body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #84fab0, #8fd3f4);
  text-align: center;
}

header {
  padding: 20px;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.back-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  background: #2c3e50;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 120px);
  gap: 20px;
  justify-content: center;
  margin: 40px auto;
}

.hole {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at center, #1a1a1a, #000);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 10px 20px rgba(0,0,0,0.8);
  border: 3px solid #2c3e50;
  transition: all 0.3s ease;
  overflow: visible;
}

.hole-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #333, #000);
  border-radius: 50%;
  z-index: 1;
}

.mole-emoji {
  position: relative;
  z-index: 10;
  font-size: 2.5rem;
  animation: molePopUp 0.3s ease-out;
  pointer-events: none;
}

.hole.mole {
  animation: moleAppear 0.3s ease-out;
}

.hole.mole-appear {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.hole.hit {
  animation: hitEffect 0.2s ease-out;
}

.hole.miss {
  animation: missEffect 0.3s ease-out;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffd700;
  border-radius: 50%;
  animation: sparkle 0.6s ease-out forwards;
  z-index: 10;
}

@keyframes moleAppear {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes molePopUp {
  0% {
    transform: translateY(20px) scale(0);
    opacity: 0;
  }
  50% {
    transform: translateY(-10px) scale(1.2);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes hitEffect {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 215, 0, 0.8);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 215, 0, 0);
  }
}

@keyframes missEffect {
  0% {
    box-shadow: 0 0 0 rgba(255, 0, 0, 0.8);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 0, 0, 0);
  }
}

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

.score-board {
  background: rgba(255,255,255,0.9);
  display: inline-block;
  padding: 10px 20px;
  margin: 10px;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

/* Enhanced Timer Container */
.timer-container {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  margin: 20px auto;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  backdrop-filter: blur(10px);
}

.timer {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.timer.timer-warning {
  color: #ff9f00;
  text-shadow: 0 0 10px rgba(255, 159, 0, 0.5);
}

.timer.timer-critical {
  color: #ff4757;
  text-shadow: 0 0 15px rgba(255, 71, 87, 0.8);
}

/* Progress Bar */
.timer-progress {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timer-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #81C784);
  border-radius: 10px;
  transition: width 1s ease, background-color 0.5s ease;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* Game Controls */
.game-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.control-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.control-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.control-btn.paused {
  background: linear-gradient(135deg, #4CAF50, #81C784);
  animation: pulse 1.5s infinite;
}

/* Flash Animation */
@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Pulse Animation for Pause Button */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  }
  50% {
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.6);
    transform: scale(1.05);
  }
}

/* Responsive Design */
@media (max-width: 600px) {
  .timer-container {
    margin: 10px;
    padding: 15px;
  }
  
  .timer {
    font-size: 1.2rem;
  }
  
  .control-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}
