:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #ffffff;
  --text: #f8fafc;
  --muted: #94a3b8;
  --dark-text: #0f172a;
  --soft-text: #475569;
  --line: rgba(148, 163, 184, 0.22);
  --blue: #2563eb;
  --sky: #38bdf8;
  --purple: #a855f7;
  --pink: #f472b6;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fafc;
  color: var(--dark-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sky), var(--purple));
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.34);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  gap: 22px;
  color: #cbd5e1;
  font-weight: 700;
  margin-left: auto;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
  color: #ffffff;
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.header-search input,
.mobile-panel input {
  width: 210px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 10px 14px;
}

.header-search input::placeholder,
.mobile-panel input::placeholder {
  color: #94a3b8;
}

.header-search button,
.mobile-panel button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  padding: 10px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.72);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.mobile-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(51, 65, 85, 0.82);
}

.hero-shell {
  position: relative;
  color: #ffffff;
  background: var(--bg);
  overflow: hidden;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
  gap: 48px;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide {
  isolation: isolate;
}

.hero-slide.is-active {
  z-index: 2;
}

.hero-backdrop {
  position: absolute;
  inset: -1px;
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 0.9;
  filter: saturate(1.1);
}

.hero-copy {
  position: relative;
  max-width: 740px;
  padding-top: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

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

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

.hero-meta span,
.meta-line span {
  border-radius: 999px;
  padding: 5px 10px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 12px;
  font-weight: 800;
}

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

.primary-btn,
.ghost-btn,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.rank-action {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-btn:hover,
.ghost-btn:hover,
.rank-action:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  background: #111827;
}

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

.hero-control-row {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-dots,
.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.hero-quick-links a,
.quick-category-strip a {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
}

.quick-category-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 12px 0 4px;
}

.quick-category-strip a {
  flex: 0 0 auto;
  color: #334155;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.section-block,
.page-hero,
.detail-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 54px auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2,
.page-hero h1,
.detail-copy h1,
.detail-text h2 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.035em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-head p {
  margin: 7px 0 0;
  color: var(--soft-text);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.poster-link img,
.rank-cover img,
.compact-card img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(37, 99, 235, 0.92);
}

.card-rank {
  left: 12px;
  top: 12px;
  min-width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-content {
  padding: 16px;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.28;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover {
  color: var(--blue);
}

.movie-card p,
.rank-card p,
.category-card p,
.detail-text p {
  margin: 0;
  color: var(--soft-text);
}

.movie-card .meta-line span,
.rank-card .meta-line span {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  min-height: 210px;
  border-radius: 28px;
  padding: 24px;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.46), transparent 32%), linear-gradient(135deg, #0f172a, #1e1b4b 58%, #172554);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.category-title {
  display: inline-flex;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.category-card p {
  margin: 12px 0 18px;
  color: #cbd5e1;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-weight: 800;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-radius: 22px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  font-weight: 950;
}

.rank-cover {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

.rank-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #0f172a;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(150px, 0.5fr));
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.07);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  outline: 0;
  color: #0f172a;
  background: #f8fafc;
  padding: 11px 13px;
}

.empty-state {
  display: none;
  border-radius: 22px;
  padding: 28px;
  color: #64748b;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.07);
}

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

.searchable-card.is-hidden {
  display: none;
}

.page-hero {
  margin-top: 34px;
  border-radius: 34px;
  padding: 54px;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.34), transparent 34%), linear-gradient(135deg, #020617, #111827 52%, #172554);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
}

.page-hero h1 {
  margin: 16px 0 10px;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 64px);
}

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

.compact-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.compact-card img {
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  color: #0f172a;
  line-height: 1.3;
}

.compact-card em {
  margin-top: 4px;
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 24px 0;
  color: #64748b;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: var(--blue);
}

.player-section {
  margin-bottom: 26px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: #020617;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.34);
  aspect-ratio: 16 / 9;
}

.player-box video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-box video {
  background: #020617;
}

.player-cover {
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 4px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.34);
  font-size: 34px;
}

.play-text {
  font-size: 20px;
  font-weight: 950;
}

.detail-main {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  border-radius: 34px;
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

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

.detail-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 4.8vw, 58px);
  line-height: 1.08;
}

.lead-text {
  max-width: 760px;
  color: #475569;
  font-size: 18px;
}

.detail-actions .ghost-btn {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.detail-text {
  border-radius: 28px;
  padding: 30px;
  background: #ffffff;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.detail-text h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
}

.detail-text h2:not(:first-child) {
  margin-top: 28px;
}

.detail-text p {
  font-size: 17px;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 34px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 28px;
}

.site-footer p {
  margin: 12px 0 0;
  color: #94a3b8;
}

.site-footer strong {
  display: block;
  color: #ffffff;
  margin-bottom: 12px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  color: #94a3b8;
  margin: 7px 0;
}

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 14px;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero-track {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    align-content: center;
  }

  .hero-poster {
    width: min(280px, 72vw);
  }

  .hero-control-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-card {
    grid-template-columns: 44px 74px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 3;
    width: fit-content;
  }

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

  .detail-poster {
    max-width: 280px;
  }

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

@media (max-width: 620px) {
  .header-inner,
  .section-block,
  .page-hero,
  .detail-wrap,
  .quick-category-strip,
  .footer-grid,
  .copyright {
    width: min(100% - 22px, 1240px);
  }

  .hero-slide,
  .hero-control-row {
    width: min(100% - 22px, 1240px);
  }

  .hero-track {
    min-height: 720px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 38px;
  }

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

  .movie-grid,
  .dense-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 42px 68px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-card p {
    display: none;
  }

  .detail-main,
  .detail-text {
    padding: 20px;
    border-radius: 24px;
  }

  .player-box {
    border-radius: 22px;
  }
}
