/* Small extras Tailwind's CDN build doesn't cover. Keep this file thin —
   prefer Tailwind utility classes in markup; put things here only when
   there's no utility for it (scrollbar hiding, keyframes, etc). */

.scrollbar-hide {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

#game-player {
  animation: player-in 0.18s ease-out;
}
@keyframes player-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Player full-screen mode (game-player-element.js's _enterFullscreen()).
   The stage wrapper is pinned over the whole viewport and the game is
   letterboxed on black; z-index stays below #ad-interstitial (1000) so an
   interstitial can still show over a running game. */
#player-stage-wrap.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 900;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
#player-stage-wrap.is-fullscreen #player-stage {
  border-radius: 0;
  box-shadow: none;
}
#player-exit-fullscreen {
  display: none;
}
#player-stage-wrap.is-fullscreen #player-exit-fullscreen {
  display: inline-flex;
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  z-index: 1;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
#player-stage-wrap.is-fullscreen #player-exit-fullscreen:hover {
  background: rgba(30, 41, 59, 0.9);
}
#player-exit-fullscreen:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

/* Interstitial ad overlay — same contract/markup as the original index.html
   test page (toggled via the "visible" class from player.js). */
#ad-interstitial {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#ad-interstitial.visible {
  display: flex;
}
#ad-interstitial-slot {
  background: #fff;
}
#ad-interstitial-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  line-height: 1;
}
#ad-interstitial-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
