:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --rose: #f43f5e;
  --gold: #f59e0b;
  --radius: 24px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -10%, rgba(6, 182, 212, 0.22), transparent 34rem),
    radial-gradient(circle at 88% 6%, rgba(37, 99, 235, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 76%);
}

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

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

button,
input {
  font: inherit;
}

.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);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 16px 35px rgba(6, 182, 212, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 14px;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #67e8f9;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--soft);
}

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

main,
.page-main,
.detail-main {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-slider {
  position: relative;
  margin-top: 22px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.46fr);
  gap: 34px;
  align-items: end;
  padding: clamp(28px, 5vw, 72px);
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-content {
  max-width: 850px;
  padding-bottom: 26px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.category-hero h1,
.detail-info h1 {
  margin: 0;
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content h1 {
  max-width: 980px;
  font-size: clamp(42px, 6vw, 86px);
}

.hero-content h2 {
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 58px);
}

.hero-content p,
.page-hero p,
.category-hero p,
.detail-info p {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(6, 182, 212, 0.28);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.62);
  color: var(--soft);
}

.btn-ghost:hover {
  border-color: rgba(103, 232, 249, 0.45);
  color: #ffffff;
}

.hero-poster {
  align-self: end;
  width: min(100%, 330px);
  margin-left: auto;
  aspect-ratio: 3 / 4.15;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.hero-poster span,
.hero-mini-card span,
.poster-frame,
.detail-cover {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background-color: #0f172a;
  background-position: center;
  background-size: cover;
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 5vw, 72px);
  bottom: 26px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.24);
}

.hero-dot.is-active {
  background: #67e8f9;
}

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

.hero-mini-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 90px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.hero-mini-card:hover {
  border-color: rgba(103, 232, 249, 0.38);
  transform: translateY(-3px);
}

.hero-mini-card span {
  height: 70px;
  border-radius: 15px;
}

.hero-mini-card strong,
.hero-mini-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-mini-card strong {
  font-size: 14px;
}

.hero-mini-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.section-block {
  margin-top: 42px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.48);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

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

.section-heading.compact {
  display: block;
  margin-bottom: 16px;
}

.section-heading h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 950;
  letter-spacing: -0.05em;
}

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

.search-panel {
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(37, 99, 235, 0.08)),
    rgba(15, 23, 42, 0.58);
}

.search-bar {
  display: flex;
  gap: 12px;
}

.search-bar input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  outline: none;
  padding: 0 18px;
  background: rgba(2, 6, 23, 0.74);
  color: var(--text);
}

.search-bar input:focus {
  border-color: rgba(103, 232, 249, 0.58);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

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

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

.category-tile,
.category-showcase-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.16), transparent 55%),
    rgba(2, 6, 23, 0.48);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-tile:hover,
.category-showcase-card:hover {
  border-color: rgba(103, 232, 249, 0.38);
  background:
    radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.24), transparent 55%),
    rgba(15, 23, 42, 0.72);
  transform: translateY(-4px);
}

.category-tile span,
.category-showcase-card h3 {
  display: block;
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 950;
}

.category-tile p,
.category-showcase-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.category-showcase-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-showcase-card div a {
  max-width: 100%;
  overflow: hidden;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.32);
  transform: translateY(-6px);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4.15;
  border-radius: 23px 23px 0 0;
}

.poster-badge,
.poster-type,
.rank-label {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.poster-badge {
  right: 12px;
}

.poster-type {
  left: 12px;
}

.rank-label {
  left: 12px;
  top: 48px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
}

.movie-card-body {
  display: block;
  padding: 15px;
}

.movie-card-body strong,
.movie-card-body em,
.movie-card-body small {
  display: block;
}

.movie-card-body strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-body em {
  overflow: hidden;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-body small {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  margin-top: 9px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.1);
  color: #a5f3fc;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero,
.category-hero {
  overflow: hidden;
  margin-top: 28px;
  padding: clamp(30px, 5vw, 66px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 24% 0%, rgba(6, 182, 212, 0.18), transparent 48%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.72));
  box-shadow: var(--shadow);
}

.compact-hero h1,
.category-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.category-hero {
  min-height: 410px;
  display: flex;
  align-items: end;
  background-position: center;
  background-size: cover;
}

.detail-main {
  padding-top: 24px;
}

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

.breadcrumb a {
  color: #67e8f9;
}

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

.video-panel,
.detail-info {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}

.video-panel {
  padding: 16px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.94), rgba(37, 99, 235, 0.94));
  color: #ffffff;
  box-shadow: 0 24px 58px rgba(6, 182, 212, 0.36);
}

.play-button span {
  margin-left: 6px;
  font-size: 34px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.detail-info {
  padding: 22px;
}

.detail-cover {
  aspect-ratio: 3 / 4.15;
  margin-bottom: 22px;
}

.detail-info h1 {
  font-size: clamp(30px, 3vw, 44px);
}

.meta-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--soft);
  font-size: 14px;
}

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

.detail-tags {
  margin-top: 18px;
}

.detail-text {
  color: var(--soft);
  line-height: 1.9;
}

.detail-text h2 {
  margin: 0 0 16px;
  color: var(--text);
}

.detail-text h2 + p {
  margin-top: 0;
}

.detail-text p + h2 {
  margin-top: 28px;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 52px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner p {
  margin: 12px 0 18px;
  line-height: 1.75;
}

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

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

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 12px;
    font-size: 13px;
  }

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

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

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

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

  .hero-stage {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .hero-poster {
    display: none;
  }

  .hero-strip,
  .movie-grid,
  .ranking-grid,
  .category-grid,
  .category-grid.large,
  .category-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-info {
    order: -1;
  }

  .detail-cover {
    display: none;
  }
}

@media (max-width: 620px) {
  .nav-shell,
  main,
  .page-main,
  .detail-main,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 22px, 1440px);
  }

  .logo,
  .footer-logo {
    font-size: 18px;
  }

  .hero-stage {
    min-height: 650px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 24px;
  }

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

  .hero-content h2,
  .compact-hero h1,
  .category-hero h1 {
    font-size: 30px;
  }

  .hero-content p,
  .page-hero p,
  .category-hero p,
  .detail-info p {
    font-size: 15px;
  }

  .hero-dots {
    left: 24px;
    bottom: 18px;
  }

  .hero-strip,
  .movie-grid,
  .ranking-grid,
  .category-grid,
  .category-grid.large,
  .category-showcase {
    grid-template-columns: 1fr;
  }

  .section-block,
  .page-hero,
  .category-hero,
  .video-panel,
  .detail-info {
    border-radius: 22px;
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-block;
    margin-top: 10px;
  }

  .search-bar {
    flex-direction: column;
  }

  .play-button {
    width: 72px;
    height: 72px;
  }
}
