/* Game-Specific Customization */
.thirty-sec-game {
    background: #000;
  }
  
  /* Snake Particles for crash effect */
  .snake-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 1;
    z-index: 10;
  }
  
  /* Food particles for special eat effect */
  .food-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 1;
    z-index: 10;
  }
  
  /* Special food flash effect */
  .special-food-flash {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    opacity: 0.7;
    z-index: 9;
    animation: flash-out 0.5s forwards;
  }
  
  @keyframes flash-out {
    0% { transform: scale(0.1); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(2); opacity: 0; }
  }
  
  /* Freeze effect overlay */
  .freeze-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.3), rgba(200, 240, 255, 0.1));
    z-index: 5;
    animation: freeze-pulse 1s ease-in-out infinite;
    pointer-events: none;
  }
  
  @keyframes freeze-pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
  }
  
  /* Combo special message */
  .turbo-special-message {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    z-index: 100;
    animation: special-msg 3s forwards;
  }
  
  @keyframes special-msg {
    0% { transform: scale(0.5) translateY(-50px); opacity: 0; }
    20% { transform: scale(1.2) translateY(0); opacity: 1; }
    80% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(0.8) translateY(50px); opacity: 0; }
  }
  
  /* Boost Button for Mobile */
  .turbo-boost-button {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at center, rgba(0, 255, 0, 0.8), rgba(0, 100, 0, 0.8));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    z-index: 100;
    user-select: none;
    touch-action: manipulation;
    animation: pulse-button 2s infinite;
  }
  
  @keyframes pulse-button {
    0% {
      transform: scale(1);
      box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    }
    50% {
      transform: scale(1.1);
      box-shadow: 0 0 20px rgba(0, 255, 0, 0.9);
    }
    100% {
      transform: scale(1);
      box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    }
  }
  
  /* Instructions */
  .turbo-instructions {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.2em;
    text-shadow: 0 0 5px #000;
    opacity: 0.8;
    pointer-events: none;
    animation: fade-out 4s forwards;
  }
  
  @keyframes fade-out {
    0% { opacity: 0.8; }
    70% { opacity: 0.8; }
    100% { opacity: 0; }
  }
  
  /* Game Canvas */
  canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
  }
  
  /* Custom Score Popup Animation */
  .score-popup {
    animation: score-pop-up 1s ease-out forwards;
    font-weight: bold;
    font-size: 1.5em;
    text-shadow: 0 0 10px currentColor;
  }
  
  @keyframes score-pop-up {
    0% {
      transform: scale(0.5) translateY(0);
      opacity: 0;
    }
    25% {
      transform: scale(1.5) translateY(-5px);
      opacity: 1;
    }
    100% {
      transform: scale(1) translateY(-30px);
      opacity: 0;
    }
  }
  
  /* Game Over screen customization */
  .thirty-sec-game-over h2 {
    color: #0f0;
    text-shadow: 0 0 10px #0f0;
    font-size: 2em;
  }
  
  /* Grid effect for the background */
  .thirty-sec-game-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
      linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
  }
  
  /* Customize game over button */
  .thirty-sec-game-over .thirty-sec-restart,
  .thirty-sec-game-over .thirty-sec-share {
    background: linear-gradient(to right, #0f0, #00f);
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    transition: transform 0.2s;
  }
  
  .thirty-sec-game-over .thirty-sec-restart:hover,
  .thirty-sec-game-over .thirty-sec-share:hover {
    transform: scale(1.05);
  }
  
  /* Media query for smaller screens */
  @media (max-width: 768px) {
    .turbo-boost-button {
      width: 60px;
      height: 60px;
      font-size: 0.8em;
    }
  }
  
  /* For devices that don't support hover */
  @media (hover: none) {
    .turbo-boost-button {
      background: radial-gradient(circle at center, rgba(0, 255, 0, 0.9), rgba(0, 100, 0, 0.9));
    }
  }

  .explosion-particle {
    position: absolute;
    border-radius: 50%;
    z-index: 1000;
    pointer-events: none;
}

.explosion-shockwave {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,150,0,0.4) 40%, rgba(255,0,0,0) 70%);
    z-index: 990;
    pointer-events: none;
    animation: shockwave 0.5s ease-out forwards;
}

@keyframes shockwave {
    0% {
        transform: scale(0.1);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.immunity-indicator {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(64, 224, 208, 0.7);
    color: white;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 1000;
    animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}