:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
}

.site-nav-wrap {
  width: min(1280px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 0.25s ease;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  box-shadow: 0 12px 32px rgba(8, 145, 178, 0.3);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

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

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

.nav-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.55);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

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

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

.hero-slide {
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  transition: opacity 0.85s ease, visibility 0.85s ease, transform 4.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.62) 46%, rgba(2, 6, 23, 0.28)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 48%),
    radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.28), transparent 32rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 110px;
}

.hero-kicker,
.eyebrow {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 860px;
  margin: 12px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.18);
  font-size: 12px;
  font-weight: 700;
}

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

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

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  box-shadow: 0 16px 38px rgba(8, 145, 178, 0.28);
}

.button-ghost,
.section-more {
  color: #e2e8f0;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
}

.button-primary:hover,
.button-ghost:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.26);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.66);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search-card {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 78px;
  z-index: 5;
  width: min(420px, calc(100% - 48px));
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search-card label {
  display: block;
  margin-bottom: 9px;
  color: #e2e8f0;
  font-weight: 800;
}

.hero-search-row {
  display: flex;
  gap: 10px;
}

.hero-search-row input,
.catalog-tools input,
.catalog-tools select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 13px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.65);
  outline: none;
}

.hero-search-row input {
  padding: 0 14px;
}

.hero-search-row button {
  min-width: 88px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: #0891b2;
  font-weight: 800;
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-top {
  padding-top: 38px;
}

.content-section {
  margin: 64px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}

.category-tile,
.channel-card a,
.story-card,
.player-shell,
.detail-hero,
.page-hero,
.catalog-tools {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(16px);
}

.category-tile {
  min-height: 118px;
  padding: 20px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile::before {
  position: absolute;
  inset: auto -40px -70px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  content: "";
  background: rgba(34, 211, 238, 0.18);
  filter: blur(8px);
}

.category-tile:hover,
.channel-card a:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-tile strong {
  position: relative;
  font-size: 20px;
}

.category-tile span {
  position: relative;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.category-tile-main {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.34), rgba(15, 23, 42, 0.8));
}

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

.movie-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.36);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  background: rgba(30, 41, 59, 0.58);
  box-shadow: 0 20px 46px rgba(2, 6, 23, 0.28);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(15, 23, 42, 0.6)),
    #0f172a;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(2, 6, 23, 0.62), transparent 46%);
  opacity: 0.9;
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

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

.card-meta,
.card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  -webkit-line-clamp: 1;
}

.card-desc {
  min-height: 42px;
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
}

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

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

.movie-card-compact a {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 170px;
}

.movie-card-compact .poster-frame {
  aspect-ratio: auto;
  height: 100%;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  min-width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.34);
  font-size: 14px;
}

.page-hero {
  padding: 36px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.page-hero::after {
  position: absolute;
  right: -80px;
  top: -110px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  content: "";
  background: rgba(34, 211, 238, 0.18);
  filter: blur(18px);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0;
  color: var(--muted-strong);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 32px 0 64px;
}

.channel-card a {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.channel-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 170px;
  background: #0f172a;
}

.channel-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
}

.channel-info {
  padding: 22px;
}

.channel-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.channel-info p {
  margin: 0;
  color: var(--muted);
}

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

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

.breadcrumb strong {
  color: var(--muted-strong);
  font-weight: 700;
}

.catalog-tools {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(150px, 1fr));
  gap: 14px;
  margin: 28px 0 42px;
  padding: 18px;
  border-radius: 22px;
}

.catalog-tools label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.catalog-tools input,
.catalog-tools select {
  padding: 0 12px;
}

.filter-grid .movie-card.is-hidden {
  display: none;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
  padding: 24px;
  border-radius: 30px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  margin: 10px 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-meta {
  color: #a5f3fc;
  font-weight: 800;
}

.detail-one-line {
  max-width: 850px;
  color: var(--muted-strong);
  font-size: 18px;
}

.detail-tags {
  margin: 22px 0 28px;
}

.player-section {
  margin: 48px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.78));
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.92);
  box-shadow: 0 18px 42px rgba(8, 145, 178, 0.38);
  font-size: 36px;
  line-height: 1;
}

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

.story-card {
  padding: 28px;
  border-radius: 24px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}

.footer-brand p {
  max-width: 650px;
  margin: 14px 0 0;
  color: var(--muted);
}

.footer-logo {
  font-size: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
}

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

.copyright {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 14px;
}

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

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

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

  .hero-search-card {
    display: none;
  }
}

@media (max-width: 820px) {
  .site-nav-wrap {
    flex-wrap: wrap;
    padding: 11px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 0 2px;
  }

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

  .nav-link {
    display: block;
    padding: 12px 14px;
  }

  .hero {
    height: 72vh;
    min-height: 560px;
  }

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

  .hero-control {
    width: 42px;
    height: 42px;
    font-size: 30px;
  }

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  .movie-grid,
  .ranking-list,
  .ranking-list-wide,
  .channel-grid,
  .category-strip,
  .story-section,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 520px) {
  .page-shell,
  .site-nav-wrap,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 17px;
  }

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

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

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

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

  .movie-card h3 {
    font-size: 14px;
    min-height: 41px;
  }

  .movie-card-compact a {
    grid-template-columns: 112px minmax(0, 1fr);
  }

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

  .page-hero,
  .detail-hero,
  .story-card {
    padding: 22px;
    border-radius: 22px;
  }

  .detail-poster img {
    min-height: 0;
  }
}
