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

:root {
  --bg: #f7f7f7;
  --fg: #535353;
  --muted: #8a8a8a;
  --btn-bg: #e9e9e9;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background-color 0.6s ease, color 0.6s ease;
  -webkit-user-select: none;
  user-select: none;
}

body.night {
  --bg: #202124;
  --fg: #dcdcdc;
  --muted: #9aa0a6;
  --btn-bg: #303134;
}

.game-wrap {
  width: 100%;
  max-width: 832px;
  padding: 16px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mute-btn {
  border: 0;
  border-radius: 6px;
  padding: 6px 12px;
  background: var(--btn-bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.6s ease, color 0.6s ease;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 240;
  cursor: pointer;
  touch-action: manipulation;
  outline: none;
}

.help {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--btn-bg);
  color: var(--fg);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
}

/* Touch-Buttons nur auf Touch-Geräten */
.touch-controls {
  display: none;
  gap: 12px;
  margin-top: 12px;
}

.touch-controls button {
  flex: 1;
  padding: 18px 0;
  border: 0;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--fg);
  font-size: 1rem;
  font-weight: 600;
  touch-action: manipulation;
}

.touch-controls button:active {
  filter: brightness(0.9);
}

@media (pointer: coarse) {
  .touch-controls {
    display: flex;
  }
}
