:root {
  --window-height: calc(100vh / 4);
  --icons-gap: 3.6rem;
  --icons-padding: calc(var(--icons-gap) / 2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  position: relative;
  background-color: #444;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  width: 100dvw;
  overflow: hidden;
}

ul {
  list-style: none;
}

.wrapper {
  height: 100%;
  width: 100%;
  background: url(../images/bg.webp);
  background-position: center;
  background-size: cover;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--icons-gap);
  padding: 9%;
}

.logo img {
  height: 2.7rem;
}

.outer-border {
  width: fit-content;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top,
.right,
.bottom,
.left {
  position: absolute;
  inset: -1.8rem;
}

.right {
  /* left: calc(100% + 1.8rem) - calc(calc(var(--icons-gap) / 3) / 2); */
  left: calc(100% + 0.9rem);
}

.bottom {
  top: calc(100% + 1.8rem);
}

.lights {
  display: flex;
  gap: 1rem;
}

.top .lights,
.bottom .lights {
  flex-direction: row;
}

.left .lights,
.right .lights {
  flex-direction: column;
}

.bulb {
  width: 0.45rem;
  height: 0.45rem;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 1);
  box-shadow: inset 0 0 0.18rem 0.18rem rgba(255, 207, 62, 0.45),
    0 0 0.18rem 0.18rem rgba(255, 207, 62, 0.9);
  border-radius: 100%;
}

.slots {
  position: relative;
  display: flex;
  align-items: center;
  background-clip: padding-box;
  border-radius: 0.45rem;
  box-shadow: 0 1.8rem 9rem rgba(0, 0, 0, 1);
  z-index: 1;
}

.slots:before {
  content: "";
  position: absolute;
  inset: -0.45rem;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(to top, #a50e16, #e8353e);
}

.retry {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: white;
  transform: translateY(100%);
  -webkit-transition: all 0.9s ease-in-out;
  -moz-transition: all 0.9s ease-in-out;
  -o-transition: all 0.9s ease-in-out;
  transition: all 0.9s ease-in-out;
  z-index: 9;
}

.retry h1 {
  color: #ce2d36;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.7rem;
  line-height: 1em;
  text-align: center;
}

.marker {
  position: absolute;
  height: 0.27rem;
  width: 100%;
  background-color: #ffd994;
  box-shadow: 0 0.3rem 0.9rem rgba(0, 0, 0, 0.45);
  z-index: 9;
}

.window {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 0.9rem;
  width: fit-content;
  height: var(--window-height);
  padding: 0 0.9rem;
  background-color: rgba(0, 0, 0, 1);
  box-shadow: inset 0 0 2.7rem rgba(152, 76, 0, 1);
}

.outer-col {
  aspect-ratio: 1;
  background-color: #eee;
  overflow: hidden;
  border-width: 0 0.45rem;
  border-style: solid;
  border-image: linear-gradient(
      to bottom,
      rgba(126, 0, 0, 1),
      rgba(152, 76, 0, 1),
      rgba(126, 0, 0, 1)
    )
    1 100%;
  box-shadow: inset 0 0 2.7rem rgba(0, 0, 0, 0.72);
}

.col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--icons-gap);
  padding: calc(var(--icons-padding) / 3);
  will-change: true;
  margin-top: 0.45rem;
}

.icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  /* margin-top: calc(var(--icons-padding) / 2); */
}

.slots.spinning .outer-col:nth-of-type(2) .col {
  animation-delay: 0.1s;
}

.slots.spinning .outer-col:nth-of-type(3) .col {
  animation-delay: 0.2s;
}

.slots.spinning .outer-col:nth-of-type(4) .col {
  animation-delay: 0.3s;
}

/*
.slots.spinning .outer-col:nth-of-type(5) .col {
  animation-delay: 0.4s;
}

.slots.spinning .outer-col:nth-of-type(6) .col {
  animation-delay: 0.5s;
}
*/

.slots.spinning .col {
  animation: scroll 3s cubic-bezier(0.5, 0, 0.5, 1) 1,
    blur 3s cubic-bezier(0.5, 0, 0.5, 1) 1;
  animation-fill-mode: forwards;
}

.icon.wiggle {
  animation: wiggle 0.4s linear infinite;
}

.bulb:nth-child(odd) {
  animation-name: alternate-yellow-glow;
  animation-duration: 1s;
  animation-iteration-count: infinite;
}

.bulb:nth-child(even) {
  animation-name: alternate-green-glow;
  animation-duration: 1s;
  animation-iteration-count: infinite;
}

.spin-btn img {
  height: 2.7rem;
  cursor: pointer;
  box-shadow: 0 1.8rem 9rem rgba(0, 0, 0, 1);
}

.splash {
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: end;
  justify-content: start;
  padding: 9% 3%;
  background: url(../images/splash.webp);
  background-position: center;
  background-size: cover;
  transform: translateX(0%);
  -webkit-transition: all 0.9s ease-in-out;
  -moz-transition: all 0.9s ease-in-out;
  -o-transition: all 0.9s ease-in-out;
  transition: all 0.9s ease-in-out;
  z-index: 99;
}

.start-btn img {
  height: 2.7rem;
  cursor: pointer;
  box-shadow: 0 0.9rem 2.7rem rgba(0, 0, 0, 0.9);
}

.winner {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  min-width: 100vw;
  background: url(../images/win-screen.webp);
  background-position: center;
  background-size: cover;
  transform: translateX(100%);
  -webkit-transition: all 0.9s ease-in-out;
  -moz-transition: all 0.9s ease-in-out;
  -o-transition: all 0.9s ease-in-out;
  transition: all 0.9s ease-in-out;
  z-index: 99;
}

@keyframes alternate-yellow-glow {
  0%,
  100% {
    background-color: rgba(255, 207, 62, 0.1);
  }
  50% {
    background-color: rgba(255, 207, 62, 1);
  }
}

@keyframes alternate-green-glow {
  50% {
    background-color: rgba(255, 207, 62, 0.1);
  }
  0%,
  100% {
    background-color: rgba(255, 207, 62, 1);
  }
}

@keyframes scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  90% {
    transform: translate3d(
      0,
      calc(-100% + var(--window-height) - var(--icons-padding) - 0.45rem ),
      0
    );
  }
  100% {
    transform: translate3d(0, calc(-100% + var(--window-height) - var(--icons-padding) + 0.9rem), 0);
  }
}

@keyframes blur {
  0% {
    filter: blur(0);
  }
  10% {
    filter: blur(0);
  }
  30% {
    filter: blur(9px);
  }
  60% {
    filter: blur(9px);
  }
  80% {
    filter: blur(0);
  }
}

@keyframes wiggle {
  0% {
    transform: rotate(9deg);
  }
  50% {
    transform: rotate(-9deg);
  }
  100% {
    transform: rotate(9deg);
  }
}
