:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c32;
  --panel-border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #3b82f6;
  --blue-strong: #2563eb;
  --cyan: #67e8f9;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.45);
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html {
  background: var(--page-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.24), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(103, 232, 249, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #08111f 48%, #020617 100%);
}

body.no-scroll {
  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: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark,
.footer-brand span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12);
}

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

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

.desktop-nav a,
.mobile-panel a,
.site-footer a {
  color: #dbeafe;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
  color: var(--cyan);
}

.header-search,
.mobile-search,
.home-search-panel form,
.page-hero form,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.home-search-panel input,
.page-hero input,
.large-search input {
  width: 230px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 11px 16px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.88);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.home-search-panel input:focus,
.page-hero input:focus,
.large-search input:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.header-search button,
.mobile-search button,
.home-search-panel button,
.page-hero button,
.large-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: white;
  background: var(--blue);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.home-search-panel button:hover,
.page-hero button:hover,
.large-search button:hover,
.primary-btn:hover {
  background: var(--blue-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ghost-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: white;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.mobile-panel nav {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--page-bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.62) 46%, rgba(2, 6, 23, 0.26) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 52%, rgba(2, 6, 23, 0.42) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1200px) / 2));
  bottom: 72px;
  z-index: 2;
  width: min(690px, calc(100% - 48px));
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #93c5fd;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

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

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.hero-meta a,
.detail-meta span,
.meta-line span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-meta a {
  color: white;
  background: var(--blue);
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100% - 1200px) / 2));
  bottom: 48px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

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

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

.home-search-panel,
.page-main,
.detail-main,
.content-section,
.category-block {
  width: min(1200px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: -36px;
  position: relative;
  z-index: 4;
  padding: 24px;
  border: 1px solid var(--panel-border);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.home-search-panel h2,
.page-hero h1,
.section-head h2,
.category-block-title h2,
.detail-info h1,
.detail-content h2 {
  margin: 0;
}

.home-search-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.home-search-panel p,
.page-hero p,
.section-head p,
.category-block-title p,
.detail-one-line,
.detail-content p,
.site-footer p,
.search-status {
  color: var(--muted);
  line-height: 1.75;
}

.content-section,
.category-block {
  padding-top: 64px;
}

.section-head,
.category-block-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 28px;
}

.section-head h2,
.category-block-title h2 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-more {
  color: #60a5fa;
  font-weight: 800;
  white-space: nowrap;
}

.section-more:hover {
  color: var(--cyan);
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.9));
  box-shadow: 0 20px 54px rgba(2, 6, 23, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 28px 70px rgba(37, 99, 235, 0.16);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0b1220;
}

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

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

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

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 800;
}

.score {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(250, 204, 21, 0.28);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-style: normal;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--cyan);
}

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

.meta-line {
  gap: 6px;
  margin-bottom: 10px;
}

.meta-line span {
  padding: 4px 8px;
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #bfdbfe;
  font-size: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.18);
}

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

.category-card {
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.2), transparent 13rem),
    rgba(15, 23, 42, 0.88);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.5);
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  display: block;
  min-height: 54px;
  color: #dbeafe;
  font-weight: 500;
  line-height: 1.65;
}

.category-card div {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-card div a {
  color: var(--muted);
}

.category-card div a:hover {
  color: white;
}

.page-main,
.detail-main {
  padding-top: 48px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
  padding: 38px;
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  background:
    radial-gradient(circle at 0% 20%, rgba(59, 130, 246, 0.24), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
  box-shadow: var(--shadow);
}

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

.page-hero h1 {
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -0.04em;
}

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

.filter-panel {
  padding-top: 24px;
}

.filter-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
  color: var(--soft);
}

.filter-row > span {
  padding-top: 10px;
  color: #dbeafe;
  font-weight: 800;
}

.filter-row div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-row button {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.filter-row button.is-active,
.filter-row button:hover {
  color: white;
  background: var(--blue);
  border-color: transparent;
}

.category-block {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
  color: var(--muted);
}

.breadcrumb a {
  color: #93c5fd;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 34px;
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.2), transparent 24rem),
    rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #0b1220;
  box-shadow: 0 24px 74px rgba(2, 6, 23, 0.4);
}

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 760px;
  margin: 18px 0 22px;
  font-size: 18px;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-tags {
  margin-bottom: 26px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 28px;
  background: black;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.48);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  font-size: 34px;
  background: var(--blue);
  box-shadow: 0 0 0 12px rgba(59, 130, 246, 0.18);
}

.play-overlay strong {
  font-size: 22px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
}

.detail-content article {
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 26px;
  background: rgba(15, 23, 42, 0.86);
}

.detail-content h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: #cbd5e1;
}

.related-section {
  padding-top: 48px;
}

.search-status {
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.8);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), #020617);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 900;
}

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

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

[hidden] {
  display: none !important;
}

.is-hidden-card {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

  .compact-grid,
  .mini-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    bottom: 92px;
  }

  .home-search-panel,
  .page-hero,
  .section-head,
  .category-block-title,
  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-search-panel form,
  .page-hero form,
  .large-search {
    width: 100%;
  }

  .home-search-panel input,
  .page-hero input,
  .large-search input,
  .mobile-search input {
    width: 100%;
  }

  .detail-hero {
    padding: 24px;
  }

  .detail-poster {
    width: min(320px, 100%);
    margin: 0 auto;
  }

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

@media (max-width: 560px) {
  .site-header-inner,
  .mobile-panel,
  .home-search-panel,
  .page-main,
  .detail-main,
  .content-section,
  .category-block,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1200px);
  }

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

  .hero-content {
    left: 16px;
    width: calc(100% - 32px);
  }

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

  .hero-dots {
    left: 16px;
    right: auto;
  }

  .page-hero,
  .home-search-panel {
    padding: 22px;
    border-radius: 22px;
  }

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

  .compact-grid,
  .feature-grid,
  .mini-grid,
  .category-grid {
    gap: 14px;
  }

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