
:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, .72);
  --panel-strong: rgba(15, 23, 42, .92);
  --line: rgba(148, 163, 184, .18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, .22), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  max-width: 100%;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(2, 6, 23, .96), rgba(15, 23, 42, .94), rgba(2, 6, 23, .96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}

.nav-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .36);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #dbeafe, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  color: #d1d5db;
  transition: .25s ease;
}

.nav-link {
  padding: 10px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  background: rgba(37, 99, 235, .88);
  color: white;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, .9);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, .98);
}

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

.mobile-link {
  padding: 12px 14px;
}

.page-home,
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.hero-shell {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: var(--shadow);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .55fr);
  align-items: center;
  gap: 48px;
  padding: 68px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity .65s ease, transform .65s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-content {
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-heading span,
.page-hero span,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, .45);
  color: #93c5fd;
  background: rgba(37, 99, 235, .16);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.05em;
  text-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.hero-content p {
  max-width: 680px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
  text-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}

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

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

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .22);
  color: #dbeafe;
  font-size: 12px;
}

.hero-actions,
.inline-actions,
.detail-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-button,
.ghost-button,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button,
.quick-search button {
  background: linear-gradient(135deg, var(--blue), #0891b2);
  color: white;
  box-shadow: 0 16px 32px rgba(37, 99, 235, .32);
}

.ghost-button {
  border: 1px solid rgba(148, 163, 184, .28);
  background: rgba(15, 23, 42, .62);
  color: #e2e8f0;
}

.primary-button:hover,
.ghost-button:hover,
.quick-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: min(330px, 100%);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .24);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  transform: rotate(2deg);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  transform: translateY(-50%);
  border: 1px solid rgba(226, 232, 240, .22);
  background: rgba(2, 6, 23, .55);
  color: white;
  font-size: 30px;
  line-height: 1;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(226, 232, 240, .42);
  transition: .25s ease;
}

.hero-dot.active {
  width: 32px;
  background: #60a5fa;
}

.home-search-block,
.section-block,
.filter-panel,
.detail-card,
.poster-panel,
.related-panel,
.ranking-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(15, 23, 42, .72), rgba(2, 6, 23, .62));
  border-radius: var(--radius);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .26);
}

.home-search-block {
  margin: 32px 0;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 24px;
  align-items: center;
}

.home-search-block h2,
.section-heading h2,
.page-hero h1,
.detail-card h1,
.detail-card h2,
.poster-panel h2,
.related-panel h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -.03em;
}

.home-search-block h2 {
  font-size: 30px;
}

.home-search-block p,
.page-hero p,
.poster-panel p,
.detail-card p {
  color: var(--muted);
  line-height: 1.8;
}

.quick-search {
  display: flex;
  gap: 10px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(2, 6, 23, .72);
  border: 1px solid var(--line);
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: rgba(15, 23, 42, .86);
  color: white;
  outline: none;
}

.quick-search input {
  padding: 0 14px;
  border: 0;
  background: transparent;
}

.section-block {
  margin-top: 34px;
  padding: 28px;
}

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

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

.section-heading a {
  color: #60a5fa;
  font-weight: 800;
}

.compact-heading h2 {
  font-size: 26px;
}

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

.listing-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 23, 42, .74);
  border: 1px solid rgba(148, 163, 184, .18);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, .42);
  background: rgba(30, 41, 59, .84);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .35);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, .8), rgba(2, 6, 23, .9));
}

.movie-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform .36s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: rgba(37, 99, 235, .92);
}

.rank-badge {
  left: 10px;
  top: 10px;
  padding: 6px 9px;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.movie-info {
  padding: 14px;
}

.movie-info h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-info h2 a:hover {
  color: #60a5fa;
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

.movie-line {
  min-height: 42px;
  margin-top: 8px;
  color: #cbd5e1;
}

.movie-tags {
  margin-top: 12px;
}

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

.movie-card.compact .movie-cover img {
  height: 100%;
  min-height: 142px;
}

.movie-card.compact .movie-line {
  min-height: auto;
}

.movie-card.compact .movie-tags {
  display: none;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, .2);
  background: #0f172a;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .25);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .58;
  transition: transform .35s ease, opacity .35s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: .74;
}

.category-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(2, 6, 23, .12), rgba(2, 6, 23, .9));
}

.category-body {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

.category-body strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-body em {
  display: block;
  color: #dbeafe;
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 26px;
  align-items: start;
}

.editor-list,
.rank-list,
.related-list {
  display: grid;
  gap: 14px;
}

.ranking-panel,
.related-panel,
.poster-panel {
  padding: 22px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 48px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: radial-gradient(circle at top right, rgba(14, 165, 233, .22), transparent 28rem), linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(2, 6, 23, .92));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 16px;
  font-size: clamp(38px, 5vw, 58px);
}

.page-hero p {
  max-width: 850px;
  font-size: 17px;
}

.filter-panel {
  position: sticky;
  top: 86px;
  z-index: 20;
  margin: 0 0 24px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(140px, .55fr));
  gap: 12px;
  backdrop-filter: blur(18px);
}

.filter-panel input,
.filter-panel select {
  padding: 0 13px;
}

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

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

.breadcrumb a:hover {
  color: #60a5fa;
}

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

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

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .28);
  transition: opacity .2s ease, background .2s ease;
}

.play-overlay:hover {
  background: rgba(0, 0, 0, .44);
}

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

.big-play {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  font-size: 36px;
  box-shadow: 0 18px 50px rgba(37, 99, 235, .42);
}

.detail-card {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.detail-card h1 {
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 48px);
}

.detail-card h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 24px;
}

.detail-meta {
  margin: 14px 0;
}

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

.lead-text {
  padding: 18px;
  border-left: 4px solid var(--blue);
  border-radius: 16px;
  background: rgba(37, 99, 235, .12);
}

.detail-nav-links {
  margin-top: 24px;
}

.detail-side {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 20px;
}

.poster-panel img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 18px;
}

.related-panel h2,
.poster-panel h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(2, 6, 23, .82), rgba(2, 6, 23, .98));
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 1.3fr .7fr .8fr;
  gap: 32px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--soft);
}

.footer-grid p {
  max-width: 520px;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: white;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
}

.footer-grid a:hover {
  color: #60a5fa;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 30px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .page-home,
  .page-wrap {
    padding: 18px 16px 48px;
  }

  .hero-shell {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 42px 24px 72px;
  }

  .hero-poster {
    justify-self: start;
    width: 190px;
    transform: none;
  }

  .home-search-block,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .page-hero,
  .section-block,
  .detail-card {
    padding: 24px;
  }

  .filter-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .quick-search {
    display: grid;
  }

  .rank-showcase,
  .category-grid,
  .movie-grid,
  .listing-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-card:not(.compact) .movie-cover img {
    height: 100%;
  }

  .detail-title-row {
    display: grid;
  }

  .hero-arrow {
    display: none;
  }
}
