/* Orb Attack — Puzzle Bobble-style web game */

:root {
  --bg: #2c2825;
  --panel: #3d3630;
  --accent: #c47b5b;
  --text: #e8e4df;
  --highlight: #5c5248;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Fredoka", sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
}

.header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(233, 69, 96, 0.4);
}

.score-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 1rem;
  margin-top: 0.25rem;
}

.score-row strong {
  color: #fff;
}

.game-wrap {
  position: relative;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 3px var(--highlight);
}

#game {
  display: block;
  width: 100%;
  max-width: min(400px, 100vw - 1rem);
  height: auto;
  aspect-ratio: 400 / 560;
  background: linear-gradient(180deg, #3d3630 0%, #2c2825 50%, #252119 100%);
  cursor: crosshair;
  touch-action: none; /* claim all touch for game; no scroll/zoom on canvas */
}

.hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Overlay for level complete / game over */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.overlay.hidden {
  display: none;
}

.overlay-box {
  background: var(--panel);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  text-align: center;
  border: 2px solid var(--accent);
  max-width: 90%;
}

.overlay-box h2 {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 1.5rem;
}

.overlay-box p {
  margin: 0 0 1rem;
  opacity: 0.9;
}

.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}

.btn:hover, .btn:focus {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.5);
}

.btn:active {
  transform: scale(0.98);
}

@media (max-width: 420px) {
  .header h1 { font-size: 1.5rem; }
  .score-row { font-size: 0.9rem; gap: 1rem; }
}
