:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --yellow: #facc15;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(8, 47, 73, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.16), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(37, 99, 235, 0.22), transparent 32%),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  padding-left: 2px;
  color: #0f172a;
  background: linear-gradient(135deg, #67e8f9, #2563eb);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.45);
  font-size: 15px;
}

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

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

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

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

.header-search input,
.mobile-search input,
.hero-search input,
.live-search {
  border: 1px solid rgba(148, 163, 184, 0.26);
  outline: none;
  color: white;
  background: rgba(15, 23, 42, 0.86);
  border-radius: 999px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 260px;
  padding: 12px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.live-search:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.98);
}

button,
.primary-button,
.ghost-button,
.card-foot a,
.section-more,
.category-action {
  font: inherit;
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.card-foot a,
.play-overlay button,
.category-action {
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.26);
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 11px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-button:hover,
.card-foot a:hover,
.play-overlay button:hover,
.category-card:hover .category-action {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(6, 182, 212, 0.36);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
}

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

.mobile-search input {
  width: 100%;
  padding: 12px 16px;
}

.mobile-search button {
  padding: 12px 18px;
}

main {
  overflow: hidden;
}

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

.hero {
  position: relative;
  min-height: 760px;
  padding-top: 72px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 35% 18%, rgba(34, 211, 238, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), #020617 90%);
  z-index: -2;
}

.hero-track {
  position: relative;
  min-height: 688px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: 688px;
  padding: 56px 0;
}

.hero-panel {
  max-width: 790px;
}

.eyebrow,
.hero-meta span,
.tag-row span,
.detail-tag-row span,
.category-pill,
.rank-badge,
.result-count {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.eyebrow {
  gap: 8px;
  padding: 8px 14px;
  color: white;
  background: rgba(6, 182, 212, 0.92);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

.hero h1 {
  margin: 24px 0 20px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

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

.hero-description {
  max-width: 700px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.hero-actions,
.card-meta,
.card-foot,
.detail-meta,
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin: 24px 0;
}

.hero-meta span {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  color: #e2e8f0;
}

.hero-actions {
  gap: 14px;
  margin: 28px 0;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
}

.ghost-button,
.section-more {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(125, 211, 252, 0.28);
}

.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 16px 34px rgba(8, 47, 73, 0.28);
}

.hero-search {
  max-width: 640px;
  gap: 10px;
  padding: 8px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(18px);
}

.hero-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
}

.hero-search button {
  min-width: 118px;
  min-height: 48px;
  padding: 0 18px;
}

.hero-dots {
  position: absolute;
  right: 32px;
  bottom: 42px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: var(--cyan);
}

.page-block {
  padding: 72px 0;
}

.page-hero {
  padding: 144px 0 56px;
  background:
    radial-gradient(circle at 16% 32%, rgba(34, 211, 238, 0.16), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(37, 99, 235, 0.2), transparent 25%);
}

.page-hero h1,
.detail-title h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p,
.section-heading p,
.category-card p,
.card-body p,
.detail-summary,
.prose-panel p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 780px;
  margin: 10px 0 0;
}

.section-more {
  flex: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.86));
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: var(--shadow);
}

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

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.08);
  filter: brightness(0.82);
}

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  padding-left: 4px;
  color: white;
  background: rgba(6, 182, 212, 0.9);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.45);
  opacity: 0;
  transform: translate(-50%, -42%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 42px;
  height: 34px;
  justify-content: center;
  color: #020617;
  background: linear-gradient(135deg, #fef08a, #facc15);
}

.card-body {
  padding: 18px;
}

.card-meta {
  color: #bae6fd;
  font-size: 13px;
  font-weight: 800;
}

.card-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.82);
}

.card-body h3 {
  margin: 14px 0 9px;
  font-size: 20px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-body p {
  min-height: 76px;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.detail-tag-row span {
  padding: 6px 9px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.76);
  font-size: 12px;
}

.card-foot {
  justify-content: space-between;
  margin-top: 16px;
}

.rating {
  color: var(--yellow);
  font-weight: 900;
}

.card-foot a {
  padding: 9px 13px;
  font-size: 14px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.82));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.48);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 26px;
}

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

.category-action {
  display: inline-flex;
  padding: 10px 16px;
  margin-top: 18px;
}

.category-samples {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.category-samples a {
  color: #cbd5e1;
  font-size: 14px;
}

.category-samples a:hover {
  color: var(--cyan);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}

.live-search {
  flex: 1 1 260px;
  min-height: 44px;
  padding: 0 16px;
}

.category-pill {
  padding: 10px 14px;
  color: #dbeafe;
  background: rgba(51, 65, 85, 0.76);
  border: 1px solid transparent;
  cursor: pointer;
}

.category-pill:hover,
.category-pill.is-active {
  color: white;
  background: linear-gradient(90deg, var(--cyan-strong), var(--blue));
  border-color: rgba(255, 255, 255, 0.14);
}

.result-count {
  margin-left: auto;
  padding: 10px 14px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.55);
}

.no-results {
  display: none;
  padding: 36px;
  text-align: center;
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
}

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

.compact-card .card-body p {
  min-height: 56px;
  -webkit-line-clamp: 2;
}

.detail-page {
  padding: 112px 0 72px;
}

.breadcrumbs {
  margin-bottom: 24px;
  color: #93c5fd;
  font-weight: 700;
}

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

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

.player-shell,
.prose-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 62px rgba(0, 0, 0, 0.22);
}

.player-shell {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.56) 58%, rgba(2, 6, 23, 0.82));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 26px;
  font-size: 18px;
}

.detail-title {
  padding: 26px;
}

.detail-meta {
  color: #cbd5e1;
  margin: 10px 0 18px;
}

.detail-meta span {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.76);
}

.detail-summary {
  margin: 0;
  font-size: 18px;
}

.side-panel {
  padding: 22px;
}

.side-poster {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

.side-panel h2,
.prose-panel h2 {
  margin: 22px 0 14px;
  font-size: 24px;
}

.detail-facts {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.detail-facts div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-facts dt {
  color: var(--muted);
}

.detail-facts dd {
  margin: 0;
  color: #f8fafc;
  font-weight: 800;
  text-align: right;
}

.prose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 34px;
}

.prose-panel {
  padding: 26px;
}

.prose-panel h2 {
  margin-top: 0;
}

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

.mini-link {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mini-link:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.48);
}

.mini-link img {
  aspect-ratio: 2 / 3;
  border-radius: 13px;
  object-fit: cover;
}

.mini-link span {
  color: #e2e8f0;
  font-weight: 800;
  line-height: 1.35;
}

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

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

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

.footer-grid a:not(.footer-logo) {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

.footer-grid a:hover {
  color: var(--cyan);
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

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

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

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

  .side-panel {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
  }
}

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

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

  .hero {
    min-height: 720px;
  }

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

  .hero-search {
    border-radius: 26px;
    flex-direction: column;
  }

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

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

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

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

  .brand,
  .footer-logo {
    font-size: 23px;
  }

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

  .hero {
    padding-top: 64px;
  }

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

  .hero-description {
    font-size: 16px;
  }

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

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 14px;
  }

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

  .side-panel {
    display: block;
  }

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

  .page-block {
    padding: 54px 0;
  }
}
