:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c33;
  --panel-glass: rgba(15, 23, 42, 0.78);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --amber: #f59e0b;
  --orange: #ea580c;
  --blue: #38bdf8;
  --violet: #a78bfa;
  --pink: #f472b6;
  --green: #34d399;
  --red: #f87171;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% -8%, rgba(245, 158, 11, 0.18), transparent 30%),
    radial-gradient(circle at 86% 6%, rgba(56, 189, 248, 0.13), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  line-height: 1.65;
}

body.no-scroll {
  overflow: hidden;
}

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

img,
video {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
  font-size: 18px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fcd34d, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-subtitle {
  margin-top: 5px;
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
}

.desktop-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 13px;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.95);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: rgba(51, 65, 85, 0.66);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.icon-button:hover {
  background: rgba(245, 158, 11, 0.9);
  transform: translateY(-1px);
}

.mobile-only {
  display: none;
}

.search-panel {
  display: none;
  border-top: 1px solid var(--border);
}

.search-panel.is-open {
  display: block;
}

.search-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px 18px;
}

.search-input,
.filter-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
  border-radius: 14px;
  color: #fff;
  background: rgba(30, 41, 59, 0.92);
  padding: 13px 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.search-input:focus,
.filter-input:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.is-open {
  display: grid;
}

.mobile-link {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
}

.mobile-link.is-active,
.mobile-link:hover {
  background: rgba(245, 158, 11, 0.88);
  color: #fff;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .7s ease, transform .9s ease;
  background-position: center;
  background-size: cover;
}

.hero-slide:focus {
  outline: none;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 43%, rgba(2, 6, 23, 0.3) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 28%, rgba(2, 6, 23, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 620px;
  padding: 76px 20px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 54px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0;
  max-width: 820px;
  font-size: clamp(40px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.hero-summary {
  margin: 24px 0 0;
  max-width: 700px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-meta,
.breadcrumbs,
.movie-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.meta-pill,
.movie-meta span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 15px;
  border: 1px solid transparent;
  padding: 12px 18px;
  min-height: 48px;
  font-weight: 760;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 18px 42px rgba(234, 88, 12, 0.28);
}

.btn-ghost {
  color: #fff;
  background: rgba(15, 23, 42, 0.52);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-poster-stack {
  position: relative;
  min-height: 500px;
}

.hero-poster-main,
.hero-poster-card {
  border-radius: 26px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-poster-main {
  position: absolute;
  inset: 0 0 36px 38px;
}

.hero-poster-card {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56%;
  aspect-ratio: 3 / 4;
  background-color: #111827;
}

.hero-poster-note {
  position: absolute;
  right: 18px;
  bottom: 0;
  width: 64%;
  padding: 18px;
  border-radius: 22px;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
}

.hero-poster-note strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.hero-poster-note span {
  color: #cbd5e1;
  font-size: 13px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-control:hover {
  background: rgba(245, 158, 11, 0.92);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 5;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: #f59e0b;
}

.home-search-card {
  position: relative;
  z-index: 3;
  max-width: 1040px;
  margin: -38px auto 0;
  padding: 18px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.home-search-card .filter-input {
  min-height: 54px;
  background: rgba(2, 6, 23, 0.68);
}

.content-section {
  padding: 58px 0;
}

.content-section.alt {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.44), rgba(15, 23, 42, 0.22));
  border-block: 1px solid rgba(148, 163, 184, 0.08);
}

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

.heading-copy {
  display: flex;
  align-items: center;
  gap: 13px;
}

.heading-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.18);
}

.section-heading h1,
.section-heading h2,
.page-title h1,
.detail-title,
.movie-body h2 {
  margin: 0;
  color: #fff;
  letter-spacing: -0.025em;
}

.section-heading h2,
.page-title h1,
.movie-body h2 {
  font-size: clamp(26px, 4vw, 36px);
}

.section-heading p,
.page-title p {
  margin: 3px 0 0;
  color: var(--muted);
}

.section-link {
  color: #fbbf24;
  font-weight: 700;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background-color: #111827;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.86));
  opacity: .9;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  font-size: 13px;
  font-weight: 760;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 34px;
  padding: 0 9px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-weight: 800;
}

.movie-card-body {
  padding: 16px;
}

.movie-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.movie-title:hover {
  color: #fbbf24;
}

.rating {
  flex: 0 0 auto;
  color: #fbbf24;
  font-weight: 800;
}

.movie-desc {
  margin: 10px 0 12px;
  min-height: 46px;
  color: #94a3b8;
  font-size: 14px;
}

.movie-meta {
  gap: 7px;
}

.movie-meta span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.tag-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  border-radius: 999px;
  padding: 3px 8px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  font-size: 12px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.movie-card-horizontal .poster-frame {
  height: 100%;
  min-height: 194px;
  aspect-ratio: auto;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -48% -30% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  opacity: .18;
  background: #f59e0b;
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  position: relative;
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.category-card .btn {
  position: relative;
  min-height: 40px;
  padding: 9px 13px;
}

.page-hero {
  padding: 54px 0 30px;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), transparent);
}

.page-title {
  max-width: 860px;
}

.breadcrumbs {
  margin-bottom: 14px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumbs a {
  color: #fbbf24;
}

.filter-bar {
  margin: 28px 0 0;
  max-width: 780px;
}

.no-results {
  display: none;
  margin-top: 24px;
  padding: 22px;
  border-radius: 18px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
}

.no-results.is-visible {
  display: block;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 72px 180px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-weight: 900;
  font-size: 20px;
}

.rank-poster {
  height: 108px;
  border-radius: 16px;
  background-position: center;
  background-size: cover;
  background-color: #111827;
}

.rank-copy h2,
.rank-copy h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-copy p {
  margin: 0 0 10px;
  color: #94a3b8;
}

.watch-section {
  padding: 36px 0 60px;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.player-panel,
.detail-panel,
.movie-body,
.side-panel {
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--border);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.22);
}

.player-panel {
  overflow: hidden;
}

.video-shell {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  background-position: center;
  background-size: cover;
  transition: opacity .2s ease, visibility .2s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(0, 0, 0, 0.78));
}

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

.play-round {
  position: relative;
  z-index: 3;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 24px 52px rgba(234, 88, 12, 0.42);
  font-size: 32px;
  cursor: pointer;
  transition: transform .2s ease;
}

.play-round:hover {
  transform: scale(1.08);
}

.detail-panel {
  padding: 26px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.detail-title {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.detail-meta {
  margin: 18px 0;
}

.detail-intro {
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
}

.side-panel {
  padding: 18px;
  height: fit-content;
  position: sticky;
  top: 92px;
}

.side-poster {
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  background-position: center;
  background-size: cover;
  background-color: #111827;
  margin-bottom: 16px;
}

.side-info h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.side-info dl {
  margin: 0;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.side-info dt {
  color: #94a3b8;
}

.movie-body {
  margin-top: 24px;
  padding: 30px;
}

.movie-body h2 {
  margin-top: 0;
}

.movie-body p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 16px;
}

.related-grid {
  margin-top: 24px;
}

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-poster-stack {
    display: none;
  }

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

  .side-panel {
    position: static;
  }
}

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

  .mobile-only {
    display: inline-grid;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 54px;
    padding-bottom: 82px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .movie-grid.grid-2,
  .movie-grid.grid-3,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card-horizontal {
    display: block;
  }

  .movie-card-horizontal .poster-frame {
    aspect-ratio: 16 / 10;
    min-height: auto;
  }

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

  .rank-item {
    grid-template-columns: 52px 92px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .rank-poster {
    height: 84px;
  }

  .detail-panel,
  .movie-body {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    height: 64px;
    padding: 0 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .movie-grid,
  .movie-grid.grid-2,
  .movie-grid.grid-3,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .home-search-card {
    margin-left: 14px;
    margin-right: 14px;
  }
}


.mini-links {
  position: relative;
  margin: 12px 0 18px;
  display: grid;
  gap: 7px;
}

.mini-links a {
  color: #cbd5e1;
  font-size: 14px;
}

.mini-links a:hover {
  color: #fbbf24;
}
