:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefb;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #38bdf8;
  --emerald: #34d399;
  --pink: #f472b6;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 5%, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(244, 114, 182, 0.12), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #06101f 45%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), #2563eb 55%, var(--pink));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  color: var(--soft);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  padding: 8px 12px;
  font-size: 18px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0 28px;
}

.hero-stage {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: saturate(1.14);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.7) 48%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 42%);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  max-width: 760px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  color: var(--soft);
  font-size: 18px;
}

.hero-actions,
.card-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.12);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.34);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
}

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

.hero-poster .poster-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 22px 20px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.94));
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.meta-pill,
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.64);
  padding: 5px 10px;
  font-size: 12px;
}

.hero-tools {
  position: absolute;
  z-index: 5;
  left: 54px;
  right: 54px;
  bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.search-panel {
  flex: 1;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
}

.search-panel input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.56);
  color: #fff;
  padding: 12px 14px;
  font-size: 14px;
}

.search-panel input {
  border: none;
  background: transparent;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.28);
  cursor: pointer;
}

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

.section {
  padding: 34px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.64);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 22px 60px rgba(8, 47, 73, 0.3);
}

.card-cover {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.9));
}

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.82);
  color: var(--cyan);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  left: 12px;
  right: auto;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.card-body {
  padding: 14px;
}

.card-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
  line-height: 1.42;
  min-height: 45px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-text {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.category-card {
  min-height: 154px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 15%, rgba(34, 211, 238, 0.18), transparent 9rem),
    rgba(15, 23, 42, 0.68);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card h3 {
  margin: 0 0 8px;
  color: #fff;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 54px 0 24px;
}

.page-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 20%, rgba(34, 211, 238, 0.16), transparent 18rem),
    rgba(15, 23, 42, 0.62);
  padding: 34px;
  box-shadow: var(--shadow);
}

.page-panel h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-panel p {
  max-width: 760px;
  color: var(--soft);
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  margin: 24px 0 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 62px 84px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(15, 23, 42, 0.92);
}

.rank-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--cyan);
  text-align: center;
}

.rank-row img {
  width: 84px;
  height: 112px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row h3 {
  margin: 0 0 5px;
  color: #fff;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.14), rgba(2, 6, 23, 0.55));
  cursor: pointer;
}

.player-start {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #fff;
  font-size: 30px;
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.45);
  cursor: pointer;
}

.player-box.is-playing .player-overlay {
  display: none;
}

.detail-card,
.info-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  padding: 22px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.13;
  letter-spacing: -0.04em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

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

.poster-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.content-block h2,
.info-card h2 {
  margin: 0 0 12px;
  color: #fff;
}

.content-block p {
  color: var(--soft);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 58px;
  padding: 36px 0;
  background: rgba(2, 6, 23, 0.68);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-grid a {
  display: inline-flex;
  margin: 0 10px 8px 0;
  color: var(--muted);
}

.footer-grid a:hover {
  color: var(--cyan);
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

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

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

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

  .hero-poster {
    max-width: 320px;
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

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

  .hero-content {
    padding: 32px 22px 120px;
  }

  .hero-tools {
    left: 22px;
    right: 22px;
    bottom: 22px;
    flex-direction: column;
    align-items: stretch;
  }

  .search-panel {
    max-width: none;
  }

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

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

  .rank-row {
    grid-template-columns: 48px 70px 1fr;
  }

  .rank-row .btn {
    grid-column: 2 / 4;
  }

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .page-panel {
    padding: 24px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 15px;
  }
}
