@import url("https://fonts.googleapis.com/css2?family=Audiowide&family=Nunito:wght@500;700;800&family=Poppins:wght@400;600&display=swap");

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #160b35 0%, #03051a 100%);
  color: #e8e4ff;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.75rem 1rem;
}

.topbar {
  width: min(1600px, calc(100vw - 1.5rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.brand {
  font-family: "Audiowide", cursive;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 1rem;
}

.brand:hover {
  color: #fff;
}

h1 {
  font-family: "Nunito", sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  margin: 0 0 0.35rem;
  text-align: center;
}

.hint {
  margin: 0;
  color: #c4d0ff;
  font-size: 0.92rem;
}

.music-toggle {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  font: 600 0.85rem "Poppins", sans-serif;
  cursor: pointer;
}

.music-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.stage-wrap {
  position: relative;
  width: min(1600px, calc(100vw - 1.5rem));
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  background: #2b2c34;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #2b2c34;
  touch-action: none;
}

.hud {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.controls {
  width: min(1600px, calc(100vw - 1.5rem));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.controls button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 14px;
  padding: 0.95rem 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
}

.controls button:active,
.controls button.is-held {
  background: rgba(255, 255, 255, 0.22);
}
