.connect4__header {
  width: min(84vmin, 100%);
  margin: 1em auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.connect4__header h1 {
  margin: 0;
}

.connect4__controls {
  display: flex;
  gap: 0.5rem;
}

#output {
  height: auto;
  margin: 0;
  text-align: right;
}

.board {
  width: 84vmin;
  margin: auto;
  outline: 1px solid #ffffff;
}

.board .field {
  border: 1px solid #ffffff;
  width: 12vmin;
  height: 12vmin;
  float: left;
  display: block;
}

.board .field .piece {
  width: 10vmin;
  height: 10vmin;
  border-radius: 50%;
  margin: 1vmin;
}

.board .field .blue {
  background-color: #08174b;
}

.board .field .red {
  background-color: #5d1620;
}

.glow-red-text {
  animation: glow-red-text 1s ease-in-out infinite alternate;
}

@-webkit-keyframes glow-red-text {
  from {
    text-shadow: 0 0 10px #FFF, 0 0 20px #d5a8a8, 0 0 30px #652932, 0 0 40px #5D1620FF, 0 0 50px #5D1620FF, 0 0 60px #5D1620FF, 0 0 70px #5D1620FF;
  }

  to {
    text-shadow: 0 0 20px #fff, 0 0 30px #d4af37, 0 0 40px #d4af37, 0 0 50px #d4af37, 0 0 60px #d4af37, 0 0 70px #d4af37, 0 0 80px #d4af37;
  }
}

.board .field .glow-red {
  animation: glow-red 1s ease-in-out infinite alternate;
}

@-webkit-keyframes glow-red {
  from {
    box-shadow: 0 0 10px #FFF, 0 0 20px #FFF, 0 0 30px #5D1620FF, 0 0 40px #5D1620FF, 0 0 50px #5D1620FF, 0 0 60px #5D1620FF, 0 0 70px #5D1620FF;
  }

  to {
    box-shadow: 0 0 20px #fff, 0 0 30px #d4af37, 0 0 40px #d4af37, 0 0 50px #d4af37, 0 0 60px #d4af37, 0 0 70px #d4af37, 0 0 80px #d4af37;
  }
}

.glow-blue-text {
  animation: glow-blue-text 1s ease-in-out infinite alternate;
}

@-webkit-keyframes glow-blue-text {
  from {
    text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #08174BFF, 0 0 40px #08174BFF, 0 0 50px #08174BFF, 0 0 60px #08174BFF, 0 0 70px #08174BFF;
  }

  to {
    text-shadow: 0 0 20px #fff, 0 0 30px #d4af37, 0 0 40px #d4af37, 0 0 50px #d4af37, 0 0 60px #d4af37, 0 0 70px #d4af37, 0 0 80px #d4af37;
  }
}

.board .field .glow-blue {
  animation: glow-blue 1s ease-in-out infinite alternate;
}

@-webkit-keyframes glow-blue {
  from {
    box-shadow: 0 0 10px #FFF, 0 0 20px #fff, 0 0 30px #08174BFF, 0 0 40px #08174BFF, 0 0 50px #08174BFF, 0 0 60px #08174BFF, 0 0 70px #08174BFF;
  }

  to {
    box-shadow: 0 0 20px #fff, 0 0 30px #d4af37, 0 0 40px #d4af37, 0 0 50px #d4af37, 0 0 60px #d4af37, 0 0 70px #d4af37, 0 0 80px #d4af37;
  }
}

@media (max-width: 900px) {
  .connect4__header {
    width: 100%;
    grid-template-columns: 1fr auto;
    padding: 1rem;
  }

  #output {
    grid-column: 1 / -1;
    text-align: center;
  }
}
