:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #38bdf8;
  --brand-2: #8b5cf6;
  --brand-3: #ec4899;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(139, 92, 246, 0.22), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 72%);
  z-index: -1;
}

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

button,
input {
  font: inherit;
}

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #0f766e, #2563eb 48%, #9333ea);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.38);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(148, 163, 184, 0.12);
}

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

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

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

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

.hero-slide {
  display: none;
  min-height: 590px;
  padding: clamp(28px, 5vw, 70px);
  background-position: center;
  background-size: cover;
}

.hero-slide.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 14px;
  border: 1px solid rgba(56, 189, 248, 0.36);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.movie-card-tags,
.detail-tags,
.channel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span,
.movie-card-tags span,
.detail-tags span,
.channel-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.46);
  font-size: 13px;
}

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

.btn,
.btn-secondary,
.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn {
  color: #06111f;
  background: linear-gradient(135deg, #67e8f9, #a78bfa 55%, #f0abfc);
  box-shadow: 0 16px 42px rgba(56, 189, 248, 0.24);
}

.btn-secondary,
.filter-chip {
  color: #e2e8f0;
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.72);
}

.btn:hover,
.btn-secondary:hover,
.filter-chip:hover,
.filter-chip.is-active {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.58);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.hero-poster::after,
.poster::after,
.rank-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.72));
}

.hero-controls {
  position: absolute;
  left: clamp(28px, 5vw, 70px);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
  transition: 0.22s ease;
}

.hero-dot.is-active {
  width: 56px;
  background: #fff;
}

.section-block {
  margin-top: 52px;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.section-head p,
.page-title p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.22);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 211, 252, 0.42);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.34);
}

.poster {
  position: relative;
  display: block;
  min-height: 255px;
  background-color: #0f172a;
  background-position: center;
  background-size: cover;
}

.poster-badge,
.poster-type {
  position: absolute;
  z-index: 1;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.poster-badge {
  left: 12px;
}

.poster-type {
  right: 12px;
}

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

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card h3 a:hover {
  color: #7dd3fc;
}

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

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

.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 211, 252, 0.48);
}

.category-card span {
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 500;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 26px;
  align-items: start;
}

.rank-panel,
.search-panel,
.info-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: 0.22s ease;
}

.rank-item:hover {
  border-color: var(--line-strong);
  background: rgba(148, 163, 184, 0.10);
}

.rank-number {
  color: #67e8f9;
  font-size: 18px;
  font-weight: 900;
}

.rank-poster {
  position: relative;
  overflow: hidden;
  width: 58px;
  height: 76px;
  border-radius: 13px;
  background-position: center;
  background-size: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small {
  color: var(--muted);
  font-size: 13px;
}

.rank-arrow {
  color: var(--muted);
  font-size: 24px;
}

.search-panel {
  padding: 18px;
  margin: 24px 0;
}

.search-line {
  display: flex;
  gap: 12px;
}

.search-input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  outline: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.68);
}

.search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.empty-state {
  display: none;
  padding: 46px;
  text-align: center;
  color: var(--muted);
}

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

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

.breadcrumb a:hover {
  color: #fff;
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.20), transparent 24rem),
    rgba(2, 6, 23, 0.42);
}

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

.play-layer span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-icon {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(135deg, #67e8f9, #a78bfa);
  color: #06111f;
  font-size: 34px;
  box-shadow: 0 22px 60px rgba(56, 189, 248, 0.32);
}

.video-caption {
  display: block;
  margin-top: 14px;
  color: var(--muted);
}

.info-panel {
  padding: 24px;
}

.detail-cover {
  min-height: 420px;
  margin-bottom: 22px;
  border-radius: 24px;
  background-position: center;
  background-size: cover;
}

.detail-title h1 {
  margin-top: 0;
}

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

.detail-meta div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.detail-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta strong {
  display: block;
  margin-top: 3px;
}

.article-panel {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.article-panel h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.article-panel p {
  margin: 0 0 18px;
  color: var(--muted-strong);
  text-align: justify;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer p,
.copyright {
  color: var(--muted);
}

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

.footer-links a {
  color: var(--muted-strong);
}

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

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

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

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

@media (max-width: 760px) {
  .header-inner,
  .page-shell,
  .footer-inner,
  .copyright {
    width: min(100% - 24px, 1240px);
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 76px;
    left: 12px;
    right: 12px;
    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);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 14px;
  }

  .brand-text small {
    display: none;
  }

  .hero-slider,
  .hero-slide {
    min-height: 690px;
  }

  .hero-slide.is-active {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster {
    max-width: 250px;
    justify-self: center;
  }

  .hero-controls {
    left: 24px;
    bottom: 20px;
  }

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

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

  .poster {
    min-height: 210px;
  }

  .search-line {
    flex-direction: column;
  }

  .detail-cover {
    min-height: 320px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

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

  .hero-content h1,
  .hero-content h2 {
    font-size: 36px;
  }
}
