* {
  box-sizing: border-box;
}

:root {
  --mist-50: #f8f9fa;
  --mist-100: #f1f3f5;
  --mist-200: #e9ecef;
  --mist-300: #dee2e6;
  --mist-500: #adb5bd;
  --mist-700: #495057;
  --mist-800: #343a40;
  --mist-900: #212529;
  --mineral-50: #f0f9ff;
  --mineral-200: #bae6fd;
  --mineral-300: #7dd3fc;
  --mineral-500: #0ea5e9;
  --mineral-600: #0284c7;
  --mineral-700: #0369a1;
  --earth-50: #faf8f5;
  --earth-600: #8a6f4d;
  --earth-700: #715a40;
  --moss-600: #16a34a;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.16), 0 4px 6px -4px rgb(0 0 0 / 0.12);
  --shadow-xl: 0 20px 40px rgb(33 37 41 / 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--mist-50), #ffffff 30%, var(--mineral-50));
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, var(--mist-800), var(--mist-700));
  box-shadow: var(--shadow-lg);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--mist-900);
  background: linear-gradient(135deg, var(--mineral-300), #ffffff);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.5);
}

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

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 9px;
  color: var(--mist-100);
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #ffffff;
  background: rgb(2 132 199 / 0.72);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0;
  width: min(320px, 26vw);
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 999px;
  overflow: hidden;
  background: rgb(255 255 255 / 0.12);
}

.header-search input,
.mobile-search input,
.hero-search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
}

.header-search input {
  min-width: 0;
  padding: 9px 14px;
  color: #ffffff;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: var(--mist-300);
}

.header-search button,
.mobile-search button,
.hero-search-form button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: var(--mineral-600);
  transition: background 0.2s ease;
}

.header-search button {
  padding: 9px 14px;
  white-space: nowrap;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search-form button:hover {
  background: var(--mineral-700);
}

.menu-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 10px;
  cursor: pointer;
  background: rgb(255 255 255 / 0.08);
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgb(255 255 255 / 0.12);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-link {
  display: block;
  margin-top: 8px;
}

.mobile-search {
  display: flex;
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: rgb(255 255 255 / 0.14);
}

.mobile-search input {
  padding: 12px;
  color: #ffffff;
  background: transparent;
}

.mobile-search button {
  padding: 0 16px;
}

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

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

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

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(12px) saturate(1.12);
  transform: scale(1.08);
  opacity: 0.48;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.5), rgb(0 0 0 / 0.25)),
    linear-gradient(0deg, var(--mist-900), transparent 42%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  align-items: center;
  gap: 56px;
  min-height: 660px;
  padding: 80px 0 92px;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--mineral-300);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.08;
}

.hero-copy h1 {
  font-size: clamp(44px, 7vw, 84px);
  text-shadow: 0 10px 30px rgb(0 0 0 / 0.3);
}

.hero-summary {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--mist-200);
  font-size: 20px;
  line-height: 1.75;
}

.hero-tags,
.card-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.card-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  padding: 8px 12px;
  color: #ffffff;
  background: rgb(255 255 255 / 0.14);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-button,
.ghost-button,
.ghost-dark-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 13px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--mineral-500), var(--mineral-700));
  box-shadow: 0 14px 24px rgb(2 132 199 / 0.28);
}

.ghost-button,
.ghost-dark-button {
  padding: 12px 22px;
  border: 1px solid rgb(255 255 255 / 0.22);
  color: #ffffff;
  background: rgb(255 255 255 / 0.1);
}

.ghost-dark-button {
  color: var(--mist-800);
  border-color: var(--mist-300);
  background: #ffffff;
}

.primary-button:hover,
.ghost-button:hover,
.ghost-dark-button:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgb(0 0 0 / 0.42);
  transform: rotate(1deg);
}

.hero-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  border-radius: inherit;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--mist-800);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  background: rgb(255 255 255 / 0.14);
  backdrop-filter: blur(10px);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--mineral-300);
}

.search-hero-card {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 28px;
  align-items: center;
  margin-top: -44px;
  padding: 28px;
  border-radius: 24px;
  background: rgb(255 255 255 / 0.92);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(16px);
}

.search-hero-card h2,
.section-head h2,
.story-card h2,
.meta-card h2,
.site-footer h2 {
  margin: 0;
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-weight: 700;
}

.search-hero-card h2 {
  font-size: 30px;
}

.search-hero-card p {
  margin: 8px 0 0;
  color: var(--mist-700);
  line-height: 1.7;
}

.hero-search-form {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--mineral-200);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.hero-search-form input {
  padding: 16px 20px;
  color: var(--mist-900);
  background: transparent;
}

.hero-search-form button {
  padding: 0 24px;
  white-space: nowrap;
}

.section-block {
  padding: 56px 0 0;
}

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

.section-head h2 {
  font-size: 32px;
  color: var(--mist-900);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--mist-700);
  line-height: 1.7;
}

.section-link {
  flex: none;
  padding: 10px 18px;
  color: var(--mineral-700);
  background: var(--mineral-50);
}

.movie-grid,
.ranking-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

.catalog-grid {
  align-items: stretch;
}

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

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

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

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

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 220px);
  gap: 18px;
  padding-bottom: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.movie-card {
  min-width: 0;
  border: 1px solid rgb(222 226 230 / 0.8);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--mineral-200);
  box-shadow: var(--shadow-xl);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--mist-800);
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  font-size: 13px;
  background: rgb(2 132 199 / 0.86);
}

.rank-badge {
  top: 12px;
  left: 12px;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.2);
}

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

.card-tags span {
  padding: 5px 8px;
  color: var(--mineral-700);
  background: var(--mineral-50);
}

.movie-card h3 {
  margin: 12px 0 0;
  color: var(--mist-900);
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--mineral-700);
}

.card-line {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--mist-700);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.compact-line {
  min-height: 3.2em;
  -webkit-line-clamp: 2;
}

.category-tile {
  border-radius: 20px;
  overflow: hidden;
  background: var(--mist-900);
  box-shadow: var(--shadow-lg);
}

.category-tile a {
  position: relative;
  display: grid;
  min-height: 220px;
  align-content: end;
  padding: 20px;
  color: #ffffff;
  overflow: hidden;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile a::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgb(0 0 0 / 0.76), transparent 65%);
}

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

.category-tile span {
  font-size: 22px;
  font-weight: 800;
}

.category-tile p {
  margin: 8px 0 0;
  color: var(--mist-200);
  line-height: 1.6;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.66;
}

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

.small-page-hero {
  padding-bottom: 12px;
}

.page-hero h1,
.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
  color: var(--mist-900);
}

.page-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--mist-700);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--mist-600);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--mineral-700);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--mist-200);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.filter-panel input,
.filter-panel select {
  height: 46px;
  border-radius: 12px;
  color: var(--mist-900);
  background: var(--mist-50);
}

.filter-panel input {
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-panel select {
  min-width: 140px;
  padding: 0 12px;
}

.empty-state {
  display: none;
  padding: 40px;
  border-radius: 18px;
  color: var(--mist-700);
  text-align: center;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 34px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgb(125 211 252 / 0.28), transparent 32%),
    linear-gradient(135deg, #ffffff, var(--mineral-50));
  box-shadow: var(--shadow-xl);
}

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

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

.detail-info .hero-tags span {
  color: var(--mineral-700);
  background: var(--mineral-50);
  box-shadow: inset 0 0 0 1px var(--mineral-200);
}

.player-section {
  padding-top: 34px;
}

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

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  background: #000000;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.08);
}

.play-circle {
  position: absolute;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 36px;
  background: rgb(2 132 199 / 0.86);
  box-shadow: 0 14px 36px rgb(0 0 0 / 0.36);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  padding-top: 28px;
}

.story-card,
.meta-card {
  padding: 28px;
  border: 1px solid var(--mist-200);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.story-card p {
  margin: 14px 0 0;
  color: var(--mist-700);
  font-size: 17px;
  line-height: 1.9;
}

.meta-card {
  grid-row: span 2;
}

.meta-card dl {
  margin: 16px 0;
}

.meta-card dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--mist-200);
}

.meta-card dt {
  color: var(--mist-600);
}

.meta-card dd {
  margin: 0;
  color: var(--mist-900);
  font-weight: 700;
}

.tag-cloud span {
  padding: 7px 10px;
  color: var(--earth-700);
  background: var(--earth-50);
}

.site-footer {
  margin-top: 70px;
  color: var(--mist-100);
  background: linear-gradient(135deg, var(--mist-900), var(--mist-800));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-brand {
  font-size: 20px;
  color: #ffffff;
}

.site-footer p {
  margin: 12px 0 0;
  color: var(--mist-300);
  line-height: 1.7;
}

.site-footer h2 {
  margin-bottom: 16px;
  font-size: 17px;
  color: #ffffff;
}

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

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

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  color: var(--mist-300);
  text-align: center;
}

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

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

  .header-search {
    display: none;
  }
}

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

  .menu-button {
    display: flex;
  }

  .nav-shell {
    gap: 12px;
  }

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 60px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    margin: 0 auto;
  }

  .search-hero-card,
  .filter-panel,
  .detail-layout,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .meta-card {
    grid-row: auto;
  }

  .hero-search-form {
    border-radius: 18px;
  }

  .hero-search-form button {
    padding: 0 16px;
  }
}

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

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

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

  .hero-summary,
  .detail-one-line {
    font-size: 17px;
  }

  .hero-actions,
  .detail-actions,
  .filter-selects {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .ghost-dark-button {
    width: 100%;
  }

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

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

  .movie-card h3 {
    font-size: 15px;
  }

  .card-line {
    font-size: 13px;
  }

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

  .section-head h2 {
    font-size: 26px;
  }

  .detail-layout,
  .story-card,
  .meta-card,
  .search-hero-card {
    padding: 20px;
  }

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