* {
  box-sizing: border-box;
}

:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --orange-50: #fff7ed;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 18px 35px rgb(15 23 42 / 0.14);
  --shadow-xl: 0 28px 55px rgb(15 23 42 / 0.2);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--amber-50), var(--white) 38%, var(--gray-50));
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(255 255 255 / 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgb(229 231 235 / 0.9);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  white-space: nowrap;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
  box-shadow: 0 14px 30px rgb(180 83 9 / 0.32);
}

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

.main-nav a {
  padding: 10px 12px;
  color: var(--gray-700);
  border-radius: 12px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--amber-800);
  background: var(--amber-50);
}

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

.nav-search input,
.filter-bar input,
.filter-bar select {
  width: 210px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgb(245 158 11 / 0.18);
}

.nav-search button,
.primary-btn,
.secondary-btn,
.filter-bar button,
.player-button {
  border: 0;
  border-radius: 14px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button,
.primary-btn,
.filter-bar button,
.player-button {
  color: var(--white);
  background: var(--amber-700);
  box-shadow: 0 12px 24px rgb(180 83 9 / 0.22);
}

.nav-search button:hover,
.primary-btn:hover,
.filter-bar button:hover,
.player-button:hover {
  background: var(--amber-800);
  transform: translateY(-1px);
}

.secondary-btn {
  color: var(--amber-800);
  background: rgb(255 255 255 / 0.92);
  box-shadow: var(--shadow-sm);
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--amber-50);
  color: var(--amber-800);
  border-radius: 12px;
  padding: 10px 13px;
  cursor: pointer;
}

.hero {
  position: relative;
  height: min(760px, 72vh);
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

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

.hero-slide.is-active img {
  animation: heroZoom 7s ease both;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.84), rgb(0 0 0 / 0.56) 44%, rgb(0 0 0 / 0.08)),
    linear-gradient(0deg, rgb(17 24 39 / 0.78), transparent 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

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

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgb(180 83 9 / 0.9);
  backdrop-filter: blur(12px);
  font-weight: 700;
  margin-bottom: 20px;
}

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

.hero p {
  margin: 0 0 24px;
  max-width: 680px;
  color: rgb(243 244 246 / 0.95);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.72;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  color: rgb(255 255 255 / 0.92);
}

.hero-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  backdrop-filter: blur(10px);
}

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

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

.hero-dot {
  width: 46px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.36);
  cursor: pointer;
}

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

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 24px;
}

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

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

.section-kicker {
  color: var(--amber-700);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.section h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-desc,
.page-hero p,
.detail-lead {
  color: var(--gray-600);
  line-height: 1.8;
  font-size: 17px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--gray-100);
}

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

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

.movie-cover-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.1));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-cover-mask {
  opacity: 1;
}

.play-mark {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: rgb(180 83 9 / 0.92);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.3);
}

.score-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.score-badge {
  right: 10px;
  background: rgb(180 83 9 / 0.92);
}

.rank-badge {
  left: 10px;
  background: rgb(17 24 39 / 0.78);
}

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

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

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

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.55;
  font-size: 14px;
}

.movie-line {
  margin-top: 8px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--amber-800);
  background: var(--amber-50);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--white), var(--amber-50));
  box-shadow: var(--shadow-sm);
  border: 1px solid rgb(245 158 11 / 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-card strong {
  display: inline-block;
  margin-top: 18px;
  color: var(--amber-700);
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px 22px;
}

.filter-bar {
  max-width: 1280px;
  margin: 0 auto 24px;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-bar input {
  min-width: 260px;
  flex: 1;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 78px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
  font-weight: 900;
}

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

.rank-row h3 {
  margin: 0 0 7px;
}

.rank-row p {
  margin: 0;
  color: var(--gray-600);
}

.rank-heat {
  color: var(--amber-700);
  font-weight: 900;
}

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 74px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--gray-600);
}

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

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow-xl);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.62), rgb(0 0 0 / 0.12));
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
}

.player-button {
  pointer-events: auto;
  min-width: 142px;
  font-size: 18px;
}

.detail-title {
  padding: 28px 0 18px;
}

.detail-title h1 {
  margin-bottom: 12px;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 700;
}

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

.content-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.9;
  font-size: 16px;
}

.side-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.side-poster {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 16px;
}

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

.info-list {
  display: grid;
  gap: 10px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--gray-600);
}

.info-list strong {
  color: var(--gray-900);
  white-space: nowrap;
}

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

.related-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 64px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.related-item p {
  margin: 0;
  color: var(--gray-600);
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  background: var(--white);
  color: var(--gray-600);
  box-shadow: var(--shadow-sm);
}

.site-footer {
  background: var(--gray-900);
  color: rgb(209 213 219);
  padding: 58px 24px 28px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

.site-footer h3 {
  color: var(--white);
  margin: 0 0 14px;
}

.site-footer p {
  line-height: 1.8;
  margin: 0;
}

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

.footer-links a:hover {
  color: var(--amber-500);
}

.copyright {
  max-width: 1280px;
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgb(75 85 99 / 0.6);
  text-align: center;
  color: rgb(156 163 175);
}

.hidden-card {
  display: none !important;
}

@keyframes heroZoom {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1.01);
  }
}

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    min-height: auto;
    flex-wrap: wrap;
    padding: 14px 18px;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 3;
  }

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

  .nav-search {
    width: 100%;
    order: 4;
  }

  .nav-search input {
    width: 100%;
    flex: 1;
  }

  .hero {
    min-height: 620px;
    height: auto;
  }

  .hero-content {
    padding-top: 80px;
    padding-bottom: 100px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgb(0 0 0 / 0.86), rgb(0 0 0 / 0.26));
  }

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

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

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

  .rank-row {
    grid-template-columns: 42px 68px 1fr;
  }

  .rank-heat {
    grid-column: 3;
  }
}

@media (max-width: 520px) {
  .hero h1,
  .hero h2 {
    font-size: 40px;
  }

  .section,
  .page-hero,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .movie-grid-wide,
  .category-grid {
    gap: 14px;
  }

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

  .movie-line,
  .tag-row {
    display: none;
  }
}
