:root {
  --primary-50: #fff7ed;
  --primary-100: #ffedd5;
  --primary-200: #fed7aa;
  --primary-400: #fbbf24;
  --primary-500: #f3ab3c;
  --primary-600: #d97706;
  --accent-500: #ef4444;
  --success-500: #22c55e;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1f2937;
  --secondary-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --shadow-soft: 0 10px 35px rgba(15, 23, 42, 0.08);
  --shadow-medium: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-glow: 0 16px 35px rgba(243, 171, 60, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--secondary-800);
  background: var(--secondary-50);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.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.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--secondary-800);
  letter-spacing: -0.02em;
}

.brand-invert {
  color: var(--white);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: var(--shadow-glow);
}

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

.nav-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary-600);
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--secondary-100);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: var(--secondary-800);
}

.hero-carousel {
  background: var(--secondary-900);
}

.hero-stage {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.9s ease;
  pointer-events: none;
}

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

.hero-copy {
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
  color: var(--white);
  padding: 72px 0;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-headline h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.hero-copy p,
.page-hero p,
.detail-headline p {
  max-width: 720px;
  margin: 0 0 28px;
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.78);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: var(--primary-400);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-tags,
.movie-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-bottom: 30px;
}

.hero-tags span,
.tag-cloud span {
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-tags span:first-child {
  background: var(--primary-500);
}

.hero-actions,
.center-actions,
.detail-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

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

.btn-primary {
  color: var(--white);
  background: var(--primary-500);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  background: var(--primary-600);
}

.btn-secondary {
  color: var(--primary-600);
  background: var(--primary-100);
}

.btn-ghost {
  color: var(--white);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  font-size: 36px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.55);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.content-section {
  padding: 70px 0;
}

.bg-white {
  background: var(--white);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.section-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: var(--shadow-glow);
}

.section-heading h2,
.category-overview-block h2,
.rank-head h2,
.side-panel h2,
.detail-article h2,
.split-grids h3 {
  margin: 0;
  color: var(--secondary-800);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--secondary-500);
}

.horizontal-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 6px 4px 22px;
  scrollbar-width: thin;
}

.horizontal-scroll .movie-card {
  width: 245px;
  flex: 0 0 245px;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--secondary-200), var(--secondary-100));
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

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

.movie-card-body strong {
  display: block;
  overflow: hidden;
  color: var(--secondary-800);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-card-body strong {
  color: var(--primary-600);
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  color: var(--secondary-500);
  font-size: 12px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  color: var(--secondary-600);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags {
  margin-top: 12px;
  gap: 6px;
}

.movie-tags span {
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--primary-600);
  font-size: 12px;
  background: var(--primary-50);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
}

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

.category-tile {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 24px;
  border: 1px solid var(--secondary-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--primary-200);
  box-shadow: var(--shadow-medium);
}

.category-tile strong {
  color: var(--secondary-800);
  font-size: 22px;
  font-weight: 900;
}

.category-tile span,
.category-tile small {
  color: var(--secondary-500);
}

.category-tile small {
  display: block;
  min-height: 20px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-tile.tall {
  min-height: 168px;
}

.rank-panel,
.side-panel,
.text-card {
  border-radius: 28px;
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.rank-head span {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  background: var(--accent-500);
}

.rank-list,
.side-list {
  display: grid;
  gap: 10px;
}

.rank-row,
.side-list a {
  display: grid;
  align-items: center;
  gap: 12px;
  border-radius: 15px;
  padding: 12px;
  color: var(--secondary-700);
  background: var(--secondary-50);
  transition: background 0.2s ease, color 0.2s ease;
}

.rank-row {
  grid-template-columns: 46px 1fr 58px;
}

.rank-row:hover,
.side-list a:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}

.rank-num {
  color: var(--primary-600);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-year {
  color: var(--secondary-500);
  font-size: 13px;
  text-align: right;
}

.rank-more {
  display: block;
  margin-top: 18px;
  color: var(--primary-600);
  font-weight: 900;
}

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

.split-grids h3 {
  margin-bottom: 20px;
  font-size: 24px;
}

.center-actions {
  justify-content: center;
  margin-top: 36px;
}

.page-hero,
.detail-hero {
  color: var(--white);
  background: var(--secondary-900);
  background-size: cover;
  background-position: center;
}

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

.slim-hero {
  padding: 82px 0;
  background: linear-gradient(135deg, var(--secondary-900), #243145);
}

.category-overview-block {
  margin-bottom: 48px;
}

.category-overview-block h2 {
  margin-bottom: 20px;
  font-size: 30px;
}

.page-links,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-links a,
.pagination a,
.detail-nav-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--secondary-700);
  font-weight: 800;
  background: var(--secondary-100);
  transition: background 0.2s ease, color 0.2s ease;
}

.page-links a:hover,
.pagination a:hover,
.pagination a.is-active,
.detail-nav-links a:hover {
  color: var(--white);
  background: var(--primary-500);
}

.pagination {
  justify-content: center;
  margin-top: 42px;
}

.ranking-container {
  display: grid;
  gap: 14px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 70px 88px 1fr 32px;
  align-items: center;
  gap: 18px;
  border-radius: 24px;
  padding: 14px 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.ranking-index {
  color: var(--primary-600);
  font-size: 24px;
  font-weight: 900;
}

.ranking-card img {
  width: 88px;
  height: 118px;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-info {
  display: grid;
  gap: 5px;
}

.ranking-info strong {
  font-size: 20px;
  font-weight: 900;
}

.ranking-info em {
  color: var(--secondary-500);
  font-style: normal;
}

.ranking-info span {
  color: var(--secondary-600);
}

.ranking-arrow {
  color: var(--primary-500);
  font-size: 34px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 14px;
  margin-bottom: 26px;
  border-radius: 26px;
  padding: 20px;
  background: var(--secondary-50);
  box-shadow: inset 0 0 0 1px var(--secondary-200);
}

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

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid var(--secondary-200);
  border-radius: 14px;
  padding: 0 13px;
  color: var(--secondary-800);
  background: var(--white);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px rgba(243, 171, 60, 0.15);
}

.filter-status {
  margin-bottom: 22px;
  color: var(--secondary-500);
  font-weight: 800;
}

.movie-card.is-hidden {
  display: none;
}

.detail-hero {
  padding: 76px 0;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}

.detail-poster img {
  width: 270px;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.detail-headline .detail-nav-links {
  margin-top: 28px;
}

.player-section {
  padding: 50px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--black);
  box-shadow: var(--shadow-medium);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  text-align: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.72));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-disc {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 32px;
  background: var(--primary-500);
  box-shadow: var(--shadow-glow);
}

.player-overlay strong {
  max-width: min(600px, 80%);
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 900;
}

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

.detail-article,
.side-panel {
  border-radius: 28px;
  padding: 30px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-article h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 28px;
  color: var(--secondary-600);
  font-size: 17px;
}

.info-table {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px 20px;
  margin-bottom: 26px;
}

.info-table span {
  color: var(--secondary-500);
}

.info-table strong {
  color: var(--secondary-800);
}

.tag-cloud span {
  color: var(--primary-600);
  background: var(--primary-50);
}

.side-list a {
  grid-template-columns: 1fr 54px;
}

.side-list span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.side-list em {
  color: var(--secondary-500);
  font-size: 13px;
  font-style: normal;
  text-align: right;
}

.narrow-page {
  max-width: 880px;
}

.text-card p {
  margin: 0 0 18px;
  color: var(--secondary-600);
  font-size: 17px;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: var(--secondary-900);
}

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

.footer-brand {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 36px;
}

.footer-brand p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 16px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-grid a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.48);
  font-size: 14px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
}

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

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-medium);
  }

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

  .nav-link {
    padding: 14px 18px;
    border-bottom: 1px solid var(--secondary-100);
  }

  .hero-stage,
  .hero-copy {
    min-height: 520px;
  }

  .hero-control {
    display: none;
  }

  .two-column,
  .split-grids,
  .detail-layout,
  .footer-brand,
  .detail-hero-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster img {
    width: min(260px, 70vw);
  }

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

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

  .ranking-card {
    grid-template-columns: 50px 72px 1fr;
  }

  .ranking-card img {
    width: 72px;
    height: 96px;
  }

  .ranking-arrow {
    display: none;
  }
}

@media (max-width: 620px) {
  .container,
  .nav-shell,
  .hero-copy,
  .footer-shell {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-copy h1,
  .hero-copy h2,
  .page-hero h1,
  .detail-headline h1 {
    font-size: 34px;
  }

  .content-section,
  .page-hero,
  .detail-hero {
    padding: 48px 0;
  }

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

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

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

  .filter-panel,
  .region-blocks,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 44px 1fr;
  }

  .ranking-card img {
    display: none;
  }

  .player-shell {
    border-radius: 18px;
  }

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

  .info-table {
    grid-template-columns: 1fr;
  }
}
