html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #0f172a 44%, #111827 100%);
  color: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr minmax(240px, 340px);
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ef4444 45%, #a855f7);
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.35);
}

.brand-text {
  font-size: 1.1rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a,
.footer-links a,
.section-more {
  color: #cbd5e1;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a {
  padding: 10px 12px;
  white-space: nowrap;
  font-size: 0.94rem;
}

.main-nav a:hover,
.main-nav a.is-active,
.footer-links a:hover,
.section-more:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
}

.site-search,
.wide-search,
.local-filter {
  position: relative;
}

.site-search-input,
.card-filter-input,
.wide-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  padding: 0 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.site-search-input::placeholder,
.card-filter-input::placeholder,
.wide-search input::placeholder {
  color: #94a3b8;
}

.site-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  max-height: 440px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.site-search-results.is-open {
  display: block;
}

.search-result-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  color: #e2e8f0;
  text-decoration: none;
  border-radius: 16px;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-result-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.search-result-item strong {
  display: block;
  color: #ffffff;
}

.search-result-item span {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 0.86rem;
}

.hero-carousel {
  position: relative;
  width: min(1320px, calc(100% - 28px));
  min-height: 620px;
  margin: 24px auto 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.62fr);
  gap: 40px;
  align-items: center;
  padding: clamp(30px, 6vw, 78px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.28)),
    var(--hero-image) center / cover;
  filter: saturate(1.12);
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 10% 0 10%;
  height: 42%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 70%);
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-one-line,
.section-intro p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.wide-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.wide-search button {
  background: linear-gradient(135deg, #f59e0b, #ef4444 48%, #a855f7);
  box-shadow: 0 18px 44px rgba(239, 68, 68, 0.35);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.wide-search button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 26px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.6rem;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: #f59e0b;
}

.section-block,
.inner-page,
.detail-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section-block {
  padding: 54px 0;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 34px;
  align-items: center;
}

.section-intro h2,
.section-head h2,
.detail-text h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

.wide-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-more {
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.08);
}

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

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

.category-chip {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 126px;
  padding: 16px;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.78));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.5);
}

.category-chip__posters {
  position: relative;
  height: 96px;
}

.category-chip__posters img {
  position: absolute;
  width: 56px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.category-chip__posters img:nth-child(1) {
  left: 0;
  top: 8px;
  z-index: 3;
}

.category-chip__posters img:nth-child(2) {
  left: 25px;
  top: 0;
  z-index: 2;
}

.category-chip__posters img:nth-child(3) {
  left: 50px;
  top: 13px;
  z-index: 1;
}

.category-chip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.category-chip span {
  display: block;
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.7;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(30, 41, 59, 0.88);
}

.poster-wrap {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

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

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

.poster-wrap figcaption,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
}

.poster-wrap figcaption {
  left: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(10px);
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.32);
}

.movie-card__body {
  padding: 14px;
}

.movie-card__body h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card__body p {
  min-height: 3.6em;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.65;
}

.meta-row,
.tag-row,
.detail-meta,
.genre-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-row span,
.tag-row span,
.detail-meta span,
.genre-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.78rem;
}

.tag-row span,
.genre-strip span {
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.12);
}

.page-hero {
  position: relative;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.72));
  padding: clamp(34px, 6vw, 70px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.local-filter {
  max-width: 540px;
  margin-top: 28px;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 54px 56px minmax(140px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 10px 14px;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-row a:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.9);
}

.ranking-row img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.ranking-number {
  color: #f59e0b;
  font-size: 1.2rem;
  font-weight: 900;
}

.ranking-title {
  font-weight: 800;
}

.ranking-meta {
  color: #94a3b8;
}

.ranking-action {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fed7aa;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 26px 0;
  color: #94a3b8;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #e2e8f0;
  text-decoration: none;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.2), transparent 22rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.78));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.45);
}

.detail-meta,
.detail-tags {
  margin: 18px 0;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444 55%, #a855f7);
  box-shadow: 0 22px 48px rgba(239, 68, 68, 0.42);
  font-size: 2rem;
}

.player-overlay strong {
  font-size: 1.2rem;
}

.detail-text {
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-text p {
  margin: 12px 0 28px;
  font-size: 1.04rem;
}

.movie-card--compact .movie-card__body p {
  min-height: auto;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.62);
}

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #94a3b8;
}

.footer-shell p {
  max-width: 540px;
  margin: 0;
}

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

.footer-links a {
  padding: 8px 12px;
}

.is-filtered-out {
  display: none !important;
}

.empty-filter {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  color: #cbd5e1;
  text-align: center;
}

@media (max-width: 1120px) {
  .nav-shell {
    grid-template-columns: auto auto 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
  }

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

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

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

@media (max-width: 860px) {
  .nav-shell {
    grid-template-columns: auto auto;
  }

  .site-search {
    grid-column: 1 / -1;
    width: 100%;
    padding-bottom: 12px;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
  }

  .hero-poster {
    max-width: 260px;
    transform: none;
  }

  .section-intro,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 280px;
  }

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

  .ranking-row a {
    grid-template-columns: 42px 50px 1fr;
  }

  .ranking-meta,
  .ranking-action {
    grid-column: 3 / -1;
  }
}

@media (max-width: 620px) {
  .hero-carousel,
  .section-block,
  .inner-page,
  .detail-page {
    width: min(100% - 20px, 1240px);
  }

  .hero-carousel,
  .hero-stage {
    min-height: 700px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 26px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.35rem;
  }

  .hero-controls {
    left: 22px;
    right: auto;
  }

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

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

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

  .movie-card__body {
    padding: 12px;
  }

  .movie-card__body p,
  .meta-row,
  .tag-row {
    display: none;
  }

  .page-hero,
  .detail-hero {
    border-radius: 24px;
    padding: 26px;
  }

  .player-frame {
    border-radius: 20px;
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}
