:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --indigo: #6366f1;
  --pink: #f472b6;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 30rem),
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

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

main {
  min-height: 70vh;
}

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

.site-header-inner {
  width: var(--container);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.site-logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--indigo));
  color: white;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
}

.site-logo-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.nav-link,
.mobile-nav-link {
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 12px;
  white-space: nowrap;
}

.nav-link-muted {
  color: var(--text-muted);
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: white;
  background: rgba(34, 211, 238, 0.14);
}

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

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

.mobile-nav {
  display: none;
  width: var(--container);
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-nav-link {
  padding: 11px 12px;
}

.hero-shell {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.6s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.28)),
    linear-gradient(0deg, #020617, transparent 48%),
    radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.24), transparent 24rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: var(--container);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 46px;
  padding: 110px 0 150px;
}

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

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.hero-description,
.page-hero p,
.detail-one-line {
  max-width: 740px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.movie-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
  font-size: 12px;
}

.tag-chip-muted {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-soft);
}

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

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

.primary-button {
  background: linear-gradient(135deg, var(--cyan), var(--indigo));
  color: white;
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-soft);
}

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

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(99, 102, 241, 0.16));
  box-shadow: var(--shadow);
}

.hero-poster img,
.poster-frame img,
.detail-cover img,
.category-tile-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.hero-poster img.is-missing,
.poster-frame img.is-missing,
.detail-cover img.is-missing,
.category-tile-images img.is-missing {
  opacity: 0;
}

.hero-poster:hover img,
.poster-frame:hover img {
  transform: scale(1.055);
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: white;
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  color: white;
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-control-prev {
  left: 24px;
}

.hero-control-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  width: min(820px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.hero-search label {
  display: grid;
  gap: 4px;
}

.hero-search span,
.filter-controls span {
  color: var(--text-muted);
  font-size: 12px;
}

.hero-search input,
.search-control input,
.select-control select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.88);
  color: white;
  outline: none;
}

.hero-search input {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  background: rgba(15, 23, 42, 0.58);
}

.hero-search button {
  min-width: 112px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--cyan), var(--indigo));
  color: white;
  font-weight: 800;
}

.section-block,
.page-hero,
.detail-hero,
.breadcrumb,
.player-section {
  width: var(--container);
  margin: 0 auto;
}

.section-block {
  padding: 76px 0 0;
}

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

.section-heading h2,
.filter-panel h2,
.content-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--cyan);
  font-weight: 800;
}

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

.category-tile,
.category-overview-card,
.filter-panel,
.content-card,
.video-shell,
.detail-cover,
.detail-intro,
.player-section,
.rank-list {
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: 0 20px 54px rgba(2, 6, 23, 0.24);
  backdrop-filter: blur(18px);
}

.category-tile {
  display: grid;
  gap: 14px;
  min-height: 260px;
  padding: 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.category-tile-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  min-height: 122px;
}

.category-tile-images img {
  min-height: 78px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(99, 102, 241, 0.16));
}

.category-tile-copy span,
.movie-kicker,
.rank-row-meta,
.player-note {
  color: var(--text-muted);
  font-size: 13px;
}

.category-tile-copy h3 {
  margin: 6px 0;
  font-size: 20px;
}

.category-tile-copy p,
.movie-card-desc,
.content-card p {
  color: var(--text-soft);
  line-height: 1.72;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 20px 54px rgba(2, 6, 23, 0.36);
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(99, 102, 241, 0.2));
}

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

.poster-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.poster-play {
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  background: rgba(34, 211, 238, 0.18);
  color: #cffafe;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  top: 10px;
  padding: 6px 9px;
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-kicker {
  display: flex;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card-title {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card-desc {
  min-height: 48px;
  margin: 9px 0 0;
  font-size: 14px;
}

.movie-card-tags {
  min-height: 28px;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.filter-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.filter-panel-heading p {
  color: var(--text-muted);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 12px;
}

.search-control,
.select-control {
  display: grid;
  gap: 7px;
}

.search-control input,
.select-control select {
  min-height: 44px;
  padding: 0 13px;
}

.page-hero {
  padding: 76px 0 10px;
}

.compact-page-hero,
.category-page-hero {
  min-height: 330px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.category-overview-list {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  gap: 28px;
  padding-top: 42px;
}

.category-overview-card {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-overview-head p,
.category-overview-head span {
  color: var(--text-muted);
}

.category-overview-head h2 {
  margin: 4px 0 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 26px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  padding: 38px 0 0;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
}

.detail-intro {
  padding: 32px;
  border-radius: 30px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-meta-grid span {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.22);
  color: var(--text-soft);
}

.detail-meta-grid b {
  color: var(--cyan);
  font-size: 12px;
}

.player-section {
  margin-top: 54px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 18rem),
    rgba(2, 6, 23, 0.72);
}

.video-overlay.is-hidden {
  display: none;
}

.play-large {
  width: 78px;
  height: 78px;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--indigo));
  color: white;
  font-size: 28px;
  box-shadow: 0 20px 54px rgba(34, 211, 238, 0.24);
}

.video-overlay p {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 800;
}

.video-overlay span,
.player-note {
  color: var(--text-muted);
}

.source-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.source-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.4);
  color: var(--text-soft);
}

.source-button.is-active {
  border-color: rgba(34, 211, 238, 0.46);
  background: rgba(34, 211, 238, 0.12);
  color: #cffafe;
}

.player-source-label {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
  font-size: 13px;
  font-weight: 800;
}

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

.content-card {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.content-card p {
  margin-top: 14px;
  font-size: 16px;
}

.rank-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 8px;
  border-radius: var(--radius-lg);
  list-style: none;
}

.rank-row {
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  transform: none;
  background: rgba(34, 211, 238, 0.07);
  box-shadow: none;
}

.rank-row-link {
  display: grid;
  grid-template-columns: 64px minmax(120px, 1fr) minmax(160px, 2fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.rank-row-number {
  color: var(--amber);
  font-weight: 900;
}

.rank-row-title {
  font-weight: 800;
}

.rank-row-action {
  color: var(--cyan);
  font-weight: 800;
}

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

.footer-grid,
.footer-bottom {
  width: var(--container);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-grid p {
  max-width: 560px;
  color: var(--text-muted);
  line-height: 1.8;
}

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

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

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

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

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  font-size: 14px;
}

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

  .mobile-menu-button {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 100px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 760px) {
  :root {
    --container: min(100vw - 22px, 1180px);
  }

  .site-header-inner {
    min-height: 64px;
  }

  .site-logo-text {
    font-size: 18px;
  }

  .mobile-nav.is-open {
    grid-template-columns: 1fr;
  }

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

  .hero-content {
    padding: 88px 0 160px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: 40px;
  }

  .hero-description,
  .page-hero p,
  .detail-one-line {
    font-size: 15px;
  }

  .hero-control {
    display: none;
  }

  .hero-search {
    grid-template-columns: 1fr;
    bottom: 22px;
  }

  .hero-dots {
    bottom: 122px;
  }

  .section-heading,
  .filter-panel-heading,
  .category-overview-head,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-block {
    padding-top: 52px;
  }

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

  .category-tile {
    min-height: 220px;
  }

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

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

  .movie-card-title {
    font-size: 15px;
  }

  .movie-card-desc {
    min-height: 0;
    font-size: 13px;
  }

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

  .detail-cover {
    max-width: 260px;
  }

  .detail-intro {
    padding: 22px;
  }

  .detail-meta-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .player-section {
    padding: 14px;
  }

  .rank-row-link {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .rank-row-meta {
    grid-column: 2 / -1;
  }

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