:root {
  --primary-50: #faf8f5;
  --primary-100: #f5f0e8;
  --primary-400: #c9aa78;
  --primary-600: #a67c4a;
  --primary-700: #8a6640;
  --secondary-50: #f0f9ff;
  --secondary-600: #0284c7;
  --accent-50: #fffbeb;
  --accent-500: #f59e0b;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-300: #d6d3d1;
  --neutral-400: #a8a29e;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --black: #000000;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-md: 0 8px 20px rgba(41, 37, 36, .08);
  --shadow-lg: 0 18px 42px rgba(41, 37, 36, .14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--neutral-800);
  background: var(--neutral-50);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 10px 20px rgba(166, 124, 74, .24);
}

.brand-text strong,
.footer-brand {
  display: block;
  color: var(--neutral-800);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: .02em;
}

.brand-text em {
  display: block;
  color: var(--neutral-500);
  font-size: 12px;
  font-style: normal;
  margin-top: -2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-link {
  color: var(--neutral-700);
  font-size: 14px;
  font-weight: 600;
  transition: color .2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  background: var(--neutral-100);
  border-radius: 12px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--neutral-700);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--neutral-200);
  background: var(--white);
  padding: 10px 16px 16px;
}

.mobile-nav.open {
  display: grid;
  gap: 4px;
}

.mobile-nav-link {
  padding: 10px 8px;
  border-radius: 10px;
  color: var(--neutral-700);
  font-weight: 600;
}

.mobile-nav-link:hover {
  background: var(--neutral-100);
  color: var(--primary-700);
}

.hero-section {
  position: relative;
  min-height: 620px;
  height: 70vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-50), var(--accent-50));
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .2;
  transform: scale(1.04);
}

.hero-bg span {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #fff 0%, rgba(255, 255, 255, .72) 32%, rgba(255, 255, 255, .2) 100%);
}

.hero-inner {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .8fr);
  align-items: center;
  gap: 48px;
  padding: 64px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary-600);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-copy h1,
.sub-hero h1,
.detail-content h1 {
  margin: 0;
  color: var(--neutral-900);
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.hero-text {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--neutral-700);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.hero-actions,
.sub-actions,
.hero-category-links,
.tag-row,
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-meta span,
.detail-meta span,
.tag-row span,
.hero-category-links a,
.sub-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  color: var(--neutral-700);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(214, 211, 209, .7);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(5px);
}

.hero-actions {
  margin-top: 32px;
}

.btn-primary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn-primary {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-2px);
}

.btn-light {
  color: var(--primary-700);
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(166, 124, 74, .22);
}

.btn-light:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.hero-category-links {
  margin-top: 24px;
}

.hero-category-links a:hover,
.sub-actions a:hover {
  color: var(--primary-700);
  border-color: rgba(166, 124, 74, .45);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  background: var(--neutral-200);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  transition: transform .5s ease;
}

.hero-poster:hover img {
  transform: scale(1.04);
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: var(--white);
  background: rgba(0, 0, 0, .5);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.hero-mini-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.hero-mini-list a {
  position: relative;
  min-height: 102px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.hero-mini-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mini-list span {
  position: absolute;
  inset: auto 0 0 0;
  color: var(--white);
  padding: 26px 8px 8px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  padding: 72px 0;
}

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

.soft-section {
  background: var(--neutral-50);
}

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

.section-heading p {
  margin: 0 0 4px;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  color: var(--neutral-900);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.section-heading a {
  color: var(--primary-600);
  font-weight: 700;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(166, 124, 74, .35);
  box-shadow: var(--shadow-lg);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--neutral-200);
}

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

.movie-card:hover img {
  transform: scale(1.06);
}

.poster-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent 58%);
  opacity: 0;
  transition: opacity .25s ease;
}

.play-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: var(--primary-700);
  background: rgba(255, 255, 255, .9);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.72);
  transition: opacity .25s ease, transform .25s ease;
}

.movie-card:hover .poster-fade,
.movie-card:hover .play-dot {
  opacity: 1;
}

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

.card-body {
  display: grid;
  gap: 7px;
  padding: 15px;
}

.card-body strong {
  color: var(--neutral-800);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 750;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card:hover .card-body strong {
  color: var(--primary-700);
}

.card-body em,
.card-desc {
  color: var(--neutral-500);
  font-size: 13px;
  font-style: normal;
}

.card-desc {
  color: var(--neutral-600);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 9px;
  color: var(--primary-700);
  background: var(--primary-50);
  border-color: rgba(166, 124, 74, .16);
  font-size: 12px;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent-500), var(--primary-600));
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}

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

.category-tile,
.category-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.category-tile strong,
.category-card strong {
  color: var(--neutral-900);
  font-size: 20px;
}

.category-tile span,
.category-card em {
  color: var(--neutral-600);
  font-size: 14px;
  font-style: normal;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.category-covers img {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: var(--neutral-200);
}

.sub-hero {
  padding: 78px 0;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-50), var(--accent-50));
  border-bottom: 1px solid var(--neutral-200);
}

.sub-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--neutral-700);
  font-size: 18px;
}

.sub-actions {
  margin-top: 24px;
}

.filter-box {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  background: var(--primary-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
}

.filter-box label {
  display: grid;
  gap: 8px;
  color: var(--neutral-700);
  font-weight: 700;
}

.filter-box input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  color: var(--neutral-800);
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: 999px;
  outline: none;
}

.filter-box input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(166, 124, 74, .12);
}

.filter-buttons button {
  min-height: 34px;
  padding: 6px 12px;
  color: var(--neutral-700);
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
  font-weight: 700;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: var(--white);
  background: var(--primary-600);
  border-color: var(--primary-600);
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 200px 1fr;
}

.movie-card-wide .poster-wrap {
  aspect-ratio: auto;
  min-height: 160px;
}

.player-top {
  padding: 32px 0 48px;
  background: linear-gradient(135deg, var(--neutral-900), #3b3126 58%, var(--primary-700));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

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

.breadcrumb em {
  color: var(--white);
  font-style: normal;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: stretch;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--black);
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .32);
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--black);
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, .18), rgba(0, 0, 0, .64));
  transition: opacity .2s ease, visibility .2s ease;
}

.play-cover span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  color: var(--primary-700);
  background: rgba(255, 255, 255, .92);
  border-radius: 999px;
  font-size: 32px;
  box-shadow: var(--shadow-lg);
}

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

.detail-side {
  overflow: hidden;
  color: var(--white);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 24px;
  backdrop-filter: blur(8px);
}

.detail-side img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--neutral-200);
}

.detail-side-info {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.detail-side-info strong {
  font-size: 18px;
  line-height: 1.35;
}

.detail-side-info span {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
}

.detail-content {
  max-width: 920px;
}

.detail-content h1 {
  font-size: clamp(30px, 5vw, 52px);
}

.lead-text {
  margin: 18px 0 0;
  color: var(--neutral-700);
  font-size: 20px;
}

.detail-meta,
.detail-tags {
  margin-top: 18px;
}

.detail-block {
  margin-top: 38px;
}

.detail-block h2 {
  margin: 0 0 12px;
  color: var(--neutral-900);
  font-size: 26px;
}

.detail-block p {
  margin: 0;
  color: var(--neutral-700);
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  color: var(--neutral-300);
  background: var(--neutral-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 42px 0;
}

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

.site-footer p {
  max-width: 640px;
  margin: 0;
  color: var(--neutral-400);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--neutral-300);
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 16px;
  text-align: center;
  color: var(--neutral-500);
  font-size: 13px;
}

[data-movie-card].hidden {
  display: none;
}

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 180px 1fr;
  }

  .detail-side img {
    aspect-ratio: 1 / 1;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-section {
    height: auto;
    min-height: 0;
  }

  .hero-inner {
    padding: 48px 0;
  }

  .hero-panel {
    display: none;
  }

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

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

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

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

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

  .footer-links {
    flex-wrap: wrap;
  }
}

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

  .brand-text em {
    display: none;
  }

  .hero-copy h1,
  .sub-hero h1 {
    font-size: 34px;
  }

  .six-grid,
  .four-grid,
  .ranking-grid,
  .ranking-list,
  .category-grid,
  .category-page-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-template-columns: 120px 1fr;
  }

  .section,
  .sub-hero {
    padding: 48px 0;
  }

  .video-shell {
    border-radius: 16px;
  }

  .play-cover span {
    width: 72px;
    height: 72px;
  }
}
