* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-image: url("../img/win-bg.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
}

audio {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  opacity: 0;
}

.container {
  position: relative;
  width: 650px;
  height: 650px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container .spinBtn {
  position: absolute;
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  font-size: 24px;
  font-weight: 700;
  color: #333;
  border: 4px solid rgba(0, 0, 0, 0.75);
  cursor: pointer;
  user-select: none;
}

.container .spinBtn::before {
  content: "";
  position: absolute;
  top: -28px;
  width: 20px;
  height: 30px;
  background: #fff;
  clip-path: polygon(50% 0, 15% 100%, 85% 100%);
}

.container .wheel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #333;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 5px #333, 0 0 0 15px #fff, 0 0 0 18px #111;
  transition: transform 5s ease-in-out;
}

.container .wheel .number {
  position: absolute;
  width: 50%;
  height: 50%;
  background: var(--clr);
  transform-origin: bottom right;
  transform: rotate(calc(45deg * var(--i)));
  clip-path: polygon(0 0, 56% 0, 100% 100%, 0 56%);
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  cursor: pointer;
}
.container .wheel .number span {
  position: relative;
  left: 1rem;
  top: 1rem;
  transform: rotate(45deg);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 3px 5px 2px rgba(0, 0, 0, 0.15);
  width: 60%;
  text-align: center;
  margin-right: auto;
  margin-left: auto;
}

.congrats-overlay {
  position: fixed;
  z-index: 100;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: all 0.5s;
  background: linear-gradient(to bottom left, #ffffffb1, #ffffffc6),
    url("../img/win-bg.jpg");
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.congrats-overlay.shown {
  top: 0;
}

@media screen and (max-width: 767px) {
  .container {
    width: 500px;
    height: 500px;
  }
}

@media screen and (max-width: 576px) {
  .container {
    width: 400px;
    height: 400px;
  }
  .container .wheel .number span {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 500px) {
  .container {
    width: 320px;
    height: 320px;
  }
  .container .wheel .number span {
    font-size: 0.7rem;
    left: 0.5rem;
    top: 0.5rem;
  }
}

@media screen and (max-width: 370px) {
  .container {
    width: 300px;
    height: 300px;
  }
  .container .wheel .number span {
    font-size: 0.6rem;
    left: 0.5rem;
    top: 0.5rem;
  }
}
