* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow: hidden;
  height: 100vh;
  cursor: crosshair;
  background: url("docs/images/1781.jpg") center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

.error-cross {
  position: absolute;
  width: clamp(15px, 2vw, 25px);
  height: clamp(15px, 2vw, 25px);
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 1;
  animation: fadeOut 1s forwards;
  z-index: 9999;
}

.error-cross::before,
.error-cross::after {
  content: "";
  position: absolute;
  background-color: red;
  border-radius: 2px;
}

.error-cross::before {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.error-cross::after {
  width: 100%;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
  }
  80% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(45deg) scale(0.8);
  }
}

.counter {
  position: absolute;
  top: 3vh;
  right: 5vw;
  font-size: clamp(2rem, 6vw, 6rem);
  font-weight: 800;
  font-family: "Orbitron", sans-serif;
  color: #f5f5f5;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
    0 0 40px rgba(255, 200, 50, 0.6), 0 0 60px rgba(255, 150, 0, 0.5);
  background: rgba(0, 0, 0, 0.5);
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: clamp(0.5rem, 1vw, 1rem) clamp(1rem, 2vw, 2rem);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2),
    0 0 20px rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  user-select: none;
}

.counter:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 200, 50, 0.8);
}

.counter.pulse {
  animation: pulse 0.2s ease;
}

.counter.specialPulse {
  animation: specialPulse 0.1s ease;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
      0 0 40px rgba(255, 200, 50, 0.6), 0 0 60px rgba(255, 150, 0, 0.5);
  }
  50% {
    transform: scale(1.15);
    text-shadow: 0 0 25px rgba(255, 255, 180, 1), 0 0 60px rgba(255, 200, 50, 1),
      0 0 80px rgba(255, 180, 0, 0.9);
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
      0 0 40px rgba(255, 200, 50, 0.6), 0 0 60px rgba(255, 150, 0, 0.5);
  }
}

@keyframes specialPulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 30px rgba(255, 255, 200, 1),
      0 0 60px rgba(255, 220, 100, 1), 0 0 100px rgba(255, 180, 0, 1),
      0 0 140px rgba(255, 140, 0, 0.8);
  }
  30% {
    transform: scale(1.3);
    text-shadow: 0 0 50px rgba(255, 255, 220, 1),
      0 0 100px rgba(255, 220, 100, 1), 0 0 160px rgba(255, 190, 0, 1),
      0 0 200px rgba(255, 150, 0, 0.9);
  }
  60% {
    transform: scale(1.15);
    text-shadow: 0 0 40px rgba(255, 250, 200, 0.9),
      0 0 80px rgba(255, 210, 100, 1), 0 0 120px rgba(255, 160, 0, 1),
      0 0 160px rgba(255, 100, 0, 0.7);
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
      0 0 40px rgba(255, 200, 50, 0.6), 0 0 60px rgba(255, 150, 0, 0.5);
  }
}

.instructions {
  position: absolute;
  top: 25vh;
  width: 70%;
  max-width: 90vw;
  text-align: center;
  background: rgba(0, 0, 0, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1),
    inset 0 0 30px rgba(255, 255, 255, 0.05);
  color: #ffffff;
  padding: 3vh 2vw;
  font-family: "Poppins", sans-serif;
  line-height: 1.5;
  backdrop-filter: blur(5px);
  z-index: 10;
  animation: slideInUp 0.8s ease forwards;
  opacity: 0;
  transition: opacity 0.5s ease-out, transform 0.5s ease;
}

.instructions.hidden {
  opacity: 0;
  transform: translateY(-50px);
  pointer-events: none;
  animation: none;
}

.instructions h4 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-bottom: 1vh;
  color: #ffd85c;
  text-shadow: 0 0 15px rgba(255, 215, 100, 0.8);
}

.instructions .setRules {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 5vh;
  margin-top: 3vh;
}

.instructions .setRules p {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: #f5f5f5;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.chooseGameMode {
  position: absolute;
  bottom: 15vh;
  display: flex;
  width: 90%;
  max-width: 900px;
  height: auto;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: clamp(1rem, 2vw, 2rem);
  font-family: "Poppins", sans-serif;
  background-color: rgba(0, 0, 0, 0.75);
  border-top: 2px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  transition: opacity 0.5s ease-out, transform 0.5s ease;
  animation: slideInUp 0.8s ease forwards;
  opacity: 0;
}

.chooseGameMode.hidden {
  transform: translateY(50px);
  pointer-events: none;
  opacity: 0;
  animation: none;
}

.buttons {
  z-index: 10;
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  bottom: 2vh;
  gap: clamp(1rem, 5vw, 5rem);
}

.button {
  position: relative;
  z-index: 6;
  display: inline-block;
  cursor: pointer;
  border-radius: 100em;
  background-color: rgba(0, 0, 0, 0.75);
  box-shadow: -0.15em -0.15em 0.15em -0.075em rgba(5, 5, 5, 0.25),
    0.0375em 0.0375em 0.0675em 0 rgba(5, 5, 5, 0.1);
  overflow: hidden;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform 0.2s ease;
}

.button::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: inherit;
  background: linear-gradient(
    -135deg,
    rgba(5, 5, 5, 0.5),
    transparent 20%,
    transparent 100%
  );
  filter: blur(0.0125em);
  opacity: 0.25;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.button .button-outer {
  position: relative;
  z-index: 1;
  border-radius: inherit;
  transition: box-shadow 300ms ease;
  will-change: box-shadow;
  box-shadow: 0 0.05em 0.05em -0.01em rgba(5, 5, 5, 1),
    0 0.01em 0.01em -0.01em rgba(5, 5, 5, 0.5),
    0.15em 0.3em 0.1em -0.01em rgba(5, 5, 5, 0.25);
  overflow: hidden;
}

.button:hover .button-outer {
  box-shadow: 0 0 0 0 rgba(5, 5, 5, 1), 0 0 0 0 rgba(5, 5, 5, 0.5),
    0 0 0 0 rgba(5, 5, 5, 0.25);
}

.button-inner {
  --inset: 0.035em;
  z-index: 1;
  border-radius: inherit;
  padding: 1em 1.5em;
  transition: box-shadow 300ms ease, clip-path 250ms ease,
    background-image 250ms ease, transform 250ms ease;
  will-change: box-shadow, clip-path, background-image, transform;
  overflow: clip;
  clip-path: inset(0 0 0 0 round 100em);
  box-shadow: 0 0 0 0 inset rgba(5, 5, 5, 0.1),
    -0.05em -0.05em 0.05em 0 inset rgba(5, 5, 5, 0.25),
    0 0 0 0 inset rgba(5, 5, 5, 0.1),
    0 0 0.05em 0.2em inset rgba(255, 255, 255, 0.25),
    0.025em 0.05em 0.1em 0 inset rgba(255, 255, 255, 1),
    0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
    -0.075em -0.25em 0.25em 0.1em inset rgba(5, 5, 5, 0.25);
}

.button:hover .button-inner {
  clip-path: inset(
    clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px)
      clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) round 100em
  );
  box-shadow: 0.1em 0.15em 0.05em 0 inset rgba(5, 5, 5, 0.75),
    -0.025em -0.03em 0.05em 0.025em inset rgba(5, 5, 5, 0.5),
    0.25em 0.25em 0.2em 0 inset rgba(5, 5, 5, 0.5),
    0 0 0.05em 0.5em inset rgba(255, 255, 255, 0.15),
    0 0 0 0 inset rgba(255, 255, 255, 1),
    0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
    -0.075em -0.12em 0.2em 0.1em inset rgba(5, 5, 5, 0.25);
}

.button-inner span {
  z-index: 4;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.05em;
  font-weight: 500;
  color: rgba(0, 0, 0, 0);
  background-image: linear-gradient(
    135deg,
    rgba(25, 25, 25, 1),
    rgba(75, 75, 75, 1)
  );
  -webkit-background-clip: text;
  background-clip: text;
  transition: transform 250ms ease;
  display: block;
  will-change: transform;
  text-shadow: rgba(0, 0, 0, 0.1) 0 0 0.1em;
  user-select: none;
}

.button:hover .button-inner span {
  transform: scale(0.975);
}

.button:active .button-inner {
  transform: scale(0.975);
}

.button.active .button-inner {
  transform: scale(0.95);
  clip-path: inset(
    clamp(1px, 0.05em, 2px) clamp(1px, 0.05em, 2px) clamp(1px, 0.05em, 2px)
      clamp(1px, 0.05em, 2px) round 100em
  );
  box-shadow: 0.15em 0.15em 0.05em 0 inset rgba(5, 5, 5, 0.85),
    -0.05em -0.05em 0.1em 0.025em inset rgba(5, 5, 5, 0.6),
    0.25em 0.25em 0.2em 0 inset rgba(5, 5, 5, 0.6),
    0 0 0.05em 0.5em inset rgba(255, 255, 255, 0.1),
    0 0 0 0 inset rgba(255, 255, 255, 1),
    0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
    -0.075em -0.12em 0.2em 0.1em inset rgba(5, 5, 5, 0.25);
  filter: brightness(0.85);
}

.button.active .button-inner span {
  transform: scale(0.95);
  background-image: linear-gradient(
    135deg,
    rgba(0, 0, 0, 1),
    rgba(40, 40, 40, 1)
  );
}

#B1 {
  background-image: linear-gradient(
    135deg,
    rgb(100, 220, 100),
    rgb(150, 255, 150)
  );
}

#B2 {
  background-image: linear-gradient(135deg, rgb(255, 215, 0), rgb(255, 165, 0));
}

#B3 {
  background-image: linear-gradient(135deg, rgb(220, 20, 60), rgb(255, 80, 80));
}

/* media queries  */

@media (max-width: 768px) {
  .counter {
    font-size: clamp(1.5rem, 10vw, 4rem);
    padding: 0.5rem 1rem;
  }

  .instructions {
    top: 15vh;
    padding: 2vh 2vw;
  }

  .instructions h4 {
    font-size: clamp(1rem, 4vw, 1.2rem);
  }

  .instructions .setRules p {
    font-size: clamp(0.5rem, 2.5vw, 0.8rem);
  }

  .chooseGameMode {
    flex-direction: column;
    bottom: 12vh;
    font-size: clamp(0.9rem, 4vw, 1.5rem);
  }

  .button-inner {
    padding: 0.75em 1em;
  }

  .button-inner span {
    font-size: clamp(0.8rem, 2vw, 1rem);
  }

  .buttons {
    gap: clamp(0.5rem, 3vw, 3rem);
  }
}

@media (max-width: 480px) {
  .counter {
    font-size: clamp(1rem, 12vw, 3rem);
    padding: 0.3rem 0.5rem;
  }

  .instructions {
    top: 10vh;
    padding: 1.5vh 2vw;
    max-width: 70%;
  }

  .instructions h4 {
    font-size: clamp(1rem, 4vw, 1.2rem);
  }

  .instructions .setRules p {
    font-size: clamp(0.5rem, 2.5vw, 0.8rem);
  }

  .chooseGameMode {
    font-size: clamp(0.8rem, 5vw, 1.2rem);
    bottom: 12vh;
  }

  .button-inner {
    padding: 0.5em 0.8em;
  }

  .button-inner span {
    font-size: clamp(0.7rem, 3vw, 0.9rem);
  }

  .buttons {
    gap: clamp(0.3rem, 5vw, 2rem);
  }
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.bubble {
  z-index: 5;
  position: absolute;
  border-radius: 300px;
  background: #d40505;
  opacity: 1;
  animation: colorFade 3s linear forwards infinite;
}

@keyframes colorFade {
  from {
    filter: hue-rotate(0deg);
    opacity: 1;
  }
  to {
    opacity: 1;
    filter: hue-rotate(360deg);
  }
}

.specialBubble {
  position: absolute;
  border-radius: 300px;
  --glow-color: rgb(214, 168, 52);
  --glow-spread-color: rgb(172, 127, 13);
  --btn-color: rgb(227, 178, 53);
  color: var(--glow-color);
  background-color: var(--btn-color);
  box-shadow: 0 0 1em 0.25em var(--glow-color),
    0 0 4em 1em var(--glow-spread-color),
    inset 0 0 0.75em 0.25em var(--glow-color);
}

/* Easy, Medium, Hard */
.easyBubble,
.mediumBubble,
.hardBubble {
  border-radius: 300px;
  background: #d40505;
  opacity: 1;
}

.specialEasyBubble,
.specialMediumBubble,
.specialHardBubble {
  border-radius: 300px;
  background: rgb(227, 178, 53);
  opacity: 1;
}
