:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #cbd5e1;
  --brand: #f59e0b;
  --brand-strong: #d97706;
  --rose: #fb7185;
  --green: #34d399;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 0%, rgba(79, 70, 229, 0.22), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  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 rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover {
  color: var(--brand);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  gap: 14px;
  flex-wrap: wrap;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: #111827;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.15) contrast(1.06);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, transparent 55%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.72fr;
  align-items: center;
  gap: 48px;
  min-height: 640px;
  padding: 84px 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #dbe4ef;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.section-actions,
.player-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.62);
}

.hero-poster {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  background: #111827;
}

.hero-poster-card {
  position: absolute;
  left: -24px;
  bottom: 30px;
  max-width: 240px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(14px);
}

.hero-poster-card strong,
.rank-item strong {
  display: block;
}

.meta-pills,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.meta-pills span,
.tag-row span,
.info-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
}

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

.hero-dots button {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--brand);
}

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

.section {
  margin: 0 0 64px;
}

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

.section-head h1,
.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(15, 23, 42, 0.92);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #334155);
}

.poster-image {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-image {
  transform: scale(1.05);
}

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.score-badge {
  right: 10px;
  bottom: 10px;
  min-width: 42px;
  min-height: 28px;
  padding: 0 10px;
  background: rgba(2, 6, 23, 0.82);
  color: #fbbf24;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: white;
}

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

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--brand);
}

.movie-card p {
  margin: 0 0 14px;
  color: #b6c3d1;
  font-size: 14px;
  line-height: 1.65;
}

.compact-card .movie-card-body p {
  display: none;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.24), transparent 18rem),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

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

.category-card p {
  margin: 0 0 22px;
  color: var(--subtle);
  line-height: 1.8;
}

.category-card .preview-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card .preview-line span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.42);
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.rank-item em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-item b {
  color: #fbbf24;
}

.mini-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin: 0 0 28px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

.filter-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.7);
  color: white;
  min-height: 48px;
  padding: 0 14px;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.page-title {
  margin: 0 0 32px;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.2), transparent 20rem),
    rgba(15, 23, 42, 0.7);
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: start;
  margin-bottom: 42px;
}

.detail-poster-wrap {
  position: sticky;
  top: 96px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  background: #111827;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-content .lead {
  margin: 0 0 24px;
  color: #dbe4ef;
  font-size: 18px;
  line-height: 1.85;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.info-box {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.info-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.info-box strong {
  color: white;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin: 34px 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.2);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.78));
}

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

.play-button {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  color: white;
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.32);
  cursor: pointer;
}

.article-panel {
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.7);
  margin-bottom: 24px;
}

.article-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-panel p {
  margin: 0;
  color: #dbe4ef;
  line-height: 2;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.8);
  padding: 48px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.68);
}

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

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

  .menu-toggle {
    display: flex;
  }

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

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

  .detail-poster-wrap {
    position: relative;
    top: auto;
    max-width: 360px;
  }

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero,
  .hero-inner {
    min-height: 620px;
  }

  .hero-inner {
    padding: 54px 0 74px;
    gap: 28px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-poster-card {
    left: 16px;
    right: 16px;
    bottom: 18px;
    max-width: none;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .category-grid,
  .rank-list,
  .footer-grid,
  .filter-panel,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: auto 50px 1fr;
  }

  .rank-item b {
    grid-column: 3;
  }

  .page-title,
  .article-panel {
    padding: 22px;
  }

  .footer-bottom {
    display: block;
  }
}
