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

body {
  overflow: hidden;
  background: #1a1a2e;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#game-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Start Screen */
#start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

#title-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 30px 40px;
  border-radius: 16px;
  backdrop-filter: blur(6px);
  max-width: 420px;
  width: 90%;
}

#title-overlay h1 {
  font-size: 2.2em;
  color: #ffd700;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
  margin-bottom: 4px;
  letter-spacing: 2px;
}

.subtitle {
  color: #a8e6a3;
  font-size: 1.1em;
  margin-bottom: 18px;
}

#controls-info {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.control-group {
  text-align: left;
  background: rgba(255,255,255,0.1);
  padding: 10px 14px;
  border-radius: 8px;
}

.control-group h3 {
  color: #ffd700;
  font-size: 0.85em;
  margin-bottom: 4px;
}

.control-group p {
  color: #ddd;
  font-size: 0.75em;
  line-height: 1.5;
}

button {
  padding: 14px 48px;
  font-size: 1.3em;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #2d8a4e, #1a5c32);
  border: 2px solid #ffd700;
  border-radius: 30px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: transform 0.15s, background 0.2s;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

button:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #35a05c, #237a40);
}

button:active {
  transform: scale(0.97);
}

/* Game Canvas */
#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* HUD */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
}

#hud-top {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}

#hud-top div {
  color: #fff;
  font-size: 1em;
  font-weight: bold;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

#hud-top span {
  color: #ffd700;
}

/* Game Over Screen */
#gameover-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

#gameover-box {
  text-align: center;
  background: rgba(20, 10, 5, 0.85);
  padding: 36px 48px;
  border-radius: 16px;
  border: 2px solid #ffd700;
  min-width: 280px;
}

#gameover-box h2 {
  color: #ff4444;
  font-size: 2.2em;
  margin-bottom: 16px;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}

#final-stats {
  margin-bottom: 22px;
}

#final-stats p {
  color: #ddd;
  font-size: 1.1em;
  margin-bottom: 6px;
}

#final-stats span {
  color: #ffd700;
  font-weight: bold;
}

.hidden {
  display: none !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
  #title-overlay {
    padding: 20px 24px;
  }
  #title-overlay h1 {
    font-size: 1.6em;
  }
  #controls-info {
    flex-direction: column;
    gap: 10px;
  }
  #hud-top {
    gap: 14px;
    font-size: 0.85em;
    padding: 8px 10px;
  }
  button {
    padding: 12px 36px;
    font-size: 1.1em;
  }
}
