* {
  box-sizing: border-box;
}

:root {
  --primary: #a67c4a;
  --primary-deep: #7c5b34;
  --secondary: #0284c7;
  --accent: #f59e0b;
  --text: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --bg: #fafaf9;
  --soft: #faf8f5;
  --white: #ffffff;
  --dark: #1c1917;
  --shadow: 0 20px 45px rgba(28, 25, 23, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(166, 124, 74, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #57534e;
  font-size: 14px;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f5f5f4;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #44403c;
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 12px;
  flex-wrap: wrap;
  color: #57534e;
  font-size: 14px;
  font-weight: 600;
}

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

.hero {
  position: relative;
  min-height: 560px;
  height: 72vh;
  overflow: hidden;
  background: linear-gradient(135deg, #faf8f5 0%, #f0f9ff 55%, #fffbeb 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.04));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-deep);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(166, 124, 74, 0.2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  max-width: 680px;
  color: #57534e;
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.18);
}

.btn-ghost {
  color: #44403c;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(214, 211, 209, 0.8);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #e7e5e4;
}

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

.hero-poster-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  color: var(--white);
  background: rgba(28, 25, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  backdrop-filter: blur(14px);
}

.hero-poster-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(120, 113, 108, 0.35);
  cursor: pointer;
}

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

.search-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 4;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-form,
.filter-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
}

.search-input,
.select-input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: var(--white);
  outline: none;
}

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

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

.section {
  margin-bottom: 74px;
}

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

.section-head h2,
.page-title h1,
.detail-text h1 {
  margin: 0;
  color: #1c1917;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--primary-deep);
  font-weight: 800;
}

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

.movie-card {
  background: var(--white);
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(28, 25, 23, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(28, 25, 23, 0.12);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e7e5e4;
}

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

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

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

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

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(166, 124, 74, 0.3);
}

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

.movie-meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  margin: 0;
  min-height: 46px;
  color: #57534e;
  font-size: 14px;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  color: var(--primary-deep);
  background: #faf8f5;
  border: 1px solid rgba(166, 124, 74, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 158px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--white), #faf8f5);
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 24px;
  box-shadow: 0 8px 18px rgba(28, 25, 23, 0.05);
}

.category-card:hover {
  color: var(--primary-deep);
  border-color: rgba(166, 124, 74, 0.45);
}

.category-card strong {
  font-size: 20px;
}

.category-card span {
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  background: linear-gradient(135deg, #faf8f5, #f0f9ff, #fffbeb);
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
}

.page-title {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 54px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--primary-deep);
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.no-result {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.no-result.is-show {
  display: block;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.ranking-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
}

.ranking-poster img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: #e7e5e4;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-info p {
  margin: 0;
  color: #57534e;
  line-height: 1.7;
}

.ranking-score {
  color: var(--primary-deep);
  font-weight: 900;
  white-space: nowrap;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(to top, rgba(12, 10, 9, 0.78), rgba(12, 10, 9, 0.12));
  border: 0;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.player-button {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-size: 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.detail-text {
  margin-top: 28px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.detail-text h1 {
  margin-bottom: 16px;
}

.detail-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 22px;
}

.detail-text h2,
.side-panel h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-text p {
  color: #44403c;
  line-height: 1.9;
  margin: 0 0 14px;
}

.side-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.side-poster {
  width: 100%;
  border-radius: 22px;
  background: #e7e5e4;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.side-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 16px;
  background: #fafaf9;
}

.side-link:hover {
  color: var(--primary-deep);
}

.side-link img {
  width: 54px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: #e7e5e4;
}

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

.side-link span {
  color: var(--muted);
  font-size: 12px;
}

.pagination-note {
  margin-top: 30px;
  color: var(--muted);
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 600px;
    height: auto;
  }

  .hero-content {
    min-height: 600px;
    padding: 60px 0 90px;
  }

  .search-form,
  .filter-row {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .ranking-score {
    grid-column: 3 / 4;
  }

  .ranking-number {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .ranking-poster img {
    width: 72px;
  }

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

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