@import url('https://fonts.googleapis.com/css2?family=Akaya+Kanadaka&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background:  linear-gradient(to right, #0f2027, #203a43, #2c5364); 
    min-height: 100vh;
    display:flex;
    justify-content: center;
    align-items: center;
    font-family: 'Akaya Kanadaka', cursive;
}

.select-box{
    position:absolute;
    background: #ebf5fc;
    padding:25px;
    border-radius: 20px;
    box-shadow: 5px 5px 25px rgba(0, 0, 0,8);
    transition: 0.5s ease;
}

.select-box.hide{
    opacity: 0;
    transform: scale(0);
}

.play-board{
    position: absolute;
    opacity: 0;
    transform: scale(0);
    transition: 0.5s ease-in-out;
}

.play-board.show{
    opacity: 1;
    transform: scale(1);
}

.select-box header{
    text-align: center;
    font-size: 2em;
    margin-bottom:10px ;
    border-bottom: 2px solid #203a43;
}

.content .title{
    font-size: 1.2em;
    margin-bottom: 5px;
}

.content .options{
    display: flex;
    justify-content: space-evenly;
}

.content .options button{
cursor: pointer;
}


.content .options .player{
    font-size: 1em;
    width:40%;
    background:  linear-gradient(to right, #0f2027, #203a43, #2c5364); 
    border: none;
    border-radius: 10px;
    padding: 10px;
    color: #ebf5fc;
    box-shadow: 2px 2px 5px rgba(0, 0, 0,0.8);
    transition: 0.25s ease-in-out;
}

.content .options .player:hover{
    transform: scale(0.95);
}

.play-board .details{
    background: #ebf5fc;
    font-size: 2em;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0,0.8);
}

.play-board .details .players{
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    position: relative;
}

.play-board .details .players span{
    position: relative;
    z-index: 2;
    width: 100%;
    cursor:default;
    padding: 10px 5px;
    font-weight: 500;
    text-align: center;
    border-radius: 10px;
    user-select: none;
}

/* .players span.active{
    color: #ebf5fc;
    background:  linear-gradient(to right, #0f2027, #203a43, #2c5364); 
} */


.play-board section {
    display: flex;
}

.play-board section span{
    margin: 10px;
    display: block;
    height: 80px;
    width: 80px;
    background: #ebf5fc;
    border-radius: 10px;
    box-shadow: 5px 5px 5px rgba(0, 0, 0,8);

}

.play-area section span{
   font-size: 3em;
   padding: 10px;
   text-align: center;   
}

.result-box
{
    font-size: 2em;
    padding: 20px;
    background: #ebf5fc;
    border-radius: 10px;
    box-shadow: 5px 5px 25px rgba(0, 0, 0,8);
    position: absolute;
    opacity: 0;
    transform: scale(0);
    transition: 0.5s ease-in-out;
}

.result-box.show{
    opacity: 1;
    transform: scale(1);
}

.won-text{
    display: flex;
    margin-bottom: 10px;
}

.won-text p{
    margin:0px 5px;
}

.result-box .btn{
    display: flex;
    justify-content: center;
}

.result-box button{
    background:  linear-gradient(to right, #0f2027, #203a43, #2c5364); 
    color: #ebf5fc;
    text-transform: uppercase;
    border-radius: 10px;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    box-shadow: 5px 5px 15px rgba(0, 0, 0,8);
    transition: 0.25s ease-in-out;
}

.result-box button:hover{
    transform: scale(0.95);
}

.players .slider{
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background:  linear-gradient(to right, #0f2027, #203a43, #2c5364); 
    border-radius: 10px;
    transition: all 0.3s ease;
  }
  .players.active .slider{
    left: 50%;
  }

  .players.active span:first-child{
    color:#0f2027;
  }
  .players.active span:nth-child(2){
    color: #ebf4fc;
  }
  .players.active .slider{
    left: 50%;
  }

  .players.active span:first-child{
      color: #0f2027;
    }
    .players.active span:nth-child(2){
        color: #ebF5FC;
    }
  .players span:first-child{
    color: #fff;
  }

  span .fas{
    color: #0f2027;
  }

  .confetti {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -35px;
    left: -20px;
    width: 400px;
    height: 150px;
    overflow: hidden;
    z-index: -10;
}
.confetti-piece {
    position: absolute;
    width: 10px;
    height: 30px;
    background: #ffd300;
    top: 0;
    opacity: 0;
}
.confetti-piece:nth-child(1) {
    left: 7%;
    -webkit-transform: rotate(-40deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 182ms;
    -webkit-animation-duration: 1116ms;
}
.confetti-piece:nth-child(2) {
    left: 14%;
    -webkit-transform: rotate(4deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 161ms;
    -webkit-animation-duration: 1076ms;
}
.confetti-piece:nth-child(3) {
    left: 21%;
    -webkit-transform: rotate(-51deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 481ms;
    -webkit-animation-duration: 1103ms;
}
.confetti-piece:nth-child(4) {
    left: 28%;
    -webkit-transform: rotate(61deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 334ms;
    -webkit-animation-duration: 708ms;
}
.confetti-piece:nth-child(5) {
    left: 35%;
    -webkit-transform: rotate(-52deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 302ms;
    -webkit-animation-duration: 776ms;
}
.confetti-piece:nth-child(6) {
    left: 42%;
    -webkit-transform: rotate(38deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 180ms;
    -webkit-animation-duration: 1168ms;
}
.confetti-piece:nth-child(7) {
    left: 49%;
    -webkit-transform: rotate(11deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 395ms;
    -webkit-animation-duration: 1200ms;
}
.confetti-piece:nth-child(8) {
    left: 56%;
    -webkit-transform: rotate(49deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 14ms;
    -webkit-animation-duration: 887ms;
}
.confetti-piece:nth-child(9) {
    left: 63%;
    -webkit-transform: rotate(-72deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 149ms;
    -webkit-animation-duration: 805ms;
}
.confetti-piece:nth-child(10) {
    left: 70%;
    -webkit-transform: rotate(10deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 351ms;
    -webkit-animation-duration: 1059ms;
}
.confetti-piece:nth-child(11) {
    left: 77%;
    -webkit-transform: rotate(4deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 307ms;
    -webkit-animation-duration: 1132ms;
}
.confetti-piece:nth-child(12) {
    left: 84%;
    -webkit-transform: rotate(42deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 464ms;
    -webkit-animation-duration: 776ms;
}
.confetti-piece:nth-child(13) {
    left: 91%;
    -webkit-transform: rotate(-72deg);
    -webkit-animation: makeItRain 2s infinite ease-out;
    -webkit-animation-delay: 429ms;
    -webkit-animation-duration: 818ms;
}
.confetti-piece:nth-child(odd) {
    background: #7431e8;
}
.confetti-piece:nth-child(even) {
    z-index: 1;
}
.confetti-piece:nth-child(4n) {
    width: 5px;
    height: 12px;
    -webkit-animation-duration:4000ms;
}
.confetti-piece:nth-child(3n) {
    width: 3px;
    height: 10px;
    -webkit-animation-duration:4000ms;
    -webkit-animation-delay: 2s;
}
.confetti-piece:nth-child(4n-7) {
  background: red;
}
@-webkit-keyframes makeItRain {
    from {opacity: 0;}
    50% {opacity: 1;}
    to {-webkit-transform: translateY(350px);}
}