* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #0b1020;
  color: #e8ecf8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Game pages: full-viewport canvas, no scrolling, no touch gestures stealing swipes. */
.game-body { overflow: hidden; }
#game {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  touch-action: none;
}

/* Menu */
.menu { max-width: 640px; margin: 0 auto; padding: 2.5rem 1rem; text-align: center; }
.menu h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.game-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.game-card {
  display: block;
  padding: 1.25rem;
  border-radius: 14px;
  background: #1a2140;
  color: #e8ecf8;
  text-decoration: none;
  font-size: 1.25rem;
  transition: background 0.15s;
}
.game-card:hover { background: #232c52; }
.game-card small { display: block; margin-top: 0.35rem; font-size: 0.85rem; color: #9aa6d4; }

/* In-game overlays (start screen, game over) + transient banner */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 10, 22, 0.72);
  backdrop-filter: blur(4px);
  z-index: 10;
}
.panel {
  text-align: center;
  padding: 1.75rem 1.5rem;
  border-radius: 20px;
  background: #161c38;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  max-width: 90vw;
}
.panel h1 { margin: 0 0 0.25rem; font-size: 1.7rem; }
.panel .sub { margin: 0 0 1.1rem; color: #9aa6d4; }
.skins { display: flex; gap: 0.6rem; justify-content: center; margin-bottom: 1.1rem; }
.swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  padding: 0;
}
.swatch.sel { border-color: #fff; transform: scale(1.12); }
.calm { display: block; margin-bottom: 1.2rem; color: #cdd5f4; cursor: pointer; user-select: none; }
.calm input { margin-right: 0.4rem; }
.btn {
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.7rem 2.2rem;
  border: none;
  border-radius: 12px;
  background: #34d399;
  color: #06281c;
  cursor: pointer;
}
.btn:hover { background: #6ee7b7; }
.banner {
  position: fixed;
  top: 14%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 9;
}
.hidden { display: none !important; }
