:root {
  color-scheme: dark;
  --bg: #020617;
  --surface: #0f172a;
  --surface-soft: rgba(15, 23, 42, 0.72);
  --surface-card: rgba(15, 23, 42, 0.58);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --shadow: 0 24px 70px rgba(8, 145, 178, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  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(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.22);
}

.brand-text,
.footer-brand strong {
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #67e8f9, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.12);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.82);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

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

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.26) 45%, rgba(2, 6, 23, 0.56) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 88px;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.1);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  color: #ffffff;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 78px);
}

.hero p,
.page-hero p,
.detail-intro p {
  max-width: 760px;
  color: var(--muted-strong);
  line-height: 1.85;
}

.hero p {
  margin: 22px 0;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.tag-row,
.tag-cloud,
.meta-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.tag-cloud span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 12px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 18px 42px rgba(8, 145, 178, 0.24);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 88px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-controls button,
.hero-dot {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.hero-controls button:hover,
.hero-dot.is-active {
  background: rgba(34, 211, 238, 0.7);
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  border-radius: 999px;
}

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

.soft-block {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 32px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.52));
}

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

.section-heading h2,
.content-card h2,
.archive-group h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading a {
  color: #67e8f9;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card-link:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.95);
}

.movie-cover img,
.ranking-thumb img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.48s ease;
}

.movie-card-link:hover .movie-cover img {
  transform: scale(1.09);
}

.movie-type {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-card-body strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card-body em,
.ranking-content em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

.movie-card-body em {
  min-height: 52px;
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-compact .movie-card-body {
  padding: 13px;
}

.movie-card-compact .movie-card-body em {
  min-height: 44px;
  font-size: 13px;
}

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

.category-tile a {
  position: relative;
  display: grid;
  min-height: 190px;
  align-content: space-between;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.16), rgba(30, 41, 59, 0.76));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.category-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  right: -52px;
  top: -52px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.2);
  filter: blur(3px);
}

.category-tile strong {
  position: relative;
  color: #ffffff;
  font-size: 22px;
}

.category-tile em {
  position: relative;
  color: var(--muted-strong);
  font-style: normal;
  line-height: 1.7;
}

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

.category-samples span {
  display: inline-flex;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(2, 6, 23, 0.45);
  border: 0;
  min-width: auto;
}

.ranking-panel {
  border-top: 1px solid rgba(34, 211, 238, 0.14);
  border-bottom: 1px solid rgba(34, 211, 238, 0.14);
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-link {
  display: grid;
  grid-template-columns: 58px 156px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  transition: border-color 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.ranking-link:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.86);
}

.ranking-number {
  color: #67e8f9;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.ranking-content {
  display: grid;
  gap: 8px;
}

.ranking-content strong {
  color: #ffffff;
  font-size: 18px;
}

.ranking-content span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.page-hero {
  padding: 84px 0 22px;
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 68px);
}

.page-hero p {
  margin: 20px 0 0;
  font-size: 18px;
}

.quick-search {
  padding-top: 26px;
  padding-bottom: 26px;
}

.search-panel,
.filter-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.search-panel label,
.filter-panel span {
  color: var(--muted-strong);
  font-weight: 800;
}

.search-line,
.search-filter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-filter {
  grid-template-columns: 1fr minmax(180px, 260px);
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  outline: 0;
  background: rgba(2, 6, 23, 0.62);
}

input:focus,
select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.detail-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.08));
}

.detail-head {
  position: relative;
  z-index: 2;
  padding: 36px 0 72px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #67e8f9;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.detail-intro h1 {
  font-size: clamp(38px, 6vw, 66px);
}

.detail-intro p {
  margin: 20px 0;
  font-size: 18px;
}

.player-section {
  margin-top: -96px;
  position: relative;
  z-index: 5;
}

.player-panel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.28));
  cursor: pointer;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 24px 60px rgba(8, 145, 178, 0.36);
  font-size: 32px;
  line-height: 1;
  padding-left: 4px;
}

.player-overlay strong {
  font-size: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
}

.content-card p {
  margin: 16px 0 0;
  color: var(--muted-strong);
  line-height: 1.9;
  font-size: 16px;
}

.tag-cloud {
  margin-top: 18px;
}

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

.archive-group {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
}

.archive-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.archive-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--muted-strong);
}

.archive-list a:hover {
  color: #67e8f9;
}

.archive-list span {
  color: #64748b;
  white-space: nowrap;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid rgba(30, 41, 59, 0.95);
  background: rgba(2, 6, 23, 0.96);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  gap: 18px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--muted-strong);
  font-weight: 800;
}

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

.footer-copy {
  color: #64748b;
}

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

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

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

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

  .nav-toggle {
    display: block;
  }

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

  .hero-content {
    padding-bottom: 112px;
  }

  .hero-controls {
    right: 24px;
    bottom: 42px;
  }

  .section-heading,
  .search-line,
  .search-filter,
  .detail-grid,
  .archive-layout {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

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

  .ranking-link {
    grid-template-columns: 44px 112px 1fr;
    gap: 12px;
  }

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

  .player-section {
    margin-top: -40px;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner,
  .footer-inner,
  .mobile-nav,
  .soft-block {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 18px;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-intro h1 {
    letter-spacing: -0.02em;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-actions,
  .page-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }

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

  .soft-block {
    padding: 22px;
  }

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

  .ranking-link {
    grid-template-columns: 40px 92px 1fr;
    align-items: start;
  }

  .ranking-content em {
    display: none;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-head {
    padding-bottom: 72px;
  }

  .content-card {
    padding: 22px;
  }
}
