body {
  background-color: rgb(15, 15, 35);
}

.gentium-book-plus {
  font-family: "Gentium Book Plus", serif;
  font-weight: 400;
  font-style: normal;
}

.dancing-script {
  font-family: "Dancing Script", cursive;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.glow-text {
  color: #ffb347;
  text-shadow:
    0 0 5px #ffb347,
    0 0 10px #ff8c00,
    0 0 20px #ff8c00,
    0 0 40px #ff6600;
}

.glow-text-green {
  color: #33ff33;
  text-shadow:
    0 0 5px #33ff33,
    0 0 10px #00ff00,
    0 0 20px #00ff00,
    0 0 40px #00cc00;
}

.glow-border {
  border-color: #ffb347;
  box-shadow:
    0 0 5px #ffb347,
    0 0 10px rgba(255, 179, 71, 0.5);
}

.tile-letter {
  background: linear-gradient(145deg, #1a1a3a, #0f0f23);
  border: 2px solid #ffb347;
  color: #ffb347;
  text-shadow:
    0 0 5px #ffb347,
    0 0 10px #ff8c00;
  box-shadow:
    0 0 5px rgba(255, 179, 71, 0.3),
    inset 0 0 10px rgba(255, 179, 71, 0.1);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tile-space {
  background: rgba(255, 179, 71, 0.15);
  border: 2px solid rgba(255, 179, 71, 0.3);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes flash-green {
  0% { opacity: 0.5; }
  100% { opacity: 0; }
}

@keyframes flash-red {
  0% { opacity: 0.5; }
  100% { opacity: 0; }
}

#flash-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
}

#flash-overlay.flash-green {
  background-color: #22c55e;
  animation: flash-green 0.3s ease-out;
}

#flash-overlay.flash-red {
  background-color: #ef4444;
  animation: flash-red 0.3s ease-out;
}

#fireworks-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}

#freeze-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  z-index: 100;
  transition: opacity 0.3s ease;
}

#freeze-overlay.active {
  opacity: 1;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 5px #ffb347, 0 0 10px rgba(255, 179, 71, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 15px #ffb347, 0 0 30px rgba(255, 179, 71, 0.8), 0 0 45px rgba(255, 140, 0, 0.6);
  }
}

.pulse {
  animation: pulse 1s ease-in-out infinite;
  position: relative;
  z-index: 200;
}

@keyframes flip-tile {
  0% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

.flip-tile {
  animation: flip-tile 1s ease-in-out;
}

#prize-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#prize-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#prize-overlay .prize-text {
  font-size: 8rem;
  font-weight: bold;
  color: #ffb347;
  text-shadow:
    0 0 10px #ffb347,
    0 0 20px #ff8c00,
    0 0 40px #ff8c00,
    0 0 80px #ff6600;
  text-align: center;
}

#prize-overlay .prize-calculation {
  font-size: 3rem;
  color: #ffb347;
  text-shadow:
    0 0 5px #ffb347,
    0 0 10px #ff8c00;
  margin-bottom: 1rem;
}

@keyframes prize-pop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

#prize-overlay.active .prize-text {
  animation: prize-pop 0.5s ease-out;
}
