:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #2563eb;
  --warm: #facc15;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.22), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.2), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.28);
  transform: translateZ(0);
  transition: transform 0.28s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 24px;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #e0f2fe, #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-copy em {
  margin-top: 6px;
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  position: relative;
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.22s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #7dd3fc;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
}

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

.mobile-menu.is-open {
  display: grid;
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

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

.hero-frame {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: 32px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  box-shadow: var(--shadow);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.72fr;
  align-items: center;
  gap: 36px;
  padding: 66px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.72s ease, transform 0.72s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(2, 6, 23, 0.74) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.12);
  transform: scale(1.06);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.28), transparent 28rem),
    radial-gradient(circle at 80% 68%, rgba(37, 99, 235, 0.3), transparent 24rem);
}

.hero-content,
.hero-cover,
.hero-controls {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.hero-content h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.2);
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 16px 38px rgba(14, 165, 233, 0.18);
}

.btn.primary,
.btn.small {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.58);
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-cover {
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 3 / 4.25;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.2);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
  transition: transform 0.35s ease;
}

.hero-cover:hover {
  transform: rotate(0deg) scale(1.02);
}

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

.hero-controls {
  position: absolute;
  left: 66px;
  right: 66px;
  bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  border: 1px solid rgba(226, 232, 240, 0.18);
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 30px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.22s ease, background 0.22s ease;
}

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

.section-wrap,
.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto;
}

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

.section-title h2,
.page-hero h1,
.detail-copy h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-title.stacked {
  display: grid;
  justify-content: start;
}

.compact-title {
  align-items: center;
}

.text-link {
  color: #7dd3fc;
  font-weight: 800;
}

.text-link:hover {
  color: #bae6fd;
}

.quick-search,
.search-page,
.rank-panel,
.watch-card,
.detail-main,
.page-hero,
.category-overview-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.48));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.quick-search,
.search-page {
  padding: 26px;
}

.search-box,
.mini-search {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.46);
  padding: 12px 16px;
}

.search-box.large {
  margin-bottom: 18px;
}

.search-box span {
  color: #7dd3fc;
  font-weight: 900;
}

.search-box input,
.mini-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.filter-btn {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  font-weight: 800;
}

.filter-btn.is-active,
.filter-btn:hover {
  color: #fff;
  border-color: rgba(125, 211, 252, 0.55);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.72), rgba(37, 99, 235, 0.72));
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 211, 252, 0.5);
  box-shadow: 0 28px 60px rgba(14, 165, 233, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.12) contrast(1.04);
}

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.poster-badge {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: #111827;
  background: var(--warm);
  font-size: 12px;
}

.poster-play {
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(14px);
  opacity: 0;
  padding: 8px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

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

.movie-card h3 a:hover,
.rank-copy h3 a:hover,
.detail-copy h1 a:hover {
  color: #7dd3fc;
}

.movie-meta,
.movie-desc,
.rank-copy p,
.page-hero p,
.detail-copy p,
.footer-inner p {
  color: var(--muted);
}

.movie-meta {
  margin: 0 0 8px;
  font-size: 13px;
}

.movie-desc {
  margin: 0 0 12px;
  font-size: 14px;
}

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 16rem),
    rgba(15, 23, 42, 0.58);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card span,
.category-overview-card h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 24px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: #cbd5e1;
}

.category-card em,
.category-sample-links {
  display: grid;
  gap: 6px;
  font-style: normal;
  color: #7dd3fc;
  font-size: 14px;
}

.category-overview-card {
  grid-template-columns: 140px 1fr;
  grid-column: span 2;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: start;
  gap: 24px;
}

.rank-panel {
  position: sticky;
  top: 98px;
  padding: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 84px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.36);
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.rank-row:hover {
  border-color: rgba(125, 211, 252, 0.42);
  transform: translateY(-2px);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  font-weight: 950;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

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

.rank-copy h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.rank-copy p {
  margin: 0 0 8px;
  font-size: 14px;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bae6fd;
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 34px;
  padding: clamp(32px, 6vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 20%, rgba(56, 189, 248, 0.26), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.72));
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

.category-hero {
  min-height: 310px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #7dd3fc;
}

.watch-card {
  padding: 14px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
  background:
    radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  min-width: 150px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 950;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.32);
}

.play-layer p {
  margin: 0;
  color: #e0f2fe;
  font-weight: 800;
}

.detail-main {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  margin-top: 24px;
  padding: 28px;
}

.detail-poster img {
  width: 100%;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #0f172a;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.pill-link {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.24);
  font-weight: 850;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  color: #cbd5e1;
  font-weight: 800;
  font-size: 14px;
}

.tag-row.wide {
  margin-bottom: 22px;
}

.lead-text {
  font-size: 18px;
  color: #e2e8f0;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  color: #f8fafc;
  font-size: 22px;
}

.detail-copy p {
  margin: 0 0 12px;
}

.empty-state {
  margin: 20px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 14px;
  text-align: center;
}

.footer-brand {
  color: #e0f2fe;
  font-size: 22px;
  font-weight: 950;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  color: #93c5fd;
  font-weight: 800;
}

.footer-inner p {
  margin: 0;
}

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

  .split-section,
  .hero-slide {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

  .hero-cover {
    display: none;
  }

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

  .category-overview-card {
    grid-column: auto;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .brand-copy strong {
    font-size: 20px;
  }

  .hero-frame {
    min-height: 600px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 36px 24px 86px;
  }

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

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

  .section-title,
  .compact-title {
    align-items: start;
    flex-direction: column;
  }

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-desc {
    display: none;
  }

  .category-overview-card,
  .detail-main {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 220px;
  }

  .rank-row {
    grid-template-columns: 42px 70px 1fr;
    gap: 10px;
  }

  .rank-copy p {
    display: none;
  }
}

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

  .hero-content h1 {
    font-size: 38px;
  }

  .page-hero,
  .quick-search,
  .search-page,
  .detail-main {
    padding: 22px;
  }

  .rank-row {
    grid-template-columns: 38px 1fr;
  }

  .rank-thumb {
    display: none;
  }
}
