:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --primary: #4f46e5;
  --primary-strong: #6366f1;
  --accent: #f59e0b;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.55);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(79, 70, 229, 0.22), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(14, 165, 233, 0.16), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.18);
}

.nav-search {
  display: flex;
  align-items: center;
  min-width: 235px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  overflow: hidden;
}

.nav-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 6px 10px 14px;
  color: var(--text);
  background: transparent;
}

.nav-search button {
  border: 0;
  padding: 10px 14px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 11px;
  color: #fff;
  background: rgba(15, 23, 42, 0.84);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: var(--soft);
  border-bottom: 1px solid var(--border);
}

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

.page-shell {
  padding: 42px 0 72px;
}

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

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

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

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.24) 48%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 86px;
}

.hero-copy {
  max-width: 690px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  background: rgba(79, 70, 229, 0.72);
  backdrop-filter: blur(10px);
  font-size: 14px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  max-width: 630px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.35);
}

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 70px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  opacity: 0.5;
}

.hero-dot.active {
  width: 28px;
  border-radius: 999px;
  opacity: 1;
  background: #fff;
}

.section {
  margin-top: 54px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.28);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(15, 23, 42, 0.86);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.65);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 52%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

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

.card-badge,
.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(79, 70, 229, 0.84);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
  line-height: 1.38;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card:hover .card-title {
  color: #a5b4fc;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-summary {
  display: -webkit-box;
  min-height: 62px;
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.58;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-card {
  min-height: 160px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.26), transparent 44%),
    rgba(15, 23, 42, 0.68);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.48);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 84px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(15, 23, 42, 0.88);
}

.rank-number {
  color: #a5b4fc;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  width: 84px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.7);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.rank-copy p {
  margin: 0;
  color: var(--soft);
  line-height: 1.55;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.page-hero {
  padding: 46px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 0%, rgba(99, 102, 241, 0.28), transparent 30%),
    rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.04em;
}

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

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

.breadcrumb a {
  color: #c7d2fe;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin: 28px 0 24px;
}

.filter-bar input {
  width: min(520px, 100%);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 14px 18px;
  color: var(--text);
  outline: 0;
  background: rgba(15, 23, 42, 0.76);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 26px;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 52px rgba(2, 6, 23, 0.28);
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.48);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  box-shadow: 0 0 0 18px rgba(99, 102, 241, 0.18);
  font-size: 32px;
}

.detail-card {
  padding: 26px;
}

.detail-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.04em;
}

.info-chips,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.66);
  font-size: 13px;
}

.detail-text h2,
.side-card h2 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.detail-text p {
  margin: 0 0 14px;
  color: var(--soft);
  line-height: 1.9;
}

.side-card {
  padding: 20px;
}

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

.recommend-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.48);
}

.recommend-item:hover {
  background: rgba(30, 41, 59, 0.72);
}

.recommend-item img {
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  object-fit: cover;
}

.recommend-item h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.recommend-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.74);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.footer-links a:hover {
  color: #fff;
}

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

@media (max-width: 1000px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-slider {
    height: 560px;
  }

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

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

  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .hero-slider {
    height: 520px;
  }

  .hero-content {
    padding-bottom: 96px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 34px;
  }

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

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

  .page-hero {
    padding: 28px;
  }

  .rank-item {
    grid-template-columns: 42px 70px 1fr;
  }

  .rank-meta {
    grid-column: 2 / 4;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .container,
  .header-inner,
  .mobile-panel {
    width: min(100% - 24px, 1180px);
  }

  .hero-copy h1 {
    font-size: 34px;
  }

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

  .card-title {
    min-height: 0;
  }
}
