:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(255, 255, 255, 0.10);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --yellow: #facc15;
  --orange: #f97316;
  --blue: #60a5fa;
  --radius: 22px;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.30);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617 0%, #0f172a 38%, #111827 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.25);
}

.brand-text {
  font-size: 22px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--soft);
  font-size: 15px;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--yellow);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--soft);
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--yellow);
  background: rgba(255, 255, 255, 0.06);
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.star-field {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
    radial-gradient(2px 2px at 60px 70px, #ffffff, transparent),
    radial-gradient(1px 1px at 50px 50px, #ffffff, transparent),
    radial-gradient(1px 1px at 130px 80px, #ffffff, transparent),
    radial-gradient(2px 2px at 90px 10px, #ffffff, transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: starMove 200s linear infinite;
}

@keyframes starMove {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-200px);
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(250, 204, 21, 0.18), transparent 32%),
    radial-gradient(circle at 82% 30%, rgba(96, 165, 250, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), #0f172a 88%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 46px;
  padding: 74px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 999px;
  color: var(--yellow);
  background: rgba(250, 204, 21, 0.08);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.hero p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.25);
}

.btn-ghost {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.hero-panel {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  pointer-events: none;
  box-shadow: var(--shadow);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.08) 100%);
}

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

.hero-copy .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.meta-pill,
.card-meta span,
.tag-row span,
.detail-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.meta-pill {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.hero-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}

.hero-copy p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin: 0 0 18px;
  color: #dbe4ee;
  font-size: 16px;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 26px;
  top: 26px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

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

.section {
  padding: 76px 0;
}

.section.alt {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.52), rgba(15, 23, 42, 0.52));
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.section-link {
  color: var(--yellow);
  font-weight: 700;
}

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

.stat-card,
.category-card,
.panel-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
}

.stat-card {
  padding: 24px;
  text-align: center;
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--yellow);
  font-size: 34px;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.70);
}

.featured-grid .poster-link {
  aspect-ratio: 4 / 5;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.05));
  transition: opacity 0.3s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 9px;
  border-radius: 9px;
  color: #111827;
  background: rgba(250, 204, 21, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: rgba(250, 204, 21, 0.94);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding-top: 12px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.card-meta span,
.detail-pill {
  padding: 7px 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.08);
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.25s ease;
}

.featured-grid .movie-card h3 {
  font-size: 22px;
}

.movie-card:hover h3 {
  color: var(--yellow);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  padding: 6px 8px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.95);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-bottom: 28px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(250, 204, 21, 0.56);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.08);
}

.category-card {
  display: grid;
  min-height: 220px;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 204, 21, 0.50);
}

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

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

.category-card .mini-list {
  display: grid;
  gap: 8px;
  margin-top: auto;
  color: var(--soft);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(250, 204, 21, 0.42);
}

.rank-number {
  color: var(--yellow);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 78px;
  height: 108px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-meta {
  color: var(--soft);
  font-size: 14px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 48px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 22% 16%, rgba(250, 204, 21, 0.16), transparent 30%),
    radial-gradient(circle at 78% 10%, rgba(96, 165, 250, 0.12), transparent 34%);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.7;
}

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

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

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

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
}

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

.player-button {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.32);
  font-size: 30px;
}

.player-title {
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}

.player-title h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
}

.player-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-card {
  padding: 28px;
}

.detail-card + .detail-card {
  margin-top: 22px;
}

.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.detail-card p {
  margin: 0 0 16px;
  color: var(--soft);
  line-height: 1.88;
}

.detail-card p:last-child {
  margin-bottom: 0;
}

.side-card {
  position: sticky;
  top: 100px;
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.25s ease;
}

.related-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.related-item img {
  width: 74px;
  height: 104px;
  border-radius: 10px;
  object-fit: cover;
}

.related-item h3 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

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

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

.site-footer p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.25s ease;
}

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

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.68);
}

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

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

  .hero-panel {
    min-height: 520px;
  }

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

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

  .side-card {
    position: static;
  }
}

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

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

  .hero {
    min-height: auto;
  }

  .hero-grid {
    padding: 48px 0;
  }

  .hero-panel {
    min-height: 460px;
  }

  .section {
    padding: 54px 0;
  }

  .section-head {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 14px;
  }

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

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

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

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

  .rank-meta {
    grid-column: 3 / 4;
  }

  .detail-card {
    padding: 22px;
  }
}
