:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --soft: rgba(14, 165, 233, 0.12);
  --line: rgba(148, 163, 184, 0.22);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --brand: #38bdf8;
  --brand-strong: #0ea5e9;
  --accent: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.2), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(124, 58, 237, 0.16), transparent 36rem),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb 55%, #7c3aed);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.28);
}

.brand-text {
  font-size: 1.18rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.mobile-nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.16);
}

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

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.2), rgba(15, 23, 42, 0.9));
}

.hero-track,
.hero-slide {
  min-height: 660px;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.hero-dim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 660px;
  margin: 0 auto;
  padding: 96px 22px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-label,
.section-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  font-size: 0.9rem;
}

.hero h1 {
  max-width: 820px;
  margin: 22px 0 18px;
  font-size: clamp(2.6rem, 7vw, 5.9rem);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.9;
}

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

.primary-button,
.ghost-button,
.search-form button,
.filter-bar button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.22s ease;
}

.primary-button,
.search-form button {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 16px 42px rgba(14, 165, 233, 0.28);
}

.primary-button:hover,
.search-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(14, 165, 233, 0.34);
}

.ghost-button,
.filter-bar button,
.text-link {
  color: #dbeafe;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
}

.ghost-button:hover,
.filter-bar button:hover,
.filter-bar button.is-active,
.text-link:hover {
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 165, 233, 0.18);
}

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

.hero-dot {
  width: 38px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: 0.22s ease;
}

.hero-dot.is-active {
  width: 58px;
  background: #38bdf8;
}

.search-panel,
.content-section,
.filter-bar,
.detail-hero,
.player-section,
.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.search-panel {
  margin-top: -52px;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-top: 24px;
  padding-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.search-panel p,
.page-hero p,
.category-tile p,
.category-overview-card p,
.movie-card-body p,
.detail-one-line,
.player-copy p,
.detail-main-text p,
.detail-side dd,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.search-form {
  display: flex;
  width: min(100%, 540px);
  gap: 10px;
}

.search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.65);
  padding: 0 16px;
  outline: none;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(56, 189, 248, 0.58);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.content-section {
  padding-top: 72px;
}

.slim-section {
  padding-top: 48px;
}

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

.section-kicker {
  margin-bottom: 10px;
}

.section-more {
  color: #7dd3fc;
  font-weight: 700;
}

.category-grid,
.movie-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.category-tile,
.movie-card,
.category-overview-card,
.player-card,
.detail-side,
.detail-main-text {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.62));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.category-tile {
  min-height: 210px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: 0.22s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 24px 60px rgba(14, 165, 233, 0.14);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.category-tile::after,
.detail-poster::after,
.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 58%);
  pointer-events: none;
}

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

.category-tile span {
  font-size: 1.25rem;
  font-weight: 800;
}

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: 0.22s ease;
}

.poster-link {
  position: relative;
  min-height: 320px;
  background:
    radial-gradient(circle at 35% 20%, rgba(56, 189, 248, 0.24), transparent 20rem),
    linear-gradient(135deg, #0f172a, #111827);
}

.compact-card .poster-link {
  min-height: 250px;
}

.poster-link img,
.detail-poster img,
.category-overview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  position: absolute;
  inset: 0;
}

.poster-year {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 0.86rem;
}

.movie-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #7dd3fc;
  font-size: 0.86rem;
}

.movie-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 800;
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.13);
  font-size: 0.78rem;
}

.rank-section {
  padding-top: 64px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.64);
  transition: 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(56, 189, 248, 0.48);
  transform: translateY(-2px);
}

.rank-number {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.page-hero {
  padding-top: 84px;
  padding-bottom: 28px;
}

.page-hero h1 {
  margin-top: 18px;
}

.page-hero p {
  max-width: 820px;
  font-size: 1.08rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
}

.breadcrumb a {
  color: #7dd3fc;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 16px;
}

.category-overview-image {
  min-height: 210px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(124, 58, 237, 0.18));
}

.category-overview-card h2 {
  margin: 4px 0 8px;
  font-size: 1.45rem;
  font-weight: 900;
}

.category-preview {
  color: #cbd5e1;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
}

.filter-bar input {
  flex: 1 1 260px;
}

.filter-bar select {
  flex: 0 1 180px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-hero {
  padding-top: 48px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 34px;
  align-items: center;
  padding-top: 30px;
}

.detail-poster {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, #0f172a, #111827);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin-top: 20px;
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.detail-one-line {
  max-width: 840px;
  font-size: 1.18rem;
}

.detail-tags {
  margin-top: 20px;
}

.player-section {
  padding-top: 72px;
}

.player-card {
  padding: 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.22), rgba(2, 6, 23, 0.68));
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 18px 50px rgba(14, 165, 233, 0.38);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #ffffff;
}

.player-copy {
  padding: 18px 8px 4px;
}

.player-copy h2,
.detail-main-text h2,
.detail-side h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  font-weight: 900;
}

.detail-text {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.8fr);
  gap: 22px;
}

.detail-main-text,
.detail-side {
  padding: 24px;
}

.detail-main-text p + h2 {
  margin-top: 26px;
}

.detail-side dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side dt {
  color: #7dd3fc;
  font-weight: 800;
}

.detail-side dd {
  margin: -8px 0 0;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 22px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--muted);
}

.footer-links a:hover {
  color: #7dd3fc;
}

[data-filter-card].is-hidden {
  display: none;
}

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

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

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

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

  .menu-button {
    display: block;
  }

  .mobile-nav.is-open {
    display: flex;
  }

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

  .search-panel,
  .section-head,
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .search-form {
    width: 100%;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .category-overview-grid,
  .rank-list,
  .long-rank-list,
  .detail-text {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    min-height: 420px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .site-header-inner,
  .search-panel,
  .content-section,
  .filter-bar,
  .detail-hero,
  .player-section,
  .page-hero,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-actions,
  .detail-actions,
  .search-form {
    flex-direction: column;
  }

  .poster-link {
    min-height: 280px;
  }
}
