body {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 40%, #1a0a2e 70%, #0d0518 100%);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  margin: 0;
  padding: 10px 0;
  font-family: 'Arial', sans-serif;
  position: relative;
  box-sizing: border-box;
}

/* Magical starfield background texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,0.8) 1px, transparent 1px),
    radial-gradient(circle at 85% 25%, rgba(255,215,0,0.6) 1px, transparent 1px),
    radial-gradient(circle at 45% 80%, rgba(255,255,255,0.7) 1px, transparent 1px),
    radial-gradient(circle at 75% 65%, rgba(255,105,180,0.5) 1px, transparent 1px),
    radial-gradient(circle at 25% 55%, rgba(0,191,255,0.5) 1px, transparent 1px),
    radial-gradient(circle at 90% 90%, rgba(255,255,255,0.6) 1px, transparent 1px),
    radial-gradient(circle at 10% 85%, rgba(255,215,0,0.4) 1px, transparent 1px),
    radial-gradient(circle at 60% 20%, rgba(255,255,255,0.5) 1px, transparent 1px),
    radial-gradient(circle at 35% 35%, rgba(138,43,226,0.4) 1px, transparent 1px),
    radial-gradient(circle at 55% 50%, rgba(255,255,255,0.4) 1px, transparent 1px);
  background-size: 200px 200px, 300px 300px, 250px 250px, 180px 180px, 220px 220px, 280px 280px, 240px 240px, 190px 190px, 260px 260px, 170px 170px;
  pointer-events: none;
  z-index: -1;
  animation: starTwinkle 8s ease-in-out infinite alternate;
}

/* Ambient glow overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(138,43,226,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(255,105,180,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0,191,255,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

@keyframes starTwinkle {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

#game-container {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(165deg, #2d1b4e 0%, #1a0a2e 50%, #150820 100%);
  border-radius: 24px;
  padding: 25px 15px;
  box-shadow:
    0 0 40px rgba(138,43,226,0.3),
    0 0 80px rgba(255,105,180,0.15),
    0 15px 40px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 2px solid rgba(255,215,0,0.3);
  box-sizing: border-box;
  overflow: hidden;
}

/* Glowing border effect */
#game-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #ffd700, #ff69b4, #00bfff, #ffd700);
  background-size: 400% 400%;
  border-radius: 26px;
  z-index: -1;
  animation: borderGradientFlow 8s ease infinite;
  opacity: 0.6;
}

#game-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(165deg, rgba(255,255,255,0.05) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
  border-radius: 22px;
  pointer-events: none;
}

@keyframes borderGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3em;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 15px;
  padding: 0;
  box-sizing: border-box;
  text-shadow: 0 0 10px rgba(255,215,0,0.5), 0 2px 4px rgba(0,0,0,0.5);
  gap: 5px;
}

#board-area {
  position: relative;
  width: 100%;
  height: 480px;
  margin-bottom: 15px;
  background: linear-gradient(145deg, #3d2066 0%, #2a1548 50%, #1f0f38 100%);
  border-radius: 18px;
  box-shadow:
    inset 0 4px 15px rgba(0,0,0,0.5),
    inset 0 0 30px rgba(138,43,226,0.2),
    0 4px 10px rgba(0,0,0,0.3);
  overflow: hidden;
  border: 2px solid rgba(255,215,0,0.2);
}

#draw-decks-container {
  display: flex;
  justify-content: space-between;
  padding: 15px 50px;
  height: 70px;
  position: absolute;
  width: 100%;
  box-sizing: border-box;
  top: 0;
  left: 0;
  z-index: 10;
  pointer-events: none;
}

.draw-deck {
  width: 40px;
  height: 40px;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.9) 0%, rgba(245,222,179,0.9) 100%);
  background-size: 75%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid #8b4513;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  display: none;
  pointer-events: auto;
  transition: all 0.2s ease;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 2px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 5px rgba(255,248,220,0.3);
  animation: subtleGlow 3s ease-in-out infinite alternate;
}

/* Removed hover effect for mobile compatibility */

/* Dynamic deck stacking based on tile count */
.draw-deck.deck-empty::before,
.draw-deck.deck-empty::after {
  display: none;
}

.draw-deck.deck-single::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(245,222,179,0.4) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-2px, -2px);
  z-index: -1;
  box-shadow: 
    0 1px 3px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.draw-deck.deck-single::after {
  display: none;
}

.draw-deck.deck-few::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.6) 0%, rgba(245,222,179,0.6) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-3px, -3px);
  z-index: -1;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

.draw-deck.deck-few::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.3) 0%, rgba(245,222,179,0.3) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-5px, -5px);
  z-index: -2;
  box-shadow: 
    0 1px 3px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.draw-deck.deck-many::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.7) 0%, rgba(245,222,179,0.7) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-4px, -4px);
  z-index: -1;
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 0 rgba(0,0,0,0.1);
}

.draw-deck.deck-many::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.5) 0%, rgba(245,222,179,0.5) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-8px, -8px);
  z-index: -2;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.draw-deck.deck-full::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.8) 0%, rgba(245,222,179,0.8) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-5px, -5px);
  z-index: -1;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(0,0,0,0.15);
}

.draw-deck.deck-full::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.6) 0%, rgba(245,222,179,0.6) 100%);
  border-radius: 5px;
  border: 2px solid #8b4513;
  transform: translate(-10px, -10px);
  z-index: -2;
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

#game-board {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  padding: 10px;
  box-sizing: border-box;
}

#draw-decks-container:not(.hidden) + #game-board {
  top: 60px;
  height: 415px;
}

#holding-area {
  width: 100%;
  height: 50px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 5px;
  margin-bottom: 5px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.tile {
  width: 40px;
  height: 40px;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.9) 0%, rgba(245,222,179,0.9) 100%);
  background-size: 75%;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #8b4513;
  border-radius: 5px;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 2px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 5px rgba(255,248,220,0.3);
}

/* Removed hover effect for mobile compatibility */

.tile:not(.disabled) {
  animation: subtleGlow 3s ease-in-out infinite alternate;
}

.tile.disabled {
  filter: grayscale(40%) brightness(0.5);
  pointer-events: none;
  box-shadow: 
    0 1px 3px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.5);
  background-color: #d3d3d3;
  background-image: linear-gradient(145deg, rgba(211,211,211,0.6) 0%, rgba(169,169,169,0.6) 100%);
}

/* Keep gold background for disabled pineapple-drink tiles */
.tile.disabled[data-fruit='pineapple-drink'] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  filter: brightness(0.7) saturate(0.8);
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 0 8px rgba(255,215,0,0.4);
}

@keyframes subtleGlow {
  0% {
    box-shadow: 
      0 4px 8px rgba(0,0,0,0.3),
      inset 0 2px 0 rgba(255,255,255,0.8),
      inset 0 -1px 0 rgba(0,0,0,0.2),
      0 0 5px rgba(255,248,220,0.3);
  }
  100% {
    box-shadow: 
      0 4px 8px rgba(0,0,0,0.3),
      inset 0 2px 0 rgba(255,255,255,0.8),
      inset 0 -1px 0 rgba(0,0,0,0.2),
      0 0 10px rgba(255,215,0,0.5);
  }
}

/* Better stacking effect for tiles */
.tile[style*="z-index: 2"] {
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}

.tile[style*="z-index: 3"] {
  box-shadow: 
    0 5px 10px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}

.tile[style*="z-index: 4"], .tile[style*="z-index: 5"] {
  box-shadow: 
    0 6px 12px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}

#collection-slot-container {
  width: 100%;
  background: linear-gradient(145deg, #8b4513 0%, #654321 100%);
  border-radius: 12px;
  padding: 15px;
  box-sizing: border-box;
  box-shadow: 
    inset 0 3px 8px rgba(0,0,0,0.4),
    0 2px 4px rgba(0,0,0,0.2);
  position: relative;
}

#collection-slot-container::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: linear-gradient(145deg, #a0522d 0%, #8b4513 100%);
  border-radius: 10px;
  z-index: -1;
}

#collection-slot {
  display: flex;
  align-items: center;
  height: 70px;
  width: 100%;
  background: linear-gradient(145deg, #daa520 0%, #b8860b 100%);
  border-radius: 8px;
  padding: 0 10px;
  box-sizing: border-box;
  box-shadow: 
    inset 0 2px 5px rgba(0,0,0,0.3),
    0 1px 0 rgba(255,255,255,0.2);
}

.collected-tile {
  width: 55px;
  height: 55px;
  background-color: #faf0e6;
  background-image: linear-gradient(145deg, rgba(255,248,220,0.9) 0%, rgba(245,222,179,0.9) 100%);
  background-size: 75%;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  border: 2px solid #8b4513;
  margin: 0 3px;
  animation: popIn 0.3s ease;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 2px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 5px rgba(255,248,220,0.3);
}

.collected-tile {
  animation: popIn 0.3s ease, subtleGlow 3s ease-in-out infinite alternate 0.3s;
}

/* Removed hover effect for mobile compatibility - selection handled via tap */
.collected-tile.selectable {
  cursor: pointer;
  border: 3px solid #ffd700;
}

#bonus-container {
  display: flex;
  justify-content: space-around;
  padding-top: 20px;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
  gap: 10px;
}

.bonus-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  width: 90px;
  height: 90px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.85em;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
}

/* Remove Button - Coral/Red Candy */
#bonus-remove {
  background: linear-gradient(145deg, #ff6b6b 0%, #ee5a5a 30%, #ff4757 60%, #c44040 100%);
  border: 3px solid #ff8a8a;
  color: #fff;
  box-shadow:
    0 6px 0 #b33939,
    0 0 20px rgba(255,107,107,0.4),
    0 8px 15px rgba(0,0,0,0.3),
    inset 0 2px 4px rgba(255,255,255,0.4),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Undo Button - Electric Blue Candy */
#bonus-undo {
  background: linear-gradient(145deg, #4facfe 0%, #00b4db 30%, #00a8cc 60%, #0077b6 100%);
  border: 3px solid #7ec8e3;
  color: #fff;
  box-shadow:
    0 6px 0 #005f8a,
    0 0 20px rgba(79,172,254,0.4),
    0 8px 15px rgba(0,0,0,0.3),
    inset 0 2px 4px rgba(255,255,255,0.4),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Shuffle Button - Purple/Magenta Candy */
#bonus-shuffle {
  background: linear-gradient(145deg, #a855f7 0%, #9333ea 30%, #7c3aed 60%, #6d28d9 100%);
  border: 3px solid #c084fc;
  color: #fff;
  box-shadow:
    0 6px 0 #5b21b6,
    0 0 20px rgba(168,85,247,0.4),
    0 8px 15px rgba(0,0,0,0.3),
    inset 0 2px 4px rgba(255,255,255,0.4),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.bonus-btn:hover {
  transform: translateY(-4px) scale(1.05);
}

#bonus-remove:hover {
  box-shadow:
    0 10px 0 #b33939,
    0 0 35px rgba(255,107,107,0.6),
    0 12px 20px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.5);
}

#bonus-undo:hover {
  box-shadow:
    0 10px 0 #005f8a,
    0 0 35px rgba(79,172,254,0.6),
    0 12px 20px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.5);
}

#bonus-shuffle:hover {
  box-shadow:
    0 10px 0 #5b21b6,
    0 0 35px rgba(168,85,247,0.6),
    0 12px 20px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.5);
}

.bonus-btn:active {
  transform: translateY(3px) scale(0.98);
}

#bonus-remove:active {
  box-shadow:
    0 3px 0 #b33939,
    0 0 15px rgba(255,107,107,0.4),
    0 5px 10px rgba(0,0,0,0.3);
}

#bonus-undo:active {
  box-shadow:
    0 3px 0 #005f8a,
    0 0 15px rgba(79,172,254,0.4),
    0 5px 10px rgba(0,0,0,0.3);
}

#bonus-shuffle:active {
  box-shadow:
    0 3px 0 #5b21b6,
    0 0 15px rgba(168,85,247,0.4),
    0 5px 10px rgba(0,0,0,0.3);
}

.bonus-btn.disabled {
  background: linear-gradient(145deg, #4a4a5e 0%, #35354a 50%, #2a2a3e 100%) !important;
  border-color: #5a5a6e !important;
  color: #888 !important;
  cursor: not-allowed;
  box-shadow:
    0 4px 0 #252530,
    0 6px 10px rgba(0,0,0,0.3) !important;
  opacity: 0.7;
}

.bonus-btn.disabled:hover {
  transform: none;
  box-shadow:
    0 4px 0 #252530,
    0 6px 10px rgba(0,0,0,0.3) !important;
}

.bonus-btn.disabled::before {
  display: none;
}

.bonus-img {
  width: 45px;
  height: 45px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 5px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)) brightness(1.1);
}

.bonus-count {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(145deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%);
  background-size: 200% 200%;
  color: #5a2d00;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1em;
  font-weight: 900;
  border: 3px solid #fff;
  box-shadow:
    0 0 10px rgba(255,215,0,0.6),
    0 3px 6px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.6);
  text-shadow: none;
  animation: countBadgePulse 2s ease-in-out infinite;
  z-index: 15;
}

@keyframes countBadgePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255,215,0,0.6), 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.6); }
  50% { box-shadow: 0 0 20px rgba(255,215,0,0.9), 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.6); }
}

.bonus-buy-btn {
  position: absolute;
  top: -10px;
  left: -10px;
  background: linear-gradient(145deg, #00ff88 0%, #00d970 50%, #00c853 100%);
  color: #004d25;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4em;
  font-weight: 900;
  border: 3px solid #fff;
  box-shadow:
    0 0 12px rgba(0,255,136,0.6),
    0 3px 6px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.4);
  text-shadow: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 15;
  animation: buyBtnPulse 1.5s ease-in-out infinite;
}

@keyframes buyBtnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(0,255,136,0.6), 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(0,255,136,0.9), 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.4); }
}

.bonus-buy-btn:hover {
  transform: scale(1.25) !important;
  box-shadow:
    0 0 25px rgba(0,255,136,1),
    0 4px 8px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.5);
  animation: none;
}

.bonus-buy-btn:active {
  transform: scale(1.1) !important;
}

/* Store Modal Styles - Treasure Shop */
.store-content {
  max-width: 400px;
  width: 92%;
  background: linear-gradient(165deg, #1a0a2e 0%, #2d1b4e 30%, #1a0a2e 100%) !important;
  border: 3px solid rgba(255,215,0,0.4) !important;
  box-shadow:
    0 0 50px rgba(255,215,0,0.2),
    0 0 100px rgba(138,43,226,0.2),
    0 20px 60px rgba(0,0,0,0.6) !important;
}

.store-content .modal-header {
  background: linear-gradient(145deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%) !important;
  background-size: 200% 200% !important;
  animation: storeHeaderGlow 3s ease-in-out infinite;
  border-bottom: 3px solid #b8860b !important;
}

.store-content .modal-header h3 {
  color: #5a2d00 !important;
  font-size: 1.4em !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5) !important;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@keyframes storeHeaderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.store-content .modal-body {
  background: transparent !important;
  padding: 20px !important;
}

#store-coin-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 25px;
  background: linear-gradient(145deg, #ffd700 0%, #ffb347 30%, #ffd700 50%, #b8860b 100%);
  background-size: 200% 200%;
  border-radius: 30px;
  border: 3px solid #8b4513;
  box-shadow:
    0 0 20px rgba(255,215,0,0.5),
    0 4px 10px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.5);
  animation: storeCoinPulse 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

#store-coin-display::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  animation: storeCoinShine 4s ease-in-out infinite;
}

@keyframes storeCoinPulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes storeCoinShine {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}

#store-coin-display img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  animation: coinSpin 4s linear infinite;
}

#store-coin-count {
  font-size: 1.6em;
  font-weight: 900;
  color: #5a2d00;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  position: relative;
  z-index: 1;
}

.store-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.store-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
  border-radius: 16px;
  border: 2px solid rgba(255,215,0,0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.store-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.1), transparent);
  transition: left 0.5s ease;
}

.store-item:hover {
  border-color: rgba(255,215,0,0.6);
  transform: translateX(5px);
  box-shadow: 0 0 20px rgba(255,215,0,0.2);
}

.store-item:hover::before {
  left: 100%;
}

/* Color-code store items to match bonus buttons */
.store-item[data-bonus="remove"] {
  border-left: 4px solid #ff6b6b;
}

.store-item[data-bonus="undo"] {
  border-left: 4px solid #4facfe;
}

.store-item[data-bonus="shuffle"] {
  border-left: 4px solid #a855f7;
}

.store-item-img {
  width: 55px;
  height: 55px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.store-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.store-item-name {
  font-size: 1.15em;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255,215,0,0.3);
}

.store-item-desc {
  font-size: 0.85em;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
}

.store-buy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(145deg, #00ff88 0%, #00d970 50%, #00c853 100%);
  border: none;
  border-radius: 25px;
  color: #004d25;
  font-size: 1em;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 4px 0 #00a040,
    0 0 15px rgba(0,255,136,0.4),
    0 5px 12px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
}

.store-buy-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg);
  animation: buyBtnShine 3s ease-in-out infinite;
}

@keyframes buyBtnShine {
  0% { left: -100%; }
  40%, 100% { left: 150%; }
}

.store-buy-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 6px 0 #00a040,
    0 0 25px rgba(0,255,136,0.6),
    0 8px 16px rgba(0,0,0,0.4);
}

.store-buy-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #00a040,
    0 0 10px rgba(0,255,136,0.4),
    0 3px 8px rgba(0,0,0,0.3);
}

.store-buy-btn:disabled {
  background: linear-gradient(145deg, #4a4a5e 0%, #35354a 100%);
  box-shadow: 0 3px 0 #252530, 0 4px 8px rgba(0,0,0,0.3);
  cursor: not-allowed;
  opacity: 0.8;
}

.store-buy-btn:disabled::before {
  display: none;
}

.store-buy-btn:disabled:hover {
  transform: none;
  box-shadow: 0 3px 0 #252530, 0 4px 8px rgba(0,0,0,0.3);
}

.store-coin-icon {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.store-item.cannot-afford {
  opacity: 0.5;
  filter: grayscale(30%);
}

.store-item.cannot-afford .store-buy-btn {
  background: linear-gradient(145deg, #4a4a5e 0%, #35354a 100%);
  box-shadow: 0 3px 0 #252530, 0 4px 8px rgba(0,0,0,0.3);
  cursor: not-allowed;
}

/* Save Progress Button */
#save-progress-btn {
  background: linear-gradient(145deg, #00ff88 0%, #00d970 50%, #00c853 100%);
  color: #004d25;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.55em;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow:
    0 2px 0 #00a040,
    0 0 8px rgba(0,255,136,0.3),
    0 3px 6px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

#save-progress-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 5px 0 #00a040,
    0 0 20px rgba(0,255,136,0.5),
    0 6px 12px rgba(0,0,0,0.4);
}

#save-progress-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 2px 0 #00a040,
    0 0 8px rgba(0,255,136,0.3),
    0 3px 6px rgba(0,0,0,0.3);
}

/* Register Modal */
.register-content {
  max-width: 420px;
  width: 92%;
}

#register-progress-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(145deg, rgba(255,215,0,0.15) 0%, rgba(138,43,226,0.15) 100%);
  border-radius: 12px;
  margin-bottom: 18px;
  font-weight: 700;
  color: #ffd700;
  border: 2px solid rgba(255,215,0,0.3);
  text-shadow: 0 0 10px rgba(255,215,0,0.3);
}

#register-progress-info .separator {
  color: rgba(255,215,0,0.4);
}

.register-coin-icon {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 4px rgba(255,215,0,0.5));
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.register-form input {
  padding: 14px 16px;
  border: 2px solid rgba(138,43,226,0.3);
  border-radius: 12px;
  font-size: 1em;
  background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(240,240,255,0.9) 100%);
  color: #2d1b4e;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.register-form input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 0 15px rgba(255,215,0,0.4);
}

.register-form input::placeholder {
  color: #888;
}

.register-error {
  color: #ff6b6b;
  font-size: 0.9em;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(255,107,107,0.15);
  border: 1px solid rgba(255,107,107,0.3);
  border-radius: 8px;
  display: none;
  font-weight: 600;
}

.register-error.visible {
  display: block;
}

#confirm-register-btn {
  background: linear-gradient(145deg, #00ff88 0%, #00d970 50%, #00c853 100%);
  color: #004d25;
  box-shadow:
    0 4px 0 #00a040,
    0 0 15px rgba(0,255,136,0.4),
    0 6px 12px rgba(0,0,0,0.3);
}

#confirm-register-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 #00a040,
    0 0 25px rgba(0,255,136,0.6),
    0 8px 16px rgba(0,0,0,0.4);
}

#confirm-register-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #00a040,
    0 0 10px rgba(0,255,136,0.4),
    0 4px 8px rgba(0,0,0,0.3);
}

#confirm-register-btn:disabled {
  background: linear-gradient(145deg, #4a4a5e 0%, #35354a 100%);
  box-shadow: 0 4px 0 #252530, 0 5px 10px rgba(0,0,0,0.3);
  cursor: not-allowed;
  opacity: 0.7;
}

#cancel-register-btn {
  background: linear-gradient(145deg, #4a4a5e 0%, #35354a 100%);
  color: rgba(255,255,255,0.8);
  box-shadow: 0 4px 0 #252530, 0 6px 12px rgba(0,0,0,0.3);
}

#cancel-register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #252530, 0 8px 16px rgba(0,0,0,0.4);
  color: #fff;
}

@keyframes popIn {
  0% { 
    transform: scale(0.3); 
    opacity: 0;
    rotate: 180deg;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% { 
    transform: scale(1); 
    opacity: 1;
    rotate: 0deg;
  }
}

@keyframes burstOut {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    transform: scale(1.3);
    opacity: 0.8;
    filter: brightness(1.5) saturate(1.5);
  }
  100% {
    transform: scale(0.3);
    opacity: 0;
    filter: brightness(2) saturate(2);
  }
}

@keyframes sparkle {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: scale(0) rotate(360deg);
    opacity: 0;
  }
}

.collected-tile.bursting {
  animation: burstOut 0.4s ease-out forwards;
  z-index: 1000;
}

.burst-effect {
  position: absolute;
  pointer-events: none;
  z-index: 1001;
}

.burst-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #ffd700 0%, #ff6b6b 100%);
  border-radius: 50%;
  animation: sparkle 0.6s ease-out forwards;
}

.burst-particle:nth-child(1) { animation-delay: 0s; }
.burst-particle:nth-child(2) { animation-delay: 0.1s; }
.burst-particle:nth-child(3) { animation-delay: 0.05s; }
.burst-particle:nth-child(4) { animation-delay: 0.15s; }
.burst-particle:nth-child(5) { animation-delay: 0.08s; }
.burst-particle:nth-child(6) { animation-delay: 0.12s; }

/* Animation for sliding tiles */
.tile-sliding {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1000 !important;
}

/* Removed hover override since hover effects are removed */

#game-over-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at center, rgba(26,10,46,0.95) 0%, rgba(13,5,24,0.98) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #ffd700;
  font-size: 2em;
  z-index: 100;
  border-radius: 22px;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

/* Victory sparkle overlay */
#game-over-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,215,0,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255,105,180,0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 10%, rgba(0,255,136,0.1) 0%, transparent 30%);
  pointer-events: none;
  animation: victoryAmbient 3s ease-in-out infinite alternate;
}

@keyframes victoryAmbient {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

#game-over-screen.hidden {
  display: none;
}

#game-over-message {
  margin-bottom: 30px;
  padding: 0 20px;
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(145deg, #ffd700 0%, #ff8c00 25%, #ffd700 50%, #ffb347 75%, #ffd700 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: victoryGradient 3s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(255,215,0,0.4));
  position: relative;
  z-index: 2;
  word-wrap: break-word;
}

@keyframes victoryTextGlow {
  0% {
    opacity: 0;
    transform: scale(0.5) rotateX(90deg);
  }
  50% {
    transform: scale(1.1) rotateX(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateX(0deg);
  }
}

@keyframes victoryGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#next-level-btn, #try-again-btn {
  padding: 16px 35px;
  font-size: 0.95em;
  cursor: pointer;
  border-radius: 30px;
  border: none;
  margin: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

#next-level-btn {
  background: linear-gradient(145deg, #00ff88 0%, #00d970 50%, #00c853 100%);
  color: #004d25;
  box-shadow:
    0 5px 0 #00a040,
    0 0 25px rgba(0,255,136,0.5),
    0 8px 20px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.3);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  animation: nextLevelPulse 1.5s ease-in-out infinite;
}

#next-level-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg);
  animation: buttonShine 3s ease-in-out infinite;
}

@keyframes nextLevelPulse {
  0%, 100% { box-shadow: 0 5px 0 #00a040, 0 0 25px rgba(0,255,136,0.5), 0 8px 20px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.3); }
  50% { box-shadow: 0 5px 0 #00a040, 0 0 40px rgba(0,255,136,0.8), 0 8px 20px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.4); }
}

@keyframes buttonShine {
  0% { left: -100%; }
  40%, 100% { left: 150%; }
}

#try-again-btn {
  background: linear-gradient(145deg, #ff6b6b 0%, #ee5a5a 50%, #ff4757 100%);
  color: #fff;
  box-shadow:
    0 5px 0 #b33939,
    0 0 20px rgba(255,107,107,0.4),
    0 8px 20px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

#try-again-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg);
  animation: buttonShine 3s ease-in-out infinite 0.5s;
}

#next-level-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 9px 0 #00a040,
    0 0 40px rgba(0,255,136,0.8),
    0 12px 25px rgba(0,0,0,0.5);
  animation: none;
}

#try-again-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 9px 0 #b33939,
    0 0 35px rgba(255,107,107,0.6),
    0 12px 25px rgba(0,0,0,0.5);
}

#next-level-btn:active, #try-again-btn:active {
  transform: translateY(2px) scale(0.98);
}

#next-level-btn:active {
  box-shadow:
    0 2px 0 #00a040,
    0 0 15px rgba(0,255,136,0.4),
    0 4px 10px rgba(0,0,0,0.3);
}

#try-again-btn:active {
  box-shadow:
    0 2px 0 #b33939,
    0 0 15px rgba(255,107,107,0.4),
    0 4px 10px rgba(0,0,0,0.3);
}

.tile[data-fruit='pineapple-drink'] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  border: 2px solid #8b4513;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 15px rgba(255,215,0,0.6);
  animation: goldGlow 2s ease-in-out infinite alternate;
}

/* Pineapple-drink tiles in collection slot */
.collected-tile[style*="pineapple-drink"] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  border: 2px solid #8b4513 !important;
  animation: popIn 0.3s ease, goldGlow 2s ease-in-out infinite alternate 0.3s;
}

/* Pineapple-drink tiles in draw decks */
.draw-deck[style*="pineapple-drink"] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  border: 2px solid #8b4513 !important;
  animation: goldGlow 2s ease-in-out infinite alternate;
}

/* Pineapple-drink tiles in holding area */
#holding-area .tile[data-fruit='pineapple-drink'] {
  background-color: #ffd700 !important;
  background-image: url(images/pineapple-drink.png), linear-gradient(145deg, rgba(255,248,220,0.4) 0%, rgba(255,215,0,0.5) 50%, rgba(218,165,32,0.4) 100%) !important;
  background-size: 75%, 100% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  border: 2px solid #8b4513 !important;
  animation: goldGlow 2s ease-in-out infinite alternate;
}

@keyframes goldGlow {
  0% {
    box-shadow: 
      0 4px 8px rgba(0,0,0,0.4),
      inset 0 1px 0 rgba(255,255,255,0.7),
      inset 0 -1px 0 rgba(0,0,0,0.2),
      0 0 15px rgba(255,215,0,0.6);
  }
  100% {
    box-shadow: 
      0 4px 8px rgba(0,0,0,0.4),
      inset 0 1px 0 rgba(255,255,255,0.7),
      inset 0 -1px 0 rgba(0,0,0,0.2),
      0 0 25px rgba(255,215,0,0.9);
  }
}

#login-container, #reset-password-container {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 420px;
  padding: 35px;
  box-sizing: border-box;
  background: linear-gradient(165deg, #2d1b4e 0%, #1a0a2e 50%, #150820 100%);
  border-radius: 24px;
  box-shadow:
    0 0 50px rgba(138,43,226,0.3),
    0 0 100px rgba(255,105,180,0.15),
    0 20px 50px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
  border: 2px solid rgba(255,215,0,0.3);
  position: relative;
  overflow: hidden;
}

/* Glowing border effect for login */
#login-container::before, #reset-password-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #ffd700, #ff69b4, #00bfff, #ffd700);
  background-size: 400% 400%;
  border-radius: 26px;
  z-index: -1;
  animation: borderGradientFlow 8s ease infinite;
  opacity: 0.5;
}

#login-container h3, #reset-password-container h3 {
  text-align: center;
  color: #ffd700;
  font-size: 2em;
  margin-bottom: 30px;
  text-shadow: 0 0 20px rgba(255,215,0,0.5), 0 2px 4px rgba(0,0,0,0.5);
  letter-spacing: 2px;
}

#login-container input, #login-container button,
#reset-password-container input, #reset-password-container button {
  width: 100%;
  padding: 14px 16px;
  margin: 10px 0;
  border-radius: 12px;
  box-sizing: border-box;
  font-size: 1em;
  transition: all 0.3s ease;
}

#login-container input, #reset-password-container input {
  background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(240,240,255,0.9) 100%);
  color: #2d1b4e;
  border: 2px solid rgba(138,43,226,0.3);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.1),
    0 2px 4px rgba(0,0,0,0.2);
}

#login-container input::placeholder, #reset-password-container input::placeholder {
  color: #888;
}

#login-container input:focus, #reset-password-container input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.1),
    0 0 15px rgba(255,215,0,0.4),
    0 2px 4px rgba(0,0,0,0.2);
}

#login-container button, #reset-password-container button {
  background: linear-gradient(145deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%);
  background-size: 200% 200%;
  border: none;
  cursor: pointer;
  font-weight: 800;
  color: #5a2d00;
  box-shadow:
    0 5px 0 #b8860b,
    0 0 20px rgba(255,215,0,0.4),
    0 8px 15px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.4);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

#login-container button::before, #reset-password-container button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg);
  animation: buttonShine 4s ease-in-out infinite;
}

#login-container button:hover, #reset-password-container button:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 0 #b8860b,
    0 0 35px rgba(255,215,0,0.6),
    0 12px 20px rgba(0,0,0,0.5);
  background-position: 100% 50%;
}

#login-container button:active, #reset-password-container button:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #b8860b,
    0 0 15px rgba(255,215,0,0.4),
    0 4px 8px rgba(0,0,0,0.3);
}

#forgot-password-btn {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #00bfff !important;
  font-size: 0.9em !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-shadow: 0 0 10px rgba(0,191,255,0.5) !important;
  padding: 10px 12px !important;
  transition: all 0.2s ease !important;
}

#forgot-password-btn:hover {
  transform: none !important;
  box-shadow: none !important;
  color: #7dd3fc !important;
  text-shadow: 0 0 15px rgba(0,191,255,0.8) !important;
  text-decoration: underline !important;
}

#forgot-password-btn:active {
  transform: none !important;
  box-shadow: none !important;
}

#forgot-password-btn::before {
  display: none !important;
}

#logout-btn {
  background: linear-gradient(145deg, #ff6b6b 0%, #ff4757 50%, #ee5a5a 100%);
  border: none;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.55em;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow:
    0 2px 0 #b33939,
    0 0 8px rgba(255,107,107,0.3),
    0 3px 6px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transition: all 0.2s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

#logout-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 #b33939,
    0 0 25px rgba(255,107,107,0.5),
    0 8px 16px rgba(0,0,0,0.4);
}

#logout-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #b33939,
    0 0 10px rgba(255,107,107,0.3),
    0 4px 8px rgba(0,0,0,0.3);
}

/* Guest Logout Button (bottom of screen) */
#guest-logout-btn {
  display: block;
  margin: 15px auto 10px;
  background: linear-gradient(145deg, rgba(255,107,107,0.15) 0%, rgba(255,71,87,0.15) 100%);
  border: 1px solid rgba(255,107,107,0.3);
  color: rgba(255,107,107,0.9);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

#guest-logout-btn:hover {
  background: linear-gradient(145deg, rgba(255,107,107,0.25) 0%, rgba(255,71,87,0.25) 100%);
  border-color: rgba(255,107,107,0.5);
  color: #ff6b6b;
}

#guest-logout-btn:active {
  transform: translateY(1px);
}

#bug-report-container {
  position: absolute;
  bottom: 12px;
  right: 15px;
  z-index: 50;
}

#bug-report-btn {
  background: linear-gradient(145deg, rgba(74,74,94,0.8) 0%, rgba(53,53,74,0.8) 100%);
  border: 1px solid rgba(255,215,0,0.2);
  color: rgba(255,255,255,0.7);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8em;
  font-weight: 600;
  opacity: 0.8;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

#bug-report-btn:hover {
  opacity: 1;
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(94,74,114,0.9) 0%, rgba(74,54,94,0.9) 100%);
  border-color: rgba(255,215,0,0.4);
  color: #ffd700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(26,10,46,0.95) 0%, rgba(13,5,24,0.98) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: linear-gradient(165deg, #2d1b4e 0%, #1a0a2e 50%, #150820 100%);
  border-radius: 20px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow:
    0 0 50px rgba(138,43,226,0.3),
    0 0 100px rgba(255,105,180,0.15),
    0 20px 50px rgba(0,0,0,0.6);
  border: 2px solid rgba(255,215,0,0.3);
}

.modal-header {
  background: linear-gradient(145deg, rgba(255,215,0,0.2) 0%, rgba(138,43,226,0.2) 100%);
  color: #ffd700;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255,215,0,0.3);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3em;
  font-weight: 800;
  text-shadow: 0 0 15px rgba(255,215,0,0.5);
  letter-spacing: 1px;
}

.close-btn {
  background: linear-gradient(145deg, rgba(255,107,107,0.3) 0%, rgba(255,71,87,0.3) 100%);
  border: 2px solid rgba(255,107,107,0.5);
  color: #ff6b6b;
  font-size: 1.4em;
  cursor: pointer;
  padding: 0;
  width: 34px;
  height: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: linear-gradient(145deg, rgba(255,107,107,0.5) 0%, rgba(255,71,87,0.5) 100%);
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 0 15px rgba(255,107,107,0.5);
}

.modal-body {
  padding: 22px;
  color: rgba(255,255,255,0.9);
}

.modal-body p {
  margin: 0 0 15px 0;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}

#bug-description {
  width: 100%;
  padding: 14px;
  border: 2px solid rgba(138,43,226,0.3);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(240,240,255,0.9) 100%);
  color: #2d1b4e;
  font-family: Arial, sans-serif;
  font-size: 1em;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
  margin-bottom: 15px;
  transition: all 0.2s ease;
}

#bug-description:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255,215,0,0.4);
}

#bug-info {
  background: rgba(138,43,226,0.15);
  padding: 12px;
  border-radius: 10px;
  font-size: 0.9em;
  border: 1px solid rgba(138,43,226,0.2);
}

#bug-info p {
  margin: 5px 0;
  font-weight: normal;
  color: rgba(255,255,255,0.7);
}

#bug-info strong {
  font-weight: bold;
  color: #ffd700;
}

.modal-footer {
  padding: 18px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,215,0,0.1);
}

.modal-footer button {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95em;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#submit-bug-btn {
  background: linear-gradient(145deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%);
  color: #5a2d00;
  box-shadow:
    0 4px 0 #b8860b,
    0 0 15px rgba(255,215,0,0.4),
    0 6px 12px rgba(0,0,0,0.3);
}

#submit-bug-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 #b8860b,
    0 0 25px rgba(255,215,0,0.6),
    0 8px 16px rgba(0,0,0,0.4);
}

#submit-bug-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #b8860b,
    0 0 10px rgba(255,215,0,0.4),
    0 4px 8px rgba(0,0,0,0.3);
}

#cancel-bug-btn {
  background: linear-gradient(145deg, #4a4a5e 0%, #35354a 100%);
  color: rgba(255,255,255,0.8);
  box-shadow:
    0 4px 0 #252530,
    0 6px 12px rgba(0,0,0,0.3);
}

#cancel-bug-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 #252530,
    0 8px 16px rgba(0,0,0,0.4);
  color: #fff;
}

#cancel-bug-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #252530,
    0 4px 8px rgba(0,0,0,0.3);
}

/* Mobile device adjustments */
@media (max-width: 420px) {
  body {
    align-items: flex-start;
    padding: 5px 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #game-container {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 15px 10px; /* Reduced padding */
    min-height: auto;
    max-height: none;
  }

  #board-area {
    height: 400px; /* Reduced height for mobile */
  }

  .tile {
    width: 40px; /* Match JavaScript TILE_SIZE for mobile */
    height: 40px;
    font-size: 0.8em; /* Smaller font if you have any text */
  }

  .collected-tile {
    width: 45px; /* Slightly smaller collection tiles */
    height: 45px;
    margin: 0 2px; /* Reduced margin */
  }

  .draw-deck {
    width: 40px; /* Same size as board tiles */
    height: 40px;
  }

  .draw-deck::before {
    transform: translate(-3px, -3px); /* Adjusted stacking effect */
  }

  .draw-deck::after {
    transform: translate(-6px, -6px);
  }

  #draw-decks-container {
    padding: 10px 30px; /* Reduced padding */
    height: 60px; /* Match desktop height for consistency */
  }

  .bonus-btn {
    width: 70px; /* Smaller bonus buttons */
    height: 70px;
    font-size: 0.8em;
  }

  .bonus-img {
    width: 30px;
    height: 30px;
  }

  .bonus-count {
    width: 24px;
    height: 24px;
    font-size: 0.9em;
    top: -6px;
    right: -6px;
  }

  .bonus-buy-btn {
    width: 20px;
    height: 20px;
    font-size: 1em;
    top: -6px;
    left: -6px;
  }

  .store-item {
    padding: 10px;
    gap: 10px;
  }

  .store-item-img {
    width: 40px;
    height: 40px;
  }

  .store-item-name {
    font-size: 1em;
  }

  .store-item-desc {
    font-size: 0.75em;
  }

  .store-buy-btn {
    padding: 6px 10px;
    font-size: 0.9em;
  }

  #collection-slot {
    height: 55px; /* Reduced height */
    padding: 0 8px;
  }

  #top-bar {
    font-size: 1.1em; /* Smaller top bar font */
    padding: 0 15px;
  }

  #bonus-container {
    padding: 15px 15px 15px; /* Add bottom padding for mobile */
    gap: 8px; /* Smaller gap */
    margin-bottom: 10px; /* Ensure space at bottom */
  }

  #bug-report-container {
    bottom: 5px;
    right: 10px;
  }

  #bug-report-btn {
    font-size: 0.7em;
    padding: 6px 10px;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 12px 15px;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-footer {
    padding: 12px 15px;
    flex-direction: column;
  }

  .modal-footer button {
    width: 100%;
    margin: 5px 0;
  }

  #holding-area {
    top: 10px;
    right: 10px;
    padding: 3px; /* Smaller padding */
  }
}

/* Tablet adjustments */
@media (max-width: 768px) and (min-width: 421px) {
  .tile {
    width: 40px; /* Match JavaScript TILE_SIZE for tablet */
    height: 40px;
  }

  .collected-tile {
    width: 40px;
    height: 40px;
  }

  .draw-deck {
    width: 40px;
    height: 40px;
  }
}

/* ========== COIN AND SLOT MACHINE TOP BAR ========== */
#level-coin-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
}

/* ===== PREMIUM COIN DISPLAY ===== */
#coin-display {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(145deg, #ffd700 0%, #ffb347 30%, #ffd700 50%, #b8860b 100%);
  background-size: 200% 200%;
  padding: 4px 10px;
  border-radius: 16px;
  border: 2px solid #8b4513;
  box-shadow:
    0 3px 6px rgba(0,0,0,0.4),
    inset 0 1px 3px rgba(255,255,255,0.5),
    inset 0 -1px 3px rgba(0,0,0,0.2),
    0 0 10px rgba(255,215,0,0.3);
  position: relative;
  overflow: hidden;
  animation: coinDisplayShine 3s ease-in-out infinite;
  flex-shrink: 0;
}

#coin-display::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  animation: coinShine 4s ease-in-out infinite;
}

@keyframes coinDisplayShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes coinShine {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}

#coin-display img, #coin-icon {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
  animation: coinSpin 4s linear infinite;
  transform-style: preserve-3d;
}

@keyframes coinSpin {
  0%, 100% { transform: rotateY(0deg); }
  25% { transform: rotateY(15deg); }
  50% { transform: rotateY(0deg); }
  75% { transform: rotateY(-15deg); }
}

#coin-count {
  font-weight: 900;
  color: #5d3a1a;
  font-size: 0.85em;
  min-width: 28px;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

/* Coin count animation on change */
#coin-display.coin-increase #coin-count {
  animation: coinPop 0.4s ease-out;
}

@keyframes coinPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); color: #00aa00; }
  100% { transform: scale(1); }
}

/* Slot machine indicator is now directly in top bar */

/* ===== SPECTACULAR SLOT MACHINE INDICATOR ===== */
#slot-machine-indicator {
  position: relative;
  padding: 0;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slot-glow-ring {
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 22px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.slot-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 18px;
  border: 2px solid;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.slot-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

#slot-icon {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
}

/* Progress bar container */
#slot-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  z-index: 3;
  min-width: 50px;
}

#slot-progress-bar {
  width: 50px;
  height: 8px;
  background: rgba(0,0,0,0.4);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

#slot-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 50%, #CDDC39 100%);
  border-radius: 4px;
  transition: width 0.3s ease-out;
  box-shadow: 0 0 5px rgba(76,175,80,0.5);
}

#slot-progress-text {
  font-weight: 700;
  font-size: 0.55em;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #b8c9a8;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  white-space: nowrap;
}

/* ===== UNAVAILABLE STATE - Building Anticipation ===== */
#slot-machine-indicator.slot-unavailable {
  cursor: default;
}

#slot-machine-indicator.slot-unavailable .slot-inner {
  background: linear-gradient(145deg, #5a6b4e 0%, #4a5b3e 50%, #3a4b2e 100%);
  border-color: #3a4b2e;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

#slot-machine-indicator.slot-unavailable #slot-icon {
  filter: grayscale(30%) brightness(0.85) drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

#slot-machine-indicator.slot-unavailable #slot-progress-text {
  color: #b8c9a8;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Progressive urgency as progress increases */
#slot-machine-indicator.slot-unavailable.progress-low #slot-progress-fill {
  background: linear-gradient(90deg, #5a6b4e 0%, #7a8b5e 100%);
}

#slot-machine-indicator.slot-unavailable.progress-medium .slot-inner {
  background: linear-gradient(145deg, #7a8b5e 0%, #6a7b4e 50%, #5a6b3e 100%);
  border-color: #5a6b3e;
}

#slot-machine-indicator.slot-unavailable.progress-medium #slot-progress-fill {
  background: linear-gradient(90deg, #7CB342 0%, #9CCC65 100%);
  box-shadow: 0 0 8px rgba(124,179,66,0.6);
}

#slot-machine-indicator.slot-unavailable.progress-medium #slot-progress-text {
  color: #d4e4b8;
}

#slot-machine-indicator.slot-unavailable.progress-high .slot-inner {
  background: linear-gradient(145deg, #9a8b5e 0%, #8a7b4e 50%, #7a6b3e 100%);
  border-color: #7a6b3e;
  animation: gentlePulse 2s ease-in-out infinite;
}

#slot-machine-indicator.slot-unavailable.progress-high #slot-progress-fill {
  background: linear-gradient(90deg, #FFA726 0%, #FFB74D 100%);
  box-shadow: 0 0 10px rgba(255,167,38,0.6);
}

#slot-machine-indicator.slot-unavailable.progress-high #slot-progress-text {
  color: #ffe4a8;
}

#slot-machine-indicator.slot-unavailable.progress-almost .slot-inner {
  background: linear-gradient(145deg, #c9a040 0%, #b89030 50%, #a88020 100%);
  border-color: #a88020;
  animation: urgentPulse 1s ease-in-out infinite;
  box-shadow:
    0 4px 12px rgba(255,180,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

#slot-machine-indicator.slot-unavailable.progress-almost #slot-progress-fill {
  background: linear-gradient(90deg, #FF5722 0%, #FF7043 50%, #FFD700 100%);
  box-shadow: 0 0 12px rgba(255,87,34,0.8);
  animation: progressPulse 0.5s ease-in-out infinite alternate;
}

#slot-machine-indicator.slot-unavailable.progress-almost .slot-glow-ring {
  background: radial-gradient(ellipse, rgba(255,180,0,0.4) 0%, transparent 70%);
  opacity: 1;
  animation: ringPulse 1s ease-in-out infinite;
}

#slot-machine-indicator.slot-unavailable.progress-almost #slot-icon {
  filter: none;
  animation: slotIconShake 0.5s ease-in-out infinite;
}

#slot-machine-indicator.slot-unavailable.progress-almost #slot-progress-text {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,215,0,0.8);
  animation: numberGlow 0.8s ease-in-out infinite;
}

@keyframes progressPulse {
  0% { box-shadow: 0 0 8px rgba(255,87,34,0.6); }
  100% { box-shadow: 0 0 15px rgba(255,215,0,1); }
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes mediumPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15); }
  50% { transform: scale(1.03); box-shadow: 0 6px 12px rgba(255,180,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
}

@keyframes urgentPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(255,180,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3); }
  50% { transform: scale(1.05); box-shadow: 0 8px 20px rgba(255,180,0,0.6), inset 0 1px 0 rgba(255,255,255,0.4); }
}

@keyframes numberGlow {
  0%, 100% { text-shadow: 0 0 5px rgba(255,215,0,0.5); }
  50% { text-shadow: 0 0 15px rgba(255,215,0,1), 0 0 25px rgba(255,180,0,0.8); }
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes slotIconShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

/* ===== AVAILABLE STATE - Maximum Excitement ===== */
#slot-machine-indicator.slot-available {
  animation: slotAvailableBounce 0.8s ease-in-out infinite;
}

#slot-machine-indicator.slot-available .slot-inner {
  background: linear-gradient(145deg, #ffd700 0%, #ff8c00 25%, #ffd700 50%, #ff6600 75%, #ffd700 100%);
  background-size: 400% 400%;
  border-color: #ff4500;
  box-shadow:
    0 6px 20px rgba(255,100,0,0.6),
    0 0 40px rgba(255,215,0,0.5),
    inset 0 2px 4px rgba(255,255,255,0.6),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  animation: slotGradientFlow 2s ease-in-out infinite;
}

#slot-machine-indicator.slot-available .slot-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 70%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: skewX(-20deg);
  animation: slotShineSwipe 2s ease-in-out infinite;
}

#slot-machine-indicator.slot-available .slot-glow-ring {
  background: radial-gradient(ellipse, rgba(255,140,0,0.8) 0%, rgba(255,215,0,0.4) 50%, transparent 70%);
  opacity: 1;
  animation: slotGlowPulse 0.5s ease-in-out infinite alternate;
}

#slot-machine-indicator.slot-available #slot-icon {
  animation: slotIconWiggle 0.4s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.8)) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

#slot-machine-indicator.slot-available #slot-progress-fill {
  width: 100% !important;
  background: linear-gradient(90deg, #FFD700 0%, #FF8C00 50%, #FFD700 100%);
  background-size: 200% 100%;
  animation: progressShine 1s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(255,215,0,0.8);
}

#slot-machine-indicator.slot-available #slot-progress-text {
  color: #8b0000;
  font-size: 0.65em;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7), 0 0 10px rgba(255,255,255,0.5);
  animation: textPulse 0.5s ease-in-out infinite alternate;
}

@keyframes progressShine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

#slot-machine-indicator.slot-available:hover {
  animation: none;
  transform: scale(1.15);
}

#slot-machine-indicator.slot-available:hover .slot-inner {
  box-shadow:
    0 10px 30px rgba(255,100,0,0.8),
    0 0 60px rgba(255,215,0,0.7),
    inset 0 2px 4px rgba(255,255,255,0.7),
    inset 0 -2px 4px rgba(0,0,0,0.2);
}

#slot-machine-indicator.slot-available:active {
  transform: scale(1.05);
}

@keyframes slotAvailableBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-4px) scale(1.02); }
  50% { transform: translateY(0) scale(1); }
  75% { transform: translateY(-2px) scale(1.01); }
}

@keyframes slotGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes slotShineSwipe {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}

@keyframes slotGlowPulse {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

@keyframes slotIconWiggle {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.1); }
}

@keyframes textPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* Particle effects for available state */
#slot-machine-indicator.slot-available .slot-particles::before,
#slot-machine-indicator.slot-available .slot-particles::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 6px #ffd700;
}

#slot-machine-indicator.slot-available .slot-particles::before {
  animation: particleFloat1 1.5s ease-in-out infinite;
}

#slot-machine-indicator.slot-available .slot-particles::after {
  animation: particleFloat2 1.8s ease-in-out infinite 0.3s;
}

@keyframes particleFloat1 {
  0% { top: 80%; left: 20%; opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
  100% { top: -20%; left: 30%; opacity: 0; transform: scale(0); }
}

@keyframes particleFloat2 {
  0% { top: 80%; right: 20%; opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
  100% { top: -20%; right: 30%; opacity: 0; transform: scale(0); }
}

/* ========== SLOT MACHINE SCREEN - VEGAS STYLE ========== */
#slot-machine-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at center, rgba(20,0,40,0.95) 0%, rgba(5,0,15,0.98) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow: hidden;
}

#slot-machine-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,215,0,0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255,100,0,0.08) 0%, transparent 40%);
  pointer-events: none;
}

@keyframes screenFadeIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes ambientGlow {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

#slot-machine-screen.hidden {
  display: none;
}

#slot-machine-container {
  width: 92%;
  max-width: 420px;
  background:
    linear-gradient(180deg,
      #2a1a4a 0%,
      #1a0a3a 20%,
      #150830 50%,
      #1a0a3a 80%,
      #2a1a4a 100%);
  border-radius: 25px;
  padding: 0;
  box-shadow:
    0 0 40px rgba(255,215,0,0.25),
    0 20px 60px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.5);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  border: 3px solid #ffd700;
}

/* Header with neon effect */
#slot-machine-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 15px;
  background: linear-gradient(180deg, rgba(255,215,0,0.15) 0%, transparent 100%);
  border-bottom: 2px solid rgba(255,215,0,0.3);
}

#slot-machine-header h2 {
  color: #ffd700;
  margin: 0;
  font-size: 1.8em;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow:
    0 0 10px rgba(255,215,0,0.8),
    0 0 20px rgba(255,215,0,0.5),
    0 0 30px rgba(255,215,0,0.3),
    0 2px 4px rgba(0,0,0,0.5);
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0% { text-shadow: 0 0 10px rgba(255,215,0,0.8), 0 0 20px rgba(255,215,0,0.5), 0 0 30px rgba(255,215,0,0.3), 0 2px 4px rgba(0,0,0,0.5); }
  100% { text-shadow: 0 0 15px rgba(255,215,0,1), 0 0 30px rgba(255,215,0,0.7), 0 0 45px rgba(255,215,0,0.5), 0 2px 4px rgba(0,0,0,0.5); }
}

#slot-machine-header .close-btn {
  background: linear-gradient(145deg, #ff4444 0%, #cc0000 100%);
  color: white;
  border: 2px solid #ff6666;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(255,0,0,0.5), 0 4px 8px rgba(0,0,0,0.4);
}

#slot-machine-header .close-btn:hover {
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 0 25px rgba(255,0,0,0.8), 0 6px 12px rgba(0,0,0,0.5);
}

/* Premium coin display in slot screen */
#slot-coin-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(145deg, #ffd700 0%, #ffb347 30%, #ffd700 50%, #ff8c00 100%);
  background-size: 200% 200%;
  padding: 12px 30px;
  border-radius: 25px;
  border: 3px solid #8b4513;
  margin: 15px 20px 20px;
  box-shadow:
    0 0 20px rgba(255,215,0,0.4),
    0 6px 15px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.5),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  animation: coinDisplayPulse 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

#slot-coin-display::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-20deg);
  animation: slotCoinShine 3s ease-in-out infinite;
}

@keyframes coinDisplayPulse {
  0%, 100% { background-position: 0% 50%; box-shadow: 0 0 20px rgba(255,215,0,0.4), 0 6px 15px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.5), inset 0 -2px 4px rgba(0,0,0,0.2); }
  50% { background-position: 100% 50%; box-shadow: 0 0 30px rgba(255,215,0,0.6), 0 8px 20px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.6), inset 0 -2px 4px rgba(0,0,0,0.2); }
}

@keyframes slotCoinShine {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}

#slot-coin-display img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  animation: coinRotate 3s ease-in-out infinite;
}

@keyframes coinRotate {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
}

#slot-coin-count {
  font-weight: 900;
  color: #5d3a1a;
  font-size: 1.5em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  position: relative;
  z-index: 1;
}

/* ===== SPECTACULAR REELS CONTAINER ===== */
#slot-reels-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 15px 20px;
  padding: 25px 20px;
  background:
    linear-gradient(180deg, #1a0a2a 0%, #0a0015 50%, #1a0a2a 100%);
  border-radius: 20px;
  border: 4px solid #ffd700;
  box-shadow:
    0 0 30px rgba(255,215,0,0.3),
    inset 0 0 50px rgba(0,0,0,0.8),
    inset 0 5px 15px rgba(0,0,0,0.5);
  position: relative;
}

/* Decorative corner lights */
#slot-reels-container::before,
#slot-reels-container::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ff0000;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
  animation: cornerLight 0.5s ease-in-out infinite alternate;
}

#slot-reels-container::before {
  top: 10px;
  left: 10px;
}

#slot-reels-container::after {
  top: 10px;
  right: 10px;
  animation-delay: 0.25s;
}

@keyframes cornerLight {
  0% { opacity: 0.5; box-shadow: 0 0 5px #ff0000; }
  100% { opacity: 1; box-shadow: 0 0 15px #ff0000, 0 0 25px #ff6600; }
}

/* Individual reel styling */
.slot-reel {
  width: 90px;
  height: 100px;
  background: linear-gradient(180deg,
    #f5f5dc 0%,
    #fffef0 20%,
    #fffff8 50%,
    #fffef0 80%,
    #f5f5dc 100%);
  border-radius: 12px;
  border: 4px solid #b8860b;
  overflow: hidden;
  box-shadow:
    inset 0 5px 20px rgba(0,0,0,0.3),
    inset 0 -5px 20px rgba(0,0,0,0.2),
    0 4px 15px rgba(0,0,0,0.5),
    0 0 10px rgba(184,134,11,0.3);
  position: relative;
}

/* Reel window shine effect */
.slot-reel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

/* Reel divider lines */
.slot-reel::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(184,134,11,0.5), transparent);
  transform: translateY(-50%);
  z-index: 5;
}

.reel-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.reel-fruit {
  width: 70px;
  height: 70px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transition: all 0.1s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Spinning animation - more dramatic */
.reel-fruit.spinning {
  animation: reelSpin 0.1s linear infinite;
}

@keyframes reelSpin {
  0% { transform: translateY(-100%); opacity: 0.3; }
  50% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(100%); opacity: 0.3; }
}

/* Winning reel effects - SPECTACULAR */
.slot-reel.winning {
  border-color: #ffd700;
  box-shadow:
    0 0 20px rgba(255,215,0,0.8),
    inset 0 0 15px rgba(255,215,0,0.2);
}

.slot-reel.winning .reel-fruit {
  animation: winFruitBounce 0.5s ease-in-out infinite;
}

@keyframes winFruitBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ===== RESULT MESSAGE - DRAMATIC ===== */
#slot-result-message {
  text-align: center;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2em;
  color: #ffd700;
  margin: 0 20px 15px;
  padding: 12px 15px;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255,215,0,0.1) 0%, rgba(255,140,0,0.1) 100%);
  border: 2px solid rgba(255,215,0,0.3);
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
  transition: all 0.3s ease;
}

#slot-result-message:empty {
  background: transparent;
  border-color: transparent;
  min-height: 20px;
}

/* Win message styling */
#slot-result-message.win {
  background: linear-gradient(145deg, rgba(0,200,0,0.2) 0%, rgba(0,150,0,0.2) 100%);
  border-color: #00ff00;
  color: #00ff00;
  text-shadow: 0 0 15px rgba(0,255,0,0.8);
  animation: winMessagePulse 0.5s ease-in-out 3;
}

/* JACKPOT - Maximum excitement */
#slot-result-message.jackpot {
  background: linear-gradient(145deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%);
  border: 3px solid #fff;
  color: #8b0000;
  font-size: 1.6em;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 1px 0 #fff, 0 2px 4px rgba(0,0,0,0.3);
  box-shadow: 0 0 30px rgba(255,215,0,0.6);
}

/* ===== BETTING CONTROLS - PREMIUM ===== */
#betting-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 0 20px 20px;
  padding: 15px;
  background: linear-gradient(145deg, rgba(255,215,0,0.1) 0%, rgba(255,140,0,0.05) 100%);
  border-radius: 15px;
  border: 2px solid rgba(255,215,0,0.2);
}

.bet-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #ffd700;
  background: linear-gradient(145deg, #ffd700 0%, #ff8c00 100%);
  color: #5d3a1a;
  font-size: 1.8em;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow:
    0 0 15px rgba(255,215,0,0.4),
    0 4px 10px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.4);
}

.bet-btn:hover {
  transform: scale(1.15);
  box-shadow:
    0 0 25px rgba(255,215,0,0.6),
    0 6px 15px rgba(0,0,0,0.5);
}

.bet-btn:active {
  transform: scale(0.95);
}

.bet-btn:disabled {
  background: linear-gradient(145deg, #555 0%, #333 100%);
  border-color: #444;
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

#bet-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 25px;
  background: linear-gradient(145deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
  border-radius: 12px;
  border: 2px solid #ffd700;
  font-weight: 700;
  color: #ffd700;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
}

#current-bet {
  font-size: 1.5em;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.multiplier {
  font-size: 1em;
  color: #ffb347;
  opacity: 0.9;
}

/* ===== SPIN BUTTON - THE STAR ===== */
#spin-btn {
  width: calc(100% - 40px);
  margin: 0 20px 20px;
  padding: 18px 30px;
  font-size: 1.6em;
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  border: none;
  border-radius: 15px;
  background: linear-gradient(145deg, #ff4444 0%, #cc0000 50%, #ff4444 100%);
  color: white;
  cursor: pointer;
  box-shadow:
    0 6px 0 #8b0000,
    0 0 20px rgba(255,0,0,0.3),
    0 10px 30px rgba(0,0,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.3);
  transition: all 0.15s ease;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}

#spin-btn:hover {
  transform: translateY(-4px);
  box-shadow:
    0 10px 0 #8b0000,
    0 0 50px rgba(255,0,0,0.6),
    0 15px 40px rgba(0,0,0,0.5);
}

#spin-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 4px 0 #8b0000,
    0 0 20px rgba(255,0,0,0.4),
    0 8px 20px rgba(0,0,0,0.4);
}

#spin-btn:disabled {
  background: linear-gradient(145deg, #555 0%, #333 100%);
  box-shadow: 0 4px 0 #222, 0 6px 15px rgba(0,0,0,0.3);
  cursor: not-allowed;
}

/* ===== PRIZE TABLE - INFORMATIVE ===== */
#slot-prize-table {
  background: linear-gradient(145deg, rgba(255,215,0,0.08) 0%, rgba(255,140,0,0.05) 100%);
  border-radius: 15px;
  padding: 15px;
  margin: 0 20px 20px;
  border: 2px solid rgba(255,215,0,0.3);
}

#slot-prize-table h3 {
  text-align: center;
  color: #ffd700;
  margin: 0 0 12px 0;
  font-size: 1.1em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255,215,0,0.4);
}

.prize-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,215,0,0.15);
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.prize-row:hover {
  background: rgba(255,215,0,0.1);
}

.prize-row:last-child {
  border-bottom: none;
}

.prize-row.jackpot-row {
  background: linear-gradient(145deg, rgba(255,215,0,0.3) 0%, rgba(255,140,0,0.3) 100%);
  border-radius: 10px;
  border-bottom: none;
  margin-bottom: 8px;
  padding: 10px 15px;
  animation: jackpotRowGlow 2s ease-in-out infinite alternate;
}

@keyframes jackpotRowGlow {
  0% { box-shadow: 0 0 10px rgba(255,215,0,0.2); }
  100% { box-shadow: 0 0 20px rgba(255,215,0,0.4); }
}

.prize-combo {
  color: #ffb347;
  font-weight: 600;
}

.prize-value {
  color: #00ff88;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0,255,136,0.3);
}

.prize-row.jackpot-row .prize-combo,
.prize-row.jackpot-row .prize-value {
  color: #ffd700;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

/* ===== BACK BUTTON ===== */
#back-to-game-btn {
  width: calc(100% - 40px);
  margin: 0 20px 20px;
  padding: 14px;
  font-size: 1.1em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid rgba(255,215,0,0.3);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  color: #ffd700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#back-to-game-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(255,215,0,0.2) 0%, rgba(255,215,0,0.1) 100%);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4), 0 0 20px rgba(255,215,0,0.2);
}

#back-to-game-btn:active {
  transform: translateY(1px);
}

/* Mobile adjustments for slot machine */
@media (max-width: 420px) {
  #level-coin-container {
    gap: 6px;
  }

  #coin-display {
    padding: 4px 10px;
    border-radius: 15px;
    border-width: 2px;
    flex-shrink: 0;
  }

  #coin-display img, #coin-icon {
    width: 18px;
    height: 18px;
  }

  #coin-count {
    font-size: 0.9em;
    min-width: 28px;
    white-space: nowrap;
  }

  /* Mobile slot indicator */
  .slot-inner {
    padding: 5px 10px;
    gap: 5px;
    border-radius: 18px;
    border-width: 2px;
  }

  #slot-icon {
    width: 28px;
    height: 28px;
  }

  #slot-countdown {
    font-size: 0.85em;
  }

  #slot-label {
    font-size: 0.5em;
  }

  .slot-glow-ring {
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 20px;
  }

  /* Mobile slot machine screen */
  #slot-machine-container {
    width: 95%;
    max-width: none;
    padding: 0;
    border-radius: 20px;
    max-height: 95vh;
  }

  #slot-machine-container::before {
    border-radius: 22px;
  }

  #slot-machine-header {
    padding: 15px 15px 12px;
  }

  #slot-machine-header h2 {
    font-size: 1.4em;
    letter-spacing: 2px;
  }

  #slot-machine-header .close-btn {
    width: 32px;
    height: 32px;
    font-size: 1.2em;
  }

  #slot-coin-display {
    margin: 12px 15px 15px;
    padding: 10px 20px;
    border-radius: 20px;
  }

  #slot-coin-display img {
    width: 26px;
    height: 26px;
  }

  #slot-coin-count {
    font-size: 1.3em;
  }

  #slot-reels-container {
    margin: 0 12px 15px;
    padding: 18px 15px;
    border-radius: 15px;
    gap: 8px;
    border-width: 3px;
  }

  #slot-reels-container::before,
  #slot-reels-container::after {
    width: 8px;
    height: 8px;
    top: 8px;
  }

  #slot-reels-container::before {
    left: 8px;
  }

  #slot-reels-container::after {
    right: 8px;
  }

  .slot-reel {
    width: 75px;
    height: 85px;
    border-radius: 10px;
    border-width: 3px;
  }

  .reel-fruit {
    width: 58px;
    height: 58px;
  }

  #slot-result-message {
    margin: 0 15px 12px;
    padding: 10px 12px;
    font-size: 1em;
    min-height: 40px;
  }

  #slot-result-message.jackpot {
    font-size: 1.3em;
  }

  #betting-controls {
    margin: 0 15px 15px;
    padding: 12px;
    gap: 10px;
  }

  .bet-btn {
    width: 44px;
    height: 44px;
    font-size: 1.5em;
    border-width: 2px;
  }

  #bet-display {
    padding: 10px 18px;
    gap: 6px;
  }

  #current-bet {
    font-size: 1.3em;
  }

  .multiplier {
    font-size: 0.9em;
  }

  #spin-btn {
    width: calc(100% - 30px);
    margin: 0 15px 15px;
    padding: 15px 25px;
    font-size: 1.4em;
    letter-spacing: 3px;
    border-radius: 12px;
  }

  #slot-prize-table {
    margin: 0 15px 15px;
    padding: 12px;
    border-radius: 12px;
  }

  #slot-prize-table h3 {
    font-size: 1em;
    margin-bottom: 10px;
  }

  .prize-row {
    padding: 6px 10px;
    font-size: 0.75em;
  }

  .prize-row.jackpot-row {
    padding: 8px 12px;
  }

  #back-to-game-btn {
    width: calc(100% - 30px);
    margin: 0 15px 15px;
    padding: 12px;
    font-size: 1em;
  }
}

/* Extra small screens */
@media (max-width: 350px) {
  .slot-reel {
    width: 65px;
    height: 75px;
  }

  .reel-fruit {
    width: 48px;
    height: 48px;
  }

  #slot-reels-container {
    gap: 6px;
    padding: 15px 12px;
  }

  #slot-machine-header h2 {
    font-size: 1.2em;
    letter-spacing: 1px;
  }

  #spin-btn {
    font-size: 1.2em;
    padding: 12px 20px;
    letter-spacing: 2px;
  }

  .bet-btn {
    width: 38px;
    height: 38px;
    font-size: 1.3em;
  }

  #bet-display {
    padding: 8px 12px;
  }

  #current-bet {
    font-size: 1.1em;
  }
}

/* ===== ADDITIONAL POLISH & EFFECTS ===== */

/* Coin win animation burst */
.coin-burst {
  position: fixed;
  pointer-events: none;
  z-index: 10003;
}

.coin-burst-particle {
  position: absolute;
  width: 20px;
  height: 20px;
  background: linear-gradient(145deg, #ffd700, #ff8c00);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255,215,0,0.8);
}

/* Slot machine opening animation */
#slot-machine-screen.opening {
  animation: slotScreenOpen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Level complete slot tease */
.slot-tease {
  animation: slotTeaseAnimation 0.6s ease-in-out;
}

@keyframes slotTeaseAnimation {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Smooth scrollbar for slot machine */
#slot-machine-container::-webkit-scrollbar {
  width: 8px;
}

#slot-machine-container::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
}

#slot-machine-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffd700, #ff8c00);
  border-radius: 4px;
}

#slot-machine-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffec80, #ffb347);
}

/* Haptic feedback simulation (visual pulse on tap for mobile) */
@media (hover: none) {
  #spin-btn:active {
    animation: mobileTap 0.15s ease-out;
  }

  .bet-btn:active {
    animation: mobileTap 0.1s ease-out;
  }

  @keyframes mobileTap {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
  }
}

/* Accessibility: Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #slot-machine-indicator.slot-available {
    animation: none;
  }

  .slot-glow-ring {
    animation: none;
  }

  #spin-btn {
    animation: none;
  }

  #slot-machine-indicator.slot-available .slot-inner::before {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #slot-machine-indicator .slot-inner {
    border-width: 4px;
  }

  .slot-reel {
    border-width: 5px;
  }

  #spin-btn {
    border: 3px solid white;
  }

  #slot-result-message {
    border-width: 3px;
  }
}

/* ========== COIN REWARD POPUP ========== */
.coin-reward-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  font-size: 2em;
  font-weight: 900;
  color: #ffd700;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.8),
    0 0 20px rgba(255, 215, 0, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.5),
    2px 2px 0 #8b4513,
    -2px -2px 0 #8b4513,
    2px -2px 0 #8b4513,
    -2px 2px 0 #8b4513;
  z-index: 2000;
  pointer-events: none;
  animation: coinRewardPopup 0.5s ease-out forwards;
  white-space: nowrap;
}

@keyframes coinRewardPopup {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  30% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0;
  }
}