/* ═══════════════════════════════════════════════════════════════
   NAV — Shared reset & screen containers
   ═══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  background: #000;
}

body {
  background: #000;
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-family: 'Poppins', sans-serif;
}

.canvas-scaler {
  --content-height: 932px;
  --nav-height: 108px;
  --scaler-height: calc(var(--content-height) + var(--nav-height));
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--scaler-height);
  overflow: hidden;
  background: #000;
  transform-origin: top left;
}


/* ═══════════════════════════════════════════════════════════════
   GLOBAL OVERLAYS — Joker logo & Language selector (all screens)
   ═══════════════════════════════════════════════════════════════ */
.global-joker {
  position: absolute;
  top: 12px;
  left: 10px;
  width: 110px;
  height: auto;
  z-index: 900;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

@media (max-width: 430px) {
  .global-joker {
    width: 95px;
    left: 8px;
    top: 13px;
  }
}

@media (max-width: 385px) {
  .global-joker {
    width: 85px;
    left: 6px;
    top: 14px;
  }
}

@media (max-width: 340px) {
  .global-joker {
    width: 75px;
    left: 4px;
    top: 15px;
  }
}

.global-lang {
  position: absolute;
  top: 5px;
  right: 15px;
  z-index: 900;
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN CONTAINERS — full viewport panels, toggled by nav
   ═══════════════════════════════════════════════════════════════ */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--content-height);
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow: hidden;
  background: #000;
}

.screen--active {
  opacity: 1;
  visibility: visible;
  z-index: 5;
}

/* Fullscreen video (no controls, covers entire screen) */
.screen-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: #000;
}

/* Stacked video layers for seamless transition */
.suleiman-video-layer {
  position: absolute;
  inset: 0;
  object-position: calc(50% - 30px) center;
  transform: scale(1.1);
  transform-origin: center center;
}

.suleiman-intro {
  z-index: 2;
  transition: opacity 0.3s ease;
}

.suleiman-after-click {
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  object-position: calc(50% - 30px) center;
  transform: scale(1.1);
  transition: object-position 3s linear, transform 3s linear;
}

.suleiman-after-click.active {
  opacity: 1;
  pointer-events: auto;
}

.suleiman-after-click.centered {
  object-position: center center;
  transform: scale(1.0);
}

.suleiman-intro.done {
  opacity: 0;
  pointer-events: none;
}

/* Canvas mask for loop transition */
.suleiman-mask {
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

.suleiman-mask.active {
  animation: maskZoomFade 1s ease-out forwards;
}

@keyframes maskZoomFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.cta-row.cta-row--suleiman {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px 8px;
  bottom: calc(var(--nav-height) + 30px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cta-row.cta-row--suleiman.is-visible {
  opacity: 1;
  pointer-events: auto;
}

#page-suleiman {
  height: 100%;
  background: transparent;
  background-image: none;
}

#screen-BookofSuleiman,
#screen-nezha2 {
  height: var(--scaler-height);
}

/* ── Suleiman game logo overlay ── */
.suleiman-logo {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  width: 72%;
  max-width: 380px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.6));
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.suleiman-logo.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.suleiman-logo.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(-40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.btn-cta-img {
  width: 100%;
  height: auto;
  display: block;
}

.suleiman-open-btn,
.suleiman-demo-btn {
  display: block;
  width: 282px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
  cursor: pointer;
  text-decoration: none;
}

.suleiman-open-btn[hidden],
.suleiman-demo-btn[hidden] {
  display: none;
}

/* Placeholder screen styling */
.screen-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  background: radial-gradient(ellipse at center, rgba(30, 15, 5, 0.9) 0%, #000 70%);
}

.screen-placeholder__icon {
  font-size: 64px;
  animation: placeholderFloat 3s ease-in-out infinite;
}

@keyframes placeholderFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.screen-placeholder__title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 28px;
  background: linear-gradient(180deg, #f2c77d 0%, #fad98b 40%, #fff9e6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.screen-placeholder__desc {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: rgba(245, 231, 138, 0.5);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   SHARED CTA BUTTON SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* CTA row inside screens (outside .page context) */
.screen>.cta-row {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px 8px;
}

.btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  pointer-events: auto;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.btn-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-link:active {
  transform: scale(0.96);
}

/* CTA button: orange gradient, white text, attention-grabbing */
.btn-cta {
  width: 260px;
  height: 56px;
  border-radius: 28px;
  border: none;
  background: linear-gradient(180deg, #ff8c2e 0%, #ff6a00 40%, #f55800 100%);
  box-shadow:
    0 3px 12px rgba(255, 100, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: visible;
  animation: ctaPulse 2s ease-in-out infinite;
  cursor: pointer;
}

/* Shining light sweep */
.btn-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: linear-gradient(105deg,
      transparent 0%, transparent 35%,
      rgba(255, 255, 255, 0.35) 45%,
      rgba(255, 255, 255, 0.5) 50%,
      rgba(255, 255, 255, 0.35) 55%,
      transparent 65%, transparent 100%);
  background-size: 250% 100%;
  background-position: -100% center;
  animation: ctaShineSweep 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}

/* Outer ring pulse */
.btn-cta::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 28px;
  border: 2px solid rgba(255, 140, 0, 0.5);
  animation: ctaRingPulse 2s ease-in-out infinite;
  pointer-events: none;
}

.btn-cta-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

/* ── CTA Keyframes ── */
@keyframes ctaPulse {

  0%,
  100% {
    box-shadow:
      0 3px 12px rgba(255, 100, 0, 0.45),
      0 0 0 0 rgba(255, 120, 0, 0),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: scale(1);
  }

  50% {
    box-shadow:
      0 4px 20px rgba(255, 100, 0, 0.55),
      0 0 25px 6px rgba(255, 140, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: scale(1.04);
  }
}

@keyframes ctaShineSweep {
  0% {
    background-position: -200% center;
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  50% {
    background-position: 300% center;
    opacity: 0;
  }

  51%,
  100% {
    background-position: 300% center;
    opacity: 0;
  }
}

@keyframes ctaRingPulse {

  0%,
  100% {
    opacity: 0;
    transform: scale(1);
  }

  30% {
    opacity: 0.7;
  }

  60% {
    opacity: 0;
    transform: scale(1.08);
  }
}

/* ═══════════════════════════════════════════════════════════════
   BOTTOM NAVIGATION — Card carousel style
   ═══════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom);
  background: transparent;
  /* Hidden off-screen initially */
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.5s ease;
}

/* Slide into view */
.bottom-nav--visible {
  transform: translateY(0);
  opacity: 1;
}

/* Scrollable track */
.bottom-nav__track {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 6px 14px 10px;
}

/* Hide scrollbar */
.bottom-nav__track::-webkit-scrollbar {
  display: none;
}

.bottom-nav__track {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── Card tab ── */
.bottom-nav__card {
  flex-shrink: 0;
  width: 112px;
  height: 92px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.15, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  outline: 2px solid transparent;
  outline-offset: -2px;
  background: rgba(20, 12, 6, 0.9);
}

/* Card thumbnail image */
.bottom-nav__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center calc(50% + 10px);
  display: block;
  border-radius: 10px;
  opacity: 0.55;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

/* Card label overlay */
.bottom-nav__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 6px 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
  border-radius: 0 0 10px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

/* ── Icon-only card (no thumbnail) ── */
.bottom-nav__icon-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(135deg, rgba(25, 15, 8, 0.95) 0%, rgba(15, 8, 4, 0.95) 100%);
  border-radius: 10px;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: rgba(245, 231, 138, 0.6);
  transition: stroke 0.3s ease, filter 0.3s ease;
}

/* ── Active state ── */
.bottom-nav__card--active {
  outline: 2px solid rgba(242, 191, 66, 0.7);
  box-shadow:
    0 0 14px rgba(242, 191, 66, 0.3),
    0 0 30px rgba(242, 191, 66, 0.1);
  transform: scale(1.08);
}

#tab-worldcup2026.bottom-nav__card--active {
  outline: 2px solid #ffd700 !important;
  box-shadow:
    0 0 14px rgba(255, 215, 0, 0.45),
    0 0 30px rgba(255, 215, 0, 0.2) !important;
}


#tab-BookofSuleiman.bottom-nav__card--active {
  outline: 2px solid #c753ff !important;
  box-shadow:
    0 0 14px rgba(199, 83, 255, 0.45),
    0 0 30px rgba(199, 83, 255, 0.2) !important;
}

#tab-nezha2.bottom-nav__card--active {
  outline: 2px solid #ff2e2e !important;
  box-shadow:
    0 0 14px rgba(255, 46, 46, 0.45),
    0 0 30px rgba(255, 46, 46, 0.2) !important;
}


.bottom-nav__card--active .bottom-nav__thumb {
  opacity: 1;
}

.bottom-nav__card--active .bottom-nav__icon-wrap {
  opacity: 1;
}

.bottom-nav__card--active .bottom-nav__icon {
  stroke: #f5e78a;
  filter: drop-shadow(0 0 6px rgba(245, 231, 138, 0.4));
}

.bottom-nav__card--active .bottom-nav__label {
  color: #f5e78a;
}

/* ── Hover ── */
.bottom-nav__card:not(.bottom-nav__card--active):hover {
  transform: scale(1.04);
  outline: 1px solid rgba(242, 191, 66, 0.25);
}

.bottom-nav__card:not(.bottom-nav__card--active):hover .bottom-nav__thumb {
  opacity: 0.75;
}

.bottom-nav__card:not(.bottom-nav__card--active):hover .bottom-nav__icon-wrap {
  opacity: 0.75;
}

/* ── Press ── */
.bottom-nav__card:active {
  transform: scale(0.96);
}

/* ── Edge fade hints ── */
.bottom-nav::before,
.bottom-nav::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bottom-nav::before {
  left: 0;
  background: linear-gradient(90deg, rgba(5, 3, 1, 0.95) 0%, transparent 100%);
}

.bottom-nav::after {
  right: 0;
  background: linear-gradient(270deg, rgba(5, 3, 1, 0.95) 0%, transparent 100%);
}

.bottom-nav--scroll-left::before {
  opacity: 1;
}

.bottom-nav--scroll-right::after {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   NEZHA 2 SCREEN & CTA
   ═══════════════════════════════════════════════════════════ */
#page-nezha2 {
  position: relative;
  height: 100%;
  background: #000;
}

#page-nezha2 .screen-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateY(-130px);
  height: calc(100% + 130px);
}

#nezha2-video {
  z-index: 2;
  transition: opacity 0.4s ease;
}

#nezha2-video.done {
  opacity: 0;
  pointer-events: none;
}

#nezha2-loop {
  z-index: 1;
}

#cta-nezha2 {
  bottom: calc(var(--nav-height) + 15px);
}

/* Cyan/Teal variation for Nezha 2 CTA button */
#btn-demo-nezha2 {
  background: linear-gradient(180deg, #00f2fe 0%, #00d2c4 45%, #00a896 100%);
  box-shadow:
    0 3px 12px rgba(0, 242, 254, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: ctaPulseCyan 2s ease-in-out infinite;
}

#btn-demo-nezha2::after {
  border-color: rgba(0, 242, 254, 0.5);
  animation: ctaRingPulseCyan 2s ease-in-out infinite;
}

@keyframes ctaPulseCyan {
  0%, 100% {
    box-shadow:
      0 3px 12px rgba(0, 242, 254, 0.45),
      0 0 0 0 rgba(0, 242, 254, 0),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 4px 20px rgba(0, 242, 254, 0.55),
      0 0 25px 6px rgba(0, 242, 254, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: scale(1.04);
  }
}

@keyframes ctaRingPulseCyan {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

/* Hide top and bottom black gradient overlays on video pages */
#page-suleiman::before,
#page-suleiman::after,
#page-nezha2::before,
#page-nezha2::after {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   THEMED BOTTOM NAVIGATION BAR STYLES (World Cup 2026 Only)
   ═══════════════════════════════════════════════════════════ */

/* World Cup 2026 Theme (Green) */
#screen-worldcup2026.screen--active ~ #bottom-nav {
  background: #020d04 !important;
  border-top: 1px solid rgba(0, 255, 102, 0.15) !important;
}
#screen-worldcup2026.screen--active ~ #bottom-nav .bottom-nav__card {
  background: rgba(4, 38, 17, 0.85) !important;
}
#screen-worldcup2026.screen--active ~ #bottom-nav .bottom-nav__card--active {
  background: rgba(6, 54, 25, 0.95) !important;
}