:root {
  --brand: #dc2626;
  --brand-dark: #b91c1c;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --card: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--soft);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  color: #fff;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.nav-link {
  color: #374151;
  transition: color .2s ease, transform .2s ease;
}

.nav-link:hover {
  color: var(--brand);
  transform: translateY(-1px);
}

.hero-slide {
  display: none;
  position: absolute;
  inset: 0;
}

.hero-slide.is-active {
  display: block;
  animation: heroFade .65s ease both;
}

@keyframes heroFade {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}

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

.hero-copy {
  max-width: 42rem;
  color: #fff;
}

.hero-dot.is-active {
  background: var(--brand);
  width: 2rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #111827;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.movie-poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.1), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}

.movie-card:hover .movie-overlay {
  opacity: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .75rem;
  font-weight: 700;
  background: rgba(220, 38, 38, .1);
  color: #b91c1c;
}

.badge-dark {
  background: rgba(255,255,255,.18);
  color: #fff;
  backdrop-filter: blur(10px);
}

.category-card {
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .14);
}

.rank-item {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .55rem;
  border-radius: .85rem;
  transition: background .2s ease;
}

.rank-item:hover {
  background: #fef2f2;
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: .6rem;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #ef4444, #991b1b);
}

.detail-hero {
  position: relative;
  min-height: 28rem;
  overflow: hidden;
  background: #0f172a;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.1);
  transform: scale(1.08);
  opacity: .42;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #020617;
  box-shadow: 0 20px 60px rgba(2, 6, 23, .35);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2,6,23,.15), rgba(2,6,23,.78));
  transition: opacity .25s ease, visibility .25s ease;
}

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

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 18px 42px rgba(220, 38, 38, .42);
  font-size: 2rem;
  line-height: 1;
}

.inline-filter {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: .8rem 1.1rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.inline-filter:focus {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, .16);
}

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

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

.mobile-menu {
  display: none;
}

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

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 768px) {
  .hero-section {
    height: 560px !important;
  }

  .hero-copy h1 {
    font-size: 2.45rem !important;
  }

  .player-shell {
    border-radius: .9rem;
  }
}
