:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.18);
  --danger: #ef4444;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.12), transparent 30rem),
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(20px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b 45%, #f97316);
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
}

.nav-search input,
.large-search input {
  min-width: 220px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input::placeholder,
.large-search input::placeholder {
  color: #64748b;
}

.nav-search button,
.large-search button,
.btn {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.nav-search button {
  padding: 7px 14px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.4s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 48%, rgba(2, 6, 23, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 0 96px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-kicker strong {
  padding: 5px 10px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  letter-spacing: 0;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 650px;
  margin: 0 0 22px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.card-chips,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #111827;
  background: var(--accent);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
  background: #fbbf24;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.68);
}

.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--accent);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(245, 158, 11, 0.88);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--accent);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  gap: 28px;
  align-items: center;
  margin-top: -52px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 8;
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.story-card h2 {
  margin: 8px 0 0;
  letter-spacing: -0.04em;
}

.search-panel p,
.section-heading p,
.page-hero p,
.story-card p,
.movie-card-body p,
.detail-one-line {
  color: var(--muted);
  line-height: 1.75;
}

.large-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.72);
}

.large-search input {
  width: 100%;
  padding: 0 10px;
}

.large-search button {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 13px;
  color: #111827;
  background: var(--accent);
  font-weight: 800;
}

.page-stack,
.inner-page {
  padding: 56px 0 72px;
}

.content-section {
  margin-bottom: 58px;
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p {
  max-width: 520px;
  margin: 0;
}

.section-more {
  color: var(--accent);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.78);
  transform: translateY(-6px);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.78));
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: rgba(245, 158, 11, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.quality-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card-body h3 {
  min-height: 44px;
  margin: 10px 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: var(--accent);
}

.movie-card-body p {
  min-height: 50px;
  margin: 0 0 12px;
  font-size: 13px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.movie-meta span + span::before {
  content: "•";
  margin-right: 8px;
  color: #475569;
}

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

.category-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-4px);
}

.category-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.category-images img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
  background: #0f172a;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.category-card em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.rank-list,
.ranking-page-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rank-link,
.ranking-page-row {
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.rank-link {
  grid-template-columns: 54px 58px 1fr auto;
  gap: 12px;
  padding: 10px;
}

.rank-link:hover,
.ranking-page-row:hover {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.78);
}

.rank-number {
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
}

.rank-link img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-score,
.big-score {
  color: var(--accent);
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 38%),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

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

.page-hero p {
  max-width: 740px;
  margin: 14px 0 0;
  font-size: 17px;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.66);
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.overview-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.overview-body p {
  color: var(--muted);
  line-height: 1.75;
}

.overview-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card-compact {
  display: grid;
  grid-template-columns: 96px 1fr;
}

.card-compact .movie-poster {
  aspect-ratio: auto;
  min-height: 136px;
}

.card-compact .movie-card-body p {
  min-height: auto;
}

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

.ranking-page-row {
  grid-template-columns: 92px 1fr auto;
  gap: 18px;
  padding: 14px;
}

.ranking-poster img {
  width: 92px;
  height: 124px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-copy h2 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.ranking-copy h2 a:hover {
  color: var(--accent);
}

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

.big-score {
  padding-right: 8px;
  font-size: 28px;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.08);
  transform: scale(1.04);
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.74) 50%, rgba(2, 6, 23, 0.36)),
    linear-gradient(0deg, #020617, transparent 55%, rgba(2, 6, 23, 0.72));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: end;
  min-height: 620px;
  padding: 110px 0 70px;
}

.detail-breadcrumb {
  grid-column: 1 / -1;
  margin-bottom: -8px;
}

.detail-poster img {
  width: 300px;
  border: 1px solid var(--line);
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  max-width: 820px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
}

.detail-one-line {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: 18px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.detail-stats span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.64);
}

.detail-stats strong {
  color: var(--accent);
}

.player-section {
  padding: 50px 0 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-trigger {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(2, 6, 23, 0.72) 58%);
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  font-size: 34px;
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.28);
}

.player-trigger span:last-child {
  font-size: 20px;
  font-weight: 900;
}

.detail-content {
  padding: 30px 0 18px;
}

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

.story-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.66);
}

.story-card p {
  margin: 16px 0 0;
  font-size: 16px;
}

.tag-cloud {
  margin-top: 20px;
}

.related-section {
  padding-bottom: 72px;
}

.search-page-form {
  max-width: 680px;
  margin-top: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 32px;
}

.footer-brand p,
.footer-links a {
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links h3 {
  margin: 0 0 6px;
}

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

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

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

  .search-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-search {
    margin-left: 0;
  }

  .hero-carousel {
    height: 560px;
  }

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

  .hero-control {
    display: none;
  }

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

  .rank-list,
  .content-columns,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .category-overview-card,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    align-items: start;
    padding-top: 92px;
  }

  .detail-poster img {
    width: 230px;
  }

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

  .ranking-poster img {
    width: 76px;
    height: 104px;
  }

  .big-score {
    grid-column: 1 / -1;
    padding-left: 94px;
  }
}

@media (max-width: 620px) {
  .container,
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-carousel {
    height: 520px;
  }

  .hero-content h1,
  .detail-copy h1 {
    letter-spacing: -0.04em;
  }

  .hero-actions,
  .large-search,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-panel,
  .page-hero,
  .story-card {
    padding: 22px;
  }

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

  .category-grid,
  .overview-preview {
    grid-template-columns: 1fr;
  }

  .card-compact {
    grid-template-columns: 84px 1fr;
  }

  .rank-link {
    grid-template-columns: 42px 52px 1fr;
  }

  .rank-score {
    display: none;
  }

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

  .movie-card-body h3 {
    font-size: 15px;
  }
}
