/*
 * Cinema-inspired visual refresh for PHP Melody / Apollo.
 * Keeps the existing template markup and PHP Melody behaviors intact.
 * Change accent colors here to rebrand the site.
 */
:root {
  --cinema-bg: #0b0d12;
  --cinema-panel: #121620;
  --cinema-panel-raised: #191f2b;
  --cinema-border: rgba(255,255,255,.09);
  --cinema-text: #f4f6fb;
  --cinema-muted: #9aa4b5;
  --cinema-accent: #8b5cf6;
  --cinema-accent-2: #ec4899;
  --cinema-radius: 14px;
  --cinema-shadow: 0 16px 42px rgba(0,0,0,.26);
}

html { background: var(--cinema-bg); scroll-behavior: smooth; }
body {
  background: var(--cinema-bg);
  color: var(--cinema-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body, #content, .container-footer { color: var(--cinema-text); }
#content { background: var(--cinema-bg); padding-bottom: 34px; }
a { color: #c4b5fd; transition: color .18s ease, opacity .18s ease; }
a:hover, a:focus { color: #f0abfc; text-decoration: none; }
img { max-width: 100%; }

/* Header and navigation */
.header-bg {
  position: relative;
  z-index: 20;
  background: rgba(12,14,20,.96);
  border-bottom: 1px solid var(--cinema-border);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
.pm-top-head { padding: 15px 24px 12px; }
.header-logo { min-height: 44px; display: flex; align-items: center; }
.header-logo h3 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.7px; }
.header-logo h3 a { color: #fff; }
.header-logo img { max-height: 48px; width: auto; }
#pm-top-search { padding-top: 4px; }
.pm-search-form .input-group { width: 100%; }
.pm-search-form .form-control {
  height: 42px;
  color: #f8fafc;
  background: #1a1f2b;
  border: 1px solid #303747;
  border-right: 0;
  border-radius: 10px 0 0 10px;
  box-shadow: none;
}
.pm-search-form .form-control::placeholder { color: #929bad; }
.pm-search-form .form-control:focus { border-color: var(--cinema-accent); box-shadow: 0 0 0 3px rgba(139,92,246,.16); }
.pm-search-form .btn { height: 42px; color: #fff; background: var(--cinema-accent); border: 1px solid var(--cinema-accent); border-radius: 0 10px 10px 0; }
.navbar-pmuser { margin: 3px 0 0; text-align: right; }
.navbar-pmuser > li { vertical-align: middle; }
.navbar-pmuser a { color: #e8eaf2; }
.navbar-pmuser .btn-default { background: #1a1f2b; border-color: #343b4b; }
.navbar-pmuser .btn-success, .navbar-pmuser .btn-primary { background: var(--cinema-accent); border-color: var(--cinema-accent); }
.pm-top-nav { padding: 0 24px; background: #10131b; border-top: 1px solid rgba(255,255,255,.035); }
.pm-top-nav .row { display: flex; align-items: center; flex-wrap: wrap; }
.pm-top-nav .nav-tabs { border: 0; margin: 0; }
.pm-top-nav .nav-tabs > li > a {
  padding: 14px 15px;
  color: #b7bfce;
  font-weight: 600;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.pm-top-nav .nav-tabs > li > a:hover,
.pm-top-nav .nav-tabs > li.open > a,
.pm-top-nav .nav-tabs > li.active > a { color: #fff; background: rgba(139,92,246,.12); }
.pm-top-nav .dropdown-menu, .navbar-pmuser .dropdown-menu {
  background: #171c27;
  border: 1px solid var(--cinema-border);
  border-radius: 10px;
  box-shadow: var(--cinema-shadow);
  padding: 7px;
}
.pm-top-nav .dropdown-menu > li > a, .navbar-pmuser .dropdown-menu > li > a { color: #d9deea; padding: 9px 12px; border-radius: 6px; }
.pm-top-nav .dropdown-menu > li > a:hover, .navbar-pmuser .dropdown-menu > li > a:hover { color: #fff; background: rgba(139,92,246,.18); }

/* Featured video / cinematic hero */
.pm-section-highlighted {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 34px;
  background: radial-gradient(ellipse at 78% 0%, rgba(139,92,246,.22), transparent 42%),
              radial-gradient(ellipse at 8% 18%, rgba(236,72,153,.10), transparent 35%),
              linear-gradient(180deg, #111521 0%, #0b0d12 100%);
  border-bottom: 1px solid var(--cinema-border);
}
.pm-section-highlighted:after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--cinema-accent), var(--cinema-accent-2), transparent 80%);
  opacity: .8;
}
#video-wrapper { max-width: 1440px; margin: 0 auto; }
.pm-video-watch-featured { max-width: 1220px; margin: 0 auto; }
.pm-video-watch-featured h2 { margin: 0 0 18px !important; font-size: clamp(22px, 3vw, 36px); line-height: 1.2; font-weight: 800; letter-spacing: -.7px; }
.pm-video-watch-featured h2 a { color: #fff; }
.pm-video-watch-featured #Playerholder { overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: var(--cinema-radius); box-shadow: 0 22px 60px rgba(0,0,0,.38); }
#preroll_placeholder { max-width: 1100px; margin: 0 auto; padding: 18px; background: #111521; border: 1px solid var(--cinema-border); border-radius: var(--cinema-radius); }

/* Content rhythm and section headings */
#content > .container { width: min(100% - 42px, 1440px); }
#content .row { margin-bottom: 22px; }
.pm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 15px; padding-bottom: 10px; border-bottom: 1px solid var(--cinema-border); }
.pm-section-head h2 { margin: 0; color: #f7f8fc; font-size: 21px; font-weight: 800; letter-spacing: -.35px; }
.pm-section-head h2 a { color: inherit; }
.pm-section-head h2 a:hover { color: #c4b5fd; }
.pm-section-head .btn-group { position: static; margin-left: auto; }
.pm-section-head .btn-group .btn { color: #dbe0ea; background: #1a1f2b; border: 1px solid #303747; border-radius: 8px; }
.pm-section-head .btn-group .btn:hover { color: #fff; background: var(--cinema-accent); border-color: var(--cinema-accent); }
.pm-featured-list-row, .pm-vbwrn-list-row, .pm-featured-cat-row { margin-top: 14px; }

/* Video cards */
ul.pm-ul-browse-videos, ul.pm-ul-carousel-videos { margin-left: -7px; margin-right: -7px; }
ul.pm-ul-browse-videos li, ul.pm-ul-carousel-videos > li { padding: 7px !important; margin-bottom: 12px; }
.thumbnail {
  margin-bottom: 8px;
  padding: 0;
  overflow: hidden;
  color: var(--cinema-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--cinema-radius);
  box-shadow: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.thumbnail:hover { transform: translateY(-3px); border-color: var(--cinema-border); background: rgba(255,255,255,.025); }
.pm-video-thumb { overflow: hidden; border-radius: 11px; background: #191e29 !important; }
.pm-video-thumb img { transition: transform .35s ease, filter .35s ease; }
.pm-video-thumb:hover img { transform: scale(1.045); filter: brightness(.9); }
.pm-video-thumb .overlay { background: linear-gradient(180deg, transparent 48%, rgba(0,0,0,.18)); }
.pm-video-thumb .pm-label-duration { right: 8px; bottom: 8px; padding: 4px 7px; font-size: 11px; font-weight: 700; background: rgba(4,6,12,.86); border: 1px solid rgba(255,255,255,.15); border-radius: 6px; }
.thumbnail .caption { padding: 10px 2px 5px; color: var(--cinema-text); }
.thumbnail .caption h3, .thumbnail .caption h3 a {
  margin: 0 0 7px;
  color: #f0f2f8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.1px;
}
.thumbnail .caption h3 a:hover { color: #c4b5fd; }
.pm-video-meta, .pm-video-meta a, .pm-video-since, .pm-video-author { color: var(--cinema-muted) !important; font-size: 11px; }
.pm-video-labels .label { padding: 4px 7px; border-radius: 5px; font-size: 10px; }
.pm-video-labels .label-featured { background: var(--cinema-accent); }
.pm-video-labels .label-pop { background: var(--cinema-accent-2); }
.pm-watch-later-add, .pm-watch-later-remove { border: 0; border-radius: 8px; }

/* Sidebar widgets, articles, and ads */
.widget { margin-bottom: 25px; padding: 0 0 14px; }
.widget .pm-section-head { margin-top: 12px; }
.pm-sidebar-articles li { padding: 10px 0; border-bottom: 1px solid var(--cinema-border); }
.pm-sidebar-articles .media-heading a { color: #eef0f7; font-weight: 700; }
.pm-sidebar-articles .ellipsis { color: var(--cinema-muted); }
.pm-ads-banner { overflow: hidden; border-radius: 10px; }

/* Forms, buttons, and common panels */
.form-control, input, select, textarea {
  color: #f3f5fb;
  background-color: #171c27;
  border-color: #303747;
  border-radius: 8px;
  box-shadow: none;
}
.form-control:focus, input:focus, select:focus, textarea:focus { color: #fff; background-color: #191f2b; border-color: var(--cinema-accent); box-shadow: 0 0 0 3px rgba(139,92,246,.14); }
.btn { border-radius: 8px; font-weight: 600; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-success { color: #fff !important; background: var(--cinema-accent); border-color: var(--cinema-accent); }
.btn-primary:hover, .btn-success:hover { background: #7c3aed; border-color: #7c3aed; }
.btn-default { color: #e3e7f0; background: #1a1f2b; border-color: #343b4b; }
.btn-default:hover, .btn-default:focus { color: #fff; background: #252c3a; border-color: #454e62; }
.alert { border-radius: 10px; }
.modal-content { color: var(--cinema-text); background: #151a25; border: 1px solid var(--cinema-border); border-radius: 14px; box-shadow: var(--cinema-shadow); }
.modal-header, .modal-footer { border-color: var(--cinema-border); }
.close { color: #fff; text-shadow: none; opacity: .7; }
.dropdown-menu { color: var(--cinema-text); }

/* Video watch page */
.pm-video-watch-main, .pm-video-watch-sidebar .widget, .pm-video-main-panels, .pm-video-watch-sidebar-normal { color: var(--cinema-text); }
.pm-video-watch-main h1, .pm-video-watch-main h2, .pm-video-main-panels h3 { color: #f7f8fc; }
.pm-video-watch-main #Playerholder, .pm-video-watch-main .video-js, .pm-video-watch-main iframe { border-radius: var(--cinema-radius); overflow: hidden; }
.pm-video-main-methods li a, .pm-video-sharing-methods li a { color: #c4b5fd; }
.pm-video-main-panels, .pm-video-watch-sidebar .widget { background: transparent; }

/* Tables and profile/community surfaces */
table { color: var(--cinema-text); }
.table > thead > tr > th, .table > tbody > tr > td, .table > tbody > tr > th { border-color: var(--cinema-border); }
.table-striped > tbody > tr:nth-of-type(odd) { background: rgba(255,255,255,.025); }
.panel, .well, .list-group-item { color: var(--cinema-text); background: var(--cinema-panel); border-color: var(--cinema-border); border-radius: 10px; }
.pagination > li > a, .pagination > li > span { color: #d5c9ff; background: #171c27; border-color: #303747; }
.pagination > .active > a, .pagination > .active > span { background: var(--cinema-accent); border-color: var(--cinema-accent); }

/* Footer */
.container-footer { margin-top: 0; padding: 22px 24px 12px; background: #080a0f; border-top: 1px solid var(--cinema-border); }
.container-footer footer { max-width: 1440px; margin: 0 auto; }
.container-footer a { color: #aeb7c8; }
.container-footer a:hover { color: #fff; }
.container-footer p { color: #778194; font-size: 12px; }
.list-social-sites a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: #171c27; border: 1px solid var(--cinema-border); border-radius: 50%; }

/* Keyboard accessibility and reduced-motion preferences */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 767px) {
  .pm-top-head { padding: 10px 12px; }
  .header-logo h3 { font-size: 21px; }
  .pm-top-nav { padding: 0 8px; }
  .pm-top-nav .nav-tabs > li > a { padding: 12px 10px; font-size: 12px; }
  .pm-section-highlighted { padding: 18px 12px 24px; }
  #content > .container { width: 100%; padding-left: 12px; padding-right: 12px; }
  .pm-video-watch-featured h2 { margin-bottom: 12px !important; font-size: 22px; }
  .pm-section-head { margin-top: 18px; }
  .pm-section-head h2 { font-size: 18px; }
  ul.pm-ul-browse-videos, ul.pm-ul-carousel-videos { margin-left: -4px; margin-right: -4px; }
  ul.pm-ul-browse-videos li, ul.pm-ul-carousel-videos > li { padding: 4px !important; }
  .thumbnail .caption h3, .thumbnail .caption h3 a { font-size: 12px; }
  .container-footer { padding: 18px 12px 8px; }
}
