* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Arial', sans-serif;
  background: linear-gradient(to bottom, #87CEEB 0%, #4682B4 100%);
  color: #fff;
  overflow: hidden;
  touch-action: none;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.hidden {
  display: none !important;
}

#menu h1 {
  font-size: 4rem;
  text-shadow: 4px 4px 0 #000;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 0 #000;
}

.instructions {
  background: rgba(0, 0, 0, 0.6);
  padding: 1.5rem 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  max-width: 600px;
  text-align: center;
}

.instructions h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.instructions p {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.touch-hint {
  font-size: 0.9rem;
  opacity: 0.8;
}

.big-btn {
  font-size: 2rem;
  padding: 1rem 2rem;
  background: #FFD700;
  color: #000;
  border: 4px solid #FFA500;
  border-radius: 15px;
  cursor: pointer;
  font-weight: bold;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.1s;
  font-family: inherit;
}

.big-btn:hover {
  transform: scale(1.05);
}

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

#game {
  padding: 0;
}

#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10;
  font-size: 1.2rem;
  text-shadow: 2px 2px 0 #000;
}

.player-hud {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.player-hud.left {
  align-items: flex-start;
}

.player-hud.right {
  align-items: flex-end;
}

.center-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.score {
  font-size: 1.5rem;
  font-weight: bold;
}

.status {
  font-size: 0.9rem;
  opacity: 0.8;
}

.round, .timer {
  font-weight: bold;
}

#canvas {
  width: 100%;
  height: 100vh;
  display: block;
}

#endScreen h1 {
  font-size: 3.5rem;
  text-shadow: 4px 4px 0 #000;
  margin-bottom: 2rem;
}

.final-scores {
  background: rgba(0, 0, 0, 0.6);
  padding: 2rem 3rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.final-scores div {
  margin: 0.5rem 0;
}

@media (max-width: 768px) {
  #menu h1 {
    font-size: 2.5rem;
  }
  
  .big-btn {
    font-size: 1.5rem;
    padding: 0.8rem 1.5rem;
  }
  
  .instructions {
    padding: 1rem;
    font-size: 0.9rem;
  }
  
  #hud {
    font-size: 1rem;
  }
  
  .score {
    font-size: 1.2rem;
  }
}
