@charset "UTF-8";
*,
*:before,
*:after {
  box-sizing: inherit;
  font-family: inherit;
  color: inherit;
  position: inherit;
}

*:focus {
  outline: 0.15rem dotted #ff6a13;
  outline-offset: 0.15rem;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "Baloo Chettan 2";
  margin: 0;
  min-height: 100vh;
  box-sizing: border-box;
  color: #53565a;
  font-size: 2rem;
  position: relative;
}

.red,
.yellow {
  text-transform: capitalize;
  margin-right: 0.1em;
}

.red {
  color: #e4002b;
}

.yellow {
  color: #ffd100;
}

button {
  cursor: pointer;
}

#game {
  width: 100%;
  padding: 1rem;
  margin: auto;
  min-height: 100vh;
}
@media (min-width: 40rem) {
  #game {
    max-width: 76vmin;
    padding: 0;
    padding-top: 10vmin;
    min-height: calc(100vh - 10vmin);
  }
}
#game .flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
#game .flex p {
  font-size: calc(1rem + 3vmin);
  margin: 0;
}
#game .flex button {
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 2px solid #a7a8aa;
}
#game .flex button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#game .flex button:not(:disabled):hover {
  filter: brightness(0.9);
}

#button-board {
  display: none;
  grid-template-columns: repeat(8, 1fr);
  grid-gap: 1.998vmin;
  padding: 3vmin 3vmin 0;
}
@media (min-width: 40rem) {
  #button-board {
    display: grid;
  }
}
#button-board [data-column] {
  position: relative;
}
#button-board button {
  padding: 3vmin 0;
  border: 0;
  text-align: center;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: transparent;
}
#button-board button span {
  height: 0;
  border-left: 1vmin solid transparent;
  border-right: 1vmin solid transparent;
  border-bottom: none;
  border-top: 1vmin solid #a7a8aa;
  text-align: center;
  pointer-events: none;
  display: block;
}
#button-board button span::after {
  content: "";
  width: 4vmin;
  height: 4vmin;
  border-radius: 4vmin;
  border: 3px solid #a7a8aa;
  left: -2vmin;
  top: -2.7vmin;
  display: block;
  position: absolute;
}
#button-board button:focus, #button-board button:hover {
  outline: none;
}
#button-board button:focus + .slot, #button-board button:hover + .slot {
  display: block;
  left: 0;
  z-index: 2;
  pointer-events: none;
  position: absolute;
  bottom: 0.999vmin;
}
#button-board button:focus + .slot:before, #button-board button:hover + .slot:before {
  content: "👇";
  position: absolute;
  font-size: calc(1rem + 3vmin);
  width: 90%;
  left: 0;
  top: -0.8em;
  text-align: center;
  z-index: 2;
}
#button-board button:focus + .slot div, #button-board button:hover + .slot div {
  -webkit-animation: none;
          animation: none;
  z-index: 1;
  box-shadow: -0.1rem -0.1rem 1px rgba(255, 255, 255, 0.2) inset;
}
#button-board button:focus + .slot div:before, #button-board button:hover + .slot div:before {
  box-shadow: -0.1rem -0.1rem 1px rgba(255, 255, 255, 0.2) inset, 0.2rem 0.2rem 0.3rem rgba(83, 86, 90, 0.2) inset;
}
#button-board .slot {
  position: absolute;
  top: 0;
  display: none;
}

#board {
  margin: auto;
  display: grid;
  grid-gap: 3vmin;
  grid-template-columns: repeat(8, 1fr);
  justify-content: center;
  overflow: hidden;
  border-radius: 0.25rem;
  padding: 3vmin;
  background: #7ba7bc;
  mix-blend-mode: multiply;
  box-shadow: 0.2rem 0.3rem 0.4rem rgba(83, 86, 90, 0.3), -0.25rem -0.25rem 0.25rem rgba(89, 144, 171, 0.5) inset, 0.25rem 0.25rem 0.25rem rgba(157, 190, 205, 0.8) inset;
}
@media (min-width: 40rem) {
  #board {
    grid-gap: 1.998vmin;
  }
}

.slot {
  width: 7.998vmin;
  height: 7.998vmin;
  background: #fff;
  border-radius: 7.998vmin;
  padding: 0;
  border: none;
  margin: auto;
}
@media (min-width: 40rem) {
  .slot {
    width: 6.999vmin;
    height: 6.999vmin;
  }
}
.slot.shadow {
  box-shadow: 0.15rem 0.15rem 1px rgba(174, 201, 214, 0.5), -0.15rem -0.15rem 1px rgba(79, 131, 156, 0.5), 0.2rem 0.2rem 0.2rem rgba(83, 86, 90, 0.3) inset;
}
.slot .red,
.slot .yellow {
  width: inherit;
  height: inherit;
  border-radius: inherit;
  border: none;
  pointer-events: none;
  box-shadow: -0.1rem -0.1rem 1px rgba(255, 255, 255, 0.2) inset, 0.1rem 0.1rem 1px rgba(83, 86, 90, 0.2) inset, 0.2rem 0.2rem 0.3rem rgba(83, 86, 90, 0.3) inset;
  position: relative;
  font-size: 4vmin;
  line-height: 7.2vmin;
  text-align: center;
  color: rgba(0, 0, 0, 0.4);
}
.slot .red.loser,
.slot .yellow.loser {
  filter: opacity(0.7) grayscale(60%) contrast(0.4);
}
.slot .red:before,
.slot .yellow:before {
  content: "";
  width: 70%;
  height: 70%;
  border-radius: inherit;
  box-shadow: inherit;
  left: 15%;
  top: 15%;
  position: absolute;
}
.slot .red {
  background: #e4002b;
}
.slot .yellow {
  background: #ffd100;
}

#winner-burst {
  transition: all 0.7s ease;
  width: 150vmax;
  height: 150vmax;
  border-radius: 75vmax;
  position: absolute;
  left: calc(50% - 75vmax);
  z-index: 3;
  top: calc(50% - 75vmax);
  transform-origin: center;
  transform: scale(0);
  pointer-events: none;
}
#winner-burst.red {
  background-color: #e4002b;
}
#winner-burst.yellow {
  background-color: #ffd100;
}
#winner-burst.burst {
  transform: scale(1);
  -webkit-animation: fadeOut 0.7s ease forwards;
          animation: fadeOut 0.7s ease forwards;
  -webkit-animation-delay: 0.7s;
          animation-delay: 0.7s;
}

@-webkit-keyframes drop {
  from {
    transform: translateY(-54vmin);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes drop {
  from {
    transform: translateY(-54vmin);
  }
  to {
    transform: translateY(0);
  }
}
@-webkit-keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}