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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050914;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: #cfe6ff;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 14px;
  pointer-events: none;
  z-index: 5;
}

#planet-name {
  font-size: 12px;
  letter-spacing: 3px;
  opacity: 0.85;
  margin-bottom: 5px;
}

#shield-bar {
  width: 130px;
  height: 7px;
  border-radius: 4px;
  background: rgba(120, 170, 255, 0.15);
  border: 1px solid rgba(120, 170, 255, 0.35);
  overflow: hidden;
}

#shield-fill {
  height: 100%;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #35d0ff, #7af0c9);
  transition: width 0.25s ease;
}

#hud-right {
  text-align: right;
  margin-right: 52px;
}

#score {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(80, 180, 255, 0.7);
}

#lives { font-size: 13px; letter-spacing: 3px; color: #8fd4ff; }

#btn-pause {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(140, 190, 255, 0.4);
  background: rgba(20, 40, 80, 0.45);
  color: #cfe6ff;
  font-size: 13px;
  font-weight: 700;
  pointer-events: auto;
  cursor: pointer;
}

/* ---------- Overlays ---------- */
#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: radial-gradient(ellipse at center, rgba(8, 16, 40, 0.55), rgba(4, 8, 20, 0.88));
  backdrop-filter: blur(2px);
}

#overlay.hidden { display: none !important; }

.panel {
  text-align: center;
  padding: 28px 22px;
  max-width: 480px;
  width: 90%;
  animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: clamp(34px, 9vw, 56px);
  font-weight: 800;
  letter-spacing: 6px;
  color: #eaf6ff;
  text-shadow: 0 0 26px rgba(70, 170, 255, 0.9), 0 0 60px rgba(70, 170, 255, 0.4);
}

h1 span { color: #35d0ff; }

h2 {
  font-size: clamp(24px, 6vw, 36px);
  letter-spacing: 5px;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(70, 170, 255, 0.8);
  margin-bottom: 12px;
}

.tagline {
  margin: 18px 0 26px;
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.85;
}

.controls-hint {
  margin-top: 24px;
  font-size: 12px;
  line-height: 1.8;
  opacity: 0.6;
}

#li-planet-dot {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 14px auto;
}

#li-desc, #lc-stats, #go-stats {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.85;
  margin-bottom: 22px;
  white-space: pre-line;
}

.big-btn {
  display: block;
  margin: 10px auto;
  padding: 14px 46px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #04101f;
  background: linear-gradient(135deg, #35d0ff, #7af0c9);
  border: none;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(53, 208, 255, 0.55);
  transition: transform 0.12s ease;
}

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

.small-btn {
  display: block;
  margin: 14px auto 0;
  padding: 9px 26px;
  font-size: 13px;
  letter-spacing: 2px;
  color: #9fc8ef;
  background: transparent;
  border: 1px solid rgba(140, 190, 255, 0.4);
  border-radius: 30px;
  cursor: pointer;
}
