:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 6%, rgba(245, 158, 11, 0.14), transparent 30rem),
    radial-gradient(circle at 85% 18%, rgba(6, 182, 212, 0.10), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

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

.header-inner,
.quick-nav,
.footer-inner,
.main-wrap {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

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

.brand {
  font-size: 1.18rem;
}

.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: white;
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-nav-link,
.nav-chip {
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.quick-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 0 14px;
}

.nav-chip {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  font-size: 0.88rem;
}

.nav-chip:hover {
  color: white;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: white;
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  width: min(1220px, calc(100% - 32px));
  min-height: 78vh;
  margin: 0 auto;
  padding: 120px 0 96px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 820px;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
}

.hero-copy p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-tags,
.detail-tags,
.category-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-tags span,
.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.54);
  color: #e2e8f0;
  font-size: 0.88rem;
  backdrop-filter: blur(8px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: white;
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
  color: white;
}

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
  width: min(1220px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.48);
  transition: width 0.3s ease, background 0.3s ease;
}

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

.main-wrap {
  padding: 52px 0 76px;
}

.content-section + .content-section {
  margin-top: 70px;
}

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

.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.section-heading p:last-child,
.page-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(30, 41, 59, 0.86);
  box-shadow: var(--shadow);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

.movie-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 60%);
  opacity: 0.72;
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-year,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-year {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: rgba(245, 158, 11, 0.92);
}

.movie-info {
  padding: 16px;
}

.movie-meta-row,
.movie-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-category {
  color: var(--amber);
  font-weight: 800;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 10px 0 8px;
  overflow: hidden;
  color: white;
  font-size: 1.02rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-info h3 a:hover {
  color: var(--amber);
}

.movie-info p {
  display: -webkit-box;
  min-height: 3em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-stats span:first-child {
  color: var(--amber);
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 128px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.42);
  background: var(--panel-strong);
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(249, 115, 22, 0.96));
  font-weight: 900;
}

.rank-row img {
  width: 128px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.rank-row p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tool-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin: 22px 0 28px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.search-box input,
.year-filter {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font: inherit;
}

.year-filter {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
}

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.82)),
    var(--panel);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 36px;
  align-items: center;
  padding: 54px 0 36px;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 30px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.detail-title h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
}

.detail-title p {
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 1.06rem;
}

.info-panel {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.player-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 30px;
  background: rgba(2, 6, 23, 0.86);
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.28);
  color: white;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button-core {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: white;
  font-size: 2.1rem;
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.45);
}

.text-block {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.text-block h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.text-block p {
  margin: 0;
  color: #cbd5e1;
}

.text-block + .text-block {
  margin-top: 18px;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 36px 0;
  color: var(--muted);
}

.footer-brand {
  margin-bottom: 8px;
  color: white;
  font-size: 1.1rem;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

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

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 72vh;
  }

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

  .rank-row {
    grid-template-columns: 44px 96px minmax(0, 1fr);
  }

  .rank-row img {
    width: 96px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .quick-nav,
  .footer-inner,
  .main-wrap,
  .hero-content,
  .hero-dots {
    width: min(100% - 22px, 1220px);
  }

  .brand {
    font-size: 1rem;
  }

  .hero-copy h1,
  .detail-title h1 {
    font-size: 2.55rem;
  }

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

  .movie-grid,
  .category-grid,
  .ranking-grid,
  .category-cards,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .rank-row {
    grid-template-columns: 42px 112px minmax(0, 1fr);
  }

  .rank-row img {
    width: 112px;
  }
}
