* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f172a;
  font-family: "Press Start 2P", "VT323", "Courier New", monospace;
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  background: #0b1021;
  touch-action: none; /* allow touch events without browser gestures */
}

.menu-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  z-index: 10;
  pointer-events: auto;
  image-rendering: pixelated;
}

.menu-overlay.hidden {
  display: none;
}

.menu-content {
  text-align: center;
  color: #f8fafc;
  padding: 12px 16px;
  min-width: 100px;
  background: repeating-linear-gradient(
    90deg,
    #3f2c1d 0,
    #3f2c1d 14px,
    #4b3523 14px,
    #4b3523 28px
  );
  border: 6px solid #1f2937;
  box-shadow:
    0 0 0 4px #9a6b3d,
    0 0 0 10px #0b0f1a,
    0 24px 0 0 rgba(0,0,0,0.35);
  border-radius: 10px;
}

.menu-title {
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: 2px;
  color: #fef3c7;
  text-shadow:
    4px 4px 0 #1e293b,
    0 0 24px rgba(255, 255, 255, 0.2);
}

.menu-subtitle {
  font-size: 16px;
  color: #cbd5e1;
  margin-top: 10px;
}

.menu-note {
  font-size: 13px;
  color: #e2e8f0;
  margin: 10px 0 18px;
  text-shadow: 1px 1px 0 #1f2937;
}

.menu-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.menu-btn {
  padding: 14px 18px;
  border: 4px solid #1f2937;
  border-radius: 4px;
  background: linear-gradient(180deg, #94a3b8 0%, #475569 100%);
  color: #0b1021;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 -4px 0 rgba(0,0,0,0.2),
    0 6px 0 #1e293b,
    0 12px 10px rgba(0,0,0,0.35);
  text-transform: uppercase;
  transition: transform 80ms ease, box-shadow 80ms ease;
}

.menu-btn.primary {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  color: #f8fafc;
}

.menu-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 -4px 0 rgba(0,0,0,0.25),
    0 8px 0 #0f172a,
    0 14px 14px rgba(0,0,0,0.4);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-size: 13px;
  background: rgba(15, 23, 42, 0.3);
  padding: 10px 12px;
  border: 3px solid #1f2937;
  border-radius: 4px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25);
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: #22c55e;
}

.menu-select {
  padding: 12px 14px;
  border-radius: 4px;
  border: 3px solid #1f2937;
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
  color: #0b1021;
  min-width: 160px;
  font-weight: 700;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.15);
}
