@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;500;700&display=swap');

/* ── Reset & body ─────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0a0a0f;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}

canvas {
  display: block;
  touch-action: none;
}

/* ── HUD (scores) ─────────────────────────────────────────────────── */
#hud {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 24px;
  z-index: 20;
  font-family: 'Orbitron', monospace;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
#hud.visible { opacity: 1; }

.connection-status {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
}
.connection-status.visible { display: inline-flex; }

.connection-status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5a5a66;
  box-shadow: 0 0 8px rgba(90,90,102,0.5);
}
.connection-status .dot.green {
  background: #33ff99;
  box-shadow: 0 0 10px rgba(51,255,153,0.65);
}
.connection-status .dot.yellow {
  background: #ffc832;
  box-shadow: 0 0 10px rgba(255,200,50,0.65);
}
.connection-status .dot.red {
  background: #ff4444;
  box-shadow: 0 0 10px rgba(255,68,68,0.65);
}
.connection-status .dot.offline {
  background: #5a5a66;
  box-shadow: none;
}

#network-warning {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 0.5px;
  background: rgba(255,68,68,0.12);
  border: 1px solid rgba(255,68,68,0.45);
  color: #ff9f9f;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
#network-warning.visible { opacity: 1; }

.score-box {
  text-align: center;
  padding: 6px 16px;
  border-radius: 8px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.1s;
}
.score-box.flash { transform: scale(1.15); }

.score-box .label {
  font-size: 10px;
  letter-spacing: 2px;
  opacity: 0.5;
  text-transform: uppercase;
}
.score-box .value {
  font-size: 26px;
  font-weight: 900;
}

.score-box.p0 .value { color: #ff3366; }
.score-box.p1 .value { color: #33ff99; }
.score-box.p2 .value { color: #3399ff; }

.score-box.eliminated { opacity: 0.3; }
.score-box.eliminated .value { text-decoration: line-through; }

/* ── Scoreboard (goals panel) ────────────────────────────────────── */
#scoreboard {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 100px;
}
#scoreboard.visible { opacity: 1; }

.sb-title {
  font: bold 11px Orbitron, monospace;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.sb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sb-row:last-child { border-bottom: none; }

.sb-name {
  font: bold 13px Orbitron, monospace;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-row.p0 .sb-name { color: #ff3366; }
.sb-row.p1 .sb-name { color: #33ff99; }
.sb-row.p2 .sb-name { color: #3399ff; }

.sb-goals {
  font: bold 22px Orbitron, monospace;
  color: #fff;
  margin-left: 16px;
  min-width: 24px;
  text-align: right;
}

/* ── Menu overlay ─────────────────────────────────────────────────── */
#menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.menu-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: auto;
  animation: fadeIn 0.2s ease-out;
}
.menu-screen.active { display: flex; }

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

/* ── Title screen ─────────────────────────────────────────────────── */
#screen-title .logo {
  font-family: 'Orbitron', monospace;
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #ff3366, #3399ff, #33ff99);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
#screen-title .subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 40px;
}
#screen-title .start-hint {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.version-tag {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

#debug-bot-controls {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.debug-label {
  font-size: 10px;
  color: rgba(255,200,50,0.5);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.debug-bot-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.menu-btn-debug {
  font-size: 11px;
  padding: 5px 12px;
  background: rgba(255,200,50,0.1);
  border-color: rgba(255,200,50,0.3);
}

.debug-bot-status {
  font-size: 11px;
  color: rgba(255,200,50,0.6);
  margin-top: 6px;
  margin-top: 24px;
}

/* ── Heading style shared across screens ─────────────────────────── */
#screen-difficulty h2,
#screen-mode h2,
#screen-online h2,
#screen-online-wait h2,
#screen-settings h2 {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 28px;
}

/* ── Menu buttons ────────────────────────────────────────────────── */
.menu-btn {
  display: block;
  width: 240px;
  padding: 12px 0;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 2px solid rgba(51,153,255,0.85);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #67b8ff;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn:active { transform: scale(0.96); }
.menu-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}
.menu-btn-secondary {
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.85);
}
.menu-btn-quit {
  border-color: rgba(255,68,68,0.35);
  color: rgba(255,68,68,0.6);
  margin-top: 12px;
  font-size: 12px;
}

/* ── Difficulty buttons ──────────────────────────────────────────── */
.diff-btn {
  display: block;
  width: 240px;
  padding: 14px 0;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 2px solid;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.diff-btn:active { transform: scale(0.96); }

.diff-btn.easy   { border-color: #33ff99; color: #33ff99; }
.diff-btn.medium { border-color: #ffc832; color: #ffc832; }
.diff-btn.hard   { border-color: #ff3366; color: #ff3366; }

.diff-btn .desc {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.5;
  letter-spacing: 0;
  margin-top: 2px;
}

/* ── Online form ─────────────────────────────────────────────────── */
.online-form {
  width: min(88vw, 260px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.online-form label {
  margin: 4px 0 6px;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  text-align: left;
}

.online-form input {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  text-transform: uppercase;
}

.online-form input::placeholder {
  color: rgba(255,255,255,0.35);
  text-transform: none;
}

.status-text {
  min-height: 18px;
  margin-top: 8px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
}

/* ── Waiting room ────────────────────────────────────────────────── */
.room-code {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  letter-spacing: 3px;
  margin-bottom: 2px;
  color: #67b8ff;
  cursor: pointer;
  transition: color 0.15s;
}
.room-code:hover { color: #99d1ff; }

.room-code-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 8px;
}

.menu-btn-invite {
  font-size: 12px;
  padding: 6px 16px;
  margin-bottom: 10px;
  background: rgba(103,184,255,0.15);
  border-color: rgba(103,184,255,0.4);
}

.wait-player-list {
  margin: 12px 0 20px;
  padding: 10px 14px;
  min-width: 230px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(0,0,0,0.35);
  font-size: 14px;
  line-height: 1.8;
  text-align: left;
}

.wait-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ai-pick-label {
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.ai-pick-btns {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.btn-start-ai {
  border-color: #33ff99;
  color: #33ff99;
  font-size: 0.85rem;
  padding: 6px 12px;
  min-width: 0;
}

/* ── Pest level picker ──────────────────────────────────────────── */
.pest-level-picker {
  margin: 14px 0 16px;
  text-align: center;
}

.pest-label {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
}

.pest-options {
  display: flex;
  gap: 0;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(68,255,136,0.25);
}

.pest-btn {
  padding: 7px 14px;
  border: none;
  background: rgba(0,0,0,0.45);
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  border-right: 1px solid rgba(68,255,136,0.15);
}
.pest-btn:last-child { border-right: none; }

.pest-btn:hover {
  background: rgba(68,255,136,0.08);
  color: rgba(255,255,255,0.7);
}

#wait-pest-picker .pest-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pest-btn.active {
  background: rgba(68,255,136,0.18);
  color: #44ff88;
  text-shadow: 0 0 8px rgba(68,255,136,0.4);
}

.pest-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  margin-top: 5px;
}

/* ── Settings screen ─────────────────────────────────────────────── */
.settings-form {
  width: min(88vw, 260px);
  margin-bottom: 20px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.setting-row label {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
}

.setting-row input {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  width: 120px;
  text-align: right;
  text-transform: uppercase;
}

.toggle-btn {
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.45);
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.toggle-btn.on {
  color: #33ff99;
  border-color: rgba(51,255,153,0.5);
  background: rgba(51,255,153,0.1);
}
.toggle-btn.off {
  color: #ff4444;
  border-color: rgba(255,68,68,0.4);
  background: rgba(255,68,68,0.08);
}

/* ── Update button ──────────────────────────────────────────────── */
.menu-btn-update {
  border-color: rgba(255,200,50,0.5);
  color: #ffc832;
  font-size: 12px;
  margin-top: 12px;
}

/* ── Rematch status ──────────────────────────────────────────────── */
.rematch-status {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  min-height: 20px;
  margin-bottom: 16px;
}

/* ── Countdown ────────────────────────────────────────────────────── */
#countdown-display {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#countdown-display.active { display: flex; }

#countdown-display .num {
  font-family: 'Orbitron', monospace;
  font-size: clamp(60px, 15vw, 120px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 40px rgba(255,255,255,0.3);
  animation: countPop 0.6s ease-out forwards;
}

@keyframes countPop {
  0%   { transform: scale(1.6); opacity: 1; }
  100% { transform: scale(1);   opacity: 0.2; }
}

/* ── Abandon countdown (AI-only phantom game) ────────────────────── */
#abandon-countdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 55;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  font-family: 'Orbitron', monospace;
}
#abandon-countdown.visible { opacity: 1; }

.abandon-label {
  font-size: clamp(14px, 3vw, 22px);
  font-weight: 700;
  color: rgba(255, 80, 80, 0.6);
  letter-spacing: 0.3em;
  margin-bottom: 4px;
}

.abandon-timer {
  font-size: clamp(80px, 20vw, 160px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.35);
  text-shadow: 0 0 40px rgba(255, 60, 60, 0.25);
  line-height: 1;
}

.abandon-sub {
  font-size: clamp(12px, 2.5vw, 18px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

/* ── Pause screen ────────────────────────────────────────────────── */
#screen-pause {
  background: rgba(0,0,0,0.75);
  position: fixed;
  inset: 0;
  z-index: 55;
  backdrop-filter: blur(6px);
}

#screen-pause h2 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 28px;
  color: rgba(255,255,255,0.8);
}

/* ── Set over (between sets) ──────────────────────────────────────── */
#screen-setover {
  background: rgba(0,0,0,0.75);
  position: fixed;
  inset: 0;
  z-index: 55;
  backdrop-filter: blur(6px);
}

#screen-setover h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
#screen-setover .winner-text {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ── Set scoreboard (tennis-style) ───────────────────────────────── */
.set-scoreboard {
  min-width: 200px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(0,0,0,0.5);
  overflow: hidden;
}

.set-sb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.35);
}

.set-sb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s;
}
.set-sb-row:last-child { border-bottom: none; }
.set-sb-row.set-winner {
  background: rgba(255,255,255,0.06);
}

.set-sb-name {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-sb-wins {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  min-width: 30px;
  text-align: center;
}

/* ── Game over ────────────────────────────────────────────────────── */
#screen-gameover {
  background: rgba(0,0,0,0.75);
  position: fixed;
  inset: 0;
  z-index: 55;
  backdrop-filter: blur(6px);
}

#screen-gameover h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
#screen-gameover .winner-text {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
#screen-gameover .scorer-table {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
#screen-setover .actions,
#screen-gameover .actions {
  display: flex;
  gap: 16px;
}
#screen-setover .actions button,
#screen-gameover .actions button {
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
#screen-setover .actions button:active,
#screen-gameover .actions button:active { transform: scale(0.95); }
#screen-setover .actions button:hover,
#screen-gameover .actions button:hover  { background: rgba(255,255,255,0.15); }
#screen-setover .actions button:disabled,
#screen-gameover .actions button:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* ── Toast notifications ─────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 8px 18px;
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-info {
  background: rgba(51,153,255,0.18);
  border: 1px solid rgba(51,153,255,0.4);
  color: #99ccff;
}
.toast-error {
  background: rgba(255,68,68,0.18);
  border: 1px solid rgba(255,68,68,0.4);
  color: #ff9f9f;
}
.toast-success {
  background: rgba(51,255,153,0.18);
  border: 1px solid rgba(51,255,153,0.4);
  color: #99ffcc;
}

/* ── Smash button (mobile) ────────────────────────────────────────── */
#smash-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255,200,50,0.4);
  background: rgba(255,200,50,0.12);
  color: #ffc832;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 30;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, box-shadow 0.2s;
}
#smash-btn:active { transform: scale(0.9); }
#smash-btn.available {
  border-color: #ffc832;
  background: rgba(255,200,50,0.25);
  box-shadow: 0 0 20px rgba(255,200,50,0.3);
  animation: smashPulse 0.8s ease-in-out infinite;
}

@keyframes smashPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255,200,50,0.2); }
  50%      { box-shadow: 0 0 28px rgba(255,200,50,0.5); }
}

/* ── Controls hint (desktop) ──────────────────────────────────────── */
#controls-hint {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  text-align: center;
}
#controls-hint.visible { opacity: 1; }

kbd {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
}

/* ── Mobile action buttons (music, restart) ──────────────────────── */
#mobile-actions {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 30;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}

.mobile-action-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-action-btn:active { transform: scale(0.88); }

.mobile-action-btn.music-off {
  color: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.1);
}

.mobile-quit-btn {
  border-color: rgba(255,68,68,0.35);
  color: rgba(255,68,68,0.6);
  font-size: 16px;
  font-weight: 700;
}
.mobile-quit-btn:active {
  background: rgba(255,68,68,0.15);
}

/* ── Mobile adjustments ───────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  #smash-btn.mobile-show { display: flex; align-items: center; justify-content: center; }
  #mobile-actions.mobile-show { display: flex; }
  #controls-hint { display: none; }
}
