:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.68);
  --bg-card-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(96, 165, 250, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #2563eb;
  --blue-light: #38bdf8;
  --cyan: #22d3ee;
  --orange: #f97316;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 36rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 32rem),
    linear-gradient(135deg, #020617 0%, #0f172a 52%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1200px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
}

.brand-text {
  font-size: 1.45rem;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

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

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

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

.header-search input,
.mobile-search input,
.search-box input,
.filter-field input,
.filter-field select {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  border-radius: 12px;
  outline: none;
  transition: 0.2s ease;
}

.header-search input {
  width: 210px;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.search-box button,
.primary-button,
.secondary-button,
.player-start {
  border: 0;
  color: white;
  cursor: pointer;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button {
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-box input:focus,
.filter-field input:focus,
.filter-field select:focus {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.header-search button:hover,
.mobile-search button:hover,
.search-box button:hover,
.primary-button:hover,
.secondary-button:hover,
.player-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.36);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #dbeafe;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 6px;
}

.mobile-search input {
  padding: 12px;
}

.mobile-search button {
  padding: 0 16px;
}

main {
  min-height: 60vh;
}

.hero-slider {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #020617;
}

.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;
  filter: saturate(1.05) contrast(1.06);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(15, 23, 42, 0.58) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 74px;
  width: min(1200px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: end;
  gap: 36px;
}

.hero-kicker,
.card-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #eff6ff;
  background: rgba(37, 99, 235, 0.86);
  border: 1px solid rgba(147, 197, 253, 0.26);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.86rem;
}

.hero-title {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(2.45rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 720px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 1.12rem;
  line-height: 1.8;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 700;
}

.secondary-button {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border);
}

.hero-side-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-side-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
}

.hero-side-card h3 {
  margin: 14px 0 6px;
}

.hero-side-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.58);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-control:hover {
  background: rgba(37, 99, 235, 0.76);
}

.hero-prev {
  left: 26px;
}

.hero-next {
  right: 26px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.content-section {
  padding: 56px 0;
}

.content-section.compact {
  padding: 36px 0;
}

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

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
}

.section-heading p,
.page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

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

.movie-card,
.movie-list-card,
.category-card,
.stat-card,
.info-panel {
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.movie-card:hover,
.movie-list-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 24px 72px rgba(37, 99, 235, 0.18);
}

.movie-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(14, 165, 233, 0.12));
}

.movie-card img,
.list-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-card figcaption {
  position: absolute;
  left: 12px;
  top: 12px;
  color: white;
  background: rgba(37, 99, 235, 0.88);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
}

.rank-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  border-radius: 11px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.34);
}

.hover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.4rem;
  opacity: 0;
  background: rgba(2, 6, 23, 0.42);
  transition: opacity 0.2s ease;
}

.movie-card:hover .hover-play,
.movie-list-card:hover .hover-play {
  opacity: 1;
}

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

.movie-card h3,
.movie-list-card h3 {
  margin: 0 0 9px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.movie-list-card:hover h3 {
  color: #60a5fa;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.84rem;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.88);
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.movie-list-card {
  border-radius: 18px;
  overflow: hidden;
}

.movie-list-card a {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  height: 100%;
}

.list-cover {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.8);
}

.list-info {
  padding: 14px 16px 14px 0;
}

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

.category-card,
.stat-card {
  border-radius: 20px;
  padding: 22px;
}

.category-card h3,
.stat-card h3 {
  margin: 0 0 10px;
}

.category-card p,
.stat-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.stat-number {
  display: block;
  margin-top: 12px;
  color: #67e8f9;
  font-size: 1.75rem;
  font-weight: 800;
}

.page-hero {
  padding: 72px 0 32px;
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.26), transparent 34rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.55), transparent);
}

.filter-panel,
.search-box {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 16px;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.6);
}

.filter-field {
  display: grid;
  gap: 8px;
}

.filter-field label {
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
}

.no-results {
  display: none;
  padding: 28px;
  color: var(--muted-strong);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.4);
}

.no-results.is-visible {
  display: block;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 0;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #dbeafe;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.62);
}

.pagination a.is-current,
.pagination a:hover {
  color: white;
  background: var(--blue);
}

.detail-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.05);
  transform: scale(1.04);
  opacity: 0.54;
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.46)),
    linear-gradient(0deg, #020617, transparent 70%);
}

.detail-inner {
  position: relative;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 36px;
  align-items: end;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  background: rgba(30, 41, 59, 0.9);
}

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

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 780px;
  color: #dbeafe;
  line-height: 1.85;
  font-size: 1.05rem;
}

.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.detail-meta span,
.tag-row span {
  color: #dbeafe;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  padding: 7px 11px;
  font-size: 0.9rem;
}

.player-section {
  padding: 56px 0 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 26rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.18));
  transition: opacity 0.25s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-start {
  pointer-events: auto;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  font-size: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 34px 0 58px;
}

.info-panel {
  border-radius: 22px;
  padding: 24px;
}

.info-panel h2,
.info-panel h3 {
  margin: 0 0 14px;
}

.info-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.info-panel + .info-panel {
  margin-top: 18px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-link {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(96, 165, 250, 0.14);
  transition: 0.2s ease;
}

.side-link:hover {
  border-color: rgba(56, 189, 248, 0.58);
  background: rgba(30, 41, 59, 0.82);
}

.side-link img {
  width: 84px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.side-link strong {
  display: block;
  margin-bottom: 5px;
}

.side-link span {
  color: var(--muted);
  font-size: 0.84rem;
}

.search-page-box {
  grid-template-columns: 1fr auto;
}

.search-page-box input {
  min-height: 52px;
  padding: 0 16px;
}

.search-page-box button {
  padding: 0 24px;
}

.site-footer {
  border-top: 1px solid rgba(96, 165, 250, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), #020617);
  color: var(--muted-strong);
}

.footer-grid {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 34px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-brand {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

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

.site-footer a {
  display: block;
  color: var(--muted);
  margin: 9px 0;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #60a5fa;
}

.footer-bottom {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(96, 165, 250, 0.14);
  color: var(--muted);
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

  .hero-side-card {
    display: none;
  }

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

  .detail-poster {
    width: min(310px, 70vw);
  }

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

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

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

  .header-inner {
    padding: 0 18px;
  }

  .hero-slider {
    height: 520px;
  }

  .hero-content,
  .container,
  .detail-inner,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 32px, 1200px);
  }

  .hero-title {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
  }

  .hero-control {
    display: none;
  }

  .section-heading,
  .page-heading {
    align-items: start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .stat-grid,
  .ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .search-page-box {
    grid-template-columns: 1fr;
  }

  .detail-inner {
    padding: 44px 0;
  }

  .detail-copy h1 {
    font-size: clamp(2rem, 13vw, 3rem);
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 1.16rem;
  }

  .hero-slider {
    height: 500px;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .stat-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .movie-list-card a {
    grid-template-columns: 118px 1fr;
  }

  .list-cover {
    min-height: 108px;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .player-start {
    width: 72px;
    height: 72px;
    font-size: 1.8rem;
  }
}
