* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #0a0a1a;
  color: #e8f6ff;
  touch-action: none;
  overscroll-behavior: none;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #16213e 0%, #0f3460 55%, #1a1a2e 100%);
}

.hidden {
  display: none !important;
}

/* HUD */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  pointer-events: none;
  font-size: 1rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#touch-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  touch-action: none;
}

/* Overlays */
#overlay-start,
#overlay-win,
#overlay-lose {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: rgba(8, 10, 24, 0.82);
  padding: 20px;
  z-index: 10;
}

#overlay-start img {
  width: 90px;
  height: 90px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.6));
}

#overlay-start h1,
#overlay-win h1,
#overlay-lose h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #00d4ff;
}

#overlay-start p,
#overlay-win p,
#overlay-lose p {
  max-width: 420px;
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.5;
}

.hint {
  opacity: 0.75;
  font-size: 0.85rem !important;
}

button {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 12px 40px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #00d4ff, #ffd700);
  color: #0a0a1a;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 212, 255, 0.35);
  min-width: 160px;
  max-width: 90vw;
}

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