:root {
  --primary-400: #f5b759;
  --primary-500: #f3ab3c;
  --primary-600: #f19d36;
  --accent-500: #ff835c;
  --secondary-50: #f7fafc;
  --secondary-100: #d9e2ec;
  --secondary-500: #627d98;
  --secondary-600: #486581;
  --secondary-700: #334e68;
  --secondary-800: #243b53;
  --secondary-900: #102a43;
  --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 25px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 8px 40px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 20px rgba(243, 171, 60, 0.3);
  --radius-xl: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  font-size: 14px;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

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

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--secondary-700);
}

.mobile-nav {
  display: none;
  border-top: 1px solid #edf2f7;
  padding: 14px 24px 18px;
  background: #ffffff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--secondary-900) 0%, rgba(16, 42, 67, 0.88) 45%, rgba(16, 42, 67, 0.3) 100%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--primary-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #d9e2ec;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.hero-tags,
.detail-meta-pills,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.hero-tags span,
.detail-meta-pills span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #ffffff;
}

.hero-tags span,
.detail-meta-pills span {
  padding: 6px 10px;
  background: rgba(243, 171, 60, 0.16);
  color: #ffffff;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: var(--primary-500);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

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

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

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.ghost-button.on-light {
  border-color: rgba(16, 42, 67, 0.16);
  color: var(--secondary-800);
  background: rgba(255, 255, 255, 0.75);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.is-active {
  width: 30px;
  border-radius: 999px;
  background: var(--primary-500);
}

.section {
  padding: 72px 0;
}

.section-white {
  background: #ffffff;
}

.section-soft {
  background: var(--secondary-50);
}

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

.narrow-inner {
  max-width: 980px;
}

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

.compact-heading {
  margin-bottom: 20px;
}

.section-heading h2,
.page-hero h1,
.content-card h2,
.sidebar-card h2 {
  margin: 0;
  color: var(--secondary-800);
  font-weight: 900;
}

.section-heading h2 {
  font-size: 34px;
}

.section-link {
  color: var(--primary-600);
  font-weight: 800;
}

.movie-rail {
  display: flex;
  gap: 24px;
  margin: 0 -24px;
  padding: 0 24px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.rail-item {
  width: 252px;
  flex: 0 0 auto;
}

.movie-grid,
.grid-six,
.ranking-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #d9e2ec;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 58%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card-link:hover .poster-shade {
  opacity: 1;
}

.poster-meta,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

.poster-meta {
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--secondary-800);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-card-info,
.movie-card-line {
  margin: 0;
  color: var(--secondary-500);
  font-size: 13px;
}

.movie-card-info {
  margin-bottom: 8px;
}

.movie-card-line {
  min-height: 39px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  background: var(--secondary-100);
  color: var(--secondary-700);
}

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

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

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

.category-tile {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 150px;
  overflow: hidden;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-copy {
  padding: 20px;
}

.category-copy h3 {
  margin: 0 0 8px;
  color: var(--secondary-800);
  font-size: 22px;
  font-weight: 900;
}

.category-copy p {
  margin: 0;
  color: var(--secondary-600);
  line-height: 1.65;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
  padding: 18px;
  border: 1px solid #edf2f7;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  background: var(--secondary-50);
}

.search-box span {
  color: var(--primary-600);
  font-size: 22px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--secondary-800);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  background: var(--secondary-100);
  color: var(--secondary-700);
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip.is-active,
.filter-chip:hover {
  background: var(--primary-500);
  color: #ffffff;
}

.empty-state {
  display: none;
  padding: 56px 0;
  color: var(--secondary-500);
  text-align: center;
  font-size: 18px;
}

.empty-state.is-visible {
  display: block;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff7ed, #ffffff 52%, #edf2f7);
}

.page-hero::after {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(243, 171, 60, 0.2);
  content: "";
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 82px 24px;
}

.small-hero .page-hero-inner,
.category-hero .page-hero-inner,
.ranking-hero .page-hero-inner {
  padding-top: 72px;
  padding-bottom: 72px;
}

.page-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--secondary-600);
  font-size: 18px;
  line-height: 1.8;
}

.stacked-previews {
  display: grid;
  gap: 52px;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 62px 82px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-row a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  color: #ffffff;
  font-weight: 900;
}

.rank-row img {
  width: 82px;
  height: 108px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--secondary-100);
}

.rank-content h2 {
  margin: 0 0 8px;
  color: var(--secondary-800);
  font-size: 20px;
  font-weight: 900;
}

.rank-meta,
.rank-content p {
  margin: 0;
  color: var(--secondary-500);
  line-height: 1.6;
}

.rank-action {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--secondary-100);
  color: var(--primary-600);
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--secondary-900);
}

.detail-hero::before {
  position: absolute;
  inset: 0;
  background-image: var(--detail-cover);
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: blur(3px);
  transform: scale(1.03);
  content: "";
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--secondary-900), rgba(16, 42, 67, 0.86));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 56px;
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  color: #d9e2ec;
  font-size: 14px;
}

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

.detail-title-block {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: end;
}

.detail-cover {
  width: 220px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xl);
  object-fit: cover;
  background: var(--secondary-100);
  box-shadow: var(--shadow-strong);
}

.detail-title-block h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-title-block p {
  max-width: 820px;
  margin: 0 0 20px;
  color: #d9e2ec;
  font-size: 18px;
  line-height: 1.75;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow-strong);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-overlay.is-hidden {
  display: none;
}

.player-play {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--primary-500);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  font-size: 28px;
}

.player-overlay p {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  display: none;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(16, 42, 67, 0.9);
  color: #ffffff;
  font-size: 14px;
}

.player-message.is-visible {
  display: block;
}

.content-card,
.sidebar-card {
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.content-card {
  padding: 30px;
}

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

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

.detail-sidebar {
  min-width: 0;
}

.sidebar-card {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.sidebar-card h2 {
  margin-bottom: 18px;
  font-size: 22px;
}

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edf2f7;
}

.side-item:last-child {
  border-bottom: 0;
}

.side-item img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--secondary-100);
}

.side-item strong,
.side-item em {
  display: block;
}

.side-item strong {
  margin-bottom: 6px;
  color: var(--secondary-800);
  font-size: 15px;
  line-height: 1.4;
}

.side-item em {
  color: var(--secondary-500);
  font-size: 12px;
  font-style: normal;
}

.site-footer {
  background: var(--secondary-900);
  color: #d9e2ec;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-main p {
  max-width: 620px;
  margin: 0;
  color: #bcccdc;
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 24px;
  color: #9fb3c8;
  text-align: center;
}

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

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

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

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

  .sidebar-card {
    position: static;
  }
}

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

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

  .hero {
    min-height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 52px 0;
  }

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

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

  .rank-row a {
    grid-template-columns: 48px 72px 1fr;
  }

  .rank-action {
    display: none;
  }

  .detail-title-block {
    grid-template-columns: 118px 1fr;
    align-items: center;
  }

  .detail-cover {
    width: 118px;
  }

  .detail-title-block h1 {
    font-size: 34px;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .section-inner,
  .page-hero-inner,
  .detail-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-content {
    width: calc(100% - 32px);
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p,
  .page-hero p,
  .detail-title-block p {
    font-size: 16px;
  }

  .movie-grid,
  .grid-six,
  .ranking-grid,
  .category-grid,
  .large-category-grid {
    gap: 16px;
  }

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

  .movie-card h3 {
    font-size: 15px;
  }

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

  .detail-cover {
    width: 150px;
  }

  .rank-row a {
    grid-template-columns: 40px 64px 1fr;
    gap: 12px;
  }

  .rank-row img {
    width: 64px;
    height: 88px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .content-card {
    padding: 22px;
  }

  .player-play {
    width: 66px;
    height: 66px;
  }
}
