/**
 * MOVIX — neon streaming shell (extends ott-app.css)
 */
:root {
  --movix-neon: #ff2d6a;
  --movix-violet: #a855f7;
  --movix-cyan: #22d3ee;
  --ott-vw: 100vw;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

@supports (overflow-x: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

img,
video,
canvas,
iframe,
svg {
  max-width: 100%;
}

.neon-text {
  background: linear-gradient(90deg, var(--movix-neon), var(--movix-violet), var(--movix-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.neon-ring {
  box-shadow:
    0 0 20px rgba(255, 45, 106, 0.35),
    0 0 60px rgba(168, 85, 247, 0.2);
}

.glass-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Hero: contain bleed on phones; allow peek on desktop */
.hero-swiper-shell {
  overflow: hidden;
}
.hero-slide {
  overflow: hidden;
  height: auto;
}

.hero-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.35);
  opacity: 1;
}
.hero-swiper .swiper-pagination-bullet-active {
  background: var(--movix-neon);
  box-shadow: 0 0 12px rgba(255, 45, 106, 0.8);
}

.skel-row {
  animation: movix-pulse 1.4s ease-in-out infinite;
}
@keyframes movix-pulse {
  0% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.45;
  }
}

.page-enter {
  animation: movix-fade-up 0.6s ease-out both;
}
@keyframes movix-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bottom-safe {
  padding-bottom: max(5rem, calc(env(safe-area-inset-bottom) + 4.5rem));
}

@media (min-width: 768px) {
  .bottom-safe {
    padding-bottom: 2rem;
  }
}

/* URL-based games need a real game viewport, not a short 16:9 preview. */
.movix-iframe-game-shell {
  height: clamp(560px, calc(100vh - 8rem), 820px);
  height: clamp(560px, calc(100dvh - 8rem), 820px);
  isolation: isolate;
  overscroll-behavior: contain;
  touch-action: manipulation;
}
.movix-iframe-game-shell iframe {
  display: block;
  height: 100%;
  width: 100%;
  border: 0;
  background: #000;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile layout: prevent horizontal bleed, smoother carousels */
@media (max-width: 767px) {
  header,
  main,
  footer,
  nav {
    max-width: var(--ott-vw, 100vw);
  }

  body {
    overflow-x: clip;
  }

  main.page-enter {
    overflow-x: clip;
  }

  .row-scroll {
    max-width: calc(var(--ott-vw, 100vw) - 2rem);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 1rem;
    scroll-snap-type: x proximity;
  }

  .row-scroll > a {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }

  .hero-swiper-shell .swiper-slide {
    scroll-snap-align: center;
  }

  .card-hover:active {
    transform: scale(0.98);
  }

  body.ott-no-bottom-nav .bottom-safe {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  body.ott-no-bottom-nav nav.fixed.bottom-0 {
    display: none !important;
  }

  #detail-overview h1 {
    word-break: break-word;
  }

  .glass-card,
  .glass-panel {
    max-width: 100%;
  }

  .movix-game-page-main {
    padding-top: 0.75rem;
  }

  .movix-iframe-game-shell {
    height: clamp(520px, calc(100vh - 5rem), 820px);
    height: clamp(520px, calc(100dvh - 5rem), 820px);
    border-radius: 1.25rem;
  }
}

/* Category chips on home (mobile-friendly horizontal scroll) */
.movix-section-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.movix-section-chips::-webkit-scrollbar {
  display: none;
}
.movix-section-chip {
  flex-shrink: 0;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.movix-section-chip:hover {
  border-color: rgba(255, 45, 106, 0.45);
  background: rgba(255, 45, 106, 0.12);
}

/* —— Ludo arcade shell (games/play.php?slug=ludo) —— */
.movix-ludo-shell {
  max-height: min(88dvh, 720px);
}
.movix-ludo-grid {
  display: grid;
  grid-template-columns: minmax(3.75rem, 1fr) minmax(0, 4.2fr) minmax(3.75rem, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.35rem 0.25rem;
  align-items: center;
  justify-items: stretch;
}
.movix-ludo-corner-tl {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}
.movix-ludo-spacer-top {
  grid-column: 2;
  grid-row: 1;
  min-height: 0.25rem;
}
.movix-ludo-corner-tr {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
.movix-ludo-spacer-mid-l {
  grid-column: 1;
  grid-row: 2;
}
.movix-ludo-board-wrap {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
}
.movix-ludo-spacer-mid-r {
  grid-column: 3;
  grid-row: 2;
}
.movix-ludo-corner-bl {
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
  align-self: end;
}
.movix-ludo-spacer-bot {
  grid-column: 2;
  grid-row: 3;
  min-height: 0.25rem;
}
.movix-ludo-corner-br {
  grid-column: 3;
  grid-row: 3;
  justify-self: end;
  align-self: end;
}
.movix-ludo-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}
.movix-ludo-avatar {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 55%);
}
@media (min-width: 640px) {
  .movix-ludo-avatar {
    height: 2.85rem;
    width: 2.85rem;
    font-size: 0.9rem;
  }
}
.movix-ludo-avatar--red {
  background-color: #b91c1c;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.65);
}
.movix-ludo-avatar--green {
  background-color: #15803d;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.65);
}
.movix-ludo-avatar--blue {
  background-color: #1d4ed8;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.65);
}
.movix-ludo-avatar--yellow {
  background-color: #a16207;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.65);
}
.movix-ludo-pname {
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.movix-ludo-pcoins {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
}
.movix-ludo-coin {
  display: inline-block;
  height: 0.55rem;
  width: 0.55rem;
  border-radius: 9999px;
  background: radial-gradient(circle at 30% 25%, #fde68a, #d97706 55%, #92400e);
  box-shadow: 0 0 4px rgba(251, 191, 36, 0.6);
}
.movix-ludo-die {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.25);
}
.movix-ludo-die--light {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(165deg, #f8fafc 0%, #e2e8f0 100%);
  color: #0f172a;
}
.movix-ludo-die--blue {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(165deg, #2563eb 0%, #1e3a8a 100%);
  color: #f8fafc;
}
.movix-ludo-roll-btn {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.movix-ludo-roll-btn:not(:disabled) {
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.35);
}
