:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --border: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #cbd5e1;
  --sky: #38bdf8;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --danger: #fb7185;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.46);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

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, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(2, 6, 23, 0.35);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--sky);
  border-radius: 16px;
  background: rgba(14, 165, 233, 0.12);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.38);
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #38bdf8, #60a5fa, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  padding: 8px 0;
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 650;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--sky);
  transition: transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

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

.header-search input,
.mobile-search input {
  width: 180px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  padding: 10px 14px;
  outline: none;
}

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.86);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

.mobile-nav-link {
  padding: 12px 10px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.45);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: white;
  background: rgba(14, 165, 233, 0.16);
}

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

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.04);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76) 45%, rgba(2, 6, 23, 0.28)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px clamp(28px, 7vw, 86px);
}

.hero-kicker,
.eyebrow {
  color: var(--sky);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 16px 0 10px;
  font-size: clamp(2.3rem, 6vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 3vw, 2.5rem);
  color: #e0f2fe;
}

.hero-content p {
  width: min(650px, 100%);
  margin: 0;
  color: #dbeafe;
  font-size: 1.08rem;
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.detail-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.13);
  padding: 5px 11px;
  font-size: 0.82rem;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #00111f;
  background: linear-gradient(90deg, #38bdf8, #60a5fa);
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.24);
}

.ghost-button {
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
}

.primary-button:hover,
.ghost-button:hover,
.filter-panel button:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 6;
  right: 28px;
  bottom: 128px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--text);
  cursor: pointer;
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  font-size: 2rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.55);
  padding: 0;
}

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

.hero-thumbs {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 7vw, 86px);
  right: 28px;
  bottom: 28px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.68);
  padding: 8px;
  cursor: pointer;
  overflow: hidden;
}

.hero-thumb.active {
  border-color: rgba(56, 189, 248, 0.76);
  background: rgba(14, 165, 233, 0.2);
}

.hero-thumb img {
  width: 42px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-thumb span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 750;
  text-align: left;
}

.content-section,
.detail-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  gap: 20px;
  align-items: stretch;
}

.intro-card,
.intro-links,
.detail-card,
.story-panel,
.filter-panel,
.page-hero {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.intro-card,
.intro-links {
  padding: 28px;
}

.intro-card span {
  display: inline-flex;
  color: var(--sky);
  font-weight: 900;
  margin-bottom: 10px;
}

.intro-card strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.intro-card p,
.page-hero p,
.story-panel p,
.detail-info .lead-text {
  color: var(--subtle);
  line-height: 1.9;
}

.intro-links {
  display: grid;
  gap: 12px;
}

.intro-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.12);
  padding: 16px 18px;
  font-weight: 800;
}

.intro-links a::after {
  content: "→";
  color: var(--sky);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--sky);
  font-weight: 850;
}

.highlight-section {
  width: 100%;
  max-width: none;
  padding: 58px max(16px, calc((100% - 1240px) / 2));
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.72));
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 24px 54px rgba(2, 6, 23, 0.42);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(14, 165, 233, 0.16));
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

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

.poster-frame img.is-missing,
.hero-image.is-missing,
.hero-thumb img.is-missing,
.category-card img.is-missing,
.detail-poster img.is-missing {
  opacity: 0;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #00111f;
  background: linear-gradient(135deg, #facc15, #38bdf8);
  font-weight: 950;
}

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

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-meta {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #475569;
}

.movie-card h3 {
  margin: 0;
  min-height: 2.75em;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card h3 a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  display: -webkit-box;
  min-height: 4.6em;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  min-height: 25px;
  padding: 3px 9px;
  font-size: 0.74rem;
}

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

.category-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.84);
  padding: 22px;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.32);
}

.category-card.large {
  min-height: 210px;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  transform: scale(1.05);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.92), rgba(14, 165, 233, 0.18));
}

.category-card span,
.category-card small {
  position: relative;
  z-index: 2;
  display: block;
}

.category-card span {
  margin-bottom: 12px;
  font-size: 1.35rem;
  font-weight: 950;
}

.category-card small {
  color: #cbd5e1;
  line-height: 1.7;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: clamp(34px, 7vw, 70px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.compact-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.compact-hero p {
  max-width: 760px;
  margin: 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px 160px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 26px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.52);
  padding: 12px 13px;
  outline: none;
}

.filter-panel button {
  border: 0;
  color: #00111f;
  background: linear-gradient(90deg, #38bdf8, #60a5fa);
  cursor: pointer;
}

.empty-state {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.68);
  padding: 24px;
  text-align: center;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--sky);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.74));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-symbol {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto;
  border-radius: 999px;
  color: #00111f;
  background: linear-gradient(135deg, #38bdf8, #60a5fa);
  box-shadow: 0 18px 46px rgba(56, 189, 248, 0.28);
  font-size: 2rem;
}

.player-overlay span:last-child {
  font-size: 1.05rem;
  font-weight: 900;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 28px;
  margin-top: 24px;
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.9);
}

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

.detail-info h1 {
  margin: 10px 0 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.detail-tags span {
  min-height: 30px;
  font-size: 0.82rem;
}

.story-panel {
  margin-top: 24px;
  padding: clamp(24px, 5vw, 42px);
}

.story-panel h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.story-panel p + h2 {
  margin-top: 30px;
}

.related-section {
  width: 100%;
  padding-bottom: 0;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.74);
}

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 30px;
  padding: 42px 0;
}

.footer-brand p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px;
}

.footer-links a {
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
  padding: 8px 12px;
  font-size: 0.9rem;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  padding: 18px 0 30px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

  .hero-controls {
    bottom: 212px;
  }

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

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .hero-stage,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    padding: 42px 24px 220px;
    justify-content: flex-end;
  }

  .hero-thumbs {
    left: 20px;
    right: 20px;
    bottom: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-controls {
    right: 20px;
    bottom: 178px;
  }

  .intro-strip,
  .footer-shell,
  .detail-card {
    grid-template-columns: 1fr;
  }

  .page-hero {
    display: grid;
  }

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

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

@media (max-width: 560px) {
  .nav-shell,
  .content-section,
  .detail-layout,
  .home-hero,
  .page-hero,
  .footer-shell,
  .footer-bottom,
  .mobile-nav {
    width: min(100% - 22px, 1240px);
  }

  .brand-text {
    font-size: 1.1rem;
  }

  .hero-stage,
  .hero-content {
    min-height: 650px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content h2 {
    font-size: 1.4rem;
  }

  .hero-thumb:nth-child(n + 5) {
    display: none;
  }

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

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

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

  .card-desc {
    display: none;
  }

  .detail-poster img {
    min-height: auto;
  }

  .play-symbol {
    width: 64px;
    height: 64px;
  }
}
