body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #000;
    animation: changeBackground 10s infinite;
  }
  
  @keyframes changeBackground {
    0% { background-color: #f29559; }
    10% { background-color: #f2d492; }
    20% { background-color: #b8b08d; }
    30% { background-color: #344757; }
    40% { background-color: #202c39; }
    50% { background-color: #344757; }
    60% { background-color: #b8b08d; }
    70% { background-color: #f2d492; }
    80% { background-color: #f29559; }
    90% { background-color: #cc444b; }
    100% { background-color: #f29559; }
  }
  .grid-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 0;
    width: 100%;
    height: 0;
    padding-bottom: 40%; /* Ensures the grid container remains square */
    max-height: 40vh;
    max-width: 80vw;
  }
  .box {
    opacity: 0.8;
    background-color: #ccc;
    border: 1px solid #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease, width 0.3s ease, height 0.3s ease;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* This makes the box always square */
    box-sizing: border-box;
  }
  .box:hover {
    opacity: 0.75;
  }
  h1 {
    margin: 0;
    grid-column: 1;
    grid-row: 1;
    z-index: 1;
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    text-transform: uppercase;
    animation: glowing 2s ease-in-out infinite alternate;
    text-align: center;
  }
  @keyframes glowing {
    from {
      text-shadow: 0 0 20px #2d9da9;
    }
    to {
      text-shadow: 0 0 30px #34b3c1, 0 0 10px #4dbbc7;
    }
  }

.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 13rem;
  overflow: hidden;
  height: 3rem;
  background-size: 300% 300%;
  cursor: pointer;
  backdrop-filter: blur(1rem);
  border-radius: 5rem;
  transition: 0.5s;
  animation: gradient_301 5s ease infinite;
  border: double 4px transparent;
  background-image: linear-gradient(#212121, #212121),
    linear-gradient(
      137.48deg,
      #ffdb3b 10%,
      #fe53bb 45%,
      #8f51ea 67%,
      #0044ff 87%
    );
  background-origin: border-box;
  background-clip: content-box, border-box;
}

#container-stars {
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: 0.5s;
  backdrop-filter: blur(1rem);
  border-radius: 5rem;
}

strong {
  z-index: 2;
  font-family: "Avalors Personal Use";
  font-size: 12px;
  letter-spacing: 5px;
  color: #ffffff;
  text-shadow: 0 0 4px white;
}

#glow {
  position: absolute;
  display: flex;
  width: 12rem;
}

.circle {
  width: 100%;
  height: 30px;
  filter: blur(2rem);
  animation: pulse_3011 4s infinite;
  z-index: -1;
}

.circle:nth-of-type(1) {
  background: rgba(254, 83, 186, 0.636);
}

.circle:nth-of-type(2) {
  background: rgba(142, 81, 234, 0.704);
}

.btn:hover #container-stars {
  z-index: 1;
  background-color: #212121;
}

.btn:hover {
  transform: scale(1.1);
}

.btn:active {
  border: double 4px #fe53bb;
  background-origin: border-box;
  background-clip: content-box, border-box;
  animation: none;
}

.btn:active .circle {
  background: #fe53bb;
}

#stars {
  position: relative;
  background: transparent;
  width: 200rem;
  height: 200rem;
}

#stars::after {
  content: "";
  position: absolute;
  top: -10rem;
  left: -100rem;
  width: 100%;
  height: 100%;
  animation: animStarRotate 90s linear infinite;
}

#stars::after {
  background-image: radial-gradient(#d7d3d3 2px, transparent 5%);
  background-size: 50px 50px;
}

#stars::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 170%;
  height: 500%;
  animation: animStar 60s linear infinite;
}

#stars::before {
  background-image: radial-gradient(#cff7f9 2px, transparent 5%);
  background-size: 50px 50px;
  opacity: 0.5;
}

@keyframes animStar {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-135rem);
  }
}

@keyframes animStarRotate {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0);
  }
}

@keyframes gradient_301 {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes pulse_3011 {
  0% {
    transform: scale(0.75);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
  }

  100% {
    transform: scale(0.75);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}
@media (max-width: 768px) {
  body {
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
  }

  .grid-container {
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(4, 1fr);
    padding-bottom: 80%;
    max-height: 80vh;
    max-width: 90vw;
  }

  h1 {
    font-size: 1.5rem;
  }

  .btn {
    width: 10rem;
    height: 2.5rem;
  }

  strong {
    font-size: 10px;
  }

  #glow {
    width: 10rem;
  }
}