/* ===== Playground (fullscreen mode) ===== */
#playground {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  cursor: none;
}

/* Play hint */
.play-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: rgba(124, 92, 252, 0.85);
  z-index: 200;
  pointer-events: none;
  transition: opacity 0.5s ease;
  text-align: center;
}

/* Exit button — shown via JS only when needed (no native fullscreen exit) */
#exitGame {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 500;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, opacity 0.2s ease;
}
#exitGame:active {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

/* ESC hint (fades in then out on game start) */
#escHint {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.45);
  padding: 6px 14px;
  border-radius: 20px;
  z-index: 200;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

/* ===== Spawned Emoji (Kaboom Keys) ===== */
.emoji {
  position: absolute;
  font-size: 80px;
  line-height: 1;
  pointer-events: none;
  animation:
    popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    emojiFloat var(--float-dur) ease-in-out infinite var(--float-delay);
  z-index: 110;
  transition: opacity 2s ease;
}

@keyframes popIn {
  0%   { transform: scale(0) rotate(0deg); }
  60%  { transform: scale(1.25) rotate(var(--rot)); }
  100% { transform: scale(1) rotate(var(--rot)); }
}

@keyframes emojiFloat {
  0%   { translate: 0 0; }
  25%  { translate: var(--fx) var(--fy); }
  50%  { translate: var(--fx2) var(--fy2); }
  75%  { translate: var(--fx3) var(--fy3); }
  100% { translate: 0 0; }
}

.emoji.fade-out {
  opacity: 0 !important;
}

/* ===== End Card Share Button ===== */
.endcard-share-btn {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #FF6B8A;
  background: rgba(255, 107, 138, 0.12);
  border: none;
  border-radius: 30px;
  padding: 8px 20px;
  cursor: url("../assets/emoji/cursors/hand-point-32.png") 16 4, pointer !important;
  margin-top: 0.8rem;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  z-index: 500;
  pointer-events: auto;
}

.endcard-share-btn:hover {
  background: rgba(255, 107, 138, 0.22);
  transform: scale(1.05);
}

.endcard-share-btn:active {
  transform: scale(0.97);
}

/* ===== Confetti Particle ===== */
.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 105;
  animation: particleBurst 0.6s ease-out forwards;
}

@keyframes particleBurst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--px), var(--py)) scale(0);
    opacity: 0;
  }
}
