* {
  box-sizing: border-box;
}

:root {
  --bg: #050505;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-strong: #1f2937;
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --weak: #94a3b8;
  --amber: #f59e0b;
  --amber-soft: #fde68a;
  --amber-dark: rgba(245, 158, 11, 0.14);
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 30rem),
    linear-gradient(180deg, #030712 0%, #0b1120 45%, #000000 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(30, 41, 59, 0.94), rgba(17, 24, 39, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

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

.brand-text {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  background: linear-gradient(90deg, #fde68a, #fbbf24, #f8fafc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-weight: 600;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--amber);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 1.6rem;
}

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

.hero {
  position: relative;
  min-height: 560px;
  height: 68vh;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.45;
  z-index: -3;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.24)),
    linear-gradient(180deg, rgba(3, 7, 18, 0.2), rgba(3, 7, 18, 0.95));
  z-index: -1;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 72px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.88rem;
  font-weight: 800;
}

.hero h1 {
  max-width: 820px;
  margin: 22px 0 16px;
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  background: linear-gradient(90deg, #fff7ed, #fbbf24, #f8fafc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.8;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button.primary {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.24);
}

.button.ghost {
  color: var(--text);
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--line);
}

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

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

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

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

.section {
  padding: 44px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--weak);
}

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

.movie-card,
.category-card,
.rank-card,
.info-panel,
.filter-panel,
.player-panel,
.detail-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.92), rgba(15, 23, 42, 0.92));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.movie-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(15, 23, 42, 0.95));
}

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

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

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  color: #111827;
  background: var(--amber);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--weak);
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span,
.meta-pill {
  display: inline-flex;
  padding: 5px 9px;
  color: var(--amber-soft);
  background: var(--amber-dark);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  font-size: 0.78rem;
}

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

.category-card {
  padding: 24px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.75;
}

.category-preview {
  display: flex;
  gap: 10px;
  margin: 18px 0;
}

.category-preview img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--panel-strong);
}

.filter-panel {
  padding: 18px;
  margin-bottom: 26px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(120px, 0.7fr));
  gap: 12px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  padding: 0 14px;
  outline: none;
}

.filter-count {
  margin: 12px 0 0;
  color: var(--weak);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 112px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
}

.rank-index {
  font-size: 2rem;
  font-weight: 900;
  color: var(--amber);
  text-align: center;
}

.rank-card img {
  width: 112px;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--panel-strong);
}

.rank-card h2,
.rank-card h3 {
  margin: 0 0 8px;
}

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

.hot-score {
  min-width: 92px;
  text-align: center;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.8fr);
  gap: 24px;
  padding: 34px 0;
}

.player-panel {
  position: relative;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.36), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-size: 2.2rem;
  box-shadow: 0 0 46px rgba(245, 158, 11, 0.38);
}

.play-overlay.is-hidden {
  display: none;
}

.detail-panel {
  padding: 24px;
  margin-top: 24px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 20px;
}

.detail-panel h2 {
  color: var(--amber);
  margin-top: 28px;
}

.detail-panel p {
  color: var(--muted);
  line-height: 1.9;
}

.side-poster {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  color: var(--amber-soft);
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.site-footer p,
.site-footer a {
  color: var(--weak);
  line-height: 1.8;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.empty-state {
  padding: 40px;
  color: var(--weak);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

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

  .detail-layout,
  .footer-grid,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 54px 90px 1fr;
  }

  .hot-score {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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

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

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

  .nav-links a {
    padding: 12px;
  }

  .hero {
    min-height: 560px;
    height: auto;
  }

  .hero-content {
    padding-top: 84px;
  }

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-card {
    grid-template-columns: 46px 78px 1fr;
    gap: 12px;
  }

  .rank-card img {
    width: 78px;
    height: 106px;
  }
}

@media (max-width: 460px) {
  main,
  .nav-wrap,
  .footer-grid,
  .copyright {
    width: min(100% - 22px, 1180px);
  }

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

  .movie-card p {
    min-height: auto;
  }
}
