@font-face {
    font-family: comic;
    src: url(media/COMIC.woff);
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  font-family: comic;
  line-height: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(-45deg, #24c715, #fdf909, #d41818, #df0fa1, #760da3, #1828d4, #0ba7d2);
  background-size: 400% 400%;
  animation: gradientBG 60s ease infinite;
  color: #fff;
}
@keyframes gradientBG {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}
.app { text-align: center; max-width: 90vw; overflow-x: hidden; }

.wheel-container {
  display: none; justify-content: center; flex-wrap: wrap; gap: 1rem;
}
.wheel {
  width: 15vw; height: 15vw; min-width: 60px; min-height: 60px;
  max-width: 150px; max-height: 150px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease-in-out;
}
.wheel img { max-width: 100%; max-height: 100%; object-fit: contain; }
.spinning { animation: spin 0.1s linear infinite; }
@keyframes spin { 0% { transform: rotateX(0deg);} 100% { transform: rotateX(360deg);} }

.timer {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center;
  font-size: 35vw; font-weight: bold; font-family: sans-serif;
  color: white; pointer-events: none; opacity: 0;
  transition: opacity 3s ease-out; z-index: 0; mix-blend-mode: difference;
}
.timer.show { opacity: 1; }
.timer.hide { opacity: 0; transition: opacity 0.2s cubic-bezier(0.25, 0.1, 0.25, 1); }
.timer.blink { animation: blink 0.5s steps(2, start) 5; }
@keyframes blink { to { visibility: hidden; } }

/* Buttons */
.top-btn {
  position: fixed;
  appearance: none;
  top: 10px; 
  padding: 0.5rem 1rem;
  background: transparent; 
  border: none; 
  cursor: pointer; 
  z-index: 20;
  width: 50px;
  height: 50px;
}
.top-btn img{
    width: 30px;
    height: 30px;
}
#infoBtn { left: 10px; }
#settingsBtn { right: 10px; }

/* Modals */
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 15;
}
.modal-content {
  background: yellow; padding: 1.5rem; border-radius: 10px; border-color: black; max-width: 500px; color: black;
}
.modal-content h2 { margin-top: 0; text-align: center;}
.close { float: right; cursor: pointer; font-size: 1.2rem; }
.instrument-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.add-btn {
  text-align: center; margin-top: 1rem; background: green; border: 1px solid white; color: white;
  padding: 0.3rem 0.6rem; border-radius: 4px; cursor: pointer;
}
.tempo-toggle { margin-top: 1rem; }
.remove-btn {
  background-color: red;
  color: #fff;
}

/* Splash screen */
.splash {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  text-align: center;
  color: white;
  flex-direction: column;
  mix-blend-mode: difference;
}
.splash-logo {
    width: 80vw;
  max-width: 600px;
  margin-bottom: 1rem;
}
.splash h1 { font-size: 2rem; margin: 0.5rem 0; }
.splash p { font-size: 2vh;}
.splash.hidden { display: none; }

@media (max-width: 600px) {
  .wheel-container { flex-direction: column; align-items: center; }
  .wheel { width: 25vw; height: 25vw; max-width: 100px; max-height: 100px; }
}
