: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-600: #486581;
  --steel-700: #334e68;
  --steel-800: #243b53;
  --moss-50: #f0f4f0;
  --moss-600: #3d663d;
  --moss-800: #233923;
  --accent-400: #fb923c;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.22);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 32px, 1408px);
  margin: 0 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(14px);
}

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

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

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

.brand-name {
  color: var(--fog-900);
  font-size: 24px;
}

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

.desktop-nav a,
.nav-dropdown > button {
  color: var(--fog-700);
  background: transparent;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: -20px;
  min-width: 180px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--fog-200);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

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

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

.header-search input,
.page-search-form input,
.filter-bar input {
  width: 260px;
  border: 1px solid var(--fog-300);
  border-radius: 10px;
  padding: 11px 14px;
  outline: none;
  color: var(--fog-900);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.page-search-form input:focus,
.filter-bar input:focus {
  border-color: var(--steel-600);
  box-shadow: 0 0 0 4px rgba(72, 101, 129, 0.12);
}

.header-search button {
  border: 0;
  color: var(--white);
  background: var(--steel-600);
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--fog-100);
  color: var(--fog-800);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--fog-200);
  padding: 12px 16px 18px;
}

.mobile-nav a,
.mobile-nav input {
  display: block;
  width: 100%;
  margin: 6px 0;
}

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

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

.mobile-nav input {
  border: 1px solid var(--fog-300);
  border-radius: 10px;
  padding: 11px 14px;
}

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

.hero-slider {
  position: relative;
  height: min(80vh, 760px);
  min-height: 560px;
  overflow: hidden;
  background: var(--fog-900);
}

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

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

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide > img,
.detail-hero > img,
.ranking-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-overlay,
.detail-mask,
.ranking-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(33, 37, 41, 1), rgba(33, 37, 41, 0.62), rgba(33, 37, 41, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 86px;
  color: var(--white);
}

.hero-kicker {
  width: fit-content;
  margin-bottom: 16px;
  color: var(--accent-400);
  font-weight: 600;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 0;
  line-height: 1.08;
}

.hero-content h1 {
  font-size: clamp(34px, 5vw, 66px);
  font-weight: 600;
}

.hero-content h2 {
  margin-top: 12px;
  color: var(--steel-100);
  font-size: clamp(26px, 3.5vw, 46px);
  font-weight: 500;
}

.hero-content p {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--fog-200);
  font-size: clamp(16px, 2vw, 21px);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.20);
}

.tag-row span {
  color: var(--fog-700);
  background: var(--fog-100);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

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

.btn-primary {
  color: var(--white);
  background: var(--steel-600);
}

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

.btn-soft {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

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

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

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

.pale-section {
  background: linear-gradient(to bottom, var(--fog-50), var(--white));
}

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

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

.section-head h2 {
  margin: 0;
  color: var(--fog-900);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

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

.center-head {
  justify-content: center;
  text-align: center;
}

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

.section-head.light .section-link {
  color: var(--steel-200);
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--fog-200);
  border-radius: var(--radius);
  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-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--fog-200);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.60), transparent 45%);
  opacity: 0.85;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  font-weight: 600;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(72, 101, 129, 0.88);
  font-size: 12px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  background: var(--accent-400);
}

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

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--fog-600);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
}

.movie-meta span + span::before,
.detail-meta span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--fog-400);
}

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--fog-700);
  font-size: 14px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: stretch;
}

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

.movie-card-horizontal .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.horizontal-list,
.ranking-list,
.side-recommend-list {
  display: grid;
  gap: 16px;
}

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

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

.category-tile {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 600;
}

.category-tile small {
  color: var(--steel-100);
  line-height: 1.5;
}

.page-hero {
  padding: 64px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
}

.category-page-hero {
  background: linear-gradient(135deg, var(--steel-600), var(--moss-800));
}

.search-page-hero {
  background: linear-gradient(135deg, var(--moss-600), var(--steel-800));
}

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

.page-hero p,
.ranking-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--steel-100);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.breadcrumb span::before,
.breadcrumb a + a::before {
  content: "/";
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.45);
}

.category-overview-list {
  display: grid;
  gap: 30px;
}

.category-overview-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--fog-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.category-overview-head p {
  margin: 0;
  color: var(--fog-700);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--fog-200);
  border-radius: var(--radius);
}

.filter-bar input {
  width: 100%;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--fog-700);
  background: var(--fog-100);
  cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: var(--white);
  background: var(--steel-600);
}

.movie-card.is-hidden {
  display: none;
}

.ranking-hero,
.detail-hero {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  background: var(--fog-900);
}

.ranking-hero-content,
.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 72px 0;
  color: var(--white);
}

.detail-head-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1.08;
}

.detail-copy .detail-meta {
  color: var(--steel-100);
  font-size: 15px;
}

.detail-copy p {
  max-width: 860px;
  margin: 20px 0 0;
  color: var(--fog-200);
  font-size: 18px;
}

.detail-section {
  padding-top: 54px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

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

.player-card h2,
.detail-text-card h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.40));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(72, 101, 129, 0.92);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  font-size: 30px;
  text-indent: 4px;
}

.player-shell.player-ready .play-overlay {
  opacity: 0;
  pointer-events: none;
}

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

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

.lead-text {
  color: var(--fog-900) !important;
  font-weight: 600;
}

.review-card {
  background: linear-gradient(135deg, var(--steel-50), var(--white));
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
}

.info-list dt {
  color: var(--fog-600);
}

.info-list dd {
  margin: 0;
  color: var(--fog-900);
}

.detail-side {
  position: sticky;
  top: 98px;
}

.page-search-form {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-top: 28px;
}

.page-search-form input {
  flex: 1;
  width: auto;
}

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

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

.footer-brand {
  margin-bottom: 16px;
  color: var(--fog-100);
  font-size: 24px;
}

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

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

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

.footer-links a {
  color: var(--fog-400);
}

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

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

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

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

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

  .detail-side {
    position: static;
  }
}

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

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

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

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

  .detail-head-grid,
  .footer-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .page-search-form {
    flex-direction: column;
  }
}

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

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

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

  .hero-content {
    padding-bottom: 76px;
  }

  .hero-dots {
    left: 12px;
    right: auto;
    bottom: 30px;
  }

  .content-section {
    padding: 48px 0;
  }

  .section-head,
  .category-overview-head {
    display: grid;
    align-items: start;
  }

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

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

  .movie-card-horizontal .poster-link {
    min-height: 160px;
  }

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

  .movie-card p {
    min-height: auto;
  }

  .page-hero,
  .ranking-hero-content,
  .detail-hero-content {
    padding: 46px 0;
  }

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

  .player-card,
  .detail-text-card,
  .detail-side,
  .category-overview-card {
    padding: 18px;
  }
}
