:root {
  --font-main: "apotek-variable", sans-serif;
}

body {
  color: white;
}

html,
body {
  font-family: var(--font-main);
}

canvas {
  max-width: 100%;
  max-height: 100%;

  min-width: 320px;
  min-height: 100dvh;
  width: 100%;
  height: 100%;
  outline: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.ui-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
}

.screen {
  width: 100%;
  height: 100dvh;

  /* we will use js to show/hide the screen */
  display: none;
  background-color: rgb(1, 1, 1, 0.8);
}

.screen.fade-in {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

#damage-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: white;
  text-shadow: 0 0 10px black;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
}

#damage-overlay.active {
  opacity: 1;
  pointer-events: none;
}

#damage-message {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  transform: scale(0);
}

#damage-overlay.active #damage-message {
  transform: scale(1);
  animation: damage-text-appear 1.2s ease-out;
}

.btn-pressed {
  transform: scale(0.9);
  transition: transform 0.1s;
}

#hud {
  opacity: 0;
  display: none;
  transition: opacity 0.5s ease;
}

@keyframes damage-blink {
  0% {
    opacity: 1;
    background-color: rgba(255, 0, 0, 0.7);
  }
  15% {
    opacity: 0.3;
    background-color: rgba(255, 0, 0, 0.2);
  }
  30% {
    opacity: 0.8;
    background-color: rgba(255, 0, 0, 0.6);
  }
  45% {
    opacity: 0.2;
    background-color: rgba(255, 0, 0, 0.1);
  }
  60% {
    opacity: 0.6;
    background-color: rgba(255, 0, 0, 0.4);
  }
  75% {
    opacity: 0.1;
    background-color: rgba(255, 0, 0, 0.05);
  }
  100% {
    opacity: 0;
    background-color: rgba(255, 0, 0, 0);
  }
}

@keyframes damage-text-appear {
  0% {
    transform: scale(0) rotate(-3deg);
    opacity: 0;
    filter: blur(2px);
  }
  15% {
    transform: scale(1) rotate(1deg);
    opacity: 1;
    filter: blur(0px);
    text-shadow:
      0 0 25px rgba(255, 255, 255, 1),
      0 0 35px rgba(255, 0, 0, 0.8),
      0 0 45px rgba(255, 100, 100, 0.6);
  }
  30% {
    transform: scale(0.85) rotate(-0.5deg);
    text-shadow:
      0 0 20px rgba(255, 255, 255, 0.8),
      0 0 30px rgba(255, 0, 0, 0.6),
      0 0 40px rgba(255, 100, 100, 0.4);
  }
  50% {
    transform: scale(1) rotate(0.3deg);
    text-shadow:
      0 0 15px rgba(255, 255, 255, 0.6),
      0 0 25px rgba(255, 0, 0, 0.5),
      0 0 35px rgba(255, 100, 100, 0.3);
  }
  70% {
    transform: scale(0.9) rotate(0deg);
    text-shadow:
      0 0 12px rgba(255, 255, 255, 0.4),
      0 0 20px rgba(255, 0, 0, 0.3),
      0 0 30px rgba(255, 100, 100, 0.2);
  }
  85% {
    transform: scale(1) rotate(0deg);
    text-shadow:
      0 0 8px rgba(255, 255, 255, 0.3),
      0 0 15px rgba(255, 0, 0, 0.2),
      0 0 25px rgba(255, 100, 100, 0.1);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0px);
    text-shadow:
      0 0 5px rgba(255, 255, 255, 0.2),
      0 0 10px rgba(255, 0, 0, 0.1);
  }
}

.striker-cookie-settings {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000 !important;
  background: transparent !important;
  outline: 0 !important;
  border: 0 !important;
  font-size: 16px !important;
  display: block !important;
}

.striker-cookie-settings.hidden {
  display: none !important;
}
