@font-face {
  font-family: "Yoshis Island";
  src: url("fonts/YoshisIsland.otf?v=15") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --ink: #ffffff;
  --line: #ffffff;
  --dim: #5a5a5a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Yoshis Island", "Courier New", "Lucida Console", monospace;
  -webkit-font-smoothing: none;
  overflow: hidden;
}

#app {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stage {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 12px;
  transform-origin: top center;
}

#board {
  background: #000;
  border: 3px solid var(--line);
  image-rendering: pixelated;
  touch-action: none;
}

#hud {
  width: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.logo {
  font-size: 30px;
  letter-spacing: 3px;
  line-height: 1;
  border-bottom: 3px solid var(--line);
  padding-bottom: 6px;
}
.logo span { display: block; color: #ffe000; }

.panel {
  border: 2px solid var(--line);
  padding: 6px 8px;
}
.panel .label {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--dim);
}
.panel .value {
  font-size: 26px;
  font-weight: bold;
  line-height: 1.1;
}

#next { display: none; }

.controls {
  border: 2px solid var(--line);
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.6;
  color: #bdbdbd;
}
.controls b { color: #fff; }

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
#overlay.show { display: flex; }

.modal {
  border: 3px solid var(--line);
  padding: 30px 34px;
  text-align: center;
  max-width: 420px;
  background: #000;
}
.modal-icon {
  display: block;
  width: 180px;
  height: auto;
  margin: 0 auto 16px;
  border: 3px solid var(--line);
  image-rendering: pixelated;
}
.modal h2 {
  font-size: 40px;
  letter-spacing: 6px;
  margin-bottom: 14px;
}
.modal .tag { color: #cfcfcf; line-height: 1.7; margin-bottom: 22px; }
.modal .hint { color: var(--dim); font-size: 12px; margin-top: 14px; }

button {
  font-family: inherit;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 3px;
  color: #000;
  background: #ffe000;
  border: 3px solid #fff;
  padding: 12px 34px;
  cursor: pointer;
}
button:hover { background: #fff; }
button:active { transform: translateY(2px); }

#musicBtn, #crtBtn, #muteBtn, #pauseBtn, #modeBtn {
  width: 100%;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 8px 6px;
  color: #fff;
  background: #111;
  border: 2px solid #fff;
  margin-top: 6px;
}
#musicBtn:hover, #crtBtn:hover, #muteBtn:hover, #pauseBtn:hover, #modeBtn:hover { background: #ffe000; color: #000; }
#crtBtn:disabled { color: #666; border-color: #444; cursor: default; }
#crtBtn:disabled:hover { background: #111; color: #666; }

.stat {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #808080;
  text-align: center;
}
#fpsInfo { color: #ffe000; }

.vol {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #cfcfcf;
}
.vol > span { display: block; margin-bottom: 4px; }
.vol b { color: #ffe000; font-weight: 700; }
.vol b.is-off { color: #666; }
.vol input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
.vol input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: #333;
  border: 2px solid #fff;
}
.vol input[type="range"]::-moz-range-track {
  height: 6px;
  background: #333;
  border: 2px solid #fff;
}
.vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 18px;
  margin-top: -8px;
  background: #ffe000;
  border: 2px solid #fff;
}
.vol input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 16px;
  border-radius: 0;
  background: #ffe000;
  border: 2px solid #fff;
}
.vol input[type="range"].is-off::-webkit-slider-thumb { background: #666; }
.vol input[type="range"].is-off::-moz-range-thumb { background: #666; }

#touch {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  gap: 6px;
  padding: 8px;
  z-index: 15;
}
#touch button {
  flex: 1;
  font-size: 20px;
  padding: 16px 0;
  letter-spacing: 1px;
  background: #111;
  color: #fff;
  border: 2px solid #fff;
}
#touch button:active { background: #ffe000; color: #000; }

@media (max-width: 760px) {
  #app { align-items: flex-start; }
  .controls { display: none; }
  #touch { display: flex; }
}
