:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #0f172a;
  --panel-soft: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #22c55e;
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.36);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 28rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.28);
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: #60a5fa;
}

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

.header-search input,
.mobile-search input,
.large-search input,
.inline-filter input,
.search-page-form input {
  width: 250px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.inline-filter input:focus,
.search-page-form input:focus {
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.header-search button,
.mobile-search button,
.large-search button,
.search-page-form button,
.primary-btn,
.ghost-btn,
.section-more {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 34px rgba(59, 130, 246, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.search-page-form button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.25);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.95);
}

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

.mobile-panel nav,
.quick-cats,
.footer-links,
.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-cat,
.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.64);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(12px) saturate(1.12);
  transform: scale(1.08);
  opacity: 0.62;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.68) 45%, rgba(2, 6, 23, 0.9) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.22), #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 380px;
  align-items: center;
  gap: 64px;
  padding: 72px 0;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-facts span {
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
}

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

.ghost-btn {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: none;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.58), 0 0 0 1px rgba(148, 163, 184, 0.18);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 9px 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

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

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.content-section,
.detail-wrap {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

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

.section-head h2,
.search-panel h2,
.story-block h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.search-panel p,
.story-block p,
.site-footer p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.92));
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(96, 165, 250, 0.58);
  box-shadow: 0 22px 58px rgba(59, 130, 246, 0.16);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .poster-frame img,
.category-tile:hover img,
.category-overview-card:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.82));
}

.type-badge,
.rating-badge,
.rank-badge,
.play-float {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.78);
}

.rating-badge {
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  background: linear-gradient(135deg, #f97316, #eab308);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.play-float {
  right: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.86);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: scale(1);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.movie-one-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movie-meta {
  margin: 8px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-one-line {
  min-height: 42px;
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
  color: #93c5fd;
}

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

.category-tile,
.category-overview-card,
.search-panel,
.player-card,
.detail-side,
.story-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.4s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.92));
}

.category-tile span,
.category-tile strong,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  color: #67e8f9;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  font-size: 26px;
}

.category-tile p {
  color: #cbd5e1;
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 26px;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.horizontal-card:hover {
  transform: translateX(5px);
  border-color: rgba(34, 211, 238, 0.5);
}

.horizontal-card img {
  width: 86px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.horizontal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.horizontal-card p,
.horizontal-card span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-panel {
  align-self: start;
  padding: 28px;
  position: sticky;
  top: 96px;
}

.large-search,
.inline-filter,
.search-page-form {
  margin-top: 24px;
}

.large-search input,
.inline-filter input,
.search-page-form input {
  width: min(100%, 520px);
}

.page-hero {
  width: min(1220px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.88)),
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.28), transparent 30rem);
  box-shadow: var(--shadow);
}

.compact-hero {
  min-height: 320px;
  display: grid;
  align-items: center;
}

.category-overview-card {
  overflow: hidden;
}

.category-cover {
  overflow: hidden;
}

.category-cover img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-overview-card div:last-child {
  padding: 22px;
}

.category-overview-card span {
  color: #67e8f9;
  font-weight: 900;
}

.category-overview-card h2 {
  margin: 8px 0 10px;
  font-size: 28px;
}

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

.empty-state,
.search-summary {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.search-summary {
  margin-bottom: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #60a5fa;
}

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

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(59, 130, 246, 0.28), transparent 16rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.68));
  transition: opacity 0.25s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 50px rgba(59, 130, 246, 0.45);
  font-size: 32px;
}

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

.player-overlay small,
.player-status {
  color: #cbd5e1;
}

.player-status {
  padding: 14px 4px 0;
  font-size: 14px;
}

.detail-cover {
  width: 100%;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-content {
  margin-top: 34px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

.detail-content h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-subtitle {
  max-width: 920px;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.8;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.info-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.56);
}

.info-grid dt {
  color: var(--subtle);
  font-size: 13px;
}

.info-grid dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.story-block {
  margin-top: 18px;
  padding: 26px;
}

.related-grid .movie-card-compact .movie-one-line {
  display: none;
}

.ranking-grid .movie-card:nth-child(-n + 3) {
  border-color: rgba(249, 115, 22, 0.46);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.62);
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-content,
  .detail-grid,
  .split-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    gap: 32px;
    padding-top: 54px;
  }

  .hero-poster {
    max-width: 340px;
    transform: none;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .site-logo {
    font-size: 18px;
  }

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

  .hero-copy h1,
  .page-hero h1 {
    font-size: 42px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-subtitle {
    font-size: 17px;
  }

  .hero-actions,
  .section-head,
  .large-search,
  .inline-filter,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

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

  .page-hero,
  .detail-content {
    padding: 28px;
  }

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

  .category-grid,
  .category-overview-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .content-section,
  .detail-wrap {
    padding: 48px 0;
  }
}
