:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-50: #fff7ed;
  --orange-700: #c2410c;
  --red-500: #ef4444;
  --teal-600: #0d9488;
  --shadow-soft: 0 18px 45px rgba(28, 25, 23, 0.14);
  --shadow-card: 0 10px 26px rgba(28, 25, 23, 0.12);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--stone-50);
  color: var(--stone-800);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #78350f, #9a3412 50%, #78350f);
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.22);
}

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

.nav-shell {
  display: flex;
  align-items: center;
  min-height: 64px;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: var(--amber-700);
  background: #fff7ed;
  box-shadow: inset 0 0 0 2px rgba(251, 191, 36, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  white-space: nowrap;
}

.nav-links a,
.mobile-menu a,
.footer-links a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-links a:hover {
  color: var(--amber-300);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.search-panel input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-search input {
  width: 190px;
  padding: 10px 15px;
  transition: width 0.25s ease, background 0.25s ease;
}

.nav-search input:focus {
  width: 250px;
  background: rgba(255, 255, 255, 0.2);
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.search-panel input::placeholder,
.filter-panel input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nav-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: var(--amber-600);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.primary-button:hover {
  background: var(--amber-700);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  font-size: 26px;
  background: transparent;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 12px;
  flex-direction: column;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  padding: 11px 14px;
}

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

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

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.46) 52%, rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 56px;
  color: #fff;
}

.hero-inner {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-300);
  font-weight: 700;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero-summary {
  max-width: 700px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta,
.rank-meta,
.category-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.rank-meta span,
.category-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-meta .hot-tag,
.detail-meta .hot-tag {
  background: var(--amber-500);
  color: #fff;
}

.hero-actions,
.section-title-row,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border 0.2s ease;
}

.primary-button {
  padding: 13px 26px;
  color: #fff;
  background: var(--amber-600);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

.ghost-button {
  padding: 12px 24px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.text-button {
  color: var(--amber-700);
}

.hero-arrow,
.hero-dot {
  position: absolute;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow {
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  transform: translateY(-50%);
  font-size: 26px;
}

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

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

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

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

.hero-dot {
  position: static;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
}

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

.main-section {
  padding: 58px 0;
}

.main-section.soft {
  background: linear-gradient(90deg, var(--orange-50), var(--amber-50));
}

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

.section-title-row {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title-row h2,
.page-title,
.detail-title {
  margin: 0;
  color: var(--stone-800);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-title-row h2 {
  font-size: 28px;
}

.page-title,
.detail-title {
  font-size: clamp(30px, 4.5vw, 48px);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--amber-700);
  font-weight: 800;
}

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

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

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

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--stone-200);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

.movie-card-link:hover .movie-cover img {
  transform: scale(1.08);
  opacity: 0.9;
}

.genre-badge,
.card-play,
.rank-number {
  position: absolute;
  z-index: 2;
}

.genre-badge {
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.68);
}

.card-play {
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  color: var(--amber-700);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.movie-card-body h2,
.movie-card-body h3 {
  margin: 0 0 8px;
  color: var(--stone-800);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  transition: color 0.2s ease;
}

.movie-card-link:hover h2,
.movie-card-link:hover h3 {
  color: var(--amber-700);
}

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

.movie-meta,
.rank-meta,
.category-meta {
  margin-top: auto;
  color: var(--stone-500);
  font-size: 12px;
}

.movie-meta span,
.rank-meta span,
.category-meta span {
  padding: 4px 8px;
  background: var(--stone-100);
}

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  width: 310px;
  flex: 0 0 310px;
  scroll-snap-align: start;
}

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

.category-card {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #92400e, #c2410c 52%, #78350f);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.page-hero,
.detail-hero {
  padding: 64px 0 36px;
  background: radial-gradient(circle at 12% 10%, rgba(251, 191, 36, 0.18), transparent 28%), linear-gradient(135deg, var(--stone-900), #3f1d0c 54%, #78350f);
  color: #fff;
}

.page-hero .page-title,
.detail-hero .detail-title {
  color: #fff;
}

.page-hero p,
.detail-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.search-panel,
.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
}

.search-panel input,
.filter-panel input,
.filter-panel select {
  min-width: min(100%, 320px);
  flex: 1;
  padding: 13px 16px;
}

.filter-panel select {
  color: #fff;
  cursor: pointer;
}

.filter-panel option {
  color: var(--stone-800);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--amber-300);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-card,
.rank-card,
.search-empty {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

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

.player-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 16px 26px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: var(--amber-600);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-button:hover {
  transform: scale(1.03);
  background: var(--amber-700);
}

.detail-card {
  padding: 24px;
}

.detail-card h2,
.detail-card h3 {
  margin: 0 0 14px;
  color: var(--stone-800);
}

.detail-card p {
  margin: 0 0 18px;
  color: var(--stone-700);
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

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

.detail-poster-body {
  padding: 20px;
}

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

.tag-list span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 13px;
  font-weight: 700;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 56px 220px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.rank-index {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-700));
}

.rank-card img {
  width: 220px;
  height: 124px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-card h2,
.rank-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-card p {
  margin: 0 0 12px;
  color: var(--stone-500);
}

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

.compact-card {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.compact-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.compact-card span {
  display: block;
  padding: 12px;
  color: var(--stone-800);
  font-weight: 800;
}

.search-empty {
  padding: 34px;
  color: var(--stone-500);
}

.site-footer {
  margin-top: 70px;
  padding: 46px 0 24px;
  color: #d6d3d1;
  background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 28px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
}

.footer-shell p {
  max-width: 620px;
  margin: 0;
  color: #a8a29e;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 16px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(214, 211, 209, 0.18);
  color: #a8a29e;
  font-size: 14px;
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

@media (max-width: 760px) {
  .hero {
    height: 520px;
  }

  .hero-content {
    bottom: 54px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .movie-grid.small,
  .category-grid,
  .footer-shell,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-scroll .movie-card {
    width: 280px;
    flex-basis: 280px;
  }

  .rank-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-card img {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    order: -1;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .nav-shell,
  .footer-shell,
  .container,
  .footer-bottom,
  .mobile-menu {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 19px;
  }

  .hero {
    height: 500px;
  }

  .hero-title {
    font-size: 34px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .main-section {
    padding: 42px 0;
  }
}
