:root {
  --fog-50: #f8fafc;
  --fog-100: #f1f3f5;
  --fog-200: #e9ecef;
  --fog-300: #dee2e6;
  --fog-400: #adb5bd;
  --fog-500: #868e96;
  --fog-600: #6c757d;
  --fog-700: #495057;
  --fog-800: #343a40;
  --fog-900: #212529;
  --steel-50: #f0f4f8;
  --steel-100: #d9e2ec;
  --steel-200: #bcccdc;
  --steel-300: #9fb3c8;
  --steel-400: #829ab1;
  --steel-500: #627d98;
  --steel-600: #486581;
  --steel-700: #334e68;
  --steel-800: #243b53;
  --accent-400: #f7c948;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input {
  font: inherit;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

.logo-text {
  font-size: clamp(20px, 2vw, 26px);
  color: var(--fog-900);
}

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

.nav-link {
  color: var(--fog-700);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--steel-600);
}

.nav-dropdown {
  position: relative;
}

.dropdown-trigger {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  display: grid;
  min-width: 176px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--fog-200);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--fog-700);
}

.dropdown-menu a:hover {
  color: var(--steel-600);
  background: var(--steel-50);
}

.header-search input,
.mobile-search input,
.search-panel input,
.local-filter input {
  width: 100%;
  border: 1px solid var(--fog-300);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--fog-900);
  background: var(--white);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.local-filter input:focus {
  border-color: var(--steel-500);
  box-shadow: 0 0 0 4px rgba(98, 125, 152, 0.16);
}

.header-search {
  width: min(260px, 24vw);
}

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

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--fog-700);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--fog-200);
  background: var(--white);
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

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

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

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

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

.hero-slide {
  opacity: 0;
  transition: opacity 0.75s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(33, 37, 41, 1), rgba(33, 37, 41, 0.54), rgba(33, 37, 41, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding-block: 86px;
}

.hero-copy {
  max-width: 760px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-400);
  font-weight: 700;
  margin-bottom: 16px;
}

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

.hero p {
  max-width: 680px;
  margin: 0 0 30px;
  color: var(--fog-200);
  font-size: clamp(17px, 2.2vw, 22px);
}

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

.hero-dots {
  position: absolute;
  z-index: 3;
  right: max(16px, calc((100vw - 1408px) / 2));
  bottom: 72px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 12px;
  padding: 11px 22px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--steel-600);
  box-shadow: 0 12px 26px rgba(72, 101, 129, 0.26);
}

.btn-primary:hover {
  background: var(--steel-700);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.main-section {
  padding-block: clamp(54px, 7vw, 88px);
}

.main-section.is-white {
  background: var(--white);
}

.main-section.is-dark {
  color: var(--white);
  background: var(--fog-900);
}

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

.section-title {
  margin: 0;
  color: var(--fog-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.is-dark .section-title {
  color: var(--white);
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--fog-600);
}

.is-dark .section-desc {
  color: var(--fog-300);
}

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

.is-dark .section-link {
  color: var(--steel-200);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  background: var(--fog-200);
}

.poster-wrap::after,
.horizontal-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after,
.movie-card:hover .horizontal-poster::after {
  opacity: 1;
}

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

.movie-card:hover .poster-wrap img,
.movie-card:hover .horizontal-poster img {
  transform: scale(1.06);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--fog-500);
  font-size: 12px;
}

.card-meta span:first-child {
  color: var(--steel-600);
  background: var(--steel-50);
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0 0 9px;
  color: var(--fog-900);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--steel-600);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--fog-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.horizontal-list {
  display: grid;
  gap: 18px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 170px;
}

.horizontal-poster {
  position: relative;
  overflow: hidden;
  background: var(--fog-200);
}

.horizontal-body {
  padding: 24px;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.32);
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 18px;
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--fog-900));
  box-shadow: var(--shadow-sm);
}

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

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

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

.category-count {
  display: inline-flex;
  margin-top: 20px;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--fog-900);
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
}

.page-hero {
  padding: 58px 0 46px;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(130, 154, 177, 0.42), transparent 32%), linear-gradient(135deg, var(--fog-900), var(--steel-800));
}

.page-hero h1 {
  max-width: 960px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--fog-300);
  font-size: 14px;
}

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

.local-filter {
  margin-bottom: 28px;
}

.local-filter input {
  max-width: 520px;
}

.empty-note {
  display: none;
  margin-top: 24px;
  color: var(--fog-600);
}

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

.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(130, 154, 177, 0.38), transparent 34%), linear-gradient(135deg, var(--fog-900), #111827);
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: 44px 0 54px;
}

.detail-cover {
  height: 430px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--fog-800);
  box-shadow: var(--shadow-lg);
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-info .summary-line {
  max-width: 840px;
  margin: 0 0 18px;
  color: var(--fog-200);
  font-size: 18px;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-facts span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--fog-100);
  background: rgba(255, 255, 255, 0.1);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.content-card {
  border-radius: 22px;
  padding: clamp(22px, 4vw, 34px);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.content-card + .content-card {
  margin-top: 24px;
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.content-card p {
  margin: 0;
  color: var(--fog-700);
}

.content-card p + p {
  margin-top: 14px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.14));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  clip-path: polygon(36% 26%, 36% 74%, 76% 50%);
}

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

.side-list {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 14px;
}

.side-list h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.side-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 10px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.side-item:hover {
  color: var(--steel-600);
}

.side-item img {
  width: 88px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.side-item strong {
  display: block;
  line-height: 1.35;
}

.side-item span {
  color: var(--fog-500);
  font-size: 12px;
}

.search-panel {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-top: 24px;
}

.search-panel button {
  flex: 0 0 auto;
}

.search-status {
  margin: 22px 0 0;
  color: var(--fog-600);
}

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

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

  .side-list {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .header-inner {
    min-height: 68px;
  }

  .hero,
  .hero-content {
    min-height: 68vh;
  }

  .hero-content {
    padding-block: 58px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
    bottom: 28px;
  }

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

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

  .poster-wrap {
    height: 220px;
  }

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

  .horizontal-poster {
    height: 230px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .detail-cover {
    width: min(320px, 100%);
    height: 430px;
  }

  .search-panel {
    flex-direction: column;
  }
}

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

  .logo-mark {
    width: 34px;
    height: 34px;
  }

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

  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .poster-wrap {
    height: 280px;
  }

  .page-hero {
    padding: 42px 0 34px;
  }

  .detail-cover {
    height: 390px;
  }
}
