:root {
  --fog-50: #f8f9fa;
  --fog-100: #f1f3f5;
  --fog-200: #e9ecef;
  --fog-300: #dee2e6;
  --fog-400: #ced4da;
  --fog-500: #adb5bd;
  --fog-600: #868e96;
  --fog-700: #495057;
  --fog-800: #343a40;
  --fog-900: #212529;
  --steel-50: #f0f4f8;
  --steel-100: #d9e2ec;
  --steel-200: #bcccdc;
  --steel-400: #829ab1;
  --steel-500: #627d98;
  --steel-600: #486581;
  --steel-700: #334e68;
  --steel-800: #243b53;
  --moss-600: #3d663d;
  --accent: #fb923c;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .09);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .18);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fog-50);
  color: var(--fog-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--fog-200);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
  box-shadow: 0 10px 24px rgba(72, 101, 129, .25);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--fog-700);
  font-weight: 600;
}

.desktop-nav a,
.nav-dropdown button {
  color: var(--fog-700);
  border: 0;
  background: transparent;
  transition: color .2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
  color: var(--steel-600);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: 190px;
  padding: 8px;
  border: 1px solid var(--fog-200);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.nav-dropdown-panel a:hover {
  background: var(--fog-50);
}

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

.header-search input,
.mobile-search input,
.filter-field input,
.filter-field select,
.filter-panel select {
  border: 1px solid var(--fog-300);
  border-radius: 12px;
  background: var(--white);
  color: var(--fog-900);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.header-search input {
  width: 270px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--steel-600);
}

.header-search input:focus,
.mobile-search input:focus,
.filter-field input:focus,
.filter-field select:focus,
.filter-panel select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(98, 125, 152, .22);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--fog-700);
  background: var(--fog-100);
}

.mobile-panel {
  border-top: 1px solid var(--fog-200);
  padding: 14px 16px 20px;
  animation: slideDown .24s ease;
}

.mobile-panel nav {
  display: grid;
  gap: 6px;
}

.mobile-panel nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--fog-700);
}

.mobile-panel nav a:hover {
  background: var(--fog-100);
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-slider {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  color: var(--white);
  background: var(--fog-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.is-active img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .42), rgba(0, 0, 0, .08)), linear-gradient(0deg, rgba(33, 37, 41, .95), rgba(33, 37, 41, .08) 42%, rgba(33, 37, 41, .12));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  max-width: 1408px;
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  margin: 14px 0 18px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: .98;
  letter-spacing: -.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--fog-200);
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.7;
}

.eyebrow,
.eyebrow-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--steel-100);
}

.eyebrow-dark {
  color: var(--steel-600);
}

.hero-actions,
.section-head,
.detail-meta,
.movie-meta,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions {
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
  box-shadow: 0 12px 28px rgba(36, 59, 83, .22);
}

.btn-primary:hover {
  box-shadow: 0 18px 36px rgba(36, 59, 83, .28);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
}

.hero-controls {
  position: absolute;
  right: 38px;
  bottom: 42px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, .15);
  font-size: 28px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .48);
  transition: width .25s ease, background .25s ease;
}

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

.quick-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: -54px;
  position: relative;
  z-index: 4;
}

.quick-categories a {
  min-height: 112px;
  padding: 20px;
  border: 1px solid rgba(222, 226, 230, .85);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  transition: transform .2s ease, box-shadow .2s ease;
}

.quick-categories a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.quick-categories span {
  display: block;
  margin-bottom: 8px;
  color: var(--fog-900);
  font-size: 18px;
  font-weight: 800;
}

.quick-categories small {
  color: var(--fog-600);
  line-height: 1.6;
}

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

.section-head {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.section-head h2,
.page-hero h1,
.detail-card h1,
.detail-section h2,
.detail-side h2,
.footer-grid h2 {
  margin: 0;
  letter-spacing: -.035em;
}

.section-head h2 {
  margin-top: 7px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.text-link {
  color: var(--steel-600);
  font-weight: 800;
}

.text-link:hover {
  color: var(--steel-800);
}

.text-link.light {
  color: var(--steel-100);
}

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

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

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

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

.movie-card:hover {
  border-color: var(--steel-100);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--fog-900);
}

.movie-poster img,
.category-card img,
.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.movie-card:hover .movie-poster img,
.category-card:hover img,
.ranking-item:hover .ranking-cover img {
  transform: scale(1.06);
}

.poster-shade,
.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, 0) 58%);
}

.score-pill,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  font-weight: 900;
}

.score-pill {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  color: var(--white);
  background: rgba(33, 37, 41, .72);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  color: var(--fog-900);
  background: var(--white);
}

.movie-info {
  padding: 18px;
}

.movie-title {
  display: block;
  margin-bottom: 8px;
  color: var(--fog-900);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-title:hover,
.ranking-title:hover {
  color: var(--steel-600);
}

.movie-info p,
.ranking-body p,
.category-card p,
.page-hero p,
.detail-section p,
.footer-brand p {
  color: var(--fog-600);
  line-height: 1.7;
}

.movie-info p {
  min-height: 48px;
  margin: 0 0 14px;
  font-size: 14px;
}

.movie-meta {
  gap: 10px;
  color: var(--fog-500);
  font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 10px;
  border-radius: 50%;
  vertical-align: middle;
  background: var(--fog-300);
}

.tag-row,
.detail-tags {
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--fog-700);
  background: var(--fog-100);
  font-size: 12px;
  font-weight: 700;
}

.ranking-strip {
  color: var(--white);
  background: linear-gradient(135deg, var(--fog-900), var(--steel-800));
}

.light-head h2 {
  color: var(--white);
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: auto 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.top-list .ranking-item {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--white);
  background: var(--steel-600);
  font-size: 18px;
  font-weight: 900;
}

.ranking-cover {
  display: block;
  width: 96px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--fog-900);
}

.ranking-title {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 900;
}

.top-list .ranking-title,
.top-list .ranking-body p,
.top-list .movie-meta {
  color: var(--white);
}

.top-list .movie-meta {
  opacity: .72;
}

.page-hero {
  padding: 86px 0 76px;
  color: var(--white);
  background: radial-gradient(circle at 20% 10%, rgba(130, 154, 177, .35), transparent 28%), linear-gradient(135deg, var(--fog-900), var(--steel-800));
}

.slim-hero {
  padding: 74px 0 62px;
}

.ranking-hero {
  background: radial-gradient(circle at 70% 20%, rgba(251, 146, 60, .2), transparent 25%), linear-gradient(135deg, var(--fog-900), var(--steel-800));
}

.page-hero h1 {
  max-width: 860px;
  margin: 12px 0 14px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--fog-200);
  font-size: 18px;
}

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

.category-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--fog-900);
  box-shadow: var(--shadow-md);
}

.category-card a {
  position: relative;
  display: block;
  min-height: 270px;
  color: var(--white);
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-card div {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--fog-200);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--fog-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-field {
  display: grid;
  gap: 7px;
  min-width: 170px;
}

.filter-grow {
  flex: 1;
  min-width: 260px;
}

.filter-field label {
  color: var(--fog-700);
  font-size: 13px;
  font-weight: 900;
}

.filter-field input,
.filter-field select,
.filter-panel select {
  min-height: 44px;
  padding: 10px 12px;
}

.empty-state {
  padding: 50px 20px;
  border: 1px dashed var(--fog-300);
  border-radius: 18px;
  color: var(--fog-600);
  text-align: center;
  background: var(--white);
}

.detail-top {
  padding: 22px 0;
  color: var(--fog-300);
  background: var(--fog-900);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 34px;
  padding: 42px 0 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--fog-900);
  box-shadow: var(--shadow-lg);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .22));
}

.player-overlay[hidden] {
  display: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: var(--fog-900);
  background: var(--white);
  font-size: 30px;
  box-shadow: var(--shadow-lg);
}

.detail-card,
.detail-side {
  border: 1px solid var(--fog-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.detail-card {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 36px);
}

.detail-card h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.detail-meta {
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--fog-200);
  color: var(--fog-600);
}

.detail-meta a,
.detail-meta strong {
  color: var(--steel-600);
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2,
.detail-side h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.detail-section p {
  margin: 0 0 12px;
  color: var(--fog-700);
  font-size: 16px;
}

.lead-text {
  font-weight: 800;
}

.review-box {
  padding: 22px;
  border-radius: 18px;
  background: var(--fog-50);
}

.detail-side {
  position: sticky;
  top: 108px;
  height: max-content;
  padding: 20px;
}

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

.card-horizontal {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
}

.card-horizontal .movie-poster {
  height: 100%;
  aspect-ratio: auto;
}

.card-horizontal .movie-info p,
.card-horizontal .tag-row {
  display: none;
}

.full-ranking {
  gap: 12px;
}

.site-footer {
  margin-top: 40px;
  color: var(--fog-300);
  background: var(--fog-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 54px 0;
}

.brand-footer {
  margin-bottom: 16px;
  color: var(--white);
}

.footer-brand p {
  max-width: 520px;
  margin: 0;
  color: var(--fog-400);
}

.footer-grid h2 {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 18px;
}

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

.footer-links a:hover {
  color: var(--steel-200);
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid var(--fog-800);
  color: var(--fog-500);
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

  .nav-toggle {
    display: inline-flex;
  }

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

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

  .detail-side {
    position: static;
  }
}

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

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

  .hero-slider {
    min-height: 72vh;
  }

  .hero-content {
    bottom: 12%;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(34px, 10vw, 52px);
  }

  .hero-controls {
    right: 18px;
    bottom: 24px;
  }

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

  .ranking-item {
    grid-template-columns: auto 82px minmax(0, 1fr);
  }

  .ranking-cover {
    width: 82px;
  }

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

@media (max-width: 560px) {
  .quick-categories,
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .quick-categories {
    margin-top: 18px;
  }

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

  .filter-grow {
    min-width: 100%;
  }

  .filter-field {
    width: 100%;
  }

  .card-horizontal,
  .ranking-item {
    grid-template-columns: 1fr;
  }

  .card-horizontal .movie-poster {
    aspect-ratio: 16 / 10;
  }

  .ranking-number {
    width: 100%;
    height: 38px;
  }

  .ranking-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
  }
}
