:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #172033;
  --panel-glass: rgba(15, 23, 42, 0.74);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #34d399;
  --accent-dark: #059669;
  --gold: #facc15;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.15), transparent 34rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 36rem),
    linear-gradient(180deg, #020617, #0f172a 45%, #020617);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(920px, calc(100% - 32px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, .96), rgba(15, 23, 42, .94), rgba(2, 6, 23, .96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 38px rgba(0, 0, 0, .25);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

.brand {
  font-size: 22px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: #042f2e;
  box-shadow: 0 12px 30px rgba(16, 185, 129, .32);
  font-size: 14px;
}

.top-search,
.mobile-search {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(30, 41, 59, .92);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  overflow: hidden;
}

.top-search input,
.mobile-search input,
.filter-bar input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 13px 18px;
}

.top-search input::placeholder,
.mobile-search input::placeholder,
.filter-bar input::placeholder {
  color: #94a3b8;
}

.top-search button,
.mobile-search button {
  border: 0;
  color: white;
  background: var(--accent-dark);
  padding: 11px 18px;
  cursor: pointer;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
}

.desktop-nav > a,
.nav-dropdown > button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 22px 0;
  transition: color .2s ease;
}

.desktop-nav a:hover,
.nav-dropdown:hover > button,
.desktop-nav .is-active {
  color: white;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: 100%;
  width: 170px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--soft);
}

.dropdown-panel a:hover {
  background: rgba(51, 65, 85, .72);
  color: white;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(30, 41, 59, .84);
  border-radius: 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, .96);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.mobile-panel > a {
  padding: 10px 2px;
  color: var(--soft);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center right;
  transition: opacity .65s ease, transform 1.2s ease;
  display: flex;
  align-items: center;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, #020617 88%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 112px;
  max-width: 760px;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 12px;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  color: #fff;
  letter-spacing: -.04em;
  line-height: .98;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 76px);
  max-width: 880px;
}

.hero h2 {
  margin: 18px 0 0;
  color: var(--accent);
  font-size: clamp(26px, 3vw, 44px);
}

.hero-text,
.page-hero p,
.detail-line {
  color: var(--soft);
  line-height: 1.85;
  font-size: 18px;
}

.hero-text {
  max-width: 680px;
  margin: 18px 0 0;
}

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

.hero-tags {
  margin-top: 20px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(52, 211, 153, .24);
  background: rgba(16, 185, 129, .10);
  color: #bbf7d0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.tag-row.large span {
  padding: 8px 12px;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
  color: #052e2b;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  box-shadow: 0 16px 40px rgba(45, 212, 191, .22);
}

.secondary-btn {
  color: #fff;
  background: rgba(51, 65, 85, .86);
  border: 1px solid rgba(148, 163, 184, .22);
}

.ghost-btn {
  color: #bbf7d0;
  background: rgba(6, 78, 59, .3);
  border: 1px solid rgba(52, 211, 153, .2);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-controls button {
  border: 1px solid rgba(148, 163, 184, .24);
  background: rgba(15, 23, 42, .78);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  padding: 0;
  background: rgba(148, 163, 184, .45) !important;
}

.hero-dot.is-active {
  width: 28px !important;
  border-radius: 999px !important;
  background: var(--accent) !important;
}

.section {
  padding: 54px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading.compact {
  display: block;
}

.section-heading h2,
.prose-block h2,
.player-section h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 36px);
}

.section-heading > a {
  color: var(--accent);
  font-weight: 700;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

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

.movie-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, .92), rgba(15, 23, 42, .94));
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .24);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, .54);
  box-shadow: 0 24px 60px rgba(5, 150, 105, .16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.poster-link img,
.related-card img,
.ranking-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform .35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.08);
}

.poster-badge,
.poster-score {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-badge {
  top: 10px;
  left: 10px;
  color: white;
  background: rgba(5, 150, 105, .88);
}

.poster-score {
  right: 10px;
  bottom: 10px;
  color: #fef3c7;
  background: rgba(0, 0, 0, .62);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.ranking-info h2 a:hover,
.breadcrumb a:hover {
  color: var(--accent);
}

.movie-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.movie-desc {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-small .movie-info h3 {
  font-size: 16px;
}

.movie-card-small .movie-desc {
  -webkit-line-clamp: 2;
}

.category-grid,
.category-list-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-tile,
.category-card {
  display: block;
  min-height: 150px;
  border: 1px solid rgba(52, 211, 153, .18);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(6, 78, 59, .46));
  padding: 22px;
  transition: transform .22s ease, border-color .22s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, .55);
}

.category-tile span,
.category-card h2 {
  display: block;
  color: white;
  font-size: 22px;
  font-weight: 850;
  margin: 0 0 10px;
}

.category-tile p,
.category-card p {
  color: var(--soft);
  line-height: 1.75;
  margin: 0;
}

.category-icon {
  display: inline-flex;
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 16px;
}

.split-layout {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 36px;
  align-items: start;
}

.rank-panel,
.ranking-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .76);
  border: 1px solid rgba(148, 163, 184, .13);
}

.rank-item strong {
  color: var(--accent);
}

.rank-item span {
  color: #fff;
  font-weight: 700;
}

.rank-item em {
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
}

.page-main {
  min-height: 62vh;
}

.page-hero {
  padding: 64px 0 18px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
}

.filter-bar {
  width: min(680px, 100%);
  margin: 0 0 26px;
  border: 1px solid rgba(52, 211, 153, .24);
  border-radius: 999px;
  background: rgba(15, 23, 42, .82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
}

.filter-bar.wide {
  width: 100%;
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px 116px 1fr 74px;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, .82);
  border: 1px solid rgba(148, 163, 184, .14);
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #052e2b;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  font-weight: 900;
}

.ranking-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.ranking-info h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 20px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--soft);
  line-height: 1.65;
}

.ranking-score {
  color: var(--gold);
  font-size: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  padding-top: 28px;
  font-size: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: center;
  padding: 42px 0 28px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  border: 1px solid rgba(148, 163, 184, .16);
  box-shadow: var(--shadow);
}

.detail-intro h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  color: var(--soft);
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(30, 41, 59, .62);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}

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

.player-shell {
  position: relative;
  margin-top: 18px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  border: 1px solid rgba(52, 211, 153, .22);
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: white;
  background: radial-gradient(circle, rgba(5, 150, 105, .25), rgba(2, 6, 23, .62) 62%);
  cursor: pointer;
  transition: opacity .2s ease, visibility .2s ease;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #052e2b;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(45, 212, 191, .36);
}

.player-start strong {
  font-size: 20px;
}

.player-start.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.prose-block {
  padding-top: 28px;
  padding-bottom: 20px;
}

.prose-block p {
  color: var(--soft);
  font-size: 17px;
  line-height: 2;
  margin: 18px 0 0;
  background: rgba(15, 23, 42, .74);
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 24px;
  padding: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  display: block;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, .82);
  border: 1px solid rgba(148, 163, 184, .14);
}

.related-card img {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: #111827;
  margin-bottom: 10px;
}

.related-card span {
  display: block;
  color: white;
  font-weight: 800;
  line-height: 1.4;
}

.related-card small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.site-footer {
  margin-top: 52px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, .8), #020617);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 28px;
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr;
  gap: 28px;
}

.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 520px;
}

.footer-inner h3 {
  color: white;
  margin: 0 0 14px;
}

.footer-inner a:not(.footer-brand) {
  display: block;
  color: var(--soft);
  margin: 10px 0;
}

.footer-inner a:hover {
  color: var(--accent);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, .12);
  padding: 18px 0 26px;
  font-size: 14px;
}

[data-search].is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .movie-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .top-search,
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .header-inner {
    height: 64px;
  }

  .brand {
    font-size: 19px;
  }

  .hero {
    min-height: 590px;
  }

  .hero-slide {
    background-position: center;
  }

  .hero-content {
    padding-top: 64px;
    padding-bottom: 104px;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(360px, 100%);
  }

  .ranking-row {
    grid-template-columns: 46px 86px 1fr;
  }

  .ranking-score {
    grid-column: 3;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container,
  .narrow,
  .header-inner,
  .mobile-panel,
  .footer-inner,
  .copyright {
    width: min(100% - 24px, 1180px);
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero h2 {
    font-size: 25px;
  }

  .hero-text,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-list-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 38px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-row {
    grid-template-columns: 42px 1fr;
  }

  .ranking-cover {
    display: none;
  }

  .ranking-score {
    grid-column: 2;
  }

  .player-start span {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
