:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-900), var(--slate-800));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.25);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--amber-500);
  color: var(--white);
  font-size: 14px;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(420px, 44vw);
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  padding: 11px 16px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.56);
}

.header-search button,
.nav-toggle {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-500);
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.nav-toggle:hover {
  background: var(--amber-600);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: var(--amber-400);
  background: rgba(255, 255, 255, 0.08);
}

.hero-slider {
  position: relative;
  height: 600px;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 700px;
  color: var(--white);
}

.hero-meta,
.hero-tags,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.96);
  color: var(--white);
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 600;
}

.hero-content h1 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  margin: 0 0 20px;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  margin-top: 28px;
}

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

.btn-primary {
  color: var(--white);
  background: var(--amber-500);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
  background: var(--amber-600);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 36px;
  background: var(--amber-500);
}

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

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

.section-title h2,
.rank-column h2,
.text-card h2,
.player-card h2,
.side-card h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-title span {
  color: var(--amber-600);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

.movie-card a {
  display: block;
  height: 100%;
}

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.movie-card-tall .movie-poster {
  aspect-ratio: 2 / 3;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 56%);
  opacity: 0.82;
}

.poster-year,
.poster-region {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  top: 12px;
  right: 12px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.poster-region {
  left: 12px;
  bottom: 12px;
  background: var(--amber-500);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--amber-600);
}

.movie-info p {
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.movie-tags span,
.tag-cloud span {
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--slate-700);
  background: var(--slate-100);
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 26px;
  border-radius: var(--radius-lg);
  color: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px) scale(1.01);
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.95;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.cat-1::before { background: linear-gradient(135deg, #1d4ed8, #06b6d4); }
.cat-2::before { background: linear-gradient(135deg, #d97706, #facc15); }
.cat-3::before { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.cat-4::before { background: linear-gradient(135deg, #be123c, #f97316); }
.cat-5::before { background: linear-gradient(135deg, #0f766e, #22c55e); }
.cat-6::before { background: linear-gradient(135deg, #db2777, #fb7185); }
.cat-7::before { background: linear-gradient(135deg, #4f46e5, #0ea5e9); }
.cat-8::before { background: linear-gradient(135deg, #334155, #f59e0b); }

.category-tile span,
.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
}

.category-symbol {
  margin-bottom: 42px;
  font-size: 15px;
  font-weight: 900;
  opacity: 0.76;
}

.category-tile strong {
  margin-bottom: 10px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.category-tile em {
  max-width: 260px;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  line-height: 1.7;
}

.slate-panel {
  background: linear-gradient(180deg, var(--slate-900), var(--slate-800));
}

.slate-panel .section-title h2 {
  color: var(--white);
}

.slate-panel .section-title span {
  color: var(--amber-400);
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 22px;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

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

.ranking-grid.single {
  grid-template-columns: 1fr;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 68px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.compact-card img {
  width: 68px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-800);
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  color: var(--slate-800);
  line-height: 1.35;
}

.compact-card em {
  margin-top: 7px;
  color: var(--slate-500);
  font-size: 13px;
  font-style: normal;
}

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-500);
  font-weight: 900;
}

.section-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.page-hero {
  padding: 72px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.28), transparent 30%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero h1 {
  margin: 12px 0 14px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(245, 158, 11, 0.9);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
}

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

.local-search {
  width: min(560px, 100%);
  margin-top: 28px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.local-search input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 14px;
  padding: 15px 16px;
  color: var(--slate-900);
  background: var(--white);
}

.ranking-page {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

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

.rank-column h2 {
  margin-bottom: 18px;
}

.detail-hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 58px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--slate-800);
}

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-copy p {
  max-width: 760px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  padding: 52px 0 0;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.player-card,
.text-card,
.side-card {
  overflow: hidden;
  margin-bottom: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.09);
}

.player-card h2,
.text-card h2,
.side-card h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.45));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-500);
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.35);
  font-size: 28px;
}

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

.text-card p {
  margin: 0;
  color: var(--slate-700);
  line-height: 2;
  font-size: 16px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.side-card dt {
  color: var(--slate-500);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: var(--slate-800);
  line-height: 1.6;
}

.side-card a {
  color: var(--amber-600);
  font-weight: 800;
}

.site-footer {
  margin-top: 64px;
  color: var(--slate-300);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-grid p {
  max-width: 420px;
  margin: 16px 0 0;
  color: var(--slate-300);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 17px;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 10px 0;
  color: var(--slate-300);
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: var(--amber-400);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--slate-500);
  font-size: 14px;
}

[data-card].is-hidden {
  display: none;
}

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

  .ranking-page,
  .ranking-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header-main {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .site-logo {
    font-size: 21px;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

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

  .site-nav {
    display: none;
    padding: 12px 0 16px;
    flex-direction: column;
    align-items: stretch;
  }

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

  .site-nav a {
    width: 100%;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

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

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

  .detail-cover {
    max-width: 280px;
  }

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

@media (max-width: 520px) {
  .container,
  .header-main,
  .site-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

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

  .category-tile {
    min-height: 190px;
  }

  .compact-card {
    grid-template-columns: auto 58px minmax(0, 1fr);
  }

  .compact-card img {
    width: 58px;
    height: 76px;
  }

  .player-card,
  .text-card,
  .side-card {
    padding: 18px;
  }
}
