html, body { background: #2b1b4a; }
#game { background: radial-gradient(circle at 50% 20%, #5b3c9a, #2b1b4a 70%); }

#hud { position: absolute; z-index: 10; top: 1.5vh; left: 3vw; right: 12vh; display: flex; gap: 2vh; justify-content: center;
  align-items: center; height: 8vh; pointer-events: none; }
#cue { font-size: 6vh; line-height: 1; min-width: 7vh; text-align: center; }
#cue.hand { animation: nudge .6s ease-in-out infinite alternate; }
@keyframes nudge { to { transform: translateY(-1vh); } }
#slots { display: flex; gap: 1.2vh; align-items: center; }
.slot { width: 4vh; height: 4vh; border-radius: 50%; background: #ffffff33; border: .4vh solid #ffffff66; }
.slot.on { border-color: transparent; animation: pop .45s; }
@keyframes pop { 40% { transform: scale(1.6); } }

#stage { position: absolute; left: 3vw; right: 3vw; top: 12vh; bottom: 10vh; display: flex; align-items: center; justify-content: center; }
#grid { display: grid; gap: 2vh; }
.pad { position: relative; border-radius: 12%; overflow: hidden; cursor: pointer; background: var(--c);
  box-shadow: inset 0 .8vh 0 #ffffff44, inset 0 -1vh 0 #00000033, 0 1.2vh 0 var(--d), 0 2vh 2vh #0006; transition: filter .15s, opacity .15s; }
.pad::before { content: ''; position: absolute; inset: 14%; border-radius: 50%; border: .8vh solid #ffffff66; background: #ffffff1f; }
.pad.hit { animation: hit .25s ease-out; }
@keyframes hit { 0% { transform: scale(.9); } 60% { transform: scale(1.05); filter: brightness(1.35); } 100% { transform: scale(1); } }
.pad.lit { filter: brightness(1.5) saturate(1.2); transform: scale(1.07); box-shadow: inset 0 .8vh 0 #ffffff66, 0 0 5vh 1vh var(--c), 0 2vh 2vh #0006; z-index: 2; }
.pad.hint { animation: hint .7s ease-in-out infinite alternate; z-index: 2; }
@keyframes hint { from { filter: brightness(1); transform: scale(1); } to { filter: brightness(1.6); transform: scale(1.08); box-shadow: 0 0 5vh 1.5vh #fff; } }
#grid.busy .pad:not(.lit) { opacity: .72; }
.ripple { position: absolute; left: 50%; top: 50%; width: 40%; height: 40%; margin: -20% 0 0 -20%; border-radius: 50%;
  border: .8vh solid #fff; pointer-events: none; animation: ripple .5s ease-out forwards; }
@keyframes ripple { to { transform: scale(3); opacity: 0; } }

/* mode picker */
#modes { display: flex; gap: 4vh; flex-wrap: wrap; justify-content: center; }
button.mode { width: 24vh; height: 24vh; border-radius: 4vh; border: none; color: #fff; font-family: inherit; cursor: pointer;
  background: #43a047; box-shadow: 0 1.2vh 0 #2e7d32, 0 2vh 2vh #0005; display: flex; flex-direction: column; align-items: center; justify-content: center; }
button.mode[data-mode="copy"] { background: #1e88e5; box-shadow: 0 1.2vh 0 #1565c0, 0 2vh 2vh #0005; }
button.mode[data-mode="simon"] { background: #8e24aa; box-shadow: 0 1.2vh 0 #6a1b9a, 0 2vh 2vh #0005; }
button.mode[data-mode="color"] { background: #fb8c00; box-shadow: 0 1.2vh 0 #e65100, 0 2vh 2vh #0005; }
button.mode span { font-size: 12vh; line-height: 1.1; }
button.mode small { font-size: 3vh; font-weight: 700; }
button.mode:active { transform: translateY(1vh); }

@media (max-aspect-ratio: 1/1) {
  #hud { top: 2vw; right: 18vw; height: 13vw; gap: 3vw; }
  #cue { font-size: 10vw; min-width: 11vw; }
  .slot { width: 6vw; height: 6vw; }
  #stage { top: 17vw; bottom: 19vw; }
  #grid { gap: 3vw; }
  #modes { gap: 5vw; }
  button.mode { width: 40vw; height: 36vw; border-radius: 6vw; }
  button.mode span { font-size: 17vw; } button.mode small { font-size: 4.5vw; }
}
