* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Fredoka One', cursive;
}

body {
  overflow: hidden;
  background: #87CEEB;
}

#game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#game-container canvas {
  display: block;
}

/* ========== START SCREEN ========== */
#start-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 25%, #a8edea 50%, #fed6e3 75%, #ffd1ff 100%);
  background-size: 400% 400%;
  animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.title-wrapper {
  text-align: center;
  margin-bottom: 30px;
}

.title-wrapper h1 {
  font-size: 5rem;
  color: #fff;
  text-shadow:
    4px 4px 0 #ff6b6b,
    8px 8px 0 #feca57,
    12px 12px 0 #48dbfb;
  line-height: 1.1;
  animation: bounce 1s ease infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-15px); }
}

.subtitle {
  font-size: 1.5rem;
  color: #ff6b6b;
  margin-top: 15px;
  text-shadow: 2px 2px 0 #fff;
}

#play-btn {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  padding: 20px 60px;
  background: linear-gradient(45deg, #ff6b6b, #feca57);
  color: white;
  border: 6px solid #fff;
  border-radius: 50px;
  cursor: pointer;
  text-shadow: 3px 3px 0 #e55039;
  box-shadow: 0 8px 0 #e55039, 0 12px 20px rgba(0,0,0,0.2);
  transition: all 0.1s;
  animation: pulse 1.5s ease infinite;
}

#play-btn:hover {
  transform: scale(1.1);
}

#play-btn:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #e55039, 0 6px 10px rgba(0,0,0,0.2);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.controls-info {
  margin-top: 30px;
  text-align: center;
  background: rgba(255,255,255,0.7);
  padding: 20px 40px;
  border-radius: 25px;
  border: 4px solid #fff;
}

.controls-info p {
  font-size: 1.2rem;
  color: #555;
  margin: 8px 0;
}

/* ========== HUD ========== */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.player-stats {
  position: absolute;
  top: 15px;
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 2px 2px 0 #333;
  background: rgba(0,0,0,0.35);
  padding: 10px 20px;
  border-radius: 20px;
  line-height: 1.6;
}

.player-label {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.p1-side {
  left: 20px;
  border: 3px solid rgba(68,136,255,0.6);
}

.p2-side {
  right: 20px;
  border: 3px solid rgba(255,68,170,0.6);
}

#fire-btn {
  position: absolute;
  bottom: 30px;
  right: 30px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  padding: 15px 35px;
  background: linear-gradient(45deg, #ff4444, #ff8800);
  color: white;
  border: 4px solid #fff;
  border-radius: 30px;
  cursor: pointer;
  pointer-events: auto;
  text-shadow: 2px 2px 0 #aa0000;
  box-shadow: 0 5px 0 #cc3300;
  transition: all 0.1s;
}

#fire-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #cc3300;
}

#pew-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: #ff4444;
  text-shadow: 4px 4px 0 #feca57;
  animation: pewAnim 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes pewAnim {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
  100% { transform: translate(-50%, -80%) scale(2); opacity: 0; }
}

#fork-indicator {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 40px;
  pointer-events: none;
}

.fork-left, .fork-right {
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 2px 2px 0 #333;
  background: rgba(0,0,0,0.5);
  padding: 15px 25px;
  border-radius: 20px;
  border: 3px solid #fff;
  animation: forkPulse 1s ease infinite alternate;
}

.fork-left {
  background: rgba(255, 200, 0, 0.7);
}

.fork-right {
  background: rgba(100, 200, 255, 0.7);
}

@keyframes forkPulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
  .title-wrapper h1 {
    font-size: 3rem;
  }

  #play-btn {
    font-size: 2rem;
    padding: 15px 40px;
  }

  .controls-info p {
    font-size: 1rem;
  }

  .player-stats {
    font-size: 1rem;
    padding: 8px 14px;
  }

  .player-label {
    font-size: 1.1rem;
  }

  #fire-btn {
    font-size: 1.3rem;
    padding: 12px 25px;
    bottom: 15px;
    right: 15px;
  }
}
