:root {
  --primary-900: #333d4f;
  --primary-800: #39475d;
  --primary-700: #42536f;
  --primary-600: #506688;
  --primary-100: #ebeef3;
  --accent-500: #eab308;
  --accent-400: #facc15;
  --accent-50: #fefce8;
  --neutral-950: #0f172a;
  --neutral-900: #171717;
  --neutral-800: #262626;
  --neutral-700: #404040;
  --neutral-600: #525252;
  --neutral-500: #737373;
  --neutral-400: #a3a3a3;
  --neutral-300: #d4d4d4;
  --neutral-200: #e5e5e5;
  --neutral-100: #f5f5f5;
  --neutral-50: #fafafa;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--neutral-800);
  background: var(--neutral-50);
  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: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 229, 229, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--primary-900);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--accent-500);
  background: var(--primary-100);
  transform: rotate(45deg);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-weight: 600;
  color: var(--neutral-700);
}

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

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--accent-500);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(340px, 32vw);
  border: 1px solid var(--neutral-300);
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.home-search-strip input,
.filter-controls input,
.filter-controls select {
  border: 0;
  outline: 0;
  color: var(--neutral-800);
  background: transparent;
}

.header-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.home-search-strip button {
  border: 0;
  padding: 10px 16px;
  color: var(--white);
  background: var(--primary-600);
  cursor: pointer;
  transition: background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.home-search-strip button:hover,
.btn-primary:hover {
  background: var(--primary-700);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--neutral-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--primary-900);
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.mobile-search {
  display: flex;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  overflow: hidden;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}

.hero-carousel {
  position: relative;
  height: min(660px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: var(--primary-900);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.1s 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;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.48) 50%, rgba(17, 24, 39, 0.12)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.85), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--white);
  max-width: 1240px;
}

.hero-kicker,
.page-hero span,
.section-title span,
.rank-board-head span,
.detail-kicker {
  color: var(--accent-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 14px 0 18px;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: var(--neutral-200);
  font-size: clamp(16px, 2vw, 21px);
}

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

.hero-tags {
  margin-top: 22px;
}

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

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.compact-actions {
  margin-top: 22px;
}

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

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: var(--accent-400);
}

.home-search-strip {
  position: relative;
  z-index: 10;
  width: min(1180px, calc(100% - 32px));
  margin: -54px auto 0;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 26px;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  box-shadow: var(--shadow-lg);
}

.home-search-strip h2 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.home-search-strip p {
  margin: 0;
  color: var(--primary-100);
}

.home-search-strip form {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: var(--white);
}

.home-search-strip input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
}

.section-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 56px auto;
}

.section-title,
.rank-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-title h2,
.rank-board-head h2,
.filter-heading h2,
.neighbor-categories h2,
.detail-copy h2,
.category-card-copy h2 {
  margin: 4px 0 0;
  color: var(--primary-900);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-title a,
.rank-board-head a,
.text-link {
  color: var(--primary-600);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--primary-900);
  box-shadow: var(--shadow-sm);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.12));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding: 0 18px;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile em {
  margin: 7px 0 18px;
  color: var(--neutral-200);
  font-size: 13px;
  font-style: normal;
}

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

.movie-grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--primary-900);
}

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

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

.cover-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.card-badge,
.card-year {
  position: absolute;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  top: 12px;
  left: 12px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.58);
}

.card-year {
  right: 12px;
  bottom: 12px;
  color: var(--neutral-950);
  background: var(--accent-400);
}

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

.movie-card h2,
.movie-card h3 {
  margin: 0;
  color: var(--primary-900);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.movie-card h2 a,
.movie-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 8px 0 0;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 700;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 14px;
  overflow: hidden;
  color: var(--neutral-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.rank-board {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 24px;
  background: var(--primary-900);
  box-shadow: var(--shadow-md);
}

.rank-board h2,
.rank-board a {
  color: var(--white);
}

.rank-board-head {
  margin-bottom: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.14);
}

.rank-number {
  color: var(--accent-400);
  font-size: 18px;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy strong {
  font-size: 14px;
}

.rank-copy em {
  color: var(--neutral-300);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(250, 204, 21, 0.32), transparent 28%),
    linear-gradient(135deg, var(--primary-900), var(--primary-600));
}

.page-hero > div {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--primary-100);
  font-size: 18px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-card-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--primary-900);
}

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

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

.category-card-copy p,
.filter-heading p,
.detail-copy p {
  color: var(--neutral-600);
}

.filter-panel {
  padding: 24px;
  border: 1px solid var(--neutral-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

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

.filter-heading p {
  max-width: 520px;
  margin: 0;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--neutral-300);
  border-radius: 14px;
  background: var(--neutral-50);
}

.neighbor-categories .pill-row {
  margin-top: 14px;
}

.pill-link {
  padding: 8px 13px;
  color: var(--primary-700);
  background: var(--primary-100);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}

.ranking-lead {
  position: sticky;
  top: 96px;
  padding: 18px;
  border-radius: 22px;
  background: var(--primary-900);
}

.detail-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--neutral-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-600);
  font-weight: 700;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 24px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow-lg);
}

.player-shell video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  object-fit: contain;
  background: #000;
}

.player-cover {
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
}

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

.play-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-900);
  background: var(--accent-400);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  font-size: 32px;
  line-height: 1;
}

.detail-info-card {
  padding: 28px;
  border-radius: 26px;
  color: var(--white);
  background: linear-gradient(145deg, var(--primary-900), var(--primary-600));
  box-shadow: var(--shadow-md);
}

.detail-info-card h1 {
  margin: 10px 0 14px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  color: var(--primary-100);
  font-size: 17px;
}

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

.detail-meta-grid span {
  padding: 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.11);
}

.detail-meta-grid strong {
  display: block;
  color: var(--accent-400);
  font-size: 12px;
}

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

.detail-copy article {
  padding: 28px;
  border: 1px solid var(--neutral-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.detail-copy p {
  margin-bottom: 0;
  font-size: 16px;
}

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

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

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

  .rank-board,
  .ranking-lead {
    position: static;
  }

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

@media (max-width: 820px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .site-header-inner {
    height: 64px;
  }

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

  .hero-carousel {
    min-height: 600px;
    height: 78vh;
  }

  .hero-mask {
    background:
      linear-gradient(0deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.4)),
      linear-gradient(90deg, rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.18));
  }

  .home-search-strip {
    grid-template-columns: 1fr;
    margin-top: -34px;
  }

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

  .category-card-large {
    grid-template-columns: 1fr;
  }

  .filter-heading {
    display: block;
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .player-shell {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .section-wrap,
  .detail-wrap,
  .site-header-inner,
  .mobile-panel,
  .home-search-strip,
  .page-hero > div,
  .hero-content {
    width: calc(100% - 24px);
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .category-grid,
  .home-grid,
  .all-grid,
  .related-grid,
  .category-overview-grid,
  .detail-copy,
  .ranking-lead {
    grid-template-columns: 1fr;
  }

  .section-title,
  .rank-board-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-item {
    grid-template-columns: 38px 52px 1fr;
  }

  .player-shell {
    min-height: 260px;
    border-radius: 20px;
  }

  .detail-info-card,
  .detail-copy article,
  .filter-panel {
    padding: 20px;
    border-radius: 20px;
  }

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