:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f8fafc;
  color: #0f172a;
}

img {
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.site-main {
  flex: 1;
}

.site-logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0284c7, #f59e0b);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.26);
}

.site-mobile-panel {
  display: none;
}

.site-mobile-panel.is-open {
  display: block;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-image-fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(14, 165, 233, 0.45), transparent 28%), radial-gradient(circle at 72% 22%, rgba(245, 158, 11, 0.36), transparent 32%), linear-gradient(135deg, #020617, #0f172a 45%, #082f49);
}

.hero-slide.has-missing-image img {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.16));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 4rem;
}

.hero-dots {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 5;
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 250ms ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: #0ea5e9;
}

.movie-card {
  height: 100%;
}

.movie-card a {
  height: 100%;
}

.poster-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 25% 20%, rgba(14, 165, 233, 0.28), transparent 35%), linear-gradient(135deg, #0f172a, #1e293b);
}

.poster-frame.poster-tall {
  aspect-ratio: 2 / 3;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 500ms ease;
}

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

.poster-frame.has-missing-image img {
  display: none;
}

.poster-badge {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.poster-score {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag-chip.light {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-kicker {
  color: #0284c7;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.category-tile {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.category-tile:before {
  content: "";
  position: absolute;
  width: 8rem;
  height: 8rem;
  right: -2.5rem;
  top: -2.5rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
}

.rank-list {
  counter-reset: movie-rank;
}

.rank-item {
  counter-increment: movie-rank;
}

.rank-number:before {
  content: counter(movie-rank, decimal-leading-zero);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.12));
  cursor: pointer;
  z-index: 4;
}

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

.play-circle {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.96);
  color: #ffffff;
  font-size: 2rem;
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.34);
  transform: scale(1);
  transition: transform 200ms ease;
}

.play-overlay:hover .play-circle {
  transform: scale(1.08);
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.detail-info-item {
  padding: 1rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.search-empty {
  display: none;
}

.search-empty.is-visible {
  display: block;
}

@media (min-width: 768px) {
  .hero-carousel {
    height: 80vh;
  }
}

@media (max-width: 900px) {
  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 4.75rem;
  }

  .hero-dots {
    left: 1rem;
    right: auto;
  }

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

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

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