:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #07142b;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(34, 211, 238, 0.18);
  --border-strong: rgba(34, 211, 238, 0.48);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --orange: #f97316;
  --yellow: #facc15;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 15% 6%, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 88% 10%, rgba(37, 99, 235, 0.24), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0c1a3b 48%, #020617 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 70%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.48));
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 36px rgba(34, 211, 238, 0.18);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--cyan);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-text strong,
.footer-brand {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-text em {
  margin-top: 5px;
  font-size: 12px;
  color: var(--cyan);
  font-style: normal;
}

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

.desktop-nav a {
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  width: min(360px, 30vw);
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.mobile-panel input,
.filter-form input,
.filter-form select {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

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

.header-search button,
.mobile-panel button,
.filter-form button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(8, 145, 178, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.filter-form button:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.32);
}

.ghost-button {
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.12);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.94);
}

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

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.03);
}

.mobile-panel form {
  display: flex;
  gap: 10px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-panel input {
  padding: 10px 14px;
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

.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;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(30, 41, 59, 0.88));
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.08) contrast(1.06);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 18%, rgba(34, 211, 238, 0.20), transparent 24rem),
    linear-gradient(to top, #020617 2%, rgba(2, 6, 23, 0.88) 34%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  min-height: 76vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.55fr);
  gap: 48px;
  align-items: center;
  padding: 80px 0 96px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero h1 span {
  display: block;
  margin-top: 10px;
  font-size: clamp(26px, 4vw, 46px);
  letter-spacing: -0.04em;
  color: var(--cyan);
}

.hero-lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.85;
}

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

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

.hero-meta span,
.movie-meta-line span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.66);
  color: var(--muted-strong);
}

.hero-meta span {
  padding: 8px 12px;
}

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

.hero-card {
  align-self: stretch;
  display: flex;
  align-items: end;
}

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

.hero-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.20), rgba(37, 99, 235, 0.22));
}

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

.hero-card-inner h2 {
  margin: 18px 0 8px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

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

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

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

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

.main-section {
  padding: 72px 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading span {
  display: block;
  max-width: 720px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 900;
  white-space: nowrap;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: -34px;
  position: relative;
  z-index: 6;
}

.category-pill {
  min-height: 96px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-pill:hover,
.category-card:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: rgba(15, 23, 42, 0.94);
}

.category-pill strong,
.category-card h2 {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.category-pill span,
.category-card p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

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

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

.movie-card {
  border: 1px solid rgba(30, 64, 175, 0.34);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card a {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, rgba(34, 211, 238, 0.28), transparent 42%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.72));
}

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

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

.play-mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.92);
  color: #04111f;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.36);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  color: #0f172a;
  font-weight: 950;
}

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

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

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

.movie-card h3 {
  margin: 0;
  min-height: 3.05em;
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.movie-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  color: var(--cyan);
  font-size: 12px;
}

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

.category-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 8px;
  margin-bottom: 18px;
}

.category-covers img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(37, 99, 235, 0.24));
}

.category-covers img:first-child {
  height: 160px;
  grid-row: span 2;
}

.filter-panel {
  margin-bottom: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.68);
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
  gap: 12px;
}

.filter-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-form input,
.filter-form select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.58);
}

.filter-empty {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 20px;
}

.filter-empty.is-visible {
  display: block;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 74px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(30, 64, 175, 0.34);
  border-radius: 24px;
  padding: 12px 18px 12px 12px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.rank-number {
  font-size: 28px;
  font-weight: 950;
  color: var(--cyan);
  text-align: center;
}

.rank-thumb {
  width: 96px;
  height: 132px;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(37, 99, 235, 0.24));
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

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

.detail-main {
  padding: 36px 0 76px;
}

.breadcrumbs {
  margin-bottom: 22px;
  font-size: 14px;
}

.breadcrumbs a,
.breadcrumbs span {
  padding: 6px 10px;
}

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

.player-card,
.detail-card,
.related-panel {
  border: 1px solid rgba(30, 64, 175, 0.34);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.70);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  cursor: pointer;
}

.play-overlay span {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.94);
  color: #031525;
  font-size: 34px;
  font-weight: 950;
  box-shadow: 0 22px 60px rgba(34, 211, 238, 0.34);
}

.player-shell.is-playing .play-overlay {
  display: none;
}

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.detail-meta {
  margin-top: 16px;
}

.detail-meta span {
  padding: 7px 11px;
}

.detail-card h2,
.related-panel h2 {
  margin: 28px 0 14px;
  font-size: 24px;
}

.detail-card p {
  color: var(--muted-strong);
  line-height: 1.9;
  font-size: 17px;
}

.related-panel {
  position: sticky;
  top: 98px;
  padding: 18px;
}

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

.related-list {
  display: grid;
  gap: 14px;
}

.related-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.36);
  border: 1px solid rgba(148, 163, 184, 0.10);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.related-item:hover {
  border-color: var(--border-strong);
  background: rgba(2, 6, 23, 0.56);
}

.related-item img {
  width: 96px;
  height: 116px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(37, 99, 235, 0.24));
}

.related-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.4;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.72);
  padding: 50px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  color: var(--text);
  margin-bottom: 16px;
}

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

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

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  color: #64748b;
  font-size: 13px;
}

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

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

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

  .hero-card {
    max-width: 560px;
  }

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

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 780px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .brand-text em {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 82vh;
  }

  .hero-content {
    padding: 48px 0 92px;
    gap: 26px;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .category-strip,
  .category-grid,
  .movie-grid,
  .movie-grid-wide,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    margin-top: 16px;
  }

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

  .rank-row {
    grid-template-columns: 52px 74px 1fr;
  }

  .rank-row .primary-button {
    grid-column: 1 / -1;
  }

  .rank-thumb {
    width: 74px;
    height: 104px;
  }

  .play-overlay span {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }
}
