:root {
  --pink: #cc6acf;
  --pink-light: #d09fd2;
  --blue: #61dafb;
  --purple: #4e00c2;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #212534; 
  color: #d8d8d8;
  text-align: center;
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  align-items: center;
  box-sizing: border-box;
  touch-action: none;
}

#titleAndSound {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

#soundButton {margin-top: 10px;}
#startButton {margin-top: 20px;}

h1 {
  color: #61dafb;
  text-shadow: -0.8px -0.8px 0 #693f76, 0.8px -0.8px 0 #693f76, -0.8px 0.8px 0 #693f76, 0.8px 0.8px 0 #693f76;
}

label {
  display: block;
  margin: 10px 0;
  font-size: 18px;
}

#seedInput {
  border-radius: 50px;
  width: 50px;
  text-align: center;
}
input[type="number"] {
  width: 100%;
  padding: 8px;
  font-size: 16px;
  margin-top: 5px;
}
input[type='range'] {
  accent-color: var(--pink);
  width: 80%;
  margin-top: 15px;
}

button {
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  background-color: var(--blue);
  color: #191c29;
  border-radius: 5px;
  border: 1px solid var(--pink);
}
button:hover {background-color: #4398cd;}

#message {margin-top: 20px;}

#gameArea {
  max-width: 480px;
  margin: 5px auto;
}

#gameAreaContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 20px;
}
  
#grid {
  display: grid;
  gap: 5px;
  justify-content: center;
  margin: 0;
  margin-left: 245px;
}
.grid-square {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #444;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.grid-square.active    {background-color: var(--pink);}
.grid-square.missed    {background-color: #5d305f;}
.grid-square.selected  {background-color: var(--blue);}
.grid-square.incorrect {background-color: #365d68;}
.grid-square.correct   {background-color: #72a275;}

#result {
  font-size: 24px;
  margin-top: 5px;
}
#result button {margin: 10px;}

/* Magic styles */
@property --rotate {
  syntax: "<angle>";
  initial-value: 132deg;
  inherits: false;
}

#parameters {
  background: #191c29;
  position: absolute;
  left: 35%;
  width: 30%;
  height: 60%;
  margin: 20px auto;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
}
#parameters::before {
  content: "";
  width: 104%;
  height: 102%;
  border-radius: 8px;
  background-image: linear-gradient(var(--rotate), #f75dff, #3c67e3 43%, #4e00c2);
  position: absolute;
  z-index: -1;
  top: -1%;
  left: -2%;
  animation: spin 2.5s linear infinite;
}
#parameters::after {
  position: absolute;
  content: "";
  top: 10%;
  left: 0;
  right: 0;
  z-index: -1;
  height: 100%;
  width: 100%;
  transform: scale(0.8);
  filter: blur(60px);
  background-image: linear-gradient(var(--rotate), #f75dff, #3c67e3 43%, #4e00c2);
  opacity: 1;
  transition: opacity .5s;
  animation: spin 2.5s linear infinite;
}

#statsDisplay {
  background: #191c29;
  width: 200px;
  height: 200px;
  border-radius: 6px;
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #d8d8d8;
  font-size: 18px;
  margin-left: 45px;
  margin-bottom: 35%;
  position: relative;
}
#statsDisplay::before {
  content: "";
  width: 104%;
  height: 102%;
  border-radius: 8px;
  background-image: linear-gradient(var(--rotate), #5ddcff, #3c67e3 43%, #4e00c2);
  position: absolute;
  z-index: -1;
  animation: spin 2.5s linear infinite;
}
#statsDisplay::after {
  position: absolute;
  content: "";
  top: 10%;
  left: 0;
  right: 0;
  z-index: -1;
  height: 100%;
  width: 100%;
  transform: scale(0.8);
  filter: blur(20px);
  background-image: linear-gradient(var(--rotate), #5ddcff, #3c67e3 43%, #4e00c2);
  opacity: 1;
  transition: opacity .5s;
  animation: spin 2.5s linear infinite;
}

@keyframes spin {
  0% {
    --rotate: 0deg;
  }
  100% {
    --rotate: 360deg;
  }
}

/* Star slider styles */
.star-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  margin: auto;
  }
.star-slider:focus {outline: none;}
.star-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: var(--pink);
  border-radius: 5px;
  cursor: pointer;  
}
.star-slider:hover::-webkit-slider-runnable-track {background: var(--pink-light);}
.star-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -11px;
  width: 30px;
  height: 30px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><polygon points="32,4 39,24 60,24 42,38 49,58 32,46 15,58 22,38 4,24 25,24" fill="%23d8d8d8"/></svg>') no-repeat center;
  background-size: contain;
  cursor: pointer;
  }
.star-slider {margin: 0;}