:root {
  /* ── Core palette (light) ── */
  --bg:            #f5f5f0;
  --bg-card:       #ffffff;
  --bg-hover:      #f0f0eb;
  --surface:       #ebebe6;
  --overlay:       #000000;
  --border:        rgba(0,0,0,.08);
  --border-light:  rgba(0,0,0,.04);
  --shadow:        0 2px 12px rgba(0,0,0,.08);
  --shadow-popup:  0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.07);

  /* ── Typography ── */
  --text:          #1a1a1a;
  --text-muted:    #6b6b6b;
  --text-dim:      #9b9b9b;
  --color-white:   #ffffff;

  /* ── Brand ── */
  --primary:       #5a8a6a;
  --primary-h:     #487558;
  --primary-dim:   rgba(90,138,106,.12);
  --primary-text:  #ffffff;

  /* ── Semantic ── */
  --kp-color:             #c8860a;
  --imdb-color:           #b8960a;
  --gold-color:           #B8860B;
  --status-success-bg:    #e8f5ec;
  --status-success-text:  #2d7a47;
  --status-danger-bg:     #fdecea;
  --status-danger-text:   #c0392b;
  --status-warn-bg:       #fffbe6;
  --status-warn-text:     #7a5c00;
  --status-warn-text-light: #f5d078;
  --qbg:           #5a8a6a;

  /* ── Layout ── */
  --radius: 10px;
  --font:    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --trans:   .18s ease;
  --cont:    1280px;
  --gap:     16px;

  /* ── Legacy aliases (keep for compat) ── */
  --color-primary:    var(--primary);
  --color-bg:         var(--bg);
  --color-bg-card:    var(--bg-card);
  --color-bg-hover:   var(--bg-hover);
  --color-surface:    var(--surface);
  --color-border:     transparent;
  --color-text:       var(--text);
  --color-text-muted: var(--text-muted);
  --color-text-dim:   var(--text-dim);
  --color-quality:    var(--qbg);
  --color-rating-kp:  var(--kp-color);
}

/* ══ DARK THEME ══ */
[data-theme="dark"] {
  --bg:            #1c1c1c;
  --bg-card:       #222222;
  --bg-hover:      #2a2a2a;
  --surface:       #333333;
  --overlay:       #000000;
  --border:        rgba(255,255,255,.08);
  --border-light:  rgba(255,255,255,.04);
  --shadow:        0 2px 12px rgba(0,0,0,.35);
  --shadow-popup:  0 8px 40px rgba(0,0,0,.55), 0 2px 10px rgba(0,0,0,.3);

  --text:          #f0f0f0;
  --text-muted:    #999999;
  --text-dim:      #666666;
  --color-white:   #ffffff;

  --primary:       #5084de;
  --primary-h:     #3d6ec0;
  --primary-dim:   rgba(80,132,222,.15);
  --primary-text:  #ffffff;

  --kp-color:             #e8a020;
  --imdb-color:           #d4a520;
  --gold-color:           #d4a520;
  --status-success-bg:    rgba(45,122,71,.2);
  --status-success-text:  #6ecf8f;
  --status-danger-bg:     rgba(192,57,43,.2);
  --status-danger-text:   #f08070;
  --status-warn-bg:       rgba(122,92,0,.2);
  --status-warn-text:     #e8c84a;
  --status-warn-text-light: #e8c84a;
  --qbg:           #5084de;
}


*,*::before,*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-y: scroll; /* always show scrollbar to prevent shift */
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--cont);
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  box-shadow: 0 1px 0 rgba(0,0,0,.07);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 58px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.5px;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}

.logo-lord {
  color: var(--primary);
}

.logo-film {
  color: var(--text);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.nav-link {
  padding: 5px 11px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-link-top100 {
  color: var(--gold-color) !important;
  font-weight: 700;
}
.nav-link-top100:hover, .nav-link-top100.active {
  background: rgba(255,215,0,.12) !important;
  color: var(--gold-color) !important;
}

.header-search-wrap {
  flex: 1;
  position: relative;
  max-width: 420px;
  margin-left: auto;
}

.header-search-inner {
  display: flex;
  align-items: center;
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: 0 6px 0 14px;
  gap: 6px;
}

.header-search-wrap:focus-within .header-search-inner {
  background: var(--bg-card);
  box-shadow: 0 0 0 2px var(--primary), 0 4px 16px rgba(90,138,106,.12);
}

.hs-icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.hs-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
  padding: 9px 0;
  font-family: var(--font);
  -webkit-appearance: none;
  appearance: none;
}

.hs-input::placeholder {
  color: var(--text-dim);
}

.hs-input::-webkit-search-cancel-button, .hs-input::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
}

.hs-btn {
  flex-shrink: 0;
  padding: 5px 14px;
  background: var(--primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.hs-btn:hover {
  background: var(--primary-h);
}

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-popup);
  z-index: 9999;
  overflow: hidden;
  max-height: 520px;
  overflow-y: auto;
}

.sd-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(0,0,0,.04);
}

.sd-item:last-of-type {
  border-bottom: none;
}

.sd-item:hover {
  background: var(--bg-hover);
}

.sd-poster {
  width: 42px;
  height: 62px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-hover);
}

.sd-no-poster {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dim);
}

.sd-body {
  flex: 1;
  min-width: 0;
}

.sd-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.sd-year {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 13px;
}

.sd-orig {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-seasons {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3px;
}

.sd-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sd-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--primary);
  background: var(--primary-dim);
  padding: 1px 6px;
  border-radius: var(--radius);
}

.sd-country {
  font-size: 11px;
  color: var(--text-dim);
}

.sd-ratings {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  padding-top: 2px;
}

.sd-kp, .sd-imdb {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius);
  white-space: nowrap;
}

.sd-kp {
  background: var(--bg-card)3e0;
  color: var(--kp-color);
}

.sd-imdb {
  background: var(--bg-card)de0;
  color: var(--kp-color);
}

.sd-empty {
  padding: 18px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.sd-all {
  display: block;
  padding: 11px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg-hover);
  border-top: 1px solid rgba(0,0,0,.05);
}

.sd-all:hover {
  background: var(--primary-dim);
}

.nav-burger {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.burger-icon-wrap {
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
}

.burger-icon {
  color: var(--text-muted);
  transition: opacity .18s ease, transform .18s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.burger-open {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.burger-close {
  opacity: 0;
  transform: rotate(-90deg) scale(.75);
}

[aria-expanded="true"].nav-burger .burger-open {
  opacity: 0;
  transform: rotate(90deg) scale(.75);
}

[aria-expanded="true"].nav-burger .burger-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.nav-burger:hover .burger-icon { color: var(--text); }

.search-toggle {
  display: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius);
  border: none;
}

.btn-primary:hover {
  background: var(--primary-h);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--bg-hover);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  border: none;
  border-radius: var(--radius);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.section-more {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.cards-grid, .movies-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

@media (min-width: 480px) {
  .cards-grid, .movies-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .cards-grid, .movies-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .cards-grid, .movies-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1280px) {
  .cards-grid, .movies-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
  }
}

.movie-card-quality, .quality-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  background: var(--qbg);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius);
  letter-spacing: .3px;
  line-height: 1.5;
  pointer-events: none;
  z-index: 2;
}

.movie-card-rating, .rating-badge {
  position: absolute;
  bottom: 7px;
  left: 7px;
  background: rgba(0,0,0,.72);
  color: var(--status-warn-text-light);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius);
  line-height: 1.5;
  pointer-events: none;
  z-index: 2;
}

.rank-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(0,0,0,.65);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius);
  pointer-events: none;
  z-index: 2;
}

.filter-bar {
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-form, .filter-row {
  margin-bottom: 0;
}

.filter-select option {
  background: var(--bg-card);
  color: var(--text);
  padding: 4px 8px;
}

.search-empty {
  text-align: center;
  padding: 56px 20px 32px;
  color: var(--text-muted);
}

.search-empty svg {
  display: block;
  margin: 0 auto 16px;
}

.search-empty h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.search-recs {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 2px solid var(--surface);
}

.search-recs-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.search-header {
  margin-bottom: 16px;
}

.search-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.search-form {
  margin-bottom: 16px;
}

.movie-page {
  padding-bottom: 80px;
}

.movie-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 44px;
  padding: 40px 0 32px;
  align-items: start;
}

.movie-poster-wrap {
  position: relative;
  flex-shrink: 0;
}

.movie-poster-main {
  width: 260px;
  height: auto;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,.2), 0 4px 16px rgba(0,0,0,.1);
}

.movie-poster-wrap .movie-card-quality {
  top: 12px;
  right: 12px;
  font-size: 11px;
  padding: 3px 8px;
}

.movie-title-main {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -.8px;
}

/* SEO suffix "1-5 сезон смотреть онлайн" / "(2026) смотреть онлайн" */
.movie-h1-suffix {
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -.2px;
  margin-left: 6px;
}

.movie-title-orig {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.ratings-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  align-items: center;
}

.rating-kp, .rating-imdb {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 20px;
  font-weight: 800;
}

.rating-kp {
  color: var(--kp-color);
}

.rating-imdb {
  color: var(--kp-color);
}

.rating-source {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: .3px;
}

.ratings-divider {
  width: 1px;
  height: 20px;
  background: rgba(0,0,0,.12);
  align-self: center;
}

.movie-meta-list {
  margin-bottom: 24px;
}

.meta-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  align-items: baseline;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.meta-label {
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 500;
}

.meta-value {
  color: var(--text);
  line-height: 1.5;
}

.meta-value a {
  color: var(--text);
  font-weight: 500;
}

.meta-value a:hover {
  color: var(--primary);
}

.movie-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.movie-desc.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.player-section {
  margin-top: 44px;
}

.player-section .section-title {
  margin-bottom: 18px;
}

.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0a0a0a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,.2);
  isolation: isolate;
}

.player-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  z-index: 10;
}

/* Spinner under the iframe */
.player-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: playerSpin .8s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes playerSpin {
  to { transform: rotate(360deg); }
}

.player-wrap.loaded .player-spinner {
  display: none;
}

.seasons-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.season-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  text-align: center;
}

.season-link-card:hover {
  box-shadow: 0 0 0 2px var(--primary), 0 8px 24px rgba(90,138,106,.15);
}

.slc-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.slc-eps {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.slc-play {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-white);
  padding: 4px 12px;
  background: var(--primary);
  border-radius: var(--radius);
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.episode-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  cursor: pointer;
}

.episode-row:hover {
  background: var(--bg-hover);
}

.episode-row.active {
  background: var(--primary-dim);
}

.ep-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--bg-hover);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.episode-row.active .ep-num {
  background: var(--primary);
  color: var(--color-white);
}

.ep-name {
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ep-watch {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.episode-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 24px 0;
}

.ep-nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 16px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ep-nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.episode-nav > a:last-child {
  justify-content: flex-end;
  text-align: right;
}

.ep-nav-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  white-space: nowrap;
  background: var(--primary);
  border-radius: var(--radius);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 600;
}

.trailers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.trailer-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.trailer-frame {
  aspect-ratio: 16/9;
}

.trailer-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.trailer-name {
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.trivia-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.trivia-item {
  padding: 15px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.trivia-item:last-child {
  border-bottom: none;
}

.genres-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
  gap: 10px;
  margin-top: 20px;
}

.genre-full-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.genre-full-card:hover {
  background: var(--bg-hover);
}

.genre-full-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.genre-full-count {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: var(--radius);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: var(--gap);
}

.collection-card {
  display: block;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.collection-card:hover {
  background: var(--bg-hover);
}

.collection-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.collection-count {
  font-size: 13px;
  color: var(--text-dim);
}

.person-hero {
  padding: 24px 0 8px;
}

.person-name {
  font-size: clamp(24px,4vw,36px);
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--text);
}

.person-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.person-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  background: var(--primary);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-card);
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 1px 0 0 rgba(0,0,0,.06);
}

.admin-sidebar .logo {
  padding: 0 20px 20px;
  display: inline-flex;
  width: 100%;
  margin-bottom: 12px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.admin-nav-link:hover,.admin-nav-link.active {
  color: var(--text);
  border-color: var(--primary);
  background: var(--bg-hover);
}

.admin-main {
  flex: 1;
  padding: 32px;
  overflow-x: hidden;
  min-width: 0;
}

.admin-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
}

.admin-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.form-field {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 500;
}

.form-input,.form-select,.form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.form-input:focus,.form-select:focus,.form-textarea:focus {
  background: var(--bg-hover);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.btn-admin {
  padding: 9px 20px;
  background: var(--primary);
  color: var(--color-white);
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-admin:hover {
  background: var(--primary-h);
}

.alert {
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-success {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.alert-error {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,td {
  padding: 10px 13px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,.05);
}

th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: var(--bg);
}

tr:hover td {
  background: var(--bg-hover);
}

.badge {
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
}

.badge-published {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.badge-draft {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
}

.badge-type {
  background: var(--primary-dim);
  color: var(--primary);
}

.action-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-hover);
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  margin-right: 3px;
}

.action-btn:hover {
  background: var(--primary-dim);
  color: var(--primary);
}

.skeleton {
  background: linear-gradient(90deg,var(--bg-hover) 25%,#e8e8e3 50%,var(--bg-hover) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius);
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--surface);
  border-radius: var(--radius);
}

@media (max-width: 1100px) {
  .movie-hero {
    grid-template-columns: 200px 1fr;
    gap: 28px;
  }

  .movie-poster-main {
    width: 200px;
  }
}

@media (max-width: 1000px) {
  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    padding: 8px 0;
    z-index: 999;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
  }

  .main-nav.open .nav-link {
    padding: 15px 24px;
    font-size: 16px;
    border-radius: 0;
    border-bottom: 1px solid rgba(0,0,0,.04);
    color: var(--text);
  }

  .main-nav.open .nav-link:hover {
    color: var(--primary);
    background: var(--bg-hover);
  }

  .nav-burger {
    display: flex;
  }

  .logo {
    font-size: 18px;
  }

  .header-search-wrap {
    max-width: none;
  }

  .carousel-card {
    flex: 0 0 calc(100% / 4);
    width: calc(100% / 4);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  .site-header .container {
    gap: 10px;
    height: 54px;
  }

  .movie-hero {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 16px 0 12px;
  }

  .movie-poster-wrap {
    display: block;           /* poster on its own line */
    position: relative;
    width: 160px;
    margin: 0 auto 20px;      /* centered */
    flex-shrink: unset;
  }

  .movie-poster-main {
    width: 160px;
    min-width: unset;
    flex-shrink: unset;
    border-radius: var(--radius);
    display: block;
  }

  /* quality badge stays on the poster */
  .movie-poster-wrap .movie-card-quality {
    top: 10px;
    right: 10px;
  }

  .movie-info {
    flex: unset;
    min-width: 0;
  }

  .movie-title-main {
    font-size: clamp(17px, 5vw, 22px);
  }

  .meta-row {
    grid-template-columns: 100px 1fr;
    font-size: 13px;
    padding: 7px 0;
  }

  .meta-label {
    font-size: 12px;
  }

  .ratings-row {
    margin-bottom: 14px;
  }

  .rating-kp, .rating-imdb {
    font-size: 17px;
  }

  .player-section {
    margin-top: 28px;
  }

  .seasons-links-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .episode-nav {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .ep-nav-center {
    display: none;
  }

  .carousel-card {
    flex: 0 0 calc(100% / 2);
    width: calc(100% / 2);
    padding: 0 4px;
  }

  .carousel-btn {
    width: 32px;
  }

  .filter-bar {
    gap: 6px;
    margin-bottom: 16px;
  }

  .filter-link {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
  }

  .section {
    padding: 20px 0;
  }

  .section-title {
    font-size: 17px;
  }

  .section-head {
    margin-bottom: 12px;
  }

  .trailers-grid {
    grid-template-columns: 1fr;
  }

  .trivia-item {
    padding: 12px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px 8px;
    gap: 6px;
  }

  .site-header .logo {
    flex: 1;
  }

  .site-header .nav-burger {
    order: 2;
  }

  .site-header .header-search-wrap {
    order: 3;
    flex: 0 0 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .main-nav.open {
    top: 94px;
  }

  .main-nav.open .nav-link {
    font-size: 15px;
    padding: 13px 18px;
  }

  .movie-card-title {
    font-size: 11.5px;
  }

  .movie-card-info {
    padding: 6px 2px 2px;
  }

  .movie-poster-wrap {
    width: 140px;
  }

  .movie-poster-main {
    width: 140px;
  }

  .meta-row {
    grid-template-columns: 90px 1fr;
  }

  .seasons-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .episode-nav {
    grid-template-columns: 1fr;
  }

  .ep-nav-center {
    display: flex;
  }

  .search-dropdown {
    left: -12px;
    right: -12px;
    width: auto;
  }

  .section-title {
    font-size: 16px;
  }

  .movie-section {
    margin-top: 32px;
  }

  .pagination {
    gap: 3px;
  }

  .page-link {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-card {
    padding: 14px;
  }

  .collection-grid {
    grid-template-columns: 1fr;
  }

  .seo-block {
    padding: 20px 18px;
  }
}

.page-link.active {
  pointer-events: none;
  cursor: default;
}

.page-link.page-dots {
  pointer-events: none;
  cursor: default;
  background: none;
  color: var(--text-dim);
  box-shadow: none;
}

.upload-btn:hover {
  background: var(--primary-h) !important;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px rgba(90,138,106,.15);
}

.carousel-section {
  padding: 28px 0 36px;
}

.carousel-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.carousel-btn {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 3;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.carousel-btn:hover {
  background: var(--primary);
  color: var(--color-white);
}

.carousel-btn:disabled {
  opacity: .3;
  pointer-events: none;
}

.carousel-track-wrap {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.carousel-track {
  display: flex;
  gap: 0;
}

.carousel-card {
  flex: 0 0 calc(100% / 6);
  width: calc(100% / 6);
  padding: 0 6px;
  display: block;
  box-sizing: border-box;
}

.carousel-poster {
  position: relative;
  width: 100%;
  padding-top: 150%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-hover);
  box-shadow: 0 3px 14px rgba(0,0,0,.15);
}

.carousel-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.carousel-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 45%,
    rgba(0,0,0,.08) 65%,
    rgba(0,0,0,.72) 100%
  );
  border-radius: var(--radius);
  pointer-events: none;
}

.carousel-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 10px 10px;
  z-index: 2;
}

.carousel-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}

.carousel-seasons {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  padding: 5px 8px;
  line-height: 1.3;
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.carousel-quality {
  position: absolute;
  top: 7px;
  right: 7px;
  background: var(--qbg);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius);
  z-index: 3;
  pointer-events: none;
}

.carousel-poster .carousel-seasons ~ .carousel-quality {
  top: 33px;
}

.carousel-rating {
  position: absolute;
  bottom: 38px;
  left: 8px;
  background: rgba(0,0,0,.75);
  color: var(--status-warn-text-light);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius);
  z-index: 3;
  pointer-events: none;
}

@media (max-width: 900px) {
  .carousel-card {
    flex: 0 0 calc(100% / 4);
    width: calc(100% / 4);
  }
}

@media (max-width: 600px) {
  .carousel-card {
    flex: 0 0 calc(100% / 3);
    width: calc(100% / 3);
    padding: 0 4px;
  }

  .carousel-btn {
    width: 32px;
  }
}

.comments-section {
  margin: 40px 0 20px;
}

.comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  background: var(--primary);
  color: var(--color-white);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
}

.comment-form-wrap {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.comment-form-row {
  margin-bottom: 10px;
}

.comment-author-input {
  max-width: 280px;
}

.comment-text-input {
  resize: vertical;
  min-height: 80px;
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.comment-form-msg {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-top: 10px;
}

.comment-form-msg.success {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.comment-form-msg.error {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.comment-replies {
  margin-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.comment-replies .comment-item {
  background: var(--bg-hover);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.comment-time {
  font-size: 11px;
  color: var(--text-dim);
}

.comment-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
}

.comment-vote-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.comment-reply-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
}

.comment-reply-btn:hover {
  background: var(--primary-dim);
}

.comments-empty {
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px 0;
  text-align: center;
}

.reply-form-wrap {
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 10px;
}

.reply-cancel {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  margin-left: 10px;
}

.seo-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.seo-block h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.seo-block p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}

.seo-block p:last-child {
  margin-bottom: 0;
}

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--bg-card)be6;
  padding: 8px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 12px;
}

.admin-bar-info {
  color: var(--text-muted);
}

.admin-bar-info code {
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: var(--radius);
  font-size: 11px;
}

.admin-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-bar-btn {
  padding: 5px 12px;
  background: var(--primary);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.admin-bar-btn:hover {
  background: var(--primary-h);
}

.site-footer {
  margin-top: 48px;
  padding: 20px 0 24px;
  background: var(--bg-card);
  box-shadow: 0 -1px 0 rgba(0,0,0,.06);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 800px;
}

@media (max-width: 600px) {
  .footer-bottom { justify-content: flex-start; }
  .footer-bottom-right { width: 100%; }
}

/* carousel-rating and carousel-seasons removed from carousel HTML */

@media (max-width: 600px) {
  .carousel-card {
    flex: 0 0 calc(100% / 2);
    width: calc(100% / 2);
    padding: 0 4px;
  }
}

@media (max-width: 1000px) {
  .header-search-wrap {
    flex: 1;
    max-width: none;
    min-width: 0;
  }

  .hs-input {
    font-size: 13px;
  }
}

@media (max-width: 500px) {
  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 16px;
    gap: 8px;
  }

  .logo {
    flex: 0 0 auto;
  }

  .header-search-wrap {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }

  .main-nav.open {
    top: 0;
    padding-top: 56px;
  }

  .nav-burger {
    flex: 0 0 auto;
  }
}

.section {
  padding: 28px 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.mt-0 {
  margin-top: 0 !important;
}

.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-10 {
  margin-top: 10px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.mt-36 {
  margin-top: 36px;
}

.mb-4 {
  margin-bottom: 4px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.ml-auto {
  margin-left: auto;
}

.p-0 {
  padding: 0;
}

.text-muted {
  color: var(--text-muted);
}

.text-dim {
  color: var(--text-dim);
}

.text-primary {
  color: var(--primary);
}

.text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 12px;
}

.text-11 {
  font-size: 11px;
}

.font-mono {
  font-family: monospace;
}

.font-700 {
  font-weight: 700;
}

.font-600 {
  font-weight: 600;
}

.line-16 {
  line-height: 1.6;
}

.line-17 {
  line-height: 1.7;
}

.d-flex {
  display: flex;
}

.d-inline-flex {
  display: inline-flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-6 {
  gap: 6px;
}

.gap-8 {
  gap: 8px;
}

.gap-10 {
  gap: 10px;
}

.gap-12 {
  gap: 12px;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-col {
  flex-direction: column;
}

.w-100 {
  width: 100%;
}

.max-w-280 {
  max-width: 280px;
}

.max-w-480 {
  max-width: 480px;
}

.max-w-520 {
  max-width: 520px;
}

.max-w-800 {
  max-width: 800px;
}

.text-center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.word-break {
  word-break: break-all;
}

.overflow-hidden {
  overflow: hidden;
}

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bg-card {
  background: var(--bg-card);
}

.bg-hover {
  background: var(--bg-hover);
}

.rounded {
  border-radius: var(--radius);
}

.shadow {
  box-shadow: var(--shadow);
}

.padding-card {
  padding: 16px 20px;
}

.movie-slogan {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 10px;
  opacity: .8;
}

.search-result-count {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.person-works-count {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

.admin-bar-slug {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-bar-slug code {
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: var(--radius);
  font-size: 11px;
}

.seo-block a {
  color: var(--primary);
}

.seo-block a:hover {
  text-decoration: underline;
}

.page-404 {
  text-align: center;
  padding: 80px 20px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-404 h1 {
  font-size: 96px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.page-404 h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-404 p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.new-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.comment-form-note {
  font-size: 12px;
  color: var(--text-dim);
}

.icon-svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-svg-sm {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  flex-shrink: 0;
}

.info-box {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
}

.info-box-yellow {
  background: var(--bg-card)be6;
  color: var(--kp-color);
}

.info-box-green {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.player-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  font-size: 14px;
}

.player-wrap-empty {
  height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 14px;
}

.ad-container-pc {
  display: none;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
}

.ad-container-mob {
  display: none;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

.seasons-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 20px;
  overflow-x: auto;
}

.episode-subtitle {
  opacity: .6;
  font-weight: 400;
}

.episode-page-header {
  padding: 16px 0 8px;
}

.episode-title-main {
  font-size: clamp(18px,3vw,28px);
  font-weight: 800;
  margin-bottom: 6px;
}

.episode-title-sub {
  font-size: 0.8em;
  font-weight: 400;
  color: var(--text-muted);
}

.player-loading {
  height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 14px;
}

.voice-select-wrap {
  margin-bottom: 20px;
}

.episode-meta-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.episode-poster-sm {
  width: 100px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.mb-20 {
  margin-bottom: 20px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.admin-info-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  align-items: baseline;
  border-bottom: 1px solid rgba(0,0,0,.05);
}

.admin-info-label {
  color: var(--text-muted);
}

.admin-code {
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
}

.admin-section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.admin-table-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.text-danger {
  color: var(--status-danger-text);
}

.text-success {
  color: var(--status-success-text);
}

.bg-warning {
  background: var(--bg-card)be6;
}

.pre-wrap {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius);
  font-size: 11px;
  overflow: auto;
  max-height: 300px;
  line-height: 1.6;
  font-family: monospace;
  white-space: pre-wrap;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary);
  color: var(--color-white);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.page-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.page-empty h2 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text);
}

.mb-14 {
  margin-bottom: 14px;
}

.admin-redirect-chain {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  word-break: break-all;
  max-width: 300px;
}

.status-badge {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
}

.admin-logo-badge {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  align-self: flex-end;
  padding-bottom: 1px;
}

.cache-flush-btn {
  width: 100%;
  padding: 9px 12px;
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.cache-flush-btn:hover {
  background: var(--status-danger-bg);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.admin-flex-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(130px,1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.poster-preview {
  width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 10px;
  display: block;
}

.poster-preview-hidden {
  width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 10px;
  display: none;
}

.poster-upload-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 16px;
  background: var(--primary);
  color: var(--color-white);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.poster-upload-wrap:hover {
  background: var(--primary-h);
}

.admin-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.form-section-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 600;
}

.status-pending {
  background: var(--primary);
  color: var(--color-white);
}

.status-inactive {
  background: var(--bg-hover);
  color: var(--text);
}

.episode-info-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.episode-info-title {
  font-size: 18px;
  font-weight: 700;
}

.episode-info-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 600px;
}

.season-voice-row {
  display: flex;
  gap: 12px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.person-section-pt {
  padding-top: 20px;
}

.admin-log-pre {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius);
  font-size: 11px;
  overflow: auto;
  max-height: 300px;
  line-height: 1.6;
  font-family: monospace;
}

.admin-status-label {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
}

.admin-sitemap-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-404-number {
  font-size: 80px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.movie-section {
  margin-top: 48px;
}

.movie-section .section-title {
  margin-bottom: 20px;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 14px;
  background: var(--bg-hover);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.tag:hover {
  background: var(--primary-dim);
  color: var(--primary);
}

.movie-card {
  display: block;
  text-decoration: none;
}

.movie-card-poster {
  position: relative;
  width: 100%;
  padding-top: 150%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-hover);
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

.movie-card-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.movie-card-quality {
  position: absolute;
  top: 7px;
  right: 7px;
  background: var(--qbg);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius);
  z-index: 2;
}

.movie-card-rating {
  position: absolute;
  bottom: 7px;
  left: 7px;
  background: rgba(0,0,0,.75);
  color: var(--status-warn-text-light);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius);
  z-index: 2;
}

.movie-card-info {
  padding: 8px 2px 4px;
}

.movie-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text);
  margin-bottom: 4px;
}

.movie-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.movie-card-type {
  display: inline-block;
  padding: 1px 6px;
  background: var(--primary-dim);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.movie-card-year {
  font-size: 12px;
  color: var(--text-dim);
}

.movie-card-seasons {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.no-poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  color: var(--text-dim);
  font-size: 28px;
  font-weight: 900;
}

.page-header {
  padding: 20px 0 12px;
}

.page-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -.3px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 32px 0 8px;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  background: var(--bg-card);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.page-link:hover, .page-link.active {
  background: var(--primary);
  color: var(--color-white);
  box-shadow: 0 3px 10px rgba(90,138,106,.3);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 14px 0 4px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .sep {
  color: var(--text-dim);
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 500;
}

.movie-votes {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  margin-bottom: 16px;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--bg-hover);
  color: var(--text-muted);
}

.vote-btn:hover {
  background: var(--primary-dim);
  color: var(--primary);
}

.vote-btn.voted-like {
  background: var(--primary-dim);
  color: var(--primary);
}

.vote-btn.voted-dislike {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
}

.vote-count {
  font-size: 14px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  color: var(--text-dim);
  font-size: 14px;
  background: none;
  box-shadow: none;
  cursor: default;
}

.year-dropdown-wrap {
  position: relative;
}

.year-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.year-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  z-index: 500;
  padding: 6px;
  min-width: 130px;
  max-height: 300px;
  overflow-y: auto;
}

.year-dropdown.open {
  display: block;
}

.year-option {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
}

.year-option:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.year-option.active {
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 700;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -.3px;
}

.filter-bar, .filter-form, .filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  gap: 5px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.filter-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.filter-link.active {
  background: var(--primary);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(90,138,106,.25);
}

.filter-select {
  height: 36px;
  padding: 0 30px 0 14px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%236b6b6b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 110px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.filter-select:focus, .filter-select:hover {
  background-color: var(--bg-hover);
}

.filter-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
  padding: 0 4px;
}
.seasons-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.season-tab {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: all .15s ease;
}

.season-tab:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.season-tab.active {
  background: var(--primary);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(90,138,106,.25);
}

.season-tab small {
  font-size: 11px;
  opacity: .75;
  margin-left: 2px;
}

/* ============================================================
   TOP 100 PAGE
   ============================================================ */

.top100-main {
  background: var(--bg);
}

/* ---------- HERO ---------- */
.top100-hero {
  position: relative;
  background: linear-gradient(135deg, #0f1a12 0%, #1a2e1e 50%, #0f1a12 100%);
  padding: 36px 0 52px;
  overflow: hidden;
}

.top100-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(90,138,106,.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(255,215,0,.06) 0%, transparent 60%);
  pointer-events: none;
}

.top100-breadcrumb { margin-bottom: 20px; }
.top100-breadcrumb a, .top100-breadcrumb .sep, .top100-breadcrumb .current {
  color: rgba(255,255,255,.45);
  font-size: 13px;
}
.top100-breadcrumb a:hover { color: rgba(255,255,255,.8); }

.top100-hero-content {
  position: relative;
  z-index: 1;
}

.top100-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,215,0,.12);
  color: #FFD700;
  border-radius: var(--radius);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.top100-hero-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.top100-num {
  font-size: clamp(72px, 12vw, 120px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -4px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  flex-shrink: 0;
}

.top100-text {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.2;
  letter-spacing: -.5px;
}

.top100-text em {
  font-style: normal;
  color: var(--primary);
}

.top100-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.5);
  max-width: 480px;
}

/* ---------- FILTER BAR ---------- */
.top100-filter-wrap {
  background: var(--bg-card);
  border-bottom: 1px solid rgba(0,0,0,.06);
  position: sticky;
  top: 58px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.top100-filters {
  display: flex;
  gap: 4px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.top100-filters::-webkit-scrollbar { display: none; }

.top100-filter-btn {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  transition: all .15s ease;
  white-space: nowrap;
}
.top100-filter-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.top100-filter-btn.active {
  background: var(--primary);
  color: var(--color-white);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(90,138,106,.3);
}

/* ---------- PODIUM ---------- */
/* ── TOP 3 SECTION ── */
.top100-top3-section {
  padding: 32px 0 0;
  background: var(--bg);
}

.top100-top3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* single card */
.t3-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: box-shadow .15s ease, transform .15s ease;
}

.t3-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

/* rank badge */
.t3-rank {
  flex-shrink: 0;
  width: 32px;
  text-align: center;
  padding-top: 2px;
}

.t3-num {
  display: block;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.t3-card:nth-child(1) .t3-num { color: var(--gold-color); }
.t3-card:nth-child(2) .t3-num { color: var(--text-dim); }
.t3-card:nth-child(3) .t3-num { color: #a07050; }

/* poster */
.t3-poster-wrap {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 96px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.t3-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.t3-no-poster {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dim);
}

/* info */
.t3-info {
  flex: 1;
  min-width: 0;
}

.t3-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.t3-year {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.t3-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: 3px 8px;
  color: var(--text-muted);
}

.t3-card:nth-child(1) .t3-stat { background: rgba(184,134,11,.1); color: var(--gold-color); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .top100-top3 { gap: 8px; }
  .t3-card { padding: 12px; gap: 10px; }
  .t3-poster-wrap { width: 52px; height: 78px; }
  .t3-title { font-size: 13px; }
  .t3-num { font-size: 18px; }
  .top100-row { padding: 10px 14px; gap: 10px; }
  .top100-row-title { font-size: 13.5px; }
  .top100-row-right { gap: 6px; }
}

@media (max-width: 480px) {
  .top100-top3 { grid-template-columns: 1fr; }
  .top100-num { font-size: 56px; }
  .top100-text { font-size: 22px; }
  .top100-row { padding: 9px 12px; }
  .top100-row-rank { width: 28px; }
  .top100-row-num { font-size: 13px; }
}

/* ---------- RANKED LIST ---------- */
.top100-list-section {
  padding: 32px 0 48px;

}

.top100-list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--surface);
}

.top100-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.top100-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(0,0,0,.04);
  transition: background .12s ease;
}

.top100-row:last-child { border-bottom: none; }

.top100-row:hover {
  background: var(--bg-hover);
}

.top100-row-rank {
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.top100-row-num {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.top100-row-num.top10 {
  font-size: 16px;
  color: var(--primary);
}

.top100-row-poster-wrap {
  flex-shrink: 0;
}

.top100-row-poster {
  width: 42px;
  height: 62px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.top100-no-poster {
  width: 42px;
  height: 62px;
  background: var(--surface);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

.top100-row-body {
  flex: 1;
  min-width: 0;
}

.top100-row-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.top100-row:hover .top100-row-title { color: var(--primary); }

.top100-row-orig {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.top100-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.top100-row-type {
  background: var(--primary-dim);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
}

.top100-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.top100-row-kp {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 800;
  border-radius: var(--radius);
  padding: 3px 9px;
}

.top100-row-kp.kp-elite { background: rgba(255,215,0,.12); color: var(--gold-color); }
.top100-row-kp.kp-great { background: rgba(90,138,106,.1); color: var(--primary); }
.top100-row-kp.kp-good  { background: var(--bg-hover); color: var(--text-muted); }

.top100-row-play {
  color: var(--text-dim);
  opacity: 0;
  transition: opacity .15s ease;
}

.top100-row:hover .top100-row-play { opacity: 1; color: var(--primary); }

/* ---------- EMPTY ---------- */
.top100-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.top100-empty svg { opacity: .25; margin: 0 auto 16px; display: block; }
.top100-empty p { font-size: 16px; font-weight: 500; }

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .top100-hero { padding: 24px 0 36px; }
  .top100-num { font-size: 72px; letter-spacing: -3px; }
  .top100-text { font-size: 26px; }
  .top100-filter-wrap { top: 54px; }
}

/* ============================================================
   404 PAGE
   ============================================================ */

/* ============================================================
   404 PAGE — premium rewrite
   ============================================================ */

/* ============================================================
   404 PAGE
   ============================================================ */

.page-404-wrap {
  min-height: calc(100vh - 58px);
  padding: 48px 0 72px;
}

/* ── HERO ── */
.e404-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 56px;
}

/* ── SVG ── */
.e404-graphic {
  width: 100%;
  max-width: 640px;
  margin-bottom: 36px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(0,0,0,.18);
}

.e404-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ── TEXT ── */
.e404-title {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
  margin: 0 0 10px;
  line-height: 1.2;
}

.e404-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 0 32px;
  line-height: 1.65;
}

/* ── BUTTONS ── */
.e404-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.e404-actions .btn-primary,
.e404-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* ── RANDOM PICKS ── */
.e404-picks { width: 100%; }

.e404-picks-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--surface);
}

.e404-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  align-items: start;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .page-404-wrap { padding: 32px 0 56px; }
  .e404-graphic { max-width: 100%; border-radius: var(--radius); }
  .e404-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .e404-actions { flex-direction: column; align-items: stretch; max-width: 280px; }
  .e404-actions .btn-primary,
  .e404-actions .btn-secondary { justify-content: center; }
}

@media (max-width: 360px) {
  .e404-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   TOP 100 — SORT + TYPE TABS (дополнение)
   ============================================================ */

.top100-filter-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.top100-sort-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.top100-sort-tabs::-webkit-scrollbar { display: none; }

.top100-sort-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  transition: all .15s ease;
  white-space: nowrap;
}
.top100-sort-tab:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.top100-sort-tab.active {
  background: var(--primary);
  color: var(--color-white);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(90,138,106,.3);
}

.top100-type-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.top100-type-tabs::-webkit-scrollbar { display: none; }

.top100-type-tab {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  transition: all .15s ease;
  white-space: nowrap;
}
.top100-type-tab:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.top100-type-tab.active {
  background: rgba(90,138,106,.12);
  color: var(--primary);
  font-weight: 700;
}

/* stat metric in list rows */
.top100-row-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: 3px 8px;
  white-space: nowrap;
}

/* ── Nav Top100 star icon ── */
.nav-top100-star {
  margin-right: 3px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ══ THEME SWITCHER ══ */
/* ══ THEME SWITCHER ══ */
.theme-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--trans), color var(--trans);
  font-family: var(--font);
  white-space: nowrap;
  box-shadow: none;
}
.theme-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.theme-dropdown {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-popup);
  padding: 6px;
  min-width: 192px;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.theme-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  /* Non-active items slightly dimmed, active item uses primary color */
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--trans);
  user-select: none;
  border: none;
  background: none;
  width: 100%;
  font-family: var(--font);
  text-align: left;
}
.theme-option:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.theme-option.active {
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 600;
}

.theme-check {
  opacity: 0;
  color: var(--primary);
  flex-shrink: 0;
  transition: opacity .1s;
}
.theme-option.active .theme-check {
  opacity: 1;
}

/* Button icon visibility */
.theme-btn .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-btn .theme-icon-auto { display: none; }
[data-theme="dark"] .theme-btn .theme-icon-dark { display: inline; }



/* Dark theme adjustments for specific elements */
[data-theme="dark"] .site-header {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--border);
}
[data-theme="dark"] .search-dropdown {
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
[data-theme="dark"] .main-nav.open {
  background: var(--bg-card);
}
[data-theme="dark"] .movie-card:hover .movie-card-poster {
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
[data-theme="dark"] .top100-hero {
  background: linear-gradient(135deg, #0a0f0c 0%, #111a13 50%, #0a0f0c 100%);
}
[data-theme="dark"] .top100-filter-wrap {
  background: var(--bg-card);
  box-shadow: 0 1px 0 var(--border);
}
[data-theme="dark"] .top100-list {
  background: var(--bg-card);
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
[data-theme="dark"] .top100-podium-section {
  background: var(--bg);
}
[data-theme="dark"] .top100-top3-section {
  background: var(--bg);
}
[data-theme="dark"] .t3-card {
  background: var(--bg-card);
}
[data-theme="dark"] .t3-card:nth-child(1) .t3-stat {
  background: rgba(184,134,11,.15);
}
/* 404 SVG uses hardcoded dark gradient — looks good in both themes */


/* ── Close button inside mobile nav ── */
.nav-close-btn {
  display: none;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 20px 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 100%;
  line-height: 0;
}
.nav-close-btn:hover { color: var(--text); }
.main-nav.open .nav-close-btn { display: flex; }