:root {
  color-scheme: light;
  --site-blue: #2563eb;
  --site-indigo: #4f46e5;
  --site-purple: #7c3aed;
  --site-dark: #111827;
  --site-muted: #6b7280;
  --site-soft: #f8fafc;
  --site-line: rgba(17, 24, 39, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 44%, #f8fafc 100%);
  color: #111827;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.site-nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.site-brand-mark {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 14px 26px rgba(79, 70, 229, 0.34);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #374151;
  font-weight: 700;
}

.site-nav a {
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.9rem;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: #f3f4f6;
}

.hero-slider {
  position: relative;
  height: 62vh;
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.62) 46%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  width: min(1280px, 100%);
  transform: translateX(-50%);
  padding: 4.5rem 1.5rem 5.25rem;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-title {
  max-width: 820px;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.08em;
  text-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(90deg, #ffffff, #dbeafe, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 720px;
  margin-top: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-actions,
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  min-height: 3rem;
  padding: 0.8rem 1.3rem;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.32);
}

.btn-secondary {
  min-height: 3rem;
  padding: 0.8rem 1.25rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.btn-ghost {
  min-height: 2.65rem;
  padding: 0.65rem 1rem;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.26);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1.7rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 2.2rem;
  background: #ffffff;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 0;
}

.section.compact {
  padding-top: 2.5rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.45rem;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.06em;
  font-weight: 950;
  color: #111827;
}

.section-subtitle {
  margin-top: 0.55rem;
  max-width: 720px;
  color: #6b7280;
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.16);
}

.poster-link {
  display: block;
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb, #f8fafc);
}

.poster-link img,
.related-card img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.related-card:hover img,
.rank-item:hover .rank-poster img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 0.95rem;
}

.card-title {
  display: block;
  min-height: 2.6rem;
  color: #111827;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 900;
}

.card-title:hover {
  color: #2563eb;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 700;
}

.card-desc {
  margin-top: 0.58rem;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.58rem;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  font-size: 0.75rem;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 1.35rem;
  padding: 1.35rem;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 24px 58px rgba(79, 70, 229, 0.2);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  bottom: -70px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin-top: 0.7rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
}

.search-panel {
  border-radius: 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.search-input {
  width: 100%;
  min-height: 3.3rem;
  border-radius: 999px;
  padding: 0 1.2rem;
  color: #111827;
  background: #f3f4f6;
  outline: none;
  font-weight: 750;
}

.search-input:focus {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
  background: #ffffff;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.filter-chip {
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  color: #374151;
  background: #f3f4f6;
  font-weight: 850;
  transition: color 0.2s ease, background 0.2s ease;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.85rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 4rem 5rem 1fr;
  gap: 0.85rem;
  align-items: center;
  border-radius: 1.25rem;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.07);
}

.rank-number {
  font-size: 1.6rem;
  font-weight: 950;
  color: #2563eb;
  letter-spacing: -0.08em;
  text-align: center;
}

.rank-poster {
  overflow: hidden;
  border-radius: 0.85rem;
  aspect-ratio: 2 / 3;
}

.rank-title {
  color: #111827;
  font-size: 1.02rem;
  font-weight: 950;
}

.rank-title:hover {
  color: #2563eb;
}

.rank-desc {
  color: #6b7280;
  margin-top: 0.35rem;
  line-height: 1.6;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.15rem 1.5rem 0;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #2563eb;
}

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.5rem;
  aspect-ratio: 2 / 3;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.18);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-title {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.08em;
  color: #111827;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.detail-meta span {
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  color: #374151;
  background: #f3f4f6;
  font-size: 0.86rem;
  font-weight: 850;
}

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.8fr);
  gap: 1.4rem;
}

.content-card {
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.content-card h2,
.content-card h3 {
  color: #111827;
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.content-card p {
  color: #374151;
  line-height: 1.9;
  margin-top: 0.85rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #020617;
  box-shadow: 0 30px 75px rgba(2, 6, 23, 0.22);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.56));
  z-index: 3;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-button {
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 24px 58px rgba(37, 99, 235, 0.35);
}

.play-button svg {
  margin-left: 0.28rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.related-card {
  overflow: hidden;
  border-radius: 1.15rem;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
}

.related-card .poster-link {
  aspect-ratio: 2 / 3;
}

.related-card h3 {
  padding: 0.7rem;
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 900;
}

.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  color: #6b7280;
}

.footer-inner {
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .rank-list.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-nav {
    position: fixed;
    left: 1rem;
    right: 1rem;
    top: 82px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    border-radius: 0.9rem;
  }

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

  .hero-slider {
    min-height: 560px;
    height: 78vh;
  }

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

  .category-grid,
  .detail-hero,
  .detail-layout,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(260px, 70vw);
  }
}

@media (max-width: 520px) {
  .site-nav-wrap {
    padding: 0 1rem;
  }

  .section,
  .detail-layout,
  .detail-hero,
  .breadcrumb {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .movie-grid {
    gap: 0.8rem;
  }

  .card-body {
    padding: 0.78rem;
  }

  .rank-item {
    grid-template-columns: 3rem 4rem 1fr;
  }
}
