:root {
  --primary-50: #eef6ff;
  --primary-100: #d9ecff;
  --primary-500: #2563eb;
  --primary-600: #1d4ed8;
  --primary-700: #1e40af;
  --primary-800: #1e3a8a;
  --primary-900: #172554;
  --accent-400: #facc15;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --shadow-soft: 0 14px 35px rgba(15, 23, 42, 0.08);
  --shadow-medium: 0 18px 55px rgba(15, 23, 42, 0.15);
  --shadow-hard: 0 20px 65px rgba(2, 6, 23, 0.32);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--slate-50), #ffffff 40%);
  color: var(--slate-900);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--slate-200);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  min-height: 68px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-title {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  color: var(--slate-500);
  font-size: 12px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--slate-600);
  font-size: 14px;
  font-weight: 650;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary-100);
  color: var(--primary-800);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--slate-300);
  background: #ffffff;
  border-radius: 14px;
  outline: none;
  transition: 0.2s ease;
}

.nav-search input {
  width: 235px;
  height: 42px;
  padding: 0 14px;
}

.nav-search button,
.large-search button,
.primary-button {
  border: 0;
  border-radius: 14px;
  background: var(--accent-500);
  color: var(--slate-950);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.24);
  transition: 0.2s ease;
}

.nav-search button {
  height: 42px;
  padding: 0 16px;
}

.nav-search input:focus,
.large-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.nav-search button:hover,
.large-search button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  background: var(--accent-400);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  color: var(--slate-700);
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--primary-900) 55%, var(--slate-800));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-image,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(250, 204, 21, 0.2), transparent 26%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.85));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(760px, 100%);
  color: #ffffff;
}

.hero-pill,
.page-hero span,
.feature-panel span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-copy p {
  margin: 0 0 32px;
  width: min(720px, 100%);
  color: rgba(241, 245, 249, 0.92);
  font-size: clamp(18px, 2.4vw, 24px);
}

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

.primary-button,
.glass-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
}

.glass-button {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  width: 36px;
  background: var(--accent-500);
}

.home-search-block {
  position: relative;
  z-index: 4;
  margin-top: -48px;
}

.home-search-inner {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-hard);
  backdrop-filter: blur(18px);
}

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

.large-search input {
  flex: 1;
  min-height: 54px;
  padding: 0 18px;
  font-size: 16px;
}

.large-search button {
  min-width: 128px;
  min-height: 54px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.category-chips a {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-800);
  font-size: 14px;
  font-weight: 750;
}

.content-section,
.scroll-section,
.split-section {
  padding: 72px 0;
}

.scroll-section,
.split-section {
  background: linear-gradient(90deg, var(--primary-50), var(--slate-50));
}

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

.section-head h2 {
  margin: 0 0 6px;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 0;
  color: var(--slate-600);
}

.section-link {
  color: var(--primary-700);
  font-weight: 800;
  white-space: nowrap;
}

.movie-grid,
.poster-grid,
.category-grid,
.split-grid,
.prose-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(245, 158, 11, 0.2)),
    var(--slate-200);
}

.movie-card.poster .card-cover {
  aspect-ratio: 4 / 5;
}

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

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

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.7), transparent 54%);
  opacity: 0.55;
}

.card-region,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.card-region {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-500);
  color: var(--slate-950);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.card-body strong {
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
}

.card-body em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.tag-row,
.detail-meta,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span,
.tag-row span,
.detail-meta span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 750;
}

.card-meta span:first-child {
  background: var(--primary-50);
  color: var(--primary-700);
}

.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

.compact-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  align-items: center;
  gap: 14px;
  width: 380px;
  flex: 0 0 auto;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
}

.compact-card img {
  width: 116px;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--slate-200);
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  margin-bottom: 8px;
  line-height: 1.35;
}

.compact-card em {
  color: var(--slate-500);
  font-size: 13px;
  font-style: normal;
}

.split-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: stretch;
}

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

.rank-list .compact-card {
  width: 100%;
}

.feature-panel {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
  color: #ffffff;
  box-shadow: var(--shadow-medium);
}

.feature-panel h2 {
  margin: 22px 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.feature-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.page-hero {
  padding: 88px 0;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
  color: #ffffff;
}

.page-hero.compact {
  padding: 64px 0;
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.breadcrumb a {
  color: #ffffff;
  font-weight: 750;
}

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

.category-card {
  display: grid;
  min-height: 260px;
  gap: 16px;
  padding: 26px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.category-card strong {
  color: var(--primary-800);
  font-size: 25px;
}

.category-card em {
  color: var(--slate-600);
  font-style: normal;
}

.category-samples {
  display: grid;
  gap: 8px;
  align-self: end;
}

.category-samples span {
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 13px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 160px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 42px;
  border: 1px dashed var(--slate-300);
  border-radius: 24px;
  background: var(--slate-50);
  color: var(--slate-600);
  text-align: center;
}

.empty-state.visible {
  display: block;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--slate-900);
  color: #ffffff;
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 32px;
  align-items: center;
  min-height: 640px;
  padding-top: 54px;
  padding-bottom: 54px;
}

.player-card {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-hard);
  background: #000000;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.1));
  cursor: pointer;
  transition: 0.2s ease;
}

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

.play-circle {
  display: inline-grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding-left: 5px;
  border-radius: 999px;
  background: var(--accent-500);
  color: var(--slate-950);
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.36);
}

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.one-line {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.detail-meta span,
.tag-cloud span {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.tag-cloud {
  margin-top: 18px;
}

.prose-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.prose-card {
  padding: 30px;
  border: 1px solid var(--slate-200);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.prose-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.prose-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
}

.accent-card {
  background: linear-gradient(180deg, var(--primary-50), #ffffff);
}

.site-footer {
  padding: 56px 0;
  background: var(--slate-900);
  color: var(--slate-300);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  max-width: 420px;
  color: var(--slate-400);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: var(--slate-300);
}

.footer-links a:hover {
  color: #ffffff;
}

.search-page-form {
  width: min(760px, 100%);
  margin-top: 26px;
}

.ranking-grid .movie-card:nth-child(-n + 3) .rank-badge {
  background: var(--accent-400);
}

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

  .nav-search input {
    width: 190px;
  }
}

@media (max-width: 860px) {
  .nav-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .nav-links,
  .nav-search {
    display: none;
    width: 100%;
  }

  .nav-links.open,
  .nav-search.open {
    display: grid;
  }

  .nav-links.open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-search.open {
    grid-template-columns: 1fr auto;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .home-search-block {
    margin-top: 0;
  }

  .large-search,
  .filter-bar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .split-grid,
  .detail-layout,
  .prose-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-title {
    font-size: 18px;
  }

  .hero-copy h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-copy p,
  .one-line {
    font-size: 16px;
  }

  .movie-grid,
  .poster-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .compact-card {
    width: 310px;
    grid-template-columns: 96px 1fr;
  }

  .compact-card img {
    width: 96px;
    height: 68px;
  }

  .feature-panel,
  .prose-card {
    padding: 24px;
  }

  .play-circle {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
