:root {
  --page-bg: #fafaf9;
  --surface: #ffffff;
  --surface-soft: #f5f0e8;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --primary: #a67c4a;
  --primary-strong: #8a6640;
  --primary-soft: #f5f0e8;
  --accent: #0284c7;
  --shadow: 0 24px 60px rgba(28, 25, 23, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.image-hidden {
  opacity: 0;
}

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

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 30px rgba(166, 124, 74, 0.32);
}

.site-logo-text {
  font-size: 19px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: #57534e;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.site-search {
  position: relative;
  flex: 0 1 280px;
}

.search-input,
.page-filter {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

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

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.search-results {
  display: grid;
  gap: 10px;
}

.search-result {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.search-result:hover {
  background: var(--primary-soft);
}

.search-result img {
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-soft), #ffffff);
}

.search-result span {
  display: grid;
  gap: 4px;
}

.search-result strong {
  font-size: 14px;
}

.search-result em,
.search-empty {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-soft);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: var(--primary-strong);
}

.mobile-nav {
  display: none;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: radial-gradient(circle at 20% 20%, rgba(2, 132, 199, 0.18), transparent 34%), linear-gradient(135deg, #f5f0e8 0%, #f0f9ff 48%, #fffbeb 100%);
}

.hero-stage {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-image {
  order: 2;
  position: relative;
  min-height: 440px;
  border-radius: 38px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(28, 25, 23, 0.22);
  background: linear-gradient(135deg, rgba(166, 124, 74, 0.18), rgba(2, 132, 199, 0.14));
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(28, 25, 23, 0.32));
}

.hero-image img {
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

.hero-content {
  order: 1;
  max-width: 650px;
}

.eyebrow,
.section-heading p,
.ranking-panel-head p,
.detail-kicker,
.page-hero p {
  margin: 0 0 12px;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 620px;
  margin: 24px 0 0;
  color: #57534e;
  font-size: 18px;
  line-height: 1.9;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(166, 124, 74, 0.18);
  border-radius: 999px;
  color: var(--primary-strong);
  background: rgba(245, 240, 232, 0.85);
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-button,
.secondary-button,
.ranking-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 18px 36px rgba(166, 124, 74, 0.28);
}

.primary-button:hover,
.secondary-button:hover,
.ranking-more:hover {
  transform: translateY(-2px);
}

.secondary-button {
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(166, 124, 74, 0.18);
}

.hero-controls {
  position: absolute;
  left: 0;
  bottom: 34px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.84);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(28, 25, 23, 0.1);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(166, 124, 74, 0.28);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section-block {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

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

.section-heading h2,
.ranking-panel-head h2,
.footer-links h2,
.detail-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(28, 25, 23, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(166, 124, 74, 0.18), rgba(2, 132, 199, 0.14));
}

.poster-frame img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(28, 25, 23, 0.45));
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(166, 124, 74, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.movie-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2,
.rank-item h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p,
.rank-item p,
.footer-brand p,
.detail-content p,
.page-hero span {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

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

.movie-card.compact .movie-card-body {
  padding: 14px;
}

.category-section {
  width: 100%;
  padding: 78px max(16px, calc((100% - 1240px) / 2));
  background: #ffffff;
}

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

.category-tile {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #1c1917, #57534e);
  box-shadow: 0 18px 48px rgba(28, 25, 23, 0.16);
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: transform 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.07);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(28, 25, 23, 0.84));
}

.category-tile span,
.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 26px;
  font-weight: 900;
}

.category-tile strong,
.category-tile em {
  font-size: 14px;
}

.category-tile em {
  color: #f5f0e8;
  font-style: normal;
  font-weight: 800;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(28, 25, 23, 0.08);
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: var(--primary-soft);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(166, 124, 74, 0.18), rgba(2, 132, 199, 0.14));
}

.rank-cover img {
  height: 100%;
  object-fit: cover;
}

.rank-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(166, 124, 74, 0.94);
  font-size: 12px;
  font-weight: 900;
}

.ranking-more {
  width: 100%;
  margin-top: 18px;
  color: #ffffff;
  background: var(--ink);
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 58px;
  border-radius: 34px;
  background: linear-gradient(135deg, var(--primary-soft), #f0f9ff 58%, #fffbeb);
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.09);
}

.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.filter-heading {
  align-items: center;
}

.filter-heading .page-filter {
  max-width: 320px;
}

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

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

.breadcrumb {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-strong);
  font-weight: 800;
}

.detail-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ffffff, var(--primary-soft));
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(166, 124, 74, 0.18), rgba(2, 132, 199, 0.14));
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.18);
}

.detail-cover img {
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  margin: 20px 0 0;
  color: #57534e;
  font-size: 18px;
  line-height: 1.9;
}

.detail-tags {
  margin: 22px 0 28px;
}

.player-section {
  margin-top: 34px;
}

.watch-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 34px;
  background: #050505;
  box-shadow: 0 28px 80px rgba(28, 25, 23, 0.26);
  cursor: pointer;
}

.watch-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.watch-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.15), rgba(28, 25, 23, 0.74));
}

.watch-play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(166, 124, 74, 0.92);
  font-size: 34px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.3);
}

.watch-overlay strong {
  font-size: 20px;
}

.watch-player.is-playing .watch-overlay {
  display: none;
}

.detail-content {
  margin-top: 34px;
  padding: 38px;
  border-radius: 34px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(28, 25, 23, 0.06);
}

.detail-content h2 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 28px;
}

.detail-content h2:first-child {
  margin-top: 0;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-weight: 800;
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 40px;
  padding: 54px 0 28px;
  color: #d6d3d1;
  background: #1c1917;
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-logo .site-logo-mark {
  box-shadow: none;
}

.footer-brand p {
  max-width: 520px;
  margin-top: 16px;
  color: #a8a29e;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links h2 {
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 16px;
}

.footer-links a {
  color: #a8a29e;
  font-size: 14px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #78716c;
  font-size: 14px;
}

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

  .site-search {
    margin-left: auto;
  }

  .mobile-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: grid;
    gap: 8px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(28, 25, 23, 0.08);
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 64px 0 110px;
  }

  .hero-stage,
  .hero-section {
    min-height: 900px;
  }

  .hero-image {
    order: 1;
    min-height: 360px;
  }

  .hero-content {
    order: 2;
  }

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

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

  .split-section,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

  .detail-cover {
    max-width: 340px;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    min-height: 64px;
    gap: 12px;
  }

  .site-logo-text {
    font-size: 16px;
  }

  .site-search {
    display: none;
  }

  .hero-section,
  .hero-stage {
    min-height: 780px;
  }

  .hero-slide {
    padding: 34px 0 104px;
  }

  .hero-image {
    min-height: 300px;
    border-radius: 28px;
  }

  .hero-image img {
    min-height: 300px;
  }

  .hero-content p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-controls {
    bottom: 24px;
  }

  .section-block,
  .category-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .section-heading,
  .filter-heading {
    display: grid;
    align-items: start;
  }

  .movie-grid,
  .small-grid,
  .category-movie-grid,
  .large-rank-list,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .page-hero,
  .detail-hero,
  .detail-content {
    padding: 24px;
    border-radius: 24px;
  }

  .detail-cover {
    max-width: 260px;
  }

  .watch-player {
    border-radius: 22px;
  }

  .watch-play-icon {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .small-grid,
  .category-movie-grid,
  .large-rank-list,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 70px 1fr;
  }

  .hero-actions {
    display: grid;
  }
}
