:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(41, 37, 36, 0.14);
  --soft-shadow: 0 8px 24px rgba(41, 37, 36, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--stone-800);
  background: var(--stone-50);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
  background: var(--stone-900);
}

button,
input,
select {
  font: inherit;
}

main {
  padding-top: 64px;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: var(--amber-900);
  color: var(--amber-50);
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(120, 53, 15, 0.96);
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.22);
  backdrop-filter: blur(12px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--amber-900);
  background: var(--amber-200);
  box-shadow: 0 0 24px rgba(253, 230, 138, 0.34);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--amber-900);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--amber-100);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(146, 64, 14, 0.72);
  color: var(--amber-50);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(146, 64, 14, 0.55);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--amber-100);
}

.mobile-panel {
  display: none;
  padding: 8px 16px 16px;
  background: rgba(146, 64, 14, 0.96);
  border-top: 1px solid rgba(253, 230, 138, 0.18);
}

.mobile-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--amber-50);
  font-weight: 700;
}

.mobile-panel a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--stone-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.20));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding-bottom: 70px;
}

.hero-pill,
.eyebrow,
.detail-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.92);
  color: white;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 14px;
  backdrop-filter: blur(8px);
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  text-shadow: 0 14px 30px rgba(0, 0, 0, 0.36);
}

.hero-content p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  min-height: 48px;
  padding: 0 28px;
  color: white;
  background: var(--amber-600);
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.35);
}

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

.ghost-btn {
  min-height: 48px;
  padding: 0 24px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.70);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 122px;
  z-index: 3;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 38px;
  z-index: 4;
  width: min(720px, calc(100% - 40px));
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.hero-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 0 18px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--amber-600);
  padding: 11px 22px;
  font-weight: 800;
  cursor: pointer;
}

.section {
  padding: 64px 0;
  background: white;
}

.soft-gradient {
  background: linear-gradient(to bottom, var(--stone-50), white);
}

.warm-gradient {
  background: linear-gradient(to bottom, var(--amber-50), white);
}

.stone-section {
  background: var(--stone-100);
}

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

.section-head h2,
.center-head h2,
.ranking-panel h2,
.story-panel h2,
.side-panel h2 {
  margin: 0 0 8px;
  color: var(--stone-800);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-head p,
.center-head p {
  margin: 0;
  color: var(--stone-600);
}

.section-link {
  color: var(--amber-700);
  font-size: 15px;
}

.section-link:hover {
  color: var(--amber-800);
  transform: translateX(2px);
}

.rail-wrap {
  position: relative;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 12px;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.movie-rail .movie-card {
  flex: 0 0 278px;
}

.rail-btn {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  color: var(--stone-700);
  background: white;
  font-size: 30px;
  line-height: 1;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.rail-btn.left {
  left: -14px;
}

.rail-btn.right {
  right: -14px;
}

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

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

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

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

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--stone-900);
}

.movie-card.large .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-chip,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.72);
  padding: 5px 9px;
}

.poster-chip {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: rgba(217, 119, 6, 0.92);
}

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

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--amber-700);
  font-size: 12px;
  font-weight: 800;
}

.card-meta span,
.tag-row span,
.detail-tags span,
.detail-meta span {
  border-radius: 999px;
  background: var(--amber-50);
  color: var(--amber-800);
  padding: 4px 8px;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 10px 0 8px;
  overflow: hidden;
  color: var(--stone-800);
  font-size: 18px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

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

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 22px;
}

.featured-side {
  display: grid;
  gap: 16px;
}

.movie-horizontal {
  display: grid;
  grid-template-columns: auto 132px 1fr;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 12px;
  border-radius: 16px;
  background: white;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-horizontal img {
  width: 132px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

.movie-horizontal h3 {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.movie-horizontal p {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-horizontal span {
  color: var(--stone-500);
  font-size: 12px;
  font-weight: 700;
}

.list-rank {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--amber-600);
  font-weight: 900;
}

.center-head {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
}

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

.category-card {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  background: var(--stone-900);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card > span {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.36), transparent);
}

.category-card > div {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  color: white;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 25px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.large-category {
  min-height: 280px;
}

.mini-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-title-row span {
  border-radius: 999px;
  color: var(--amber-900);
  background: rgba(254, 243, 199, 0.88);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  padding: 80px 0 64px;
  color: white;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.36), transparent 32%),
    linear-gradient(135deg, var(--amber-900), var(--stone-900));
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--stone-200);
  border-radius: 20px;
  background: white;
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  outline: 0;
  color: var(--stone-800);
  background: var(--stone-50);
  padding: 0 12px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-600);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.14);
}

.empty-state {
  margin-top: 28px;
  border-radius: 18px;
  background: var(--stone-100);
  color: var(--stone-600);
  padding: 30px;
  text-align: center;
  font-weight: 800;
}

.detail-top {
  padding: 34px 0 54px;
  color: white;
  background:
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.30), transparent 34%),
    linear-gradient(150deg, var(--stone-900), var(--amber-900));
}

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

.breadcrumb a:hover {
  color: white;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
  gap: 26px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: black;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: black;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 0;
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.24));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-shell.is-playing .play-overlay {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  background: var(--amber-600);
  font-size: 32px;
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.42);
}

.play-overlay strong {
  font-size: 18px;
}

.detail-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.detail-card img {
  width: 132px;
  height: 190px;
  border-radius: 16px;
  object-fit: cover;
}

.detail-card h1 {
  margin: 14px 0 10px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
}

.detail-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 26px;
  align-items: start;
}

.story-panel,
.side-panel,
.ranking-panel {
  border-radius: 22px;
  background: white;
  box-shadow: var(--soft-shadow);
  padding: 26px;
}

.story-panel p {
  color: var(--stone-700);
  font-size: 16px;
}

.detail-tags {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.detail-tags div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.detail-tags strong {
  margin-right: 4px;
}

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

.side-list .movie-horizontal {
  grid-template-columns: 104px 1fr;
  box-shadow: none;
  border: 1px solid var(--stone-200);
}

.side-list .movie-horizontal .list-rank {
  display: none;
}

.side-list .movie-horizontal img {
  width: 104px;
  height: 74px;
}

.ranking-layout {
  display: grid;
}

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

.all-grid .movie-card {
  min-width: 0;
}

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

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

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

.footer-inner h3 {
  margin: 0 0 14px;
  color: var(--amber-100);
}

.footer-inner a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--stone-400);
}

.footer-inner a:hover {
  color: var(--amber-100);
}

.footer-brand {
  color: var(--amber-100);
  font-size: 22px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--stone-500);
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 2px;
  }

  .nav-link {
    padding: 8px 9px;
    font-size: 13px;
  }

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

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

@media (max-width: 860px) {
  main {
    padding-top: 64px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

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

  .hero {
    min-height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .hero-search input {
    min-height: 44px;
  }

  .featured-grid,
  .detail-grid,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .detail-card {
    grid-template-columns: 100px 1fr;
  }

  .detail-card img {
    width: 100px;
    height: 148px;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

  .section {
    padding: 44px 0;
  }

  .section-head {
    display: block;
  }

  .section-link {
    margin-top: 10px;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
    padding: 14px;
  }

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

  .movie-horizontal .list-rank {
    display: none;
  }

  .movie-horizontal img {
    width: 92px;
    height: 70px;
  }

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

  .detail-card img {
    width: 100%;
    height: 230px;
  }

  .play-circle {
    width: 62px;
    height: 62px;
    font-size: 26px;
  }
}
