* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0f1a12;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  touch-action: none;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.35);
  text-align: center;
}

.overlay.hidden { display: none; }

h1 {
  margin: 0;
  font-size: clamp(36px, 9vmin, 84px);
  letter-spacing: 2px;
  color: #c6ff6b;
  text-shadow: 0 4px 0 #2d4a12, 0 8px 18px rgba(0, 0, 0, 0.6);
}

#gameover h1 { color: #ff5252; text-shadow: 0 4px 0 #5a0d0d, 0 8px 18px rgba(0, 0, 0, 0.6); }

.sub { margin: 0; font-size: clamp(16px, 4vmin, 26px); }

#skins {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.skin {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px 8px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: clamp(13px, 3vmin, 18px);
  cursor: pointer;
}

.skin[hidden] { display: none; }

.skin canvas {
  position: static;
  transform: none;
  width: clamp(56px, 13vmin, 90px);
  height: clamp(75px, 17vmin, 120px);
}

.skin.selected {
  border-color: #c6ff6b;
  background: rgba(198, 255, 107, 0.25);
}

#play {
  margin-top: 6px;
  padding: 10px 42px;
  border: none;
  border-radius: 999px;
  background: #ffb300;
  color: #3a2300;
  font: inherit;
  font-weight: bold;
  font-size: clamp(20px, 5vmin, 32px);
  box-shadow: 0 5px 0 #a35f00;
  cursor: pointer;
}

#play:active { transform: translateY(3px); box-shadow: 0 2px 0 #a35f00; }

.small-btn {
  padding: 8px 28px;
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font: inherit;
  font-weight: bold;
  font-size: clamp(15px, 3.5vmin, 22px);
  cursor: pointer;
}

.exit-btn {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.exit-btn.hidden { display: none; }

.row { display: flex; gap: 16px; }

h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 7vmin, 56px);
  color: #c6ff6b;
  text-shadow: 0 3px 0 #2d4a12;
}

.slider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(420px, 100%);
  font-size: clamp(16px, 4vmin, 24px);
}

.slider-name { width: 5.5em; text-align: left; }
.slider input { flex: 1; accent-color: #ffb300; height: 28px; }
.slider-val { width: 2.5em; text-align: right; }

.info { margin: 0; font-size: clamp(16px, 4vmin, 26px); }
.info:empty { display: none; }

.hint { margin: 4px 0 0; font-size: clamp(12px, 2.8vmin, 17px); opacity: 0.85; }
.credit { margin: 4px 0 0; font-size: clamp(12px, 2.8vmin, 17px); opacity: 0.7; }
