:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --panel-soft: rgba(30, 41, 59, 0.58);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --green: #34d399;
  --orange: #fb923c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 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 30rem),
    radial-gradient(circle at 82% 12%, rgba(59, 130, 246, 0.18), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.logo-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, #22d3ee, #2563eb 58%, #a855f7);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
}

.logo-mark::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 11px;
  border-left: 14px solid rgba(255, 255, 255, 0.92);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.logo-name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-subtitle {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: -2px;
}

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

.nav a {
  color: #cbd5e1;
  font-weight: 650;
  position: relative;
  padding: 24px 0;
  transition: color 0.24s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 18px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--cyan);
  transition: width 0.24s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--cyan);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.05);
  opacity: 0.38;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.38) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 1));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 660px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 52px;
  padding: 64px 0 88px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.14);
  color: #a5f3fc;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-title-gradient {
  display: block;
  margin-top: 10px;
  color: transparent;
  background: linear-gradient(90deg, #67e8f9, #f8fafc 52%, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-text {
  max-width: 690px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-meta,
.card-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.pill.hot {
  border-color: rgba(251, 146, 60, 0.35);
  color: #fed7aa;
}

.pill.cyan {
  border-color: rgba(34, 211, 238, 0.35);
  color: #a5f3fc;
}

.hero-actions,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 42px rgba(14, 165, 233, 0.28);
}

.btn-secondary {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
}

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

.btn-primary:hover {
  box-shadow: 0 18px 48px rgba(14, 165, 233, 0.42);
}

.hero-poster-shell {
  position: relative;
  justify-self: center;
  width: min(420px, 92%);
}

.hero-poster-shell::before {
  content: "";
  position: absolute;
  inset: 20px -22px -22px 22px;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.32), rgba(168, 85, 247, 0.24));
  filter: blur(22px);
}

.hero-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 34px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.hero-rank {
  position: absolute;
  left: -18px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(16px);
  color: #e0f2fe;
  font-weight: 800;
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.56);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform 0.22s ease, background 0.22s ease;
}

.hero-control:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(2, 6, 23, 0.8);
}

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

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

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

.main {
  padding: 56px 0 72px;
}

.section {
  margin-top: 58px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title {
  margin: 0;
  color: #fff;
  font-weight: 850;
  letter-spacing: -0.04em;
}

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

.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.view-all {
  color: #67e8f9;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.15);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 52px rgba(8, 145, 178, 0.18);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 2 / 3;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease, filter 0.32s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.07);
  filter: brightness(1.08);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.92);
  color: #fff7ed;
  font-size: 13px;
  font-weight: 900;
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.9);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.34);
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 14px;
}

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

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

.card-meta {
  margin-top: 10px;
  gap: 6px;
}

.card-meta .pill {
  padding: 4px 8px;
  font-size: 12px;
}

.horizontal-list {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.horizontal-list::-webkit-scrollbar {
  display: none;
}

.horizontal-list .movie-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

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

.category-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.category-card {
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.category-card strong {
  display: block;
  color: #fff;
  font-size: 20px;
  margin-bottom: 8px;
}

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

.category-card span {
  color: var(--cyan);
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr repeat(3, 170px);
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: none;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.66);
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.result-note {
  min-height: 24px;
  color: var(--muted);
  font-size: 14px;
  margin: -10px 0 18px;
}

.page-hero {
  padding: 60px 0 36px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.18), transparent 30rem),
    rgba(15, 23, 42, 0.2);
}

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

.breadcrumb a {
  color: #a5f3fc;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-soft);
  transition: border-color 0.24s ease, transform 0.24s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
}

.rank-num {
  color: transparent;
  background: linear-gradient(135deg, #22d3ee, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 34px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 92px;
  height: 126px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  color: #fed7aa;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

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

.player-card,
.info-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(8, 145, 178, 0.18), rgba(0, 0, 0, 0.18));
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.player-wrap.playing .player-overlay {
  opacity: 0;
}

.big-play {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.94), rgba(37, 99, 235, 0.94));
  box-shadow: 0 18px 50px rgba(6, 182, 212, 0.32);
  cursor: pointer;
}

.player-message {
  padding: 12px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.38);
  font-size: 14px;
}

.info-card,
.side-card {
  padding: 24px;
}

.detail-title {
  font-size: clamp(30px, 4vw, 46px);
}

.detail-poster {
  width: 100%;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.content-block {
  margin-top: 28px;
}

.content-block h2,
.side-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 24px;
}

.content-block p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.85;
}

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

.related-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.related-item img {
  width: 64px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
}

.related-item strong {
  display: block;
  color: #fff;
  line-height: 1.4;
}

.related-item span {
  color: var(--muted);
  font-size: 13px;
}

.footer {
  padding: 38px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.footer a {
  color: #a5f3fc;
}

.no-results {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.35);
}

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

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

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

  .side-card {
    order: -1;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 52px 0 86px;
  }

  .hero-poster-shell {
    width: min(300px, 80%);
  }

  .hero-control {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .hero-control:hover {
    transform: scale(1.08);
  }

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

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

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

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

  .rank-item {
    grid-template-columns: 48px 74px 1fr;
  }

  .rank-score {
    grid-column: 3;
    font-size: 16px;
  }

  .rank-item img {
    width: 74px;
    height: 102px;
  }
}

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

  .logo {
    min-width: 0;
  }

  .logo-subtitle {
    display: none;
  }

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

  .hero-text {
    font-size: 16px;
  }

  .grid.cards,
  .grid.cards.big,
  .category-grid {
    gap: 14px;
  }

  .card-body {
    padding: 11px;
  }

  .card-title {
    font-size: 14px;
    min-height: 42px;
  }

  .horizontal-list .movie-card {
    flex-basis: 170px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}
