:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(2, 6, 23, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft-text: #cbd5e1;
  --gold: #f59e0b;
  --gold-soft: #fbbf24;
  --rose: #fb7185;
  --cyan: #22d3ee;
  --green: #34d399;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(245, 158, 11, 0.22), transparent 34rem),
    radial-gradient(circle at 88% 8%, rgba(34, 211, 238, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft), #fff7ed);
  box-shadow: 0 14px 38px rgba(245, 158, 11, 0.25);
}

.brand-text {
  font-size: 1.08rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft-text);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: white;
  background: rgba(148, 163, 184, 0.12);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.8);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0 34px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.15) 100%),
    radial-gradient(circle at 70% 34%, rgba(245, 158, 11, 0.18), transparent 34rem);
}

.hero-frame {
  position: relative;
  min-height: 580px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.82fr);
  gap: 36px;
  align-items: center;
  padding: 56px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.15rem, 6vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-title p {
  max-width: 720px;
  color: var(--soft-text);
  font-size: 1.08rem;
  line-height: 1.86;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.76);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.95);
}

.btn-primary {
  color: #111827;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.26);
}

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

.hero-poster {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(420px, 100%);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(34, 211, 238, 0.18), rgba(251, 113, 133, 0.2));
  filter: blur(12px);
}

.hero-poster img,
.poster-link img,
.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.16), rgba(34, 211, 238, 0.1)),
    #0f172a;
}

.hero-poster img.is-missing,
.poster-link img.is-missing,
.detail-poster img.is-missing {
  opacity: 0;
}

.hero-poster-fallback,
.poster-link::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.24), rgba(34, 211, 238, 0.18)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 12px, transparent 12px 24px),
    #0f172a;
}

.hero-control {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--gold-soft);
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
}

.quick-search {
  position: relative;
  z-index: 5;
  margin: -16px auto 0;
}

.search-panel,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

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

.filter-panel {
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 180px));
  margin: 24px 0 26px;
}

.section {
  padding: 34px 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--gold-soft);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3.5vw, 2.8rem);
  letter-spacing: -0.035em;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(15, 23, 42, 0.86);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

.poster-link img {
  border-radius: 0;
  transition: transform 0.36s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.poster-year {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 0;
  min-height: 2.6em;
  font-size: 1.05rem;
  line-height: 1.3;
}

.card-content h3 a:hover,
.rank-row a:hover,
.text-link:hover {
  color: var(--gold-soft);
}

.card-meta,
.card-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.card-desc {
  color: var(--soft-text);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span,
.meta-pill {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--soft-text);
  background: rgba(148, 163, 184, 0.08);
  font-size: 0.82rem;
}

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

.category-tile {
  min-height: 160px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.38);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  padding: 58px 0 24px;
}

.page-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(34, 211, 238, 0.08)),
    rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.category-preview {
  display: grid;
  gap: 16px;
}

.category-preview-item {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.55);
}

.preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.preview-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--soft-text);
  background: rgba(148, 163, 184, 0.08);
}

.rank-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 82px 140px 140px 100px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  font-weight: 900;
}

.detail-hero {
  padding: 42px 0 26px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
}

.detail-poster img {
  border-radius: 28px;
}

.detail-title {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

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

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.7));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-stage.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.3);
  font-size: 2rem;
}

.player-caption {
  padding: 16px 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.92);
}

.detail-section {
  padding: 24px 0;
}

.prose-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  color: var(--soft-text);
  background: rgba(15, 23, 42, 0.62);
}

.prose-panel p {
  margin: 14px 0 0;
  line-height: 2;
}

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

.footer-inner {
  align-items: center;
  min-height: 116px;
}

.footer-inner p {
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

.empty-state {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.6);
}

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

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

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

  .hero-poster {
    display: none;
  }

  .detail-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

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

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

  .main-nav {
    position: absolute;
    left: 11px;
    right: 11px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.94);
  }

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

  .hero-frame {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 32px 24px;
  }

  .hero-control {
    left: 24px;
    right: 24px;
    bottom: 22px;
  }

  .search-panel,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .section-head,
  .header-inner,
  .footer-inner {
    align-items: flex-start;
  }

  .section-head,
  .footer-inner {
    flex-direction: column;
  }

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

  .category-preview-item,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row span:not(.rank-num),
  .rank-row strong {
    display: none;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 2.2rem;
  }
}
