:root {
  --primary-900: #333d4f;
  --primary-800: #39475d;
  --primary-700: #42536f;
  --primary-600: #506688;
  --primary-100: #ebeef3;
  --accent-600: #ca8a04;
  --accent-500: #eab308;
  --accent-400: #facc15;
  --neutral-950: #0a0a0a;
  --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(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--neutral-900);
  background: var(--neutral-50);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--neutral-50);
}

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

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

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.94);
  border-bottom: 1px solid rgba(229, 229, 229, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-900);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  box-shadow: 0 10px 24px rgba(80, 102, 136, 0.26);
}

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

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--neutral-700);
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary-700);
  background: var(--primary-100);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--primary-900);
  background: var(--primary-100);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 99px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  color: var(--white);
  background: var(--neutral-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.015);
  transition: opacity 700ms ease, transform 900ms ease;
}

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

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 72% 32%, rgba(250, 204, 21, 0.22), transparent 30%), linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62) 45%, rgba(17, 24, 39, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 600px;
  padding: 58px 0 64px;
}

.hero-panel {
  width: min(620px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.36);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--accent-400);
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.2);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0 0 22px;
  color: var(--neutral-200);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.movie-meta,
.detail-meta,
.card-tags,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-meta {
  margin-bottom: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-100);
  font-size: 13px;
  font-weight: 700;
}

.hero .pill {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 750;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--accent-500);
  box-shadow: 0 14px 32px rgba(234, 179, 8, 0.28);
}

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

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-soft {
  color: var(--primary-700);
  background: var(--primary-100);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: min(5vw, 56px);
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 22px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.64;
}

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

.main-section {
  padding: 64px 0;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-title h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--neutral-900);
  font-weight: 850;
  letter-spacing: -0.04em;
}

.section-title h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-title p,
.page-hero p,
.detail-title p {
  color: var(--neutral-600);
  line-height: 1.8;
}

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

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

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

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

.card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-600));
}

.movie-grid.compact .card-cover {
  aspect-ratio: 4 / 3;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

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

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 750;
}

.card-score {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 9px;
  color: var(--neutral-950);
  background: var(--accent-400);
  font-size: 12px;
  font-weight: 850;
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--neutral-900);
  font-size: 18px;
  line-height: 1.35;
}

.movie-grid.compact .card-body h3 {
  font-size: 16px;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--neutral-600);
  font-size: 14px;
  line-height: 1.65;
}

.line-clamp-2,
.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

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

.category-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 18px;
  border-radius: 18px;
  color: var(--primary-900);
  background: var(--white);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.category-chip:hover {
  transform: translateY(-3px);
  color: var(--primary-600);
  border-color: var(--primary-100);
}

.category-chip strong {
  display: block;
  font-size: 18px;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 850;
}

.rank-item:nth-child(1) .rank-number,
.rank-item:nth-child(2) .rank-number,
.rank-item:nth-child(3) .rank-number {
  color: var(--neutral-950);
  background: var(--accent-400);
}

.rank-cover {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: var(--primary-100);
}

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

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
  padding: 72px 0;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
  max-width: 760px;
  color: var(--primary-100);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px 160px;
  gap: 12px;
  margin: 28px 0;
  padding: 16px;
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--neutral-800);
  background: var(--white);
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(80, 102, 136, 0.14);
}

.detail-hero {
  padding: 34px 0 54px;
  color: var(--white);
  background: linear-gradient(135deg, var(--neutral-950), var(--primary-900));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--neutral-300);
  font-size: 14px;
}

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

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

.detail-title h1 {
  color: var(--white);
  font-size: clamp(36px, 6vw, 64px);
}

.detail-title p {
  max-width: 760px;
  color: var(--neutral-200);
  font-size: 18px;
}

.detail-meta .pill {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.poster-box {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: var(--primary-800);
  box-shadow: var(--shadow-lg);
}

.poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  padding: 46px 0 70px;
}

.player-card,
.content-card,
.side-card {
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: var(--neutral-950);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: var(--neutral-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  z-index: 3;
}

.player-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.28));
}

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

.play-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: var(--neutral-950);
  background: var(--accent-400);
  box-shadow: 0 18px 45px rgba(234, 179, 8, 0.32);
  font-size: 30px;
  transition: transform 180ms ease, background 180ms ease;
}

.play-button:hover {
  transform: scale(1.06);
  background: var(--accent-500);
}

.player-caption {
  padding: 18px 20px;
  color: var(--neutral-700);
}

.content-card {
  padding: 28px;
  margin-bottom: 24px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--neutral-900);
}

.content-card p {
  margin: 0 0 18px;
  color: var(--neutral-700);
  line-height: 1.9;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 20px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: var(--primary-100);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--neutral-900);
  line-height: 1.35;
}

.related-item span {
  color: var(--neutral-500);
  font-size: 13px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.site-footer {
  color: var(--neutral-300);
  background: var(--primary-900);
  padding: 46px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 34px;
}

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

.site-footer p,
.site-footer a {
  color: var(--neutral-300);
  line-height: 1.8;
}

.site-footer a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--neutral-400);
  font-size: 14px;
}

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

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

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

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

  .side-card {
    position: static;
  }

  .poster-box {
    max-width: 460px;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
  }

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

  .hero,
  .hero-content {
    min-height: 540px;
    height: auto;
  }

  .hero-content {
    padding: 34px 0 82px;
  }

  .hero-panel {
    padding: 22px;
  }

  .hero-controls {
    left: 18px;
    right: auto;
    bottom: 24px;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 90px minmax(0, 1fr);
    gap: 10px;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.compact,
  .category-strip {
    grid-template-columns: 1fr;
  }

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

  .related-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}
