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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f1419;
  font-family: "Nunito", "Avenir Next", sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

#playfield {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  padding: 0 16px 0;
}

#progress {
  height: 3px;
  margin: 0 -16px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

#progress-fill {
  width: 100%;
  height: 100%;
  background: rgba(255, 183, 217, 0.7);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

#hud-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 0;
}

#scores {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: #ffe8f4;
}

#current-score {
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
}

#best-score {
  font-weight: 700;
  font-size: 14px;
  color: rgba(255, 183, 217, 0.7);
}

#hud-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  color: rgba(255, 232, 244, 0.85);
}

#autoplay-toggle {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 232, 244, 0.75);
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

#autoplay-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

#autoplay-toggle[aria-pressed="true"] {
  background: rgba(255, 183, 217, 0.22);
  color: #ffe8f4;
}

#song-switcher,
#sound-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

#song-title,
#sound-label {
  font-weight: 700;
  font-size: 15px;
  min-width: 7ch;
  text-align: center;
}

#sound-label {
  min-width: 8ch;
  color: rgba(186, 230, 253, 0.9);
}

#sound-label[data-loading="true"] {
  opacity: 0.45;
}

#song-prev,
#song-next,
#sound-prev,
#sound-next {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 232, 244, 0.9);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

#song-prev:hover,
#song-next:hover,
#sound-prev:hover,
#sound-next:hover {
  background: rgba(255, 255, 255, 0.14);
}
