:root {
  --bg: rgba(24, 24, 24, 1);
  --bg-rgb: 24, 24, 24;
  --primary-color: rgb(0, 191, 255); /* Neon Blue */
  --primary-rgb: 0, 191, 255;
  --secondary-color: rgb(255, 45, 234); /* Neon Pink */
  --secondary-rgb: 255, 0, 149;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--primary-color);
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  padding: 2rem;
  touch-action: manipulation;
}

.header {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: flex-end;
  text-align: center;
}
.title,
.subtitle {
  opacity: 0;
  margin: 0;
  font-size: 2.5rem;
}

.subtitle {
  font-size: 1.25rem;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.title {
  animation: fadeIn 1s forwards;
  animation-delay: 0.25s;
}
.subtitle {
  animation: fadeIn 1s forwards;
  animation-delay: 0.5s;
}

.description {
  font-size: 1.5rem;
  margin: 0;
  opacity: 0;
  animation: fadeIn 1s forwards;
  animation-delay: 1;
  margin-top: 3rem;
  margin-bottom: 1rem;
  text-align: center;
  max-width: 500px;
  min-height: 3rem;
}

.com {
  position: relative;
  display: inline-block;
  animation: swivel 4s forwards;
  animation-delay: 3s;
  transform-origin: bottom left;
  transform: rotate(0deg);
  left: -0.25rem;
  line-height: 1;
  transition: transform 0.5s ease-in-out;
}

@keyframes swivel {
  0% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(140deg);
  }
  20% {
    transform: rotate(40deg);
  }
  30% {
    transform: rotate(130deg);
  }
  40% {
    transform: rotate(50deg);
  }
  50% {
    transform: rotate(120deg);
  }
  60% {
    transform: rotate(60deg);
  }
  70% {
    transform: rotate(110deg);
  }
  80% {
    transform: rotate(80deg);
  }

  90% {
    transform: rotate(95deg);
  }

  100% {
    transform: rotate(90deg);
  }
}

.button-base {
  opacity: 0;
  padding: 2rem;
  background: var(--primary-color);
  border-radius: 50%;
  animation: hueRotate 30s linear infinite;
  transition: opacity 1000ms;
  pointer-events: none;
}

.button-base.show {
  opacity: 1;
  pointer-events: auto;
}

.button-wrapper {
  filter: hue-rotate(180deg);
}
.button-base:has(button:hover) {
  filter: brightness(1.1);
}
.button-base:has(button:active) {
  filter: brightness(0.9);
}

.button {
  border: none;
  outline: none;
  position: relative;
  display: flex;
  padding: 2rem;
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--bg);
  background: rgba(var(--primary-rgb), 0.75);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 225ms ease-in-out;
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 200px;
  aspect-ratio: 1;
  font-family: 'Permanent Marker', cursive;

  opacity: 0;
  animation: fadeIn 8s forwards;
  animation-delay: 4.25s;
  line-height: 1.25;
  z-index: 1;

  box-shadow: 0 0 0.25rem 1px rgba(var(--bg-rgb), 0.5);
}

.button:hover,
.button:focus-visible {
  background: rgba(var(--primary-rgb), 1);
  box-shadow: 0 0 0.5rem 2px rgba(var(--bg-rgb), 0.8);
  transform: scale(1.02);
}

/* .button:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
} */

.button:active,
.button.pressed {
  box-shadow: 0 0 0.25rem 1px rgba(var(--bg-rgb), 0.5) !important;
  transform: scale(0.98) !important;
}

.score-wrapper {
  width: 250px;
  max-width: 100%;
  margin-top: 2rem;

  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  border-radius: 1em;
  gap: 0.5rem;
  line-height: 1;

  padding: 0.25rem 1rem;
  color: var(--bg);
  background-color: var(--secondary-color);

  transition: all 225ms ease-in-out;
  opacity: 0;
  animation: fadeIn 3s forwards;
  animation-delay: 7s;
  font-weight: 700;
}

#score {
  font-family: 'Audiowide', sans-serif;
  flex: 1;
  text-align: center;
}

.encouragement {
  position: absolute;
  user-select: none;
  opacity: 0;

  color: white;
  box-shadow: 0 0 0.5rem 2px var(--primary-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 1em;
  pointer-events: none;
}
.encouragement.show {
  opacity: 1;
  z-index: 100;
}

.encouragement-content {
  background: rgba(var(--secondary-rgb), 0.6);
  padding: 1rem;

  font-weight: 700;
  font-family: 'Audiowide', sans-serif;
  font-size: 1.25rem;
  max-width: 200px;
  text-align: center;
  pointer-events: none;
  margin: 0;
  border-radius: inherit;

  animation: hueRotate 3s linear infinite;
}
@keyframes hueRotate {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}
