:root {
  --primary-color: #8E24AA;
  --secondary-color: #4CAF50;
  --accent-color: #FFC107;
  --background-color: #F3E5F5;
  --target-color-1: #E91E63;
  --target-color-2: #2196F3;
  --target-color-3: #FF9800;
  --text-color: #333;
}

body {
  font-family: 'Comic Neue', 'Bubblegum Sans', cursive;
  background-color: var(--background-color);
  background-image: 
    linear-gradient(rgba(142, 36, 170, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 36, 170, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.game-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background-color: var(--background-color);
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.score, .level, .timer {
  font-size: 1.3rem;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background-color: white;
}

.score {
  color: var(--primary-color);
}

.level {
  color: var(--secondary-color);
}

.timer {
  color: var(--accent-color);
}

.game-board {
  width: 100%;
  height: 450px;
  background: linear-gradient(to bottom, #87CEEB, #B0E0E6);
  border-radius: 15px;
  position: relative;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: crosshair;
}

/* Scene elements */
.cloud {
  position: absolute;
  background-color: white;
  border-radius: 50%;
  opacity: 0.9;
  filter: blur(3px);
  z-index: 1;
}

.mountain {
  position: absolute;
  bottom: 0;
  width: 200px;
  height: 150px;
  background: linear-gradient(to top right, #8B4513, #A52A2A);
  clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
  z-index: 2;
}

.tree {
  position: absolute;
  bottom: 0;
  z-index: 3;
}

.tree-trunk {
  width: 20px;
  height: 50px;
  background-color: #8B4513;
  margin: 0 auto;
}

.tree-top {
  width: 60px;
  height: 80px;
  background-color: #228B22;
  border-radius: 50% 50% 10% 10%;
  margin: 0 auto;
  transform: translateX(-20px);
}

/* Target styles */
.target {
  position: absolute;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.1s;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.target::before {
  content: '';
  position: absolute;
  width: 70%;
  height: 70%;
  background-color: white;
  border-radius: 50%;
}

.target::after {
  content: '';
  position: absolute;
  width: 40%;
  height: 40%;
  background-color: var(--accent-color);
  border-radius: 50%;
}

.target-1 {
  background-color: var(--target-color-1);
  width: 60px;
  height: 60px;
}

.target-2 {
  background-color: var(--target-color-2);
  width: 50px;
  height: 50px;
}

.target-3 {
  background-color: var(--target-color-3);
  width: 40px;
  height: 40px;
  animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

.target.hit {
  animation: hit 0.5s forwards;
  pointer-events: none;
}

@keyframes hit {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  20% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* Bullet hole */
.bullet-hole {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #333;
  border-radius: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
}

/* Crosshair */
.crosshair {
  position: absolute;
  width: 40px;
  height: 40px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><circle cx="20" cy="20" r="18" fill="none" stroke="rgba(255,0,0,0.6)" stroke-width="2"/><line x1="20" y1="5" x2="20" y2="15" stroke="rgba(255,0,0,0.8)" stroke-width="2"/><line x1="20" y1="25" x2="20" y2="35" stroke="rgba(255,0,0,0.8)" stroke-width="2"/><line x1="5" y1="20" x2="15" y2="20" stroke="rgba(255,0,0,0.8)" stroke-width="2"/><line x1="25" y1="20" x2="35" y2="20" stroke="rgba(255,0,0,0.8)" stroke-width="2"/></svg>');
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

/* Muzzle flash */
.muzzle-flash {
  position: absolute;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, #FFF 10%, #FFC107 50%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 101;
  pointer-events: none;
  animation: flash 0.2s forwards;
}

@keyframes flash {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

/* Ammo display */
.ammo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  gap: 15px;
}

.ammo-label {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--text-color);
}

.ammo-count {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  padding: 8px 20px;
  background-color: #F5F5F5;
  border-radius: 15px;
  min-width: 40px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.reload-button {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 15px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.2s;
}

.reload-button:hover {
  background-color: #6A1B9A;
  transform: scale(1.05);
}

.reload-button:active {
  transform: scale(0.95);
}

.reload-button.disabled {
  background-color: #9E9E9E;
  cursor: not-allowed;
}

/* Game controls */
.game-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

#start-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#start-button:hover {
  background-color: #6A1B9A;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.sound-btn {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}

.sound-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Instructions */
.instructions {
  background-color: var(--background-color);
  padding: 15px;
  border-radius: 15px;
  margin-top: 20px;
}

.instructions h3 {
  color: var(--primary-color);
  margin-top: 0;
}

.instructions p {
  margin: 8px 0;
}

/* Score popup */
.score-popup {
  position: absolute;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 150;
  animation: float-up 1.5s forwards;
}

@keyframes float-up {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px);
  }
}

/* Level complete and game over overlays */
.level-complete, .game-over {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 200;
}

.level-complete.show, .game-over.show {
  opacity: 1;
  pointer-events: all;
}

.level-complete-text, .game-over-text {
  color: white;
  font-size: 3rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.final-score {
  color: var(--accent-color);
  font-size: 2rem;
  margin-bottom: 30px;
}

.score-breakdown {
  background-color: rgba(255,255,255,0.9);
  padding: 15px 25px;
  border-radius: 15px;
  margin: 20px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  min-width: 300px;
}

/* Confetti */
.confetti {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

/* Responsive styles */
@media (max-width: 768px) {
  .game-info {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .game-board {
    height: 350px;
  }
  
  .target-1 {
    width: 50px;
    height: 50px;
  }
  
  .target-2 {
    width: 40px;
    height: 40px;
  }
  
  .target-3 {
    width: 30px;
    height: 30px;
  }
} 