:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.16);
  --text: #e5eefb;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --green: #34d399;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
  --radius: 24px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 10%, rgba(14, 165, 233, 0.28), transparent 28rem),
    radial-gradient(circle at 82% 2%, rgba(45, 212, 191, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #08111f 48%, #020617 100%);
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: transparent;
  background: linear-gradient(90deg, #60a5fa, #22d3ee, #a7f3d0);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #07111f;
  font-size: 16px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.25);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

.main-nav a,
.mobile-panel a {
  color: var(--soft);
  padding: 10px 16px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.15);
}

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

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

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

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

.hero-stage {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 36px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(1.15) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.22) 100%),
    radial-gradient(circle at 70% 28%, rgba(56, 189, 248, 0.22), transparent 22rem),
    linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.82) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 72px;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.hero-desc,
.page-hero p,
.detail-desc {
  max-width: 760px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

.hero-chips,
.movie-meta,
.movie-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-chips span,
.movie-meta span,
.movie-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.centered-actions {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #04111f;
  background: linear-gradient(135deg, #38bdf8, #22d3ee, #34d399);
  box-shadow: 0 16px 32px rgba(34, 211, 238, 0.24);
}

.btn.ghost {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.7);
}

.btn.full {
  width: 100%;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.36);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #07111f;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #bae6fd, #5eead4);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: white;
  font-size: 38px;
  line-height: 1;
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 16px;
}

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

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

.section-shell,
.page-main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.section-shell {
  margin-bottom: 54px;
}

.section-head {
  margin-bottom: 22px;
}

.section-head.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2,
.site-footer h2,
.detail-article h2,
.side-recommend h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.text-link {
  color: #67e8f9;
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar.wide {
  grid-template-columns: minmax(260px, 1fr) 150px 170px 150px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  color: #e2e8f0;
  outline: none;
  background: rgba(15, 23, 42, 0.86);
  padding: 0 16px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.56));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.44);
  box-shadow: 0 22px 54px rgba(8, 47, 73, 0.28);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.poster-play,
.rank-number {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #05101d;
  background: linear-gradient(135deg, #7dd3fc, #2dd4bf);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.rank-number {
  top: 12px;
  left: 12px;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border-radius: 999px;
  color: #03101d;
  background: linear-gradient(135deg, #fef3c7, #fb7185);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  min-height: 48px;
  margin: 0 0 10px;
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
}

.movie-info h3 a:hover {
  color: #7dd3fc;
}

.movie-info p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.movie-meta span,
.movie-tags span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 12px;
}

.movie-tags span {
  color: #bae6fd;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
}

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

.category-tile:hover img {
  transform: scale(1.08);
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.9));
}

.category-tile strong,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-tile strong {
  bottom: 62px;
  color: #fff;
  font-size: 22px;
}

.category-tile small {
  bottom: 18px;
  color: #cbd5e1;
  line-height: 1.5;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.rank-line {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.rank-line:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

.rank-index {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #06111e;
  font-weight: 900;
  background: linear-gradient(135deg, #38bdf8, #34d399);
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e2e8f0;
}

.rank-heat {
  color: #fda4af;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.page-main {
  padding-top: 36px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 38px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 34px;
  padding: 58px;
  text-align: center;
  background:
    radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.24), transparent 20rem),
    radial-gradient(circle at 82% 12%, rgba(45, 212, 191, 0.2), transparent 20rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.88));
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.small-hero p {
  margin-left: auto;
  margin-right: auto;
}

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

.category-card-large {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  overflow: hidden;
}

.category-cover-row img {
  width: 100%;
  aspect-ratio: 2 / 2.6;
  object-fit: cover;
}

.category-card-large div {
  padding: 22px;
}

.category-card-large h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card-large p {
  min-height: 54px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
  color: #93c5fd;
  font-size: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 44px;
}

.player-card {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 32px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.78));
  z-index: 3;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.big-play {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #06111e;
  font-size: 32px;
  background: linear-gradient(135deg, #e0f2fe, #22d3ee, #34d399);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.32);
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(26px, 4vw, 42px);
}

.player-overlay em {
  color: #bae6fd;
  font-style: normal;
  font-weight: 800;
}

.detail-copy {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 32px;
  padding: 34px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  font-size: clamp(30px, 4vw, 54px);
}

.detail-chips {
  margin-top: 22px;
}

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

.detail-article,
.side-recommend {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-article p {
  color: #cbd5e1;
  line-height: 2;
  font-size: 16px;
}

.info-table {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.info-table div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.info-table span {
  color: var(--muted);
}

.info-table strong {
  color: #fff;
}

.side-recommend {
  position: sticky;
  top: 92px;
}

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

.side-grid .movie-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
}

.side-grid .movie-poster img {
  height: 100%;
  min-height: 138px;
}

.side-grid .movie-info h3 {
  min-height: auto;
}

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

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

.footer-brand {
  margin-bottom: 16px;
}

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

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

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #67e8f9;
}

.copyright {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

  .hero-poster {
    display: none;
  }

  .rank-panel,
  .side-recommend {
    position: static;
  }
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-panel.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

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

  .hero-content {
    padding: 42px 24px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.05em;
  }

  .hero-arrow {
    display: none;
  }

  .filter-bar,
  .filter-bar.wide {
    grid-template-columns: 1fr;
  }

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

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

  .page-hero {
    padding: 38px 22px;
    border-radius: 26px;
  }

  .detail-copy,
  .detail-article,
  .side-recommend {
    padding: 22px;
  }

  .player-card {
    min-height: 360px;
  }

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

@media (max-width: 460px) {
  .nav-shell,
  .section-shell,
  .page-main,
  .footer-grid,
  .copyright,
  .hero {
    width: min(100% - 20px, 1220px);
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 14px;
  }

  .movie-info p,
  .movie-tags {
    display: none;
  }

  .side-grid .movie-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}
