:root {
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --pink-600: #db2777;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 25px 60px rgba(15, 23, 42, 0.18);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #fff 0%, var(--gray-50) 42%, #fff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--pink-600));
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(244, 63, 94, 0.25);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--rose-500), var(--pink-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  font-size: 14px;
  font-weight: 650;
  color: var(--gray-700);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--rose-500);
}

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

.header-search input,
.inline-search input,
.filter-panel select,
.mobile-panel input {
  width: 220px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--gray-800);
  outline: none;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.inline-search input:focus,
.filter-panel select:focus,
.mobile-panel input:focus {
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.header-search button,
.inline-search button,
.mobile-panel button {
  border: 0;
  color: var(--white);
  background: var(--rose-500);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.inline-search button:hover,
.mobile-panel button:hover {
  background: var(--rose-600);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--gray-800);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.mobile-panel a {
  color: var(--gray-700);
  font-weight: 650;
}

.mobile-panel form {
  display: grid;
  gap: 10px;
}

.mobile-panel input {
  width: 100%;
}

.hero-slider {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: var(--gray-900);
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(244, 63, 94, 0.24), transparent 30%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.72) 45%, rgba(17, 24, 39, 0.22) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.85), rgba(17, 24, 39, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 150px 24px 110px;
  margin-left: max(24px, calc((100vw - 1240px) / 2));
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #ffe4e6;
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(255, 228, 230, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-content h2 + p,
.hero-content h1 + h2 + p,
.hero-content h1 + p {
  margin-top: 24px;
}

.hero-content p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions,
.detail-intro .primary-button {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--pink-600));
  box-shadow: 0 16px 35px rgba(244, 63, 94, 0.28);
}

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

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
}

.section-link {
  color: var(--rose-600);
  background: var(--rose-50);
}

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

.hero-controls > button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font-size: 28px;
  cursor: pointer;
}

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

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

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

.section-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 20px;
}

.section-soft {
  max-width: none;
  padding-left: max(20px, calc((100vw - 1240px) / 2));
  padding-right: max(20px, calc((100vw - 1240px) / 2));
  background: linear-gradient(135deg, var(--rose-50), #fff, #eff6ff);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-heading span {
  color: var(--rose-500);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.section-heading h2,
.page-hero h1,
.player-section h2,
.prose-card h2 {
  margin: 8px 0 0;
  color: var(--gray-900);
  letter-spacing: -0.045em;
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.section-heading p,
.page-hero p {
  margin: 12px 0 0;
  color: var(--gray-600);
  line-height: 1.8;
}

.split-heading {
  max-width: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

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

.category-card {
  display: grid;
  gap: 16px;
  min-height: 210px;
  padding: 22px;
  border: 1px solid rgba(244, 63, 94, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow: var(--shadow-md);
}

.category-name {
  font-size: 22px;
  font-weight: 850;
  color: var(--gray-900);
}

.category-card p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-covers {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.category-covers img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--gray-100);
}

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

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

.poster-year,
.poster-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.poster-year {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: var(--white);
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  font-weight: 750;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  color: var(--white);
  background: rgba(244, 63, 94, 0.88);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
  padding: 14px;
}

.movie-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--gray-900);
  font-weight: 820;
  line-height: 1.35;
}

.movie-card-title:hover {
  color: var(--rose-600);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 0;
  color: var(--gray-600);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--gray-500);
  font-size: 12px;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--rose-600);
  background: var(--rose-50);
  font-size: 12px;
  line-height: 1;
}

.ranking-block {
  padding-top: 42px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.rank-no {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--pink-600));
  border-radius: 12px;
  font-weight: 850;
}

.rank-info {
  min-width: 0;
}

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

.rank-info strong {
  font-size: 16px;
  color: var(--gray-900);
}

.rank-info em {
  margin-top: 5px;
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  color: var(--rose-600);
  font-size: 18px;
  font-weight: 850;
}

.page-hero {
  max-width: 1240px;
  margin: 34px auto 0;
  padding: 78px 20px;
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(244, 63, 94, 0.18), transparent 35%),
    linear-gradient(135deg, var(--gray-900), var(--gray-800));
  color: var(--white);
}

.page-hero h1 {
  color: var(--white);
}

.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
}

.filter-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.inline-search input {
  width: min(460px, 64vw);
}

.filter-panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-600);
  font-weight: 650;
}

.filter-panel select {
  width: 160px;
  border-radius: 14px;
}

.breadcrumb {
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--rose-600);
}

.detail-hero {
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 22px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 90% 18%, rgba(244, 63, 94, 0.12), transparent 34%),
    linear-gradient(135deg, #fff, var(--rose-50));
  box-shadow: var(--shadow-md);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.detail-intro {
  padding: 22px 10px;
}

.detail-intro h1 {
  margin: 18px 0 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-one-line {
  margin: 18px 0 0;
  color: var(--gray-700);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags span {
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(244, 63, 94, 0.12);
}

.wide-tags {
  margin: 0 0 26px;
}

.player-section {
  max-width: 1240px;
  margin: 46px auto 0;
  padding: 0 20px;
}

.player-section h2 {
  margin-bottom: 16px;
  font-size: clamp(26px, 3.5vw, 38px);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(17, 24, 39, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--pink-600));
  box-shadow: 0 18px 42px rgba(244, 63, 94, 0.4);
  font-size: 30px;
}

.detail-content {
  padding-top: 48px;
  padding-bottom: 20px;
}

.prose-card {
  padding: 30px;
  border: 1px solid var(--gray-200);
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.prose-card h2 {
  font-size: 28px;
}

.prose-card h2 + p {
  margin-top: 12px;
}

.prose-card p {
  color: var(--gray-700);
  line-height: 1.9;
  font-size: 16px;
}

.prose-card p + h2 {
  margin-top: 28px;
}

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

.site-footer {
  margin-top: 48px;
  color: var(--gray-300);
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 20px 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.site-footer p {
  color: var(--gray-400);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

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

.footer-links a {
  color: var(--gray-300);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 20px 30px;
  color: var(--gray-400);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

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

@media (max-width: 920px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

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

  .hero-content {
    padding-top: 120px;
    margin-left: 0;
  }

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

  .detail-poster {
    max-width: 340px;
  }

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

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

@media (max-width: 680px) {
  .header-inner {
    padding: 12px 16px;
  }

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

  .hero-slider {
    min-height: 590px;
  }

  .hero-content {
    padding: 95px 18px 98px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero-controls {
    bottom: 20px;
  }

  .section-wrap {
    padding: 48px 16px;
  }

  .section-soft {
    padding-left: 16px;
    padding-right: 16px;
  }

  .split-heading {
    display: block;
  }

  .section-link {
    margin-top: 16px;
  }

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

  .page-hero {
    margin: 18px 16px 0;
    padding: 52px 18px;
    border-radius: 24px;
  }

  .filter-panel {
    display: grid;
  }

  .inline-search {
    display: grid;
  }

  .inline-search input,
  .filter-panel select {
    width: 100%;
  }

  .detail-hero {
    margin: 18px 16px 0;
    padding: 16px;
    border-radius: 24px;
  }

  .detail-intro {
    padding: 8px 0 12px;
  }

  .player-section {
    padding: 0 16px;
  }

  .player-shell {
    border-radius: 20px;
  }

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

  .rank-row img {
    width: 54px;
    height: 74px;
  }

  .rank-score {
    display: none;
  }
}

@media (max-width: 430px) {
  .category-grid,
  .movie-grid,
  .catalog-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .poster-link {
    aspect-ratio: 16 / 10;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 42% 1fr;
  }

  .movie-card .poster-link {
    height: 100%;
  }
}
