:root {
  --mist-50: #f8f9fa;
  --mist-100: #f1f3f5;
  --mist-200: #e9ecef;
  --mist-400: #adb5bd;
  --mist-500: #868e96;
  --mist-700: #495057;
  --slate-50: #f8fafc;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --orange-600: #ea580c;
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

* {
  box-sizing: border-box;
}

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

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgb(15 23 42 / 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red-500), var(--orange-600));
  box-shadow: 0 12px 25px rgb(239 68 68 / 0.25);
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(90deg, var(--red-600), var(--orange-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: var(--slate-700);
  background: var(--mist-100);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 12px;
  border-top: 1px solid var(--mist-200);
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--slate-700);
  font-weight: 700;
}

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

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

.hero-slider {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-2xl);
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.48), rgb(0 0 0 / 0.08));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 6vw, 72px);
  top: 50%;
  width: min(610px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgb(239 68 68 / 0.92);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 16px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 24px;
  color: var(--mist-100);
  font-size: 18px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hero-chips {
  margin-bottom: 28px;
}

.hero-chips span,
.detail-chips span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.20);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.detail-chips span,
.tag-row span {
  background: var(--red-50);
  color: var(--red-600);
}

.primary-button,
.secondary-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  padding: 14px 26px;
  color: #fff;
  background: var(--red-500);
  box-shadow: 0 18px 32px rgb(239 68 68 / 0.28);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--red-600);
}

.secondary-button {
  padding: 12px 22px;
  color: var(--red-600);
  background: #fff;
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.20);
  color: #fff;
  font-size: 28px;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease;
}

.hero-nav:hover {
  background: rgb(255 255 255 / 0.32);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.35);
}

.hero-dot.active {
  background: #fff;
}

.section {
  margin-top: 58px;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--slate-800);
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--mist-700);
}

.section-more {
  padding: 9px 16px;
  color: var(--red-600);
  background: var(--red-50);
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--mist-200);
}

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

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

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgb(239 68 68 / 0.92);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  color: var(--slate-800);
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--mist-700);
  font-size: 14px;
  line-height: 1.6;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  gap: 10px;
  color: var(--mist-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(238px, 1fr);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
}

.movie-rail .movie-card {
  scroll-snap-align: start;
}

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

.category-card {
  min-height: 170px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, var(--red-50));
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl);
}

.category-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  color: var(--slate-800);
}

.category-card p {
  margin: 0;
  color: var(--mist-700);
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 82px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 0 rgb(15 23 42 / 0.08);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-500), var(--orange-600));
  font-weight: 900;
}

.rank-item img {
  width: 82px;
  height: 116px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rank-info p {
  margin: 0;
  color: var(--mist-700);
  line-height: 1.6;
}

.rank-meta {
  color: var(--mist-500);
  font-weight: 700;
  white-space: nowrap;
}

.page-hero {
  padding: 44px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, var(--red-50));
  box-shadow: var(--shadow-lg);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.04em;
}

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

.filter-zone {
  margin-top: 36px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--mist-700);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--mist-200);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--slate-800);
  background: var(--mist-50);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--red-500);
  box-shadow: 0 0 0 3px rgb(239 68 68 / 0.12);
}

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

.breadcrumbs a {
  color: var(--red-600);
  font-weight: 800;
}

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

.detail-main,
.detail-side,
.watch-panel,
.text-panel {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.detail-main {
  overflow: hidden;
}

.detail-cover {
  position: relative;
  min-height: 440px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 24px;
  background: var(--slate-900);
}

.detail-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.86), rgb(0 0 0 / 0.10));
}

.detail-cover-content {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 5vw, 44px);
  color: #fff;
}

.detail-cover h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-cover p {
  max-width: 780px;
  margin: 0 0 24px;
  color: var(--mist-100);
  line-height: 1.8;
  font-size: 17px;
}

.watch-panel {
  margin-top: 28px;
  padding: 24px;
}

.watch-panel h2,
.text-panel h2,
.detail-side h2 {
  margin: 0 0 18px;
  font-size: 24px;
  color: var(--slate-800);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.42), rgb(0 0 0 / 0.12));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--red-600);
  background: #fff;
  font-size: 34px;
  box-shadow: var(--shadow-2xl);
}

.play-overlay strong {
  font-size: 20px;
}

.text-panel {
  margin-top: 28px;
  padding: 28px;
}

.text-panel p {
  margin: 0 0 18px;
  color: var(--mist-700);
  line-height: 1.9;
  font-size: 16px;
}

.detail-side {
  padding: 22px;
  position: sticky;
  top: 86px;
}

.side-poster {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--mist-200);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.info-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--mist-200);
  color: var(--mist-700);
}

.info-list strong {
  color: var(--slate-800);
  white-space: nowrap;
}

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

.compact-card {
  display: grid;
  gap: 8px;
  color: var(--slate-800);
  font-weight: 800;
  font-size: 13px;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--mist-200);
}

.no-results {
  display: none;
  padding: 32px;
  border-radius: 18px;
  color: var(--mist-700);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.no-results.show {
  display: block;
}

.site-footer {
  margin-top: 72px;
  color: var(--mist-300, #ced4da);
  background: var(--slate-900);
}

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

.footer-logo .brand-name {
  color: #fff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-brand p {
  max-width: 620px;
  margin: 16px 0 24px;
  color: var(--mist-400);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-bottom: 24px;
}

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

.footer-links a:hover {
  color: #fff;
}

.copyright {
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid rgb(255 255 255 / 0.09);
  color: var(--mist-500);
  font-size: 14px;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-slider {
    height: 520px;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-slider {
    height: 500px;
    border-radius: 18px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-nav {
    display: none;
  }

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

  .movie-grid,
  .category-grid,
  .filter-panel,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 40px 70px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .page-hero {
    padding: 28px;
  }

  .detail-cover {
    min-height: 420px;
  }
}
