:root {
  color-scheme: light;
}

body {
  min-height: 100vh;
}

.site-logo-mark {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  color: #ffffff;
  font-size: 0.85rem;
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.25);
}

.site-logo-mark.small {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.75rem;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1.5rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.menu-icon::before {
  transform: translateY(-7px);
}

.menu-icon::after {
  transform: translateY(5px);
}

.mobile-nav {
  display: none;
}

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

.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #5d748c;
  font-size: 0.95rem;
  font-weight: 600;
}

.mobile-link:hover,
.mobile-link.is-active {
  background: #22d3ee;
  color: #ffffff;
}

.hero-root {
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1000ms ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(15, 28, 42, 1), rgba(15, 28, 42, 0.64), rgba(15, 28, 42, 0.05)),
    radial-gradient(circle at 22% 30%, rgba(34, 211, 238, 0.2), transparent 38%);
}

.hero-copy {
  animation: fadeUp 700ms ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}

.hero-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.75rem;
  color: #ffffff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 200ms ease, transform 200ms ease;
  backdrop-filter: blur(10px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.52);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  z-index: 5;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 200ms ease, background 200ms ease;
}

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

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.75rem;
}

.home-search input,
.filter-control {
  width: 100%;
  border: 1px solid #dbe6ee;
  border-radius: 0.85rem;
  background: #ffffff;
  color: #243b53;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.home-search input {
  min-height: 3.25rem;
  padding: 0 1rem;
}

.home-search input:focus,
.filter-control:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
}

.home-search button {
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border-radius: 0.85rem;
  background: #14919b;
  color: #ffffff;
  font-weight: 800;
}

.home-search button:hover {
  background: #0e7c86;
}

.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.category-chip,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e6fafd;
  color: #0e7c86;
  font-size: 0.85rem;
  font-weight: 700;
}

.category-chip {
  padding: 0.65rem 1rem;
}

.category-chip:hover {
  background: #22d3ee;
  color: #ffffff;
}

.tag-pill {
  padding: 0.45rem 0.75rem;
}

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

.section-heading.compact {
  margin-bottom: 1rem;
}

.card-play {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #14919b;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 200ms ease, transform 200ms ease;
}

.group:hover .card-play {
  opacity: 1;
  transform: scale(1);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 0.5rem;
  right: auto;
  background: #14919b;
}

.card-meta {
  margin-top: 0.65rem;
  color: #829ab1;
  font-size: 0.75rem;
}

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

.ranking-list {
  display: grid;
  gap: 0.6rem;
}

.ranking-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #f4f8fb;
}

.ranking-row:hover {
  background: #e6fafd;
}

.ranking-num {
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #14919b;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
}

.ranking-name {
  overflow: hidden;
  color: #243b53;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-meta {
  color: #829ab1;
  font-size: 0.8rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  position: absolute;
  right: -6rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
  content: "";
}

.breadcrumb {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #c7d8e5;
  font-size: 0.9rem;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.category-cover {
  display: flex;
  min-height: 10rem;
  align-items: flex-end;
  padding: 1rem;
  background-size: cover;
  background-position: center;
  isolation: isolate;
  position: relative;
}

.category-cover::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(15, 28, 42, 0.85), rgba(15, 28, 42, 0.12));
  content: "";
}

.category-cover span {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
}

.category-preview {
  display: grid;
  gap: 0.4rem;
}

.category-preview a {
  color: #14919b;
  font-size: 0.9rem;
  font-weight: 700;
}

.category-preview a:hover {
  color: #0e7c86;
}

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

.filter-control {
  min-height: 3rem;
  padding: 0 1rem;
}

.movie-card.is-hidden {
  display: none;
}

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

.watch-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f1c2a;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #0f1c2a;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(to top, rgba(15, 28, 42, 0.74), rgba(15, 28, 42, 0.16));
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.play-circle {
  display: inline-flex;
  width: 4.25rem;
  height: 4.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #22d3ee;
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(34, 211, 238, 0.26);
}

.detail-poster {
  aspect-ratio: 3 / 4;
}

.info-list {
  display: grid;
  gap: 0.7rem;
}

.info-list div {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
  color: #5d748c;
  font-size: 0.92rem;
}

.info-list dt {
  color: #829ab1;
}

.info-list dd {
  color: #243b53;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-title {
  margin-bottom: 1rem;
  color: #ffffff;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(199, 216, 229, 0.14);
  color: #9fb3c8;
  font-size: 0.9rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .filter-grid {
    grid-template-columns: minmax(0, 1fr) 12rem 12rem;
  }

  .filter-grid:has([data-filter-category]) {
    grid-template-columns: minmax(0, 1fr) 10rem 10rem 12rem;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

@media (min-width: 1024px) {
  .home-two-col {
    grid-template-columns: minmax(0, 1fr) 22rem;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.8fr);
  }
}

@media (max-width: 767px) {
  .hero-arrow {
    display: none;
  }

  .home-search {
    grid-template-columns: 1fr;
  }

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