:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: #1e293b;
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --shadow: 0 20px 60px rgba(8, 47, 73, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.12), transparent 30rem),
    radial-gradient(circle at 95% 20%, rgba(37, 99, 235, 0.16), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
}

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

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 26px rgba(34, 211, 238, 0.25);
}

.logo-text {
  font-size: 20px;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

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

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

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.48) 42%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 96px;
  max-width: 1180px;
}

.hero-tags,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: rgba(34, 211, 238, 0.11);
  color: #67e8f9;
  font-size: 13px;
  font-weight: 700;
}

.chip.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  border-color: transparent;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.26);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

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

.hero-controls button,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 50px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

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

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

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

.home-sections {
  display: grid;
  gap: 64px;
}

.content-section {
  min-width: 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #fff;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.section-more,
.text-link {
  color: var(--cyan);
  font-weight: 750;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.movie-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #111827);
}

.card-media img,
.player-cover img,
.side-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), transparent 52%);
  opacity: 0.75;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.86);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.badge-year {
  right: 10px;
  bottom: 10px;
  background: rgba(2, 6, 23, 0.78);
  color: #fff;
}

.badge-region {
  left: 10px;
  top: 10px;
  background: rgba(6, 182, 212, 0.88);
  color: #fff;
}

.rank-badge {
  right: 10px;
  top: 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

.card-body {
  display: grid;
  gap: 9px;
  padding: 15px;
}

.card-body strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: var(--cyan);
}

.card-desc,
.card-meta,
.topic-desc,
.category-card p,
.lead-text,
.text-panel p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.75;
}

.card-desc {
  min-height: 48px;
  font-size: 14px;
}

.card-meta {
  font-size: 12px;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-line span {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  padding: 4px 8px;
  font-size: 12px;
}

.glow-panel,
.ranking-panel,
.text-panel,
.side-card,
.category-card,
.compact-hero {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.58));
  box-shadow: 0 20px 70px rgba(2, 6, 23, 0.24);
}

.glow-panel,
.ranking-panel {
  padding: 28px;
}

.topic-grid,
.category-grid {
  display: grid;
  gap: 20px;
}

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

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

.topic-card,
.category-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.topic-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.5);
}

.topic-name,
.category-card h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 850;
}

.topic-sample,
.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-sample a,
.category-samples a {
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
  padding: 6px 10px;
  font-size: 12px;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

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

.rank-card .card-media {
  height: 100%;
}

.page-hero {
  margin-bottom: 28px;
}

.compact-hero {
  position: relative;
  overflow: hidden;
  padding: 36px;
}

.compact-hero::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -90px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
  filter: blur(6px);
}

.page-hero h1 {
  position: relative;
  font-size: clamp(32px, 5vw, 52px);
}

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

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.filter-input,
.filter-select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  outline: none;
}

.filter-input {
  flex: 1;
  min-width: 220px;
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0 12px;
}

.cards-area .movie-card.is-hidden {
  display: none;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--cyan);
}

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

.detail-main {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.movie-video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  background: #020617;
}

.player-cover {
  padding: 0;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: #020617;
  transition: opacity 0.24s ease;
}

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

.player-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.22));
}

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  color: #fff;
  font-size: 32px;
  transform: translate(-50%, -50%);
  box-shadow: 0 26px 70px rgba(34, 211, 238, 0.32);
}

.detail-info,
.text-panel {
  padding: 26px;
}

.detail-info {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-info h1 {
  margin-top: 18px;
  font-size: clamp(30px, 5vw, 48px);
}

.lead-text {
  margin: 14px 0 18px;
  color: #dbeafe;
  font-size: 18px;
}

.tags .chip {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.12);
}

.text-panel h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #fff;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.side-card {
  padding: 20px;
}

.side-link {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.side-link img {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #0f172a;
}

.side-link span {
  display: grid;
  gap: 6px;
}

.side-link strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.side-link em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-inner p {
  max-width: 560px;
  margin: 12px 0 0;
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 18px;
  color: var(--muted-strong);
  font-weight: 700;
}

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

@media (max-width: 1024px) {
  .grid-six,
  .grid-four,
  .grid-three,
  .topic-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-side {
    position: static;
  }

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

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-slider {
    min-height: 560px;
    height: 76vh;
  }

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

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

  .hero-controls {
    right: 16px;
    bottom: 56px;
  }

  .hero-dots {
    left: 16px;
    bottom: 68px;
  }

  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 32px;
  }

  .grid-six,
  .grid-four,
  .grid-three,
  .topic-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-selects {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .glow-panel,
  .ranking-panel,
  .compact-hero,
  .detail-info,
  .text-panel {
    padding: 20px;
  }

  .player-play {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
