:root {
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --red-50: #fef2f2;
  --ink-950: #0f172a;
  --ink-900: #111827;
  --ink-800: #1f2937;
  --ink-700: #374151;
  --ink-600: #4b5563;
  --ink-500: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.18);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 42%, #f8fafc 100%);
  color: var(--ink-900);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner,
.header-pills-inner,
.page-shell,
.footer-grid,
.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.35);
}

.brand-text {
  font-size: 24px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--red-700), var(--red-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--ink-700);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-pills {
  border-top: 1px solid rgba(229, 231, 235, 0.62);
}

.header-pills-inner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
}

.header-pills-inner::-webkit-scrollbar {
  display: none;
}

.pill-link {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 999px;
  color: var(--ink-700);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.pill-link:hover {
  color: var(--red-700);
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: var(--shadow-sm);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--red-50);
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: var(--red-600);
}

.mobile-nav {
  display: none;
  padding: 0 20px 18px;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-700);
  font-weight: 700;
}

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

.page-shell {
  padding: 44px 0 68px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.74) 45%, rgba(15, 23, 42, 0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
}

.hero-title {
  max-width: 760px;
  margin: 20px 0 14px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-summary {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.35);
}

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
}

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

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

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

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

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: -46px;
  position: relative;
  z-index: 4;
}

.stat-card {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.stat-card strong {
  display: block;
  color: var(--red-600);
  font-size: 30px;
  line-height: 1;
}

.stat-card span {
  color: var(--ink-600);
  font-weight: 700;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 58px 0 22px;
}

.section-title-row h2,
.page-title h1 {
  margin: 0;
  color: var(--ink-950);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.section-title-row p,
.page-title p {
  margin: 8px 0 0;
  color: var(--ink-600);
}

.section-more {
  flex: 0 0 auto;
  color: var(--red-600);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(220, 38, 38, 0.28);
  box-shadow: var(--shadow-lg);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink-900);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(185, 28, 28, 0.9);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-950);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card h2:hover {
  color: var(--red-600);
}

.movie-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  margin: 9px 0 0;
  color: var(--ink-600);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-list span {
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--red-700);
  background: var(--red-50);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 164px;
  padding: 24px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink-900), var(--red-700));
  box-shadow: var(--shadow-sm);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -48px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
}

.category-card span {
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.rank-panel,
.info-panel,
.detail-panel,
.filter-panel {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.rank-panel {
  padding: 18px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: var(--red-50);
  transform: translateX(4px);
}

.rank-num {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  font-weight: 900;
}

.compact-poster img {
  width: 62px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card h3 {
  margin: 0;
  color: var(--ink-950);
  font-size: 16px;
  font-weight: 900;
}

.compact-card h3:hover {
  color: var(--red-600);
}

.compact-card p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: 13px;
}

.page-title {
  padding: 34px;
  border-radius: 34px;
  color: var(--ink-950);
  background:
    radial-gradient(circle at 90% 8%, rgba(239, 68, 68, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #fff1f1);
  box-shadow: var(--shadow-sm);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ink-500);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--red-600);
}

.breadcrumb em {
  color: var(--line);
  font-style: normal;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px 160px;
  gap: 12px;
  padding: 16px;
  margin: 28px 0;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--ink-800);
  font: inherit;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: 34px;
  border-radius: 34px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78)),
    var(--detail-bg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
  margin: 14px 0 12px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.detail-info p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  border-radius: 28px;
  background: #050505;
  box-shadow: var(--shadow-lg);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.1));
  cursor: pointer;
  transition: opacity 0.24s ease;
}

.play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.42);
  font-size: 34px;
  transform: translateX(3px);
}

.player-ready .play-overlay,
.player-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

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

.detail-panel,
.info-panel {
  padding: 28px;
}

.detail-panel h2,
.info-panel h2 {
  margin: 0 0 14px;
  color: var(--ink-950);
  font-size: 24px;
  font-weight: 900;
}

.detail-panel p {
  margin: 0 0 18px;
  color: var(--ink-700);
  font-size: 16px;
}

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

.side-link {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--soft);
}

.side-link:hover {
  background: var(--red-50);
}

.side-link img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.side-link strong {
  display: block;
  color: var(--ink-950);
  font-size: 15px;
  line-height: 1.3;
}

.side-link span {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 700;
}

.empty-result {
  display: none;
  padding: 30px;
  border-radius: 24px;
  color: var(--ink-600);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.no-results .empty-result {
  display: block;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  margin: 10px 0 0;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

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

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(203, 213, 225, 0.14);
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-carousel,
  .hero-track {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 40px 0 86px;
  }

  .hero-poster {
    width: min(270px, 70vw);
  }

  .stats-strip,
  .rank-layout,
  .detail-hero,
  .detail-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 270px;
  }

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

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

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

@media (max-width: 520px) {
  .header-inner,
  .header-pills-inner,
  .page-shell,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .page-shell {
    padding-top: 28px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-summary,
  .detail-info p {
    font-size: 16px;
  }

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

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

  .detail-hero,
  .page-title,
  .detail-panel,
  .info-panel {
    padding: 20px;
    border-radius: 24px;
  }
}
