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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a5276;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

/* ── Mode selector bar ─────────────────────────────────────────────────────── */

#mode-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 20;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 72px;
  padding: 6px 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-family: 'Fredoka One', sans-serif;
  touch-action: manipulation;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mode-btn .mode-icon {
  font-size: 16px;
  line-height: 1;
}

.mode-btn .mode-label {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.03em;
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.92);
  border-color: #ffffff;
  color: #333;
}

.mode-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ── Game canvas ───────────────────────────────────────────────────────────── */

#gameCanvas {
  position: fixed;
  top: 58px;   /* sits directly below the mode bar */
  left: 0;
  display: block;
  touch-action: none;
}

/* ── Icons8 attribution ────────────────────────────────────────────────────── */

#attribution {
  position: fixed;
  bottom: 4px;
  right: 6px;
  font-size: 9px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  pointer-events: auto;
  z-index: 10;
  font-family: sans-serif;
}
#attribution:hover { color: rgba(255,255,255,0.8); }
