:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #172033;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --gold: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(6, 182, 212, 0.13), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(37, 99, 235, 0.16), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.25);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 20px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: rgba(51, 65, 85, 0.9);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-control input,
.filter-select {
  min-width: 230px;
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.25);
  outline: none;
  background: rgba(30, 41, 59, 0.92);
  border-radius: 12px;
  padding: 10px 12px;
  transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-control input:focus,
.filter-select:focus {
  border-color: rgba(6, 182, 212, 0.9);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

.header-search button,
.mobile-search button,
.btn-primary,
.btn-ghost,
.play-button {
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 12px;
  padding: 10px 16px;
  transition: 0.22s ease;
}

.header-search button,
.btn-primary,
.play-button {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 34px rgba(6, 182, 212, 0.18);
}

.header-search button:hover,
.btn-primary:hover,
.play-button:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.btn-ghost:hover {
  border-color: rgba(6, 182, 212, 0.55);
  color: #e0faff;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
}

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

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

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

.hero {
  position: relative;
  height: clamp(540px, 72vh, 780px);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding-top: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.26);
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 22px;
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-intro {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
  margin: 22px 0 30px;
}

.meta-pill,
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(51, 65, 85, 0.72);
  color: #e2e8f0;
  font-size: 13px;
}

.rating-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #111827;
  background: var(--gold);
  font-weight: 900;
}

.hero-actions,
.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 42px;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.6);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.main-space {
  padding: 72px 0;
}

.section-block {
  margin-bottom: 76px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-title h2 {
  position: relative;
  margin: 0;
  padding-left: 18px;
  font-size: clamp(26px, 3vw, 36px);
}

.section-title h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-more {
  color: #67e8f9;
  font-weight: 700;
}

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

.movie-card {
  min-width: 0;
  display: grid;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  transition: 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.75);
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.13);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #0f172a);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 55%);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(6, 182, 212, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: 0.24s ease;
}

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

.card-body {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 16px;
}

.card-body strong {
  min-height: 44px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body em,
.card-desc {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.55;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  color: #67e8f9;
  font-size: 12px;
  background: rgba(6, 182, 212, 0.12);
  border-radius: 999px;
  padding: 4px 8px;
}

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

.category-card,
.info-panel {
  background: linear-gradient(150deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.82));
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.category-card {
  min-height: 168px;
  display: grid;
  align-content: space-between;
  transition: 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.65);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p,
.info-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.page-hero {
  padding: 78px 0 42px;
  background:
    linear-gradient(120deg, rgba(6, 182, 212, 0.16), transparent 38%),
    linear-gradient(220deg, rgba(37, 99, 235, 0.18), transparent 42%);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(36px, 5vw, 60px);
}

.page-hero p {
  max-width: 860px;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
}

.search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
}

.search-control input {
  width: 100%;
}

.filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.75);
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  border-color: rgba(6, 182, 212, 0.75);
  background: rgba(6, 182, 212, 0.18);
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  transition: 0.22s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(6, 182, 212, 0.58);
}

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

.rank-row span {
  display: grid;
  gap: 6px;
}

.rank-row strong {
  font-size: 17px;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-row b {
  color: #111827;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--gold);
}

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

.breadcrumb a {
  color: #67e8f9;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.86));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.play-button {
  min-width: 156px;
  padding: 14px 22px;
  font-weight: 800;
  font-size: 17px;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
}

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

.detail-content {
  padding: 30px 0 76px;
}

.detail-title {
  font-size: clamp(34px, 5vw, 62px);
  margin-bottom: 18px;
}

.detail-section {
  margin-top: 32px;
}

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-section p {
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 16px;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  padding: 42px 0;
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 26px;
}

.footer-grid p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.75;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.68);
}

.is-hidden-card {
  display: none !important;
}

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

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

  .header-search {
    display: none;
  }
}

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

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

  .brand-copy small {
    display: none;
  }

  .nav-wrap {
    height: 68px;
  }

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    padding: 72px 0 96px;
  }

  .hero-slide::after {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.56));
  }

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

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

  .detail-side {
    grid-row: 1;
  }

  .detail-poster {
    display: none;
  }

  .footer-grid {
    display: grid;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .mobile-nav,
  .footer-grid,
  .hero-dots {
    width: min(100% - 24px, 1240px);
  }

  .brand-copy strong {
    font-size: 17px;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .search-control {
    min-width: 100%;
  }

  .rank-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
  }

  .rank-row img {
    width: 58px;
    height: 78px;
  }

  .page-hero {
    padding: 52px 0 34px;
  }
}
