:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.78);
  --card-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(96, 165, 250, 0.22);
  --line-strong: rgba(96, 165, 250, 0.46);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #3b82f6;
  --cyan: #67e8f9;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.52);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.24), transparent 34rem),
    radial-gradient(circle at 92% 18%, rgba(6, 182, 212, 0.18), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

img,
video {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 64, 175, 0.35);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.45);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand span:last-child,
.footer-brand strong {
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
  color: #cbd5e1;
  padding: 9px 12px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: #fff;
  background: rgba(30, 64, 175, 0.45);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-panel input,
.filter-box input,
.search-hero input {
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  padding: 11px 14px;
}

.header-search input:focus,
.mobile-panel input:focus,
.filter-box input:focus,
.search-hero input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.16);
}

.header-search button,
.mobile-panel button,
.hero-btn,
.search-hero button,
.play-overlay,
.filter-box button {
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 14px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.hero-btn:hover,
.search-hero button:hover,
.play-overlay:hover,
.filter-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: rgba(30, 64, 175, 0.42);
  border-radius: 12px;
  padding: 9px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(30, 64, 175, 0.35);
  padding: 14px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-panel form,
.search-hero form {
  display: flex;
  gap: 8px;
}

.mobile-panel input,
.search-hero input {
  flex: 1;
  min-width: 0;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid rgba(30, 64, 175, 0.24);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.88)),
    radial-gradient(circle at 74% 26%, rgba(59, 130, 246, 0.25), transparent 28rem);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 54px;
}

.hero-slide {
  display: none;
  align-items: center;
  gap: 42px;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.72fr);
  min-height: 520px;
}

.hero-slide.is-active {
  display: grid;
}

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

.hero-kicker,
.card-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.24);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

.hero h1 span {
  display: block;
  background: linear-gradient(90deg, #e0f2fe, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-tags span,
.detail-tags span,
.movie-meta span,
.breadcrumbs a,
.breadcrumbs span {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

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

.hero-btn.secondary {
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.hero-art {
  position: relative;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  background: var(--card);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
}

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

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

.hero-mini-list {
  position: absolute;
  left: -28px;
  right: 28px;
  bottom: -28px;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.42);
}

.hero-mini-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #dbeafe;
  font-size: 14px;
}

.hero-controls {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(148, 163, 184, 0.38);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
}

.section,
.detail-shell,
.search-hero,
.category-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

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

.section-head h2,
.category-hero h1,
.search-hero h1,
.detail-info h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-head p,
.category-hero p,
.search-hero p,
.detail-info p {
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: #93c5fd;
  font-weight: 700;
}

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.26);
  transition: 0.22s ease;
}

.movie-card-link:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 62px rgba(15, 23, 42, 0.46);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.92);
  background: rgba(37, 99, 235, 0.88);
  opacity: 0;
  transition: 0.2s ease;
}

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

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

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

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

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

.category-tile {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.34), rgba(8, 47, 73, 0.26));
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.22);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.55);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.rank-panel,
.text-panel,
.player-card,
.detail-side-card {
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.26);
}

.rank-panel {
  padding: 22px;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.rank-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 12px;
}

.rank-no {
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #020617;
  font-weight: 900;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.rank-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.rank-link:hover {
  background: rgba(30, 64, 175, 0.24);
}

.rank-link img {
  width: 78px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 12px;
}

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

.rank-link em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  margin-top: 3px;
}

.filter-box {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-box input {
  flex: 1;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

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

.player-card {
  overflow: hidden;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 20px;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.72)),
    rgba(15, 23, 42, 0.08);
}

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

.play-symbol {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.detail-info {
  padding: 24px;
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.text-panel {
  margin-top: 22px;
  padding: 24px;
}

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

.text-panel p {
  color: #cbd5e1;
  line-height: 1.9;
  margin: 0 0 14px;
}

.detail-side-card {
  padding: 18px;
}

.side-poster {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.24);
  margin-bottom: 16px;
}

.side-poster img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.search-hero {
  padding-bottom: 24px;
}

.search-hero form {
  margin-top: 20px;
  max-width: 760px;
}

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

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 28px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: var(--muted);
  border-top: 1px solid rgba(96, 165, 250, 0.14);
}

.hidden-by-filter {
  display: none;
}

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

  .detail-grid,
  .rank-layout,
  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-mini-list {
    position: static;
    margin-top: 14px;
  }
}

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

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

  .nav-shell {
    height: 62px;
  }

  .brand {
    font-size: 20px;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 34px 0 42px;
  }

  .hero-slide {
    min-height: auto;
    gap: 24px;
  }

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

  .hero-actions,
  .section-head,
  .filter-box {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

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

  .mobile-panel form,
  .search-hero form {
    flex-direction: column;
  }

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