:root {
  --amber-50: #fff7ed;
  --amber-100: #ffedd5;
  --amber-200: #fed7aa;
  --amber-400: #fb923c;
  --amber-500: #f97316;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 16px 40px rgba(17, 24, 39, 0.12);
  --soft-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
  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;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--amber-700);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-400));
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(217, 119, 6, 0.28);
}

.brand-text {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--gray-700);
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  padding: 8px 16px 16px;
  background: #ffffff;
  border-top: 1px solid var(--gray-200);
}

.mobile-link {
  display: block;
  padding: 10px 14px;
  color: var(--gray-700);
  border-radius: 10px;
}

.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-700);
  background: var(--amber-50);
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 560px;
  isolation: isolate;
}

.hero-slide.active {
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(6px) saturate(1.1);
  transform: scale(1.04);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(180, 83, 9, 0.72) 55%, rgba(251, 146, 60, 0.62));
}

.hero-grid {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 56px;
  padding: 54px 0;
  color: #ffffff;
}

.hero-copy h1 {
  margin: 12px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.amber {
  color: var(--amber-600);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--amber-700);
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

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

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

.btn-light {
  color: var(--amber-700);
  background: #ffffff;
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-amber {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-500));
}

.hero-poster {
  position: relative;
  display: block;
  transform: rotate(2deg);
  transition: transform 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-4px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 10px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.hero-poster span,
.score-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  color: var(--amber-700);
  background: #ffffff;
  border-radius: 999px;
  font-weight: 900;
  box-shadow: var(--soft-shadow);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.24);
  border-radius: 999px;
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.active {
  width: 28px;
  background: #ffffff;
}

.section {
  padding: 70px 0;
}

.section-soft {
  background: linear-gradient(180deg, var(--amber-50), #ffffff);
}

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

.section-head h2,
.rank-panel-head h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.rank-panel-head p {
  margin: 8px 0 0;
  color: var(--gray-500);
}

.section-link,
.rank-panel-head a {
  color: var(--amber-600);
  font-weight: 800;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  align-items: center;
  gap: 28px;
  padding: 34px;
  background: #ffffff;
  border: 1px solid var(--amber-100);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
}

.search-band h2 {
  margin: 8px 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.search-band p {
  margin: 0;
  color: var(--gray-500);
}

.home-search {
  display: flex;
  padding: 8px;
  background: var(--gray-100);
  border-radius: 999px;
}

.home-search input {
  min-width: 0;
  flex: 1;
  padding: 0 18px;
  border: 0;
  outline: 0;
  background: transparent;
}

.home-search button {
  padding: 12px 20px;
  border: 0;
  color: #ffffff;
  background: var(--amber-600);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: var(--amber-200);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  background: linear-gradient(135deg, var(--amber-100), var(--amber-50));
}

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

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

.movie-card h3 {
  margin: 7px 0 8px;
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.25;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--gray-500);
  font-size: 13px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--gray-500);
  font-size: 12px;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 6px;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  color: #ffffff;
  background: #ef4444;
  border-radius: 999px;
  box-shadow: var(--soft-shadow);
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 24px;
  background: var(--gray-900);
  box-shadow: var(--soft-shadow);
  isolation: isolate;
}

.tile-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  opacity: 0.62;
}

.tile-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.86));
  z-index: 1;
}

.tile-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 22px;
  color: #ffffff;
}

.tile-content b {
  display: block;
  margin-bottom: 8px;
  font-size: 23px;
}

.tile-content em {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.side-box,
.category-overview-card,
.detail-main {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.rank-panel-head {
  margin-bottom: 18px;
}

.rank-list,
.mini-rank {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--gray-50);
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: var(--amber-50);
  transform: translateX(3px);
}

.rank-row strong {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: var(--amber-600);
  border-radius: 999px;
  font-size: 13px;
}

.rank-row img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row span {
  min-width: 0;
}

.rank-row b {
  display: block;
  overflow: hidden;
  color: var(--gray-900);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  display: block;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero {
  padding: 84px 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-400));
  overflow: hidden;
}

.page-hero.warm {
  background: linear-gradient(135deg, #92400e, #f97316);
}

.rank-hero {
  background: linear-gradient(135deg, #7c2d12, #f59e0b);
}

.search-hero {
  background: linear-gradient(135deg, #1f2937, #d97706);
}

.page-hero h1 {
  max-width: 860px;
  margin: 10px 0 12px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.category-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 36px;
}

.hero-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  transform: rotate(2deg);
}

.hero-collage img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 6px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.category-overview-card {
  padding: 24px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  color: var(--gray-900);
}

.category-overview-card p {
  margin: 0 0 18px;
  color: var(--gray-500);
}

.search-panel {
  margin-bottom: 28px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.search-panel label {
  display: grid;
  gap: 7px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 800;
}

.search-box {
  margin-bottom: 16px;
}

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

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--amber-400);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16);
}

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

.detail-top {
  padding: 34px 0 0;
  background: linear-gradient(180deg, #111827, #1f2937);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background: #000000;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
}

.main-video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
  border: 0;
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding-left: 5px;
  color: var(--amber-700);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 32px;
}

.detail-aside {
  align-self: end;
  margin-bottom: 24px;
}

.detail-aside img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-score {
  margin-top: 12px;
  padding: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  text-align: center;
  font-weight: 800;
}

.detail-score b {
  color: #fbbf24;
  font-size: 24px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  padding: 30px;
}

.detail-main h1 {
  margin: 8px 0 12px;
  color: var(--gray-900);
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-main h2,
.side-box h2 {
  margin: 28px 0 12px;
  color: var(--gray-900);
  font-size: 24px;
}

.detail-main p {
  color: var(--gray-700);
  font-size: 17px;
}

.lead {
  padding: 18px;
  background: var(--amber-50);
  border-left: 5px solid var(--amber-600);
  border-radius: 16px;
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--gray-500);
}

.detail-meta span {
  padding: 5px 10px;
  background: var(--gray-100);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.tag-row.large span {
  min-height: 32px;
  padding: 6px 12px;
}

.side-box {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.side-box h2 {
  margin-top: 0;
}

.site-footer {
  background: linear-gradient(180deg, var(--amber-50), var(--amber-100));
  border-top: 1px solid var(--amber-200);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 46px 0;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: var(--gray-900);
}

.footer-grid p,
.footer-grid a {
  display: block;
  color: var(--gray-500);
  margin: 0 0 9px;
}

.footer-grid a:hover {
  color: var(--amber-700);
}

.footer-bottom {
  padding: 18px 16px;
  color: var(--gray-500);
  border-top: 1px solid var(--amber-200);
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1060px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .rank-panel,
  .side-box {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .mobile-menu.open {
    display: block;
  }

  .hero-grid,
  .category-hero-grid,
  .detail-grid,
  .search-band,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 260px;
    margin: 0 auto;
  }

  .hero-control {
    display: none;
  }

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

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

  .detail-aside {
    display: none;
  }

  .main-video {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }
}

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

  .brand-text {
    font-size: 19px;
  }

  .hero-slider,
  .hero-slide,
  .hero-grid {
    min-height: 620px;
  }

  .hero-grid {
    gap: 26px;
    padding: 34px 0 68px;
  }

  .section {
    padding: 46px 0;
  }

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

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

  .category-grid,
  .category-overview-grid,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .home-search {
    border-radius: 20px;
    flex-direction: column;
    gap: 8px;
  }

  .home-search input {
    min-height: 42px;
  }

  .page-hero {
    padding: 56px 0;
  }

  .detail-main {
    padding: 22px;
  }
}
