:root {
  --bg: #0b1020;
  --panel: rgba(20, 27, 45, 0.92);
  --panel-2: rgba(30, 38, 62, 0.96);
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef2ff;
  --muted: #b9c2e0;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, #1a2340 0%, #0b1020 48%, #060911 100%);
}

body {
  min-height: 100vh;
}

.app {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  padding: 14px;
}

.game-shell {
  display: grid;
  place-items: center;
  min-height: 0;
}

canvas {
  display: block;
  image-rendering: pixelated;
}

.controls {
  width: min(94vw, 430px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding-bottom: max(2px, env(safe-area-inset-bottom));
}

.ctrl-btn {
  appearance: none;
  border: 0;
  border-radius: 18px;
  height: 64px;
  font-size: 1.65rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 10px 22px rgba(0,0,0,0.24);
  transition: transform 0.06s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.ctrl-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 6px 14px rgba(0,0,0,0.22);
}

.ctrl-rotate {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
}

.ctrl-move {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
}

.ctrl-drop {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

@media (min-width: 700px) {
  .app {
    justify-content: center;
  }

  .controls {
  width: min(94vw, 500px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.restart-wrap {
  width: min(94vw, 500px);
  margin: 10px auto 0;
}

#restartBtn {
  width: 100%;
  height: 50px;

  font-size: 18px;
  font-family: monospace;

  border: none;
  border-radius: 0;

  background: #444;
  color: white;

  box-shadow:
    0 4px 0 #000,
    0 0 0 2px #000 inset;
}

#restartBtn:active {
  transform: translateY(4px);
  box-shadow:
    0 0 0 #000,
    0 0 0 2px #000 inset;
}

/* ===== Pixel Button ===== */

.ctrl-btn {
  border: none;
  border-radius: 0;              /* ❌ keine Rundungen */
  height: 64px;

  font-size: 22px;
  font-family: monospace;

  color: white;

  background: #2a2a2a;

  /* Pixel Shadow */
  box-shadow:
  0 4px 0 #000,
  0 8px 0 #111,
  0 0 0 2px #000 inset;

  cursor: pointer;
  user-select: none;

  image-rendering: pixelated;

  transition: none;
}

.ctrl-btn:hover {
  filter: brightness(1.2);
}

/* Farben je Funktion */

.ctrl-rotate {
  background: #8b5cf6;
}

.ctrl-move {
  background: #2563eb;
}

.ctrl-drop {
  background: #f59e0b;
}

/* Press Effekt */

.ctrl-btn:active {
  transform: translateY(4px);

  box-shadow:
    0 0 0 #000,
    0 0 0 2px #000 inset;
}

/* Desktop größer */

@media (min-width: 700px) {
  .ctrl-btn {
    height: 72px;
    font-size: 26px;
  }
}
}