: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.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --red: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.13), transparent 34rem),
    radial-gradient(circle at 90% 15%, rgba(251, 113, 133, 0.12), transparent 34rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #67e8f9 50%, #f472b6);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.34);
  font-size: 15px;
}

.brand-text {
  font-size: 20px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--soft);
  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: var(--cyan);
  background: rgba(34, 211, 238, 0.13);
}

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

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.mobile-menu.open {
  display: grid;
  gap: 4px;
}

.hero {
  position: relative;
  min-height: min(720px, calc(100vh - 68px));
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 1.2s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.62);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 28%);
}

.hero-inner {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 44px;
  align-items: center;
  padding: 70px 0 110px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5.6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  color: #e0f2fe;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 800;
}

.hero-copy p {
  margin: 0;
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.card-meta,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.card-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--soft);
}

.hero-tags span {
  padding: 7px 12px;
  color: #cffafe;
}

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

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

.primary-btn,
.hero-search button {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.28);
}

.ghost-btn,
.section-more {
  color: #e0f2fe;
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.7);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  background: rgba(15, 23, 42, 0.8);
}

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

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

.hero-poster span,
.poster-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.9);
  box-shadow: 0 20px 42px rgba(6, 182, 212, 0.34);
}

.hero-poster span {
  width: 70px;
  height: 70px;
  font-size: 28px;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
}

.hero-arrow {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 28px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

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

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
}

.hero-search input,
.search-box input,
.filters select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
}

.hero-search input {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
}

.category-strip,
.content-section,
.page-main,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.category-strip,
.content-section {
  padding: 54px 0 0;
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1,
.related-panel h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.035em;
}

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

.section-head span,
.page-hero p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

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

.category-card,
.category-hero {
  position: relative;
  overflow: hidden;
  min-height: 174px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card img,
.category-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  filter: saturate(1.15);
}

.category-card::after,
.category-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.22));
}

.category-card span,
.category-card p,
.category-hero span,
.category-hero p {
  position: relative;
  z-index: 2;
}

.category-card span,
.category-hero span {
  display: block;
  padding: 86px 18px 8px;
  font-size: 20px;
  font-weight: 900;
}

.category-card p,
.category-hero p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.7;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
}

.card-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin: 0;
  background: rgba(15, 23, 42, 0.9);
}

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

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 52%);
}

.poster-region,
.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-region {
  left: 10px;
  color: #cffafe;
  background: rgba(6, 182, 212, 0.82);
}

.poster-year {
  right: 10px;
  color: white;
  background: rgba(0, 0, 0, 0.58);
}

.rank-badge {
  left: 10px;
  top: 46px;
  color: white;
  background: rgba(251, 113, 133, 0.86);
}

.poster-play {
  z-index: 3;
  width: 56px;
  height: 56px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .poster-play {
  opacity: 1;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  min-height: 48px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0 0 14px;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta span {
  padding: 5px 8px;
  font-size: 12px;
}

.compact .card-body h3 {
  min-height: auto;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 88px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(30, 41, 59, 0.74);
}

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

.list-rank {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #001018;
  background: var(--cyan);
  font-weight: 900;
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-info strong,
.rank-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
}

.rank-info small {
  color: var(--muted);
}

.page-main {
  padding: 42px 0 64px;
}

.page-hero {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
  margin-bottom: 28px;
}

.soft-hero {
  background:
    radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.18), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.42));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 4.8vw, 60px);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 17px;
}

.search-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.search-box,
.filters label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-weight: 700;
  font-size: 14px;
}

.search-box input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
}

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

.filters select {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
}

.flat-section {
  padding-top: 0;
}

.empty-message {
  margin: 36px 0 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.58);
}

.category-blocks {
  display: grid;
  gap: 28px;
}

.category-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: stretch;
}

.category-hero {
  min-height: 100%;
}

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

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

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.16));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
  font-size: 30px;
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.38);
}

.player-overlay strong {
  font-size: 18px;
}

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

.detail-copy,
.related-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.detail-copy {
  padding: clamp(24px, 4vw, 38px);
}

.detail-copy h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-meta {
  margin: 18px 0 28px;
}

.detail-meta span {
  padding: 8px 12px;
}

.detail-copy section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-copy h2 {
  position: relative;
  margin: 0 0 12px;
  padding-left: 14px;
  font-size: 22px;
}

.detail-copy h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 4px;
  height: 1.2em;
  border-radius: 999px;
  background: var(--cyan);
}

.detail-copy p {
  margin: 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.95;
}

.lead-text {
  color: #e0f2fe !important;
  font-size: 18px !important;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.tag-cloud span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.72);
}

.related-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.related-panel h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.related-list {
  grid-template-columns: 1fr;
}

.related-list .rank-row {
  grid-template-columns: 74px 1fr;
}

.related-list .rank-row img {
  width: 74px;
  height: 58px;
}

.site-footer {
  margin-top: 72px;
  padding: 40px 0 30px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 32px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

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

.footer-brand {
  margin-bottom: 14px;
  font-size: 20px;
}

.footer-bottom {
  margin-top: 30px;
  color: #64748b;
  font-size: 13px;
}

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

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

  .related-panel {
    position: static;
  }
}

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

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

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

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

@media (max-width: 640px) {
  .nav-wrap,
  .mobile-menu,
  .category-strip,
  .content-section,
  .page-main,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 17px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-inner {
    padding-bottom: 170px;
  }

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

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

  .hero-controls {
    bottom: 110px;
  }

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

  .card-body {
    padding: 12px;
  }

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

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

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

  .rank-row {
    grid-template-columns: auto 76px 1fr;
  }

  .rank-row img {
    width: 76px;
  }

  .player-card {
    border-radius: 18px;
  }

  .detail-copy,
  .related-panel,
  .page-hero {
    border-radius: 20px;
  }
}
