body {
  text-align: center;
  background-color: #000;
}

#level-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 3rem;
  margin:  5%;
  color: #FEF2BF;
}

@media(max-width: 1428px){
  #level-title {
    margin-top: 80px;
  }
}

.container {
  display: block;
  width: 50%;
  margin: auto;

}

.btn {
  margin: 25px;
  display: inline-block;
  height: 200px;
  width: 200px;
  border: 10px solid black;
  border-radius: 20%;
}

.game-over {
  background-color: red;
  opacity: 0.8;
}

.red {
  background-color: red;
}

.green {
  background-color: green;
}

.blue {
  background-color: blue;
}

.yellow {
  background-color: yellow;
}

.pressed {
  box-shadow: 0 0 20px white;
  background-color: grey;
}

.button-container {
  position: fixed;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 10px;
}

.white {
  background: black;
  border: 2px solid white;
  color: white;
}

.btn-back {
  font-family: 'Press Start 2P', cursive;
  position:fixed;
  top: 20px;
  left: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 10px;
  font-size: 14px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  height: 20px;
  width: 100px;
}

.btn-rules {
  left: 160px;
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.popup-content {
  font-family: 'Press Start 2P', cursive;
  background-color: #222;
  color: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: white;
}

.close-btn:hover {
  color: red;
}

@keyframes pixelate {
  0% { transform: scale(1.02); filter: contrast(120%) brightness(110%); }
  50% { transform: scale(1.05); filter: contrast(90%) brightness(90%); } 
  100% { transform: scale(1.02); filter: contrast(120%) brightness(110%); } 
}

@keyframes scanline {
  0% { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

.btn-back:hover {
  animation: pixelate 0.2s infinite alternate;
  background-image: linear-gradient(
      rgba(255,255,255,0.1) 50%,
      rgba(0,0,0,0.1) 50%
  );
  background-size: 100% 4px;
  animation: scanline 0.5s linear infinite, pixelate 0.2s infinite alternate, glitchColor 0.2s infinite alternate;
}

@keyframes glitchColor {
  0% { text-shadow: -2px 0 red, 2px 0 cyan; }
  50% { text-shadow: 2px 0 red, -2px 0 cyan; }
  100% { text-shadow: -2px 0 red, 2px 0 cyan; }
}

/* Loading Screen Animation */

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 2rem;
  font-family: 'Press Start 2P', cursive;
  animation: glitch 1s infinite alternate;
  z-index: 9999;
  transition: opacity 1s ease-in-out;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-text {
  text-shadow: 
      -2px 0 red, 
      2px 0 cyan, 
      0 -2px yellow, 
      0 2px blue;
  animation: glitchLoad 1s infinite alternate;
}

@keyframes glitchLoad {
  0% {
      transform: translate(0);
  }
  25% {
      transform: translate(2px, -2px);
  }
  50% {
      transform: translate(-2px, 2px);
  }
  75% {
      transform: translate(2px, 2px);
  }
  100% {
      transform: translate(0);
  }
}








