:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #1e293b;
  --card-light: #273449;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #f59e0b;
  --brand-dark: #d97706;
  --line: rgba(148, 163, 184, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 30%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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;
}

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

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #f97316);
  color: white;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

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

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: 0.25s ease;
}

.site-nav a:hover {
  color: white;
  background: rgba(245, 158, 11, 0.16);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.12);
  color: white;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  height: min(720px, 74vh);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 4%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.18)), linear-gradient(to right, #020617 0%, rgba(2, 6, 23, 0.78) 36%, transparent 74%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-content h1,
.hero-content h2 {
  width: min(720px, 100%);
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-content p {
  width: min(660px, 100%);
  margin: 0 0 26px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 13px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.hero-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  border: 1px solid var(--line);
}

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

.btn-primary,
.btn-ghost,
.top-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.25s ease;
}

.btn-primary,
.top-search button {
  border: 0;
  background: var(--brand);
  color: white;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover,
.top-search button:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: #fbbf24;
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.42);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.search-band,
.strip-section {
  background: rgba(15, 23, 42, 0.55);
  border-block: 1px solid var(--line);
}

.search-panel {
  padding: 32px 0;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 28px;
  align-items: center;
}

.search-panel h2,
.section-heading h2,
.sub-hero h1,
.detail-copy h1,
.text-panel h2,
.info-panel h2 {
  margin: 0;
  color: white;
}

.search-panel h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.top-search,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.top-search input,
.search-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(2, 6, 23, 0.68);
  color: white;
  outline: 0;
  padding: 0 16px;
}

.top-search input:focus,
.search-input:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.page-section {
  padding: 64px 0;
}

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: #fbbf24;
  font-weight: 800;
}

.movie-grid,
.feature-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--card-light);
  box-shadow: var(--shadow);
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.85);
}

.card-poster.widescreen {
  aspect-ratio: 16 / 9;
}

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

.movie-card:hover .card-poster img,
.category-tile:hover img,
.rank-item:hover img {
  transform: scale(1.08);
}

.card-body {
  padding: 17px;
}

.card-body h3 {
  min-height: 46px;
  margin: 10px 0 8px;
  color: white;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.card-body small {
  color: #64748b;
}

.card-chip,
.card-badge {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
}

.card-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
}

.movie-card-large {
  position: relative;
}

.movie-card-large .card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.08));
}

.overlay-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}

.overlay-body h3 {
  min-height: 0;
  font-size: 22px;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 150px;
}

.horizontal-card .card-body h3 {
  min-height: 0;
}

.horizontal-poster {
  height: 100%;
  aspect-ratio: auto;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
}

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

.deep-strip {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(15, 23, 42, 0.82));
}

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  transition: transform 0.45s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.18));
}

.category-tile span {
  color: white;
  font-size: 23px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  line-height: 1.65;
  font-size: 14px;
}

.sub-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 70px;
  background: radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.18), transparent 30%), linear-gradient(135deg, #020617, #0f172a 68%, #111827);
  border-bottom: 1px solid var(--line);
}

.sub-hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: -0.05em;
}

.sub-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  line-height: 1.8;
  font-size: 18px;
}

.breadcrumb,
.breadcrumbs a {
  color: #fbbf24;
  font-weight: 800;
}

.filter-bar {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.65);
}

.filter-hint {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 82px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.78);
  transition: 0.25s ease;
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--card-light);
}

.rank-item strong {
  color: #fbbf24;
  font-size: 24px;
}

.rank-item img {
  width: 82px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
  transition: transform 0.4s ease;
}

.rank-item b,
.rank-item small {
  display: block;
}

.rank-item b {
  margin-bottom: 6px;
  color: white;
}

.rank-item small {
  color: var(--muted);
  line-height: 1.5;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 46px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
}

.detail-copy h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: 19px;
  line-height: 1.8;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

.detail-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
  color: var(--muted-strong);
  border: 1px solid var(--line);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.2));
  color: white;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.3);
  font-size: 28px;
  text-indent: 4px;
}

.player-overlay b {
  font-size: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 24px;
  align-items: start;
}

.content-main {
  display: grid;
  gap: 22px;
}

.text-panel,
.info-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  padding: 26px;
}

.text-panel h2,
.info-panel h2 {
  margin-bottom: 16px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.95;
  font-size: 16px;
}

.info-grid {
  display: grid;
  gap: 12px;
}

.info-cell {
  padding: 14px;
  border-radius: 15px;
  background: rgba(30, 41, 59, 0.72);
}

.info-cell span,
.info-cell strong {
  display: block;
}

.info-cell span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.info-cell strong {
  color: white;
  line-height: 1.6;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #020617;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 14px;
}

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

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1000px) {
  .movie-grid,
  .compact-grid,
  .feature-grid,
  .feature-grid.two-row,
  .category-grid,
  .full-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-panel,
  .detail-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 360px;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
  }

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

  .hero-slider {
    min-height: 560px;
    height: 74vh;
  }

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

  .movie-grid,
  .compact-grid,
  .feature-grid,
  .feature-grid.two-row,
  .category-grid,
  .full-rank {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .footer-inner,
  .top-search,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .horizontal-card {
    grid-template-columns: 1fr;
  }

  .horizontal-poster {
    aspect-ratio: 16 / 9;
  }

  .rank-item {
    grid-template-columns: 42px 70px 1fr;
  }

  .rank-item img {
    width: 70px;
    height: 48px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
