:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --muted: #94a3b8;
  --text: #f8fafc;
  --gold: #f59e0b;
  --gold-2: #fb923c;
  --blue: #38bdf8;
  --green: #34d399;
  --rose: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  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", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.24), transparent 35rem),
    radial-gradient(circle at 80% 5%, rgba(245, 158, 11, 0.15), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #071328 45%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.nav-shell,
.footer-shell,
.section-shell,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f97316);
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #fef3c7, #f59e0b, #fb923c);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 1.1s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.32)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.25) 45%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  gap: 52px;
  align-items: center;
  padding: 110px 0 130px;
}

.hero-eyebrow,
.page-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  font-weight: 700;
}

.hero-title {
  margin: 22px 0 18px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-title span {
  background: linear-gradient(90deg, #fff7ed, #f59e0b, #fb7185);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transition: 0.25s ease;
  cursor: pointer;
}

.btn.primary {
  border: 0;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fcd34d, #f97316);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.34);
}

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

.btn.primary:hover {
  background: linear-gradient(135deg, #fde68a, #fb923c);
}

.hero-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  object-fit: cover;
}

.hero-card-meta {
  position: absolute;
  right: 34px;
  bottom: 34px;
  left: 34px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(14px);
}

.hero-card-meta strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.hero-card-meta span {
  color: #cbd5e1;
}

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

.hero-dot {
  width: 42px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 0 16px;
}

.hero-search button {
  border: 0;
}

.section {
  padding: 76px 0;
}

.section.alt {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.18), rgba(88, 28, 135, 0.14));
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: #fbbf24;
  font-weight: 800;
}

.section h2,
.page-head h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-head p,
.page-head p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card,
.category-card,
.rank-item,
.detail-panel,
.filter-panel,
.player-frame {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.movie-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

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

.play-chip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fcd34d, #f97316);
  font-size: 13px;
  font-weight: 900;
}

.movie-info {
  padding: 18px;
}

.movie-title,
.rank-title {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.45;
  transition: color 0.25s ease;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0;
  color: #a5b4fc;
  font-size: 13px;
}

.movie-info p,
.rank-body p,
.detail-copy p,
.detail-panel p,
.footer-shell p {
  color: var(--muted);
  line-height: 1.75;
}

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

.compact-card .movie-cover img {
  height: 100%;
  aspect-ratio: auto;
}

.category-card {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  transition: 0.25s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background: linear-gradient(135deg, var(--card-a), var(--card-b));
  transition: opacity 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.category-card:hover::before {
  opacity: 0.32;
}

.category-card strong,
.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

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

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.category-card span {
  display: inline-flex;
  margin-top: 20px;
  color: #fbbf24;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-radius: 20px;
  padding: 14px;
}

.rank-number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: #111827;
  background: linear-gradient(135deg, #fcd34d, #f97316);
  font-weight: 950;
}

.rank-thumb img {
  width: 92px;
  height: 122px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-action {
  padding: 10px 16px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.page-hero {
  padding: 86px 0 44px;
  background:
    linear-gradient(180deg, rgba(30, 58, 138, 0.32), rgba(2, 6, 23, 0)),
    radial-gradient(circle at 22% 0%, rgba(245, 158, 11, 0.15), transparent 26rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.filter-panel {
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 28px;
}

.filter-line {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(130px, 0.45fr));
  gap: 12px;
}

.filter-input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: 0;
  border-radius: 16px;
  color: #fff;
  background: rgba(2, 6, 23, 0.58);
  padding: 0 14px;
}

.filter-select option {
  color: #0f172a;
}

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.empty-state.visible {
  display: block;
}

.detail-hero {
  padding: 34px 0 72px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 380px;
  gap: 28px;
  align-items: start;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

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

.player-cover.is-hidden {
  display: none;
}

.player-cover-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fcd34d, #f97316);
  box-shadow: 0 20px 55px rgba(245, 158, 11, 0.38);
  font-size: 32px;
}

.detail-panel {
  border-radius: 28px;
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  margin-bottom: 20px;
}

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

.detail-copy {
  margin-top: 28px;
  padding: 30px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.54);
}

.detail-copy h2 {
  margin: 28px 0 10px;
  font-size: 26px;
}

.detail-copy h2:first-child {
  margin-top: 0;
}

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

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 42px 0;
}

.footer-brand {
  color: #fbbf24;
  font-size: 22px;
  margin-bottom: 12px;
}

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

.footer-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 980px) {
  .hero-inner,
  .player-layout {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 420px;
  }

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

  .filter-line {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 68px;
    right: 16px;
    left: 16px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: grid;
  }

  .nav-link {
    padding: 13px 14px;
  }

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

  .hero-inner {
    padding-top: 90px;
    gap: 28px;
  }

  .hero-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 44px;
  }

  .section-head,
  .page-head,
  .footer-shell {
    display: block;
  }

  .poster-grid,
  .category-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

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

  .filter-line {
    grid-template-columns: 1fr;
  }

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

  .rank-action {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-number {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .rank-thumb img {
    width: 74px;
    height: 98px;
  }

  .footer-links {
    justify-content: start;
    margin-top: 20px;
  }
}
