* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  overflow: hidden;
  background: #111122;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
  user-select: none;
  touch-action: none;
}
canvas {
  display: block;
  touch-action: none;
}

.panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.7);
  z-index: 10;
  backdrop-filter: blur(4px);
}
.panel-content {
  background: rgba(20,25,45,0.95);
  border: 2px solid #4a7c3f;
  border-radius: 16px;
  padding: 40px 50px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 0 40px rgba(74,124,63,0.3);
}
h1 {
  font-size: 2.2em;
  color: #6abf4a;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(106,191,74,0.5);
}
h2 {
  font-size: 1.5em;
  color: #6abf4a;
  margin-bottom: 15px;
}
button {
  background: #4a7c3f;
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
button:hover {
  background: #5a9c4f;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(74,124,63,0.5);
}
button:active { transform: scale(0.98); }
button:disabled {
  background: #444;
  cursor: not-allowed;
  opacity: 0.5;
}
.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.menu-buttons button {
  font-size: 1.2em;
  padding: 15px 30px;
}
.rocket-info {
  color: #8af;
  font-size: 0.9em;
  margin-bottom: 10px;
}

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: none;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.7), transparent);
  padding: 12px 20px;
  backdrop-filter: none;
  justify-content: flex-start;
  align-items: center;
}
.hud-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hud-top span {
  background: rgba(0,0,0,0.5);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.95em;
}
#hudHp { color: #4f4; }
#hudShield { color: #4cf; }
#hudWave { color: #ffa; }
#hudKills { color: #f88; }
.hud-powerup {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0,0,0,0.7);
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid #ffdd44;
  color: #ffdd44;
  font-size: 1.1em;
  font-weight: bold;
  z-index: 6;
}
#hudCoins { color: #fd4; }
#hudRocket { color: #8af; }

#shopItems {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 15px 0;
  max-height: 400px;
  overflow-y: auto;
}
.shop-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.shop-item-name {
  font-weight: bold;
  color: #6abf4a;
  margin-bottom: 4px;
}
.shop-item-desc {
  font-size: 0.85em;
  color: #aaa;
  margin-bottom: 8px;
}
.shop-item-level {
  font-size: 0.85em;
  color: #888;
  margin-bottom: 8px;
}
.shop-item-btn {
  font-size: 0.9em;
  padding: 6px 16px;
}
#shopContinueBtn { margin-top: 10px; }

.achievement-popup {
  position: fixed;
  top: 50px;
  right: 10px;
  width: 80px;
  background: none;
  border: none;
  padding: 2px 4px;
  z-index: 20;
  font-size: 0.6em;
  color: #fd4;
  text-align: right;
  pointer-events: none;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .panel-content { padding: 24px 20px; }
  h1 { font-size: 1.6em; }
  #shopItems { grid-template-columns: 1fr; }
  .hud { font-size: 0.8em; padding: 8px 10px; }
  .hud-top span { font-size: 0.8em; }
}
