:root {
  color-scheme: dark;
  --slate-950: #020617;
  --slate-925: #06101f;
  --slate-900: #0f172a;
  --slate-850: #14213b;
  --slate-800: #1e293b;
  --blue-950: #172554;
  --blue-900: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --line: rgba(59, 130, 246, 0.28);
  --glass: rgba(15, 23, 42, 0.72);
  --card: rgba(15, 23, 42, 0.88);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.24), transparent 28rem),
    radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.16), transparent 26rem),
    linear-gradient(135deg, var(--slate-950), var(--slate-900) 52%, var(--slate-950));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.46);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1220px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-400));
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.38);
}

.brand-text,
.footer-brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #60a5fa, var(--cyan-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 12px;
  color: #d1d5db;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.42);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-tools input,
.filter-tools select {
  height: 40px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.header-search input {
  width: 220px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-tools input:focus,
.filter-tools select:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.section-more {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-btn {
  background: linear-gradient(135deg, var(--blue-600), #0891b2);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.32);
}

.header-search button,
.mobile-search button {
  height: 40px;
  padding: 0 16px;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.ghost-btn,
.section-more {
  border: 1px solid rgba(96, 165, 250, 0.34);
  background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.header-search button:hover,
.mobile-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(96, 165, 250, 0.32);
  background: rgba(15, 23, 42, 0.65);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
}

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

.mobile-links,
.mobile-categories {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

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

.mobile-category-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(30, 64, 175, 0.28);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  height: 580px;
  overflow: hidden;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--slate-950), rgba(15, 23, 42, 0.58) 44%, rgba(15, 23, 42, 0.12)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.24) 58%, rgba(2, 6, 23, 0.62));
}

.hero-copy {
  position: absolute;
  left: max(24px, calc((100% - 1220px) / 2));
  bottom: 74px;
  width: min(760px, calc(100% - 48px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: white;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 68px);
}

.hero h2 {
  margin-top: 8px;
  font-size: clamp(30px, 4.2vw, 56px);
}

.hero-movie-title {
  color: var(--cyan-300) !important;
}

.hero p,
.page-hero p,
.detail-info p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #e5e7eb;
  font-size: 18px;
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  color: white;
  background: rgba(15, 23, 42, 0.52);
  font-size: 36px;
  cursor: pointer;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 4;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-categories {
  width: min(1220px, calc(100% - 32px));
  margin: -36px auto 0;
  position: relative;
  z-index: 4;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.hero-categories a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.24);
}

.content-section,
.page-hero,
.detail-hero,
.player-section {
  width: min(1220px, calc(100% - 32px));
  margin: 64px auto 0;
}

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

.section-head h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-head p,
.detail-text p,
.category-panel p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.20);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.96));
  box-shadow: 0 20px 52px rgba(2, 6, 23, 0.32);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.48);
}

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

.movie-card.compact .poster-link {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover img {
  transform: scale(1.06);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.32);
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--cyan-300);
  font-size: 13px;
  margin-bottom: 8px;
}

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

.movie-card h3 a:hover {
  color: var(--cyan-300);
}

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

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.20);
  font-size: 12px;
}

.tag-row.large span {
  font-size: 13px;
  padding: 6px 10px;
}

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

.category-tile,
.category-panel {
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 52%),
    linear-gradient(135deg, rgba(30, 58, 138, 0.48), rgba(15, 23, 42, 0.88));
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.30);
}

.category-tile span,
.category-title {
  display: block;
  color: var(--cyan-300);
  font-size: 15px;
  font-weight: 800;
}

.category-tile strong {
  display: block;
  margin-top: 16px;
  font-size: 20px;
}

.category-tile em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.category-panel {
  min-height: 220px;
}

.category-title {
  font-size: 24px;
}

.category-samples,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a,
.inline-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
}

.page-hero,
.detail-hero {
  padding: 38px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 0%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 58, 138, 0.42));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(32px, 4.5vw, 56px);
}

.filter-section {
  margin-top: 34px;
}

.filter-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-tools input {
  width: 240px;
}

.filter-tools select {
  width: 150px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 32px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.5);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan-300);
}

.detail-info h1 {
  font-size: clamp(34px, 4.7vw, 64px);
}

.player-section {
  margin-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.28), rgba(2, 6, 23, 0.70)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.30));
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.play-icon {
  width: 72px;
  height: 72px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-400));
  box-shadow: 0 22px 60px rgba(37, 99, 235, 0.42);
  font-size: 30px;
}

.play-overlay strong {
  padding: 0 20px;
  font-size: clamp(20px, 3vw, 32px);
}

.detail-text {
  padding: 34px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.58);
}

.detail-text p {
  color: #cbd5e1;
  font-size: 17px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.detail-meta-grid div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.15);
}

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

.detail-meta-grid strong {
  display: block;
  margin-top: 6px;
  color: white;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid rgba(96, 165, 250, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: white;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(96, 165, 250, 0.14);
  color: var(--muted);
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

@media (max-width: 820px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-stage {
    height: 540px;
  }

  .hero-copy {
    bottom: 78px;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .detail-cover {
    max-width: 320px;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-hero,
  .detail-hero,
  .player-section,
  .hero-categories,
  .footer-grid {
    width: min(100% - 22px, 1220px);
  }

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

  .hero-stage {
    height: 510px;
  }

  .hero-copy {
    bottom: 62px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .rank-grid,
  .category-grid,
  .category-panel-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero,
  .detail-text {
    padding: 24px;
    border-radius: 22px;
  }

  .filter-tools,
  .filter-tools input,
  .filter-tools select {
    width: 100%;
  }

  .detail-meta-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
