* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.app-wapper {
  background-image: url('./assets/background-image.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 100vh;
}

.app-wapperContainer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.app-wapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #131515;
  opacity: 0.4;
}

.header {
  position: absolute;
  top: 10px;
  left: 40px;
  color: white;
  font-size: 52px;
  z-index: 50;
}

.container {
  width: 550px;
  height: 550px;
  background-color: #ccc;
  border-radius: 50%;
  border: 15px solid #dde;
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.wheel-item {
  height: 50%;
  width: 200px;
  position: absolute;
  clip-path: polygon(100% 0, 50% 100%, 0 0);
  transform: translateX(-50%);
  transform-origin: bottom;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: sans-serif;
  color: #fff;
  left: 160px;
  transition: all 500ms ease-in-out;
}

.wheel-item h3 {
  font-size: 16px;
  rotate: 90deg;
}

.wheel-item:nth-child(1) {
  background-color: #3f51b5;
  /* Indigo */
  display: flex;
  align-items: start;
  padding-top: 70px;
}

.wheel-item:nth-child(2) {
  background-color: #ff9800;
  /* Orange */
  display: flex;
  align-items: start;
  padding-top: 70px;
}

.wheel-item:nth-child(3) {
  background-color: #e91e63;
  /* Pink */
  display: flex;
  align-items: start;
  padding-top: 70px;
}

.wheel-item:nth-child(4) {
  background-color: #4caf50;
  /* Green */
  display: flex;
  align-items: start;
  padding-top: 70px;
}

.wheel-item:nth-child(5) {
  background-color: #009688;
  /* Teal */
  display: flex;
  align-items: start;
  padding-top: 70px;
}

.wheel-item:nth-child(6) {
  background-color: #795548;
  /* Brown */
  display: flex;
  align-items: start;
  padding-top: 70px;
}

.wheel-item:nth-child(7) {
  background-color: #9c27b0;
  /* Purple */
  display: flex;
  align-items: start;
  padding-top: 70px;
}

.wheel-item:nth-child(8) {
  background-color: #f44336;
  /* Red */
  display: flex;
  align-items: start;
  padding-top: 70px;
}

.wheel-item:nth-child(9) {
  background-color: #cddc39;
  /* Lime */
  display: flex;
  align-items: start;
  padding-top: 70px;
}

.wheel-item:nth-child(10) {
  background-color: #2196f3;
  /* Blue */
  display: flex;
  align-items: start;
  padding-top: 70px;
}



/* Continue with different colors for each child... */

#spin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background-color: #e2e2e2;
  text-transform: uppercase;
  border: 1px solid #fff;
  font-weight: bold;
  font-size: 20px;
  color: #a2a2a2;
  width: 80px;
  height: 80px;
  font-family: sans-serif;
  border-radius: 50%;
  cursor: pointer;
  outline: none;
  letter-spacing: 1px;
  transition: all 300ms ease-in-out;
  z-index: 50;
}

#spin:hover {
  background-color: #34495e;
  color: white;
  border: 1px solid #34495e;
}


/* New CSS class to highlight the selected wheel item */
.wheel-item.highlight {
  background-color: #0f0f0e;
  border: 2px solid #fff;
  transform: scale(1.23);
}

.arrow {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 80px;
  font-weight: bold;
}

/* Modal background */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

/* Modal content */
.modal-content {
  position: relative;
  background-color: #fefefe;
  padding: 10px 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  height: 250px;
  text-align: center;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The close button */
.close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #131515;
  float: right;
  font-size: 20px;
  font-weight: medium;
  border-radius: 50%;
  transition: all 500ms ease-in-out;
}

.close:hover,
.close:focus {
  text-decoration: none;
  cursor: pointer;
  color: white;
  background-color: #131515;
}

.resultModalContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.resultText {
  font-size: 28px;
  margin: 0;
  font-weight: 500;
}

.resultText span {
  font-weight: 800;
}


.contuineBtn {
  background-color: #131515;
  padding: 12px 24px;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .container {
    width: 450px;
    height: 450px;
  }

  .wheel-item {
    width: 140px;
    left: 140px;
  }

  .wheel-item h3 {
    font-size: 14px;
    rotate: 90deg;
  }

  .wheel-item:nth-child(1),
  .wheel-item:nth-child(2),
  .wheel-item:nth-child(3),
  .wheel-item:nth-child(4),
  .wheel-item:nth-child(5),
  .wheel-item:nth-child(6),
  .wheel-item:nth-child(7),
  .wheel-item:nth-child(8),
  .wheel-item:nth-child(9),
  .wheel-item:nth-child(10) {
    padding-top: 40px;
  }

  #spin {
    font-size: 14px;
    width: 70px;
    height: 70px;
  }

  .header {
    top: 10px;
    left: 30px;
    font-size: 48px;
  }

}

@media (max-width:640px) {
  .container {
    width: 350px;
    height: 350px;
  }

  .wheel-item {
    width: 120px;
    left: 100px;
  }

  .wheel-item h3 {
    font-size: 12px;
    rotate: 90deg;
  }

  .wheel-item:nth-child(1),
  .wheel-item:nth-child(2),
  .wheel-item:nth-child(3),
  .wheel-item:nth-child(4),
  .wheel-item:nth-child(5),
  .wheel-item:nth-child(6),
  .wheel-item:nth-child(7),
  .wheel-item:nth-child(8),
  .wheel-item:nth-child(9),
  .wheel-item:nth-child(10) {
    padding-top: 30px;
  }

  #spin {
    font-size: 12px;
    width: 60px;
    height: 60px;
  }

  .modal-content {
    height: 200px;
  }

  .resultModalContent {
    gap: 20px;
  }

  .resultText {
    font-size: 24px;
  }

  .contuineBtn {
    font-size: 14px;
  }

}

@media (max-width:480px) {
  .app-wapperContainer {
    height: 80%;
  }

}


@media (max-width:390px) {
  .container {
    width: 250px;
    height: 250px;
  }

  .wheel-item {
    width: 75px;
    left: 75px;
  }

  .wheel-item h3 {
    font-size: 10px;
  }

  .wheel-item:nth-child(1),
  .wheel-item:nth-child(2),
  .wheel-item:nth-child(3),
  .wheel-item:nth-child(4),
  .wheel-item:nth-child(5),
  .wheel-item:nth-child(6),
  .wheel-item:nth-child(7),
  .wheel-item:nth-child(8),
  .wheel-item:nth-child(9),
  .wheel-item:nth-child(10) {
    padding-top: 25px;
  }

  #spin {
    font-size: 10px;
    width: 50px;
    height: 50px;
  }

  .resultModalContent {
    gap: 10px;
  }

  .header {
    top: 5px;
  }

  .resultText {
    font-size: 20px;
  }

  .contuineBtn {
    font-size: 12px;
  }
}