/* Base Reset & Custom Styling for Lucky Kings */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(circle at 50% 20%, #2f074d 0%, #150226 60%, #0a0113 100%);
  background-attachment: fixed;
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  user-select: none;
}

/* Three.js Background canvas positioning */
#three-bg-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* Active Nav Tab Style */
.active-game-tab {
  background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%);
  color: #1e053a !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
}

/* Playing Cards Styling for Blackjack */
.playing-card {
  width: 54px;
  height: 76px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 0 4px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 6px;
  font-family: monospace;
  font-weight: 900;
  transition: transform 0.2s ease, opacity 0.2s ease;
  animation: card-deal-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes card-deal-pop {
  0% { transform: translateY(-30px) scale(0.6) rotate(-10deg); opacity: 0; }
  100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

.card-back {
  background: linear-gradient(135deg, #7c3aed 0%, #4338ca 100%) !important;
  border: 2px solid #fbbf24;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-back::after {
  content: '👑';
  font-size: 20px;
}

/* Custom Text Shadows */
.text-shadow-gold {
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.8);
}
.text-shadow-pink {
  text-shadow: 0 0 10px rgba(255, 42, 133, 0.7), 0 2px 4px rgba(0, 0, 0, 0.8);
}
.text-shadow-cyan {
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.7), 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Reel Glass & Reflections */
.reel-window {
  box-shadow: inset 0 8px 12px rgba(0, 0, 0, 0.35), inset 0 -8px 12px rgba(0, 0, 0, 0.35);
}

.reel-glass-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  border-radius: 0.5rem 0.5rem 0 0;
}

/* Speech bubble tail */
.speech-tail::after {
  content: '';
  position: absolute;
  bottom: 12px;
  right: -10px;
  border-width: 8px 0 8px 12px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(46, 8, 84, 0.95);
  display: block;
  width: 0;
}

/* Mascot Bounce Idle Animation */
@keyframes mascot-sway {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(2deg);
  }
}

.mascot-bounce {
  animation: mascot-sway 3s ease-in-out infinite;
}

/* Flashing carnival bulbs */
@keyframes flash-bulb {
  0%, 100% { opacity: 0.4; filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2)); }
  50% { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 255, 0, 0.9)); }
}

.bulb:nth-child(1) { animation: flash-bulb 1.2s infinite; }
.bulb:nth-child(2) { animation: flash-bulb 1.2s 0.2s infinite; }
.bulb:nth-child(3) { animation: flash-bulb 1.2s 0.4s infinite; }
.bulb:nth-child(5) { animation: flash-bulb 1.2s 0.6s infinite; }
.bulb:nth-child(6) { animation: flash-bulb 1.2s 0.8s infinite; }
.bulb:nth-child(7) { animation: flash-bulb 1.2s 1.0s infinite; }

/* Reel blur spin effect */
.reel-spinning {
  filter: blur(4px);
  transform: scaleY(1.08);
  transition: transform 0.1s ease;
}

/* Animated Scale Pop */
@keyframes pop-up {
  0% { transform: scale(0.7); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.animate-scale-up {
  animation: pop-up 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: spin-slow 8s linear infinite;
}