:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --secondary-50: #faf5ff;
  --secondary-100: #f3e8ff;
  --secondary-600: #9333ea;
  --accent-500: #f59e0b;
  --success-600: #16a34a;
  --dark-50: #f8fafc;
  --dark-100: #f1f5f9;
  --dark-300: #cbd5e1;
  --dark-500: #64748b;
  --dark-600: #475569;
  --dark-700: #334155;
  --dark-800: #1e293b;
  --dark-900: #0f172a;
  --white: #ffffff;
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-medium: 0 14px 32px rgba(15, 23, 42, 0.14);
  --shadow-hard: 0 22px 55px rgba(15, 23, 42, 0.24);
  --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(--dark-800);
  background: #f9fafb;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.section-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.nav-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon,
.footer-logo span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  box-shadow: var(--shadow-soft);
}

.brand-text {
  font-size: 24px;
  line-height: 1;
  background: linear-gradient(90deg, var(--primary-600), var(--secondary-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  font-weight: 650;
  color: var(--dark-700);
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--dark-100);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--dark-700);
  border-radius: 99px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid #e5e7eb;
  background: var(--white);
}

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

.mobile-menu-inner {
  padding: 12px 0;
}

.mobile-link {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 650;
  color: var(--dark-700);
}

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

.hero-slider {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--dark-900), var(--dark-800));
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.4), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: var(--white);
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--white);
  background: var(--secondary-600);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 660px;
  margin: 0;
  color: #e5e7eb;
  font-size: clamp(18px, 2.2vw, 22px);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

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

.btn-primary:hover {
  background: var(--primary-700);
  box-shadow: var(--shadow-medium);
}

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

.btn.full {
  width: 100%;
}

.hero-year {
  color: #cbd5e1;
  font-weight: 700;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 20px;
  transform: translateY(-50%);
}

.hero-next {
  right: 20px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section-block {
  padding: 68px 0;
}

.wide-section {
  margin: 12px 0;
}

.gradient-soft {
  background: linear-gradient(180deg, var(--secondary-50), var(--white));
}

.gradient-primary {
  background: linear-gradient(180deg, var(--primary-50), var(--white));
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.section-title > span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  box-shadow: var(--shadow-soft);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  color: var(--dark-900);
}

.section-title p {
  margin: 6px 0 0;
  color: var(--dark-500);
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.scroll-controls {
  display: flex;
  gap: 10px;
}

.scroll-controls button,
[data-scroll-button] {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  color: var(--dark-700);
  font-size: 28px;
  cursor: pointer;
}

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

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

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

.card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--dark-900);
}

.movie-card-small .movie-poster {
  height: 170px;
}

.movie-card-large .movie-poster {
  height: 290px;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.8));
}

.badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 4px 9px;
  border-radius: 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.badge-left {
  left: 12px;
  background: var(--primary-600);
}

.badge-right {
  right: 12px;
  background: var(--secondary-600);
}

.play-hover {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 52px;
  margin: 0 0 8px;
  color: var(--dark-800);
  font-size: 17px;
  line-height: 1.5;
  transition: color 0.2s ease;
}

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

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--dark-500);
  font-size: 13px;
}

.movie-info p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin: 0;
  color: var(--dark-600);
  font-size: 14px;
}

.scroll-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 6px 2px 22px;
  scroll-behavior: smooth;
}

.scroll-row::-webkit-scrollbar {
  height: 0;
}

.scroll-item {
  flex: 0 0 300px;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.tab-button {
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  color: var(--dark-700);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  font-weight: 750;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tab-button.active,
.tab-button:hover {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: var(--shadow-medium);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.center-action {
  margin-top: 28px;
  text-align: center;
}

.year-columns {
  display: grid;
  gap: 44px;
}

.year-columns h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}

.year-columns h3 span {
  display: inline-flex;
  padding: 9px 15px;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary-600);
}

.year-columns h3 small {
  color: var(--dark-500);
  font-size: 18px;
}

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

.side-panel {
  align-self: start;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--dark-900);
  color: var(--white);
  box-shadow: var(--shadow-medium);
}

.side-panel h2 {
  margin: 0 0 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-no {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  font-weight: 800;
}

.rank-row img {
  width: 64px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--dark-900);
}

.rank-row strong,
.compact-card strong {
  display: block;
  color: var(--dark-900);
}

.rank-row small,
.compact-card span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--dark-500);
}

.rank-row em {
  color: var(--secondary-600);
  font-style: normal;
  font-weight: 800;
}

.rank-row-large {
  grid-template-columns: 50px 86px minmax(0, 1fr) auto;
}

.rank-row-large img {
  width: 86px;
  height: 112px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: rgba(255, 255, 255, 0.14);
}

.compact-card img {
  width: 58px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--dark-800);
}

.side-panel .compact-card strong,
.side-panel .compact-card span {
  color: var(--white);
}

.page-hero {
  padding: 72px 0;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(147, 51, 234, 0.42), transparent 30%), linear-gradient(135deg, var(--primary-600), var(--primary-800));
}

.page-hero.dark-hero {
  background: radial-gradient(circle at 80% 20%, rgba(147, 51, 234, 0.36), transparent 32%), linear-gradient(135deg, var(--dark-900), var(--dark-800));
}

.page-hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.category-card {
  padding: 28px;
  min-height: 250px;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
  color: var(--dark-900);
}

.category-card p {
  min-height: 54px;
  margin: 0 0 18px;
  color: var(--dark-600);
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.category-preview a {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 13px;
}

.category-card > span {
  color: var(--secondary-600);
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px 180px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0 14px;
  color: var(--dark-800);
  background: var(--dark-50);
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.detail-wrap {
  padding: 34px 0 74px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--dark-500);
}

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

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

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

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

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-600);
  box-shadow: var(--shadow-medium);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 18px;
}

.detail-card {
  padding: 28px;
}

.detail-card h1,
.detail-card h2 {
  margin: 0 0 14px;
  color: var(--dark-900);
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-card h2 {
  font-size: 26px;
}

.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.detail-meta span,
.tag-row span {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 14px;
  font-weight: 750;
}

.tag-row span {
  background: var(--secondary-50);
  color: var(--secondary-600);
}

.lead-text {
  font-size: 18px;
  font-weight: 650;
}

.detail-card p {
  margin: 0;
  color: var(--dark-700);
}

.related-section {
  margin-top: 10px;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.sidebar-poster {
  padding: 18px;
}

.sidebar-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: var(--dark-900);
}

.sidebar-poster h2 {
  margin: 16px 0 8px;
  color: var(--dark-900);
}

.sidebar-poster p {
  color: var(--dark-600);
}

.side-rank {
  padding: 18px;
}

.side-rank h2 {
  margin: 0 0 14px;
}

.side-rank .compact-card {
  background: var(--dark-50);
}

.footer {
  margin-top: 46px;
  color: var(--dark-300);
  background: var(--dark-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
  font-size: 20px;
}

.footer p {
  max-width: 360px;
  color: var(--dark-300);
}

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

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer li + li {
  margin-top: 8px;
}

.footer a {
  color: var(--dark-300);
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: var(--dark-500);
}

[hidden],
.is-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .nav-links {
    gap: 14px;
    font-size: 14px;
  }

  .three-col,
  .four-col,
  .category-grid,
  .split-layout,
  .detail-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-sidebar {
    grid-column: 1 / -1;
  }

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

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-slider {
    height: 560px;
  }

  .hero-copy {
    padding-right: 18px;
  }

  .hero-arrow {
    display: none;
  }

  .section-block {
    padding: 46px 0;
  }

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

  .scroll-controls {
    display: none;
  }

  .three-col,
  .four-col,
  .category-grid,
  .split-layout,
  .detail-grid,
  .footer-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .rank-row,
  .rank-row-large {
    grid-template-columns: 36px 58px minmax(0, 1fr);
  }

  .rank-row em {
    grid-column: 2 / -1;
  }

  .rank-row-large img {
    width: 58px;
    height: 78px;
  }

  .movie-poster,
  .movie-card-large .movie-poster,
  .movie-card-small .movie-poster {
    height: 230px;
  }

  .detail-card {
    padding: 22px;
  }
}
