/* ------------------------------------------------------------ container setup ------------------------------------------------------------ */

@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,700&display=swap');

/* the body affects all elements inside of it */

body {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Poppins", "Open Sans", Arial, Helvetica, sans-serif;
    text-align: center;
    overflow: hidden;
    background: black;
    background-image: url("/plinkit/assets/plinko-generic/img/background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* contains all game elements */

#game-container {
    width: 800px;
    height: 1200px;
    position: relative;
    color: #fff;
}

#iziigame-link a {
    color: #fff;
    text-decoration: none;
    background-image: url("/plinkit/assets/plinko-generic/img/iziigame-logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    height: 54px;
    width: 54px;
    display: block;
}

#plinkit-board {
    width: 500px;
    height: 950px;
    margin: auto;
    position: relative;
    background-image: url("/plinkit/assets/plinko-generic/img/GameBoard.png");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.tube-img {
    width: 56px;
    height: 56px;
    position: absolute;
    top: 81px;
    left: 0;
    background-image: url("/plinkit/assets/plinko-generic/img/Tube.png");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 90;
    opacity: 0.6;
}

.hidden-class {
    display: none;
}

.peg {
    width: 14px;
    height: 14px;
    position: absolute;
    background: #c11;
    opacity: 0.0;
}

#chip {
    width: 25px;
    height: 25px;
    position: absolute;
    background-image: url("/plinkit/assets/plinko-generic/img/Chip.png");
    background-size: cover;
    z-index: 100;
}

#winningText {
    text-align: center;
    margin: auto;
    margin-top: 20px;
}

#prize-img {
    width: 800px;
    height: 600px;
    position: relative;
    padding-top: 200px;
    background-position: center;
    background-size: contain;
}

#buckets-holder {
    width: 100%;
    height: 180px;
    bottom: 55px;
    position: absolute;
    display: flex;
    justify-content: space-evenly;
    align-items: flex-end;
}

.bucket {
    height: 100%;
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    overflow: hidden;
    font-weight: bold;
}

.bucket span {
    transform: rotate(180deg);
}

#title {
    color: #fff;
    font-weight: bold;
    font-size: 4em;
    font-family: "Poppins", "Open Sans", Arial, Helvetica, sans-serif;
    height: 230px;
    background-image: url("/plinkit/assets/plinko-generic/img/Logo.png");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}


/* sound and restart */

#toggle-sound svg,
#restart-button svg {
    fill: #fff;
}

#intro-container,
#rules-container {
    font-size: 65px;
    border-radius: 20px;
    background-image: url("/plinkit/assets/plinko-generic/img/GameBackground.png");
    background-position: center;
    margin-top: 50px;
    margin: auto;
    width: 800px;
    padding: 50px;
}

#board-container {
    font-size: 2.5em;
    margin-top: 20px;
}

.board-img {
    width: 720px;
    height: 940px;
    border-radius: 20px;
    background-image: url("/plinkit/assets/plinko-generic/img/GameBackground.png");
    background-position: center;
    margin: auto;
}

#intro-button,
#play-button {
    cursor: pointer;
    padding: 10px;
    padding: 20px;
    font-size: 50px;
    border-radius: 10px;
    background: #FFAC4E;
    background: linear-gradient(90deg, rgba(255, 172, 78, 1) 0%, rgba(255, 250, 78, 1) 100%);
    color: #120a38;
    width: max-content;
    margin: 0 auto;
    margin-top: 35px;
}

#prize-container {
    display: none;
    position: absolute;
    font-size: 28px;
    padding: 3em;
    top: 210px;
    width: 100%;
    color: #fff;
    z-index: 100;
    margin: 0 auto;
    background-color: rgb(25 19 95 / .9);
    box-shadow: 0px 8px 40px 2px #a81aac;
    border: solid 2px #a81aac;
}

.prize-name-value,
.prize-name-tail {
    font-weight: bold;
}


/* Force the "XXX Points" to be on it's own line and centered */

.prize-name {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Centers items horizontally */
    gap: 10px;
    /* Adds space between items */
}

.prize-name-head {
    width: 100%;
    /* Forces this element to take full width, pushing subsequent items to the next line */
}


/* targets all prize ids */

div[id^="prize-id"] {
    width: 100%;
    font-size: 5vh;
}


/* .game-finished #board-container {
    display: none !important;
} */

.game-finished #prize-container {
    display: flex !important;
    text-align: center;
    top: 17%;
    width: 80%;
    right: auto;
    left: 50%;
    border-radius: 20px;
    -webkit-animation-name: showLastScreen;
    animation-name: showLastScreen;
    animation-delay: .7s;
    animation-duration: 2s;
    animation-fill-mode: both;
}


/* shows the last screen */

@keyframes showLastScreen {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale3d(0.3, 0.3, 0.3);
    }
    20% {
        transform: translateX(-50%) scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: translateX(-50%) scale3d(0.9, 0.9, 0.9);
    }
    60% {
        opacity: 1;
        transform: translateX(-50%) scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: translateX(-50%) scale3d(0.97, 0.97, 0.97);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale3d(1, 1, 1);
    }
}

.screen-board-container #select-a-ball {
    position: absolute;
    width: 613px;
    height: 950px;
    margin: auto;
    margin-left: 51px;
    margin-top: 62px;
    z-index: 1000;
    background-image: url(/plinkit/assets/plinko-generic/img/click-here.png);
    background-repeat: no-repeat;
    background-size: contain;
    animation: selectBallBounceFade 3s cubic-bezier(.4, 0, .2, 1) 1;
    opacity: 0;
    pointer-events: none;
    /* Prevent interaction after animation */
}

@keyframes selectBallBounceFade {
    0% {
        transform: translateY(300px);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    20% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(0);
    }
    35% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(0);
    }
    70% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(300px);
        visibility: hidden;
        pointer-events: none;
    }
}

@keyframes PrizeContainerShow {
    0% {
        opacity: 0;
        -webkit-transform: scale3d(0.3, 0.3, 0.3);
        transform: scale3d(0.3, 0.3, 0.3);
    }
    20% {
        -webkit-transform: scale3d(1.1, 1.1, 1.1);
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        -webkit-transform: scale3d(0.9, 0.9, 0.9);
        transform: scale3d(0.9, 0.9, 0.9);
    }
    60% {
        opacity: 1;
        -webkit-transform: scale3d(1.03, 1.03, 1.03);
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        -webkit-transform: scale3d(0.97, 0.97, 0.97);
        transform: scale3d(0.97, 0.97, 0.97);
    }
    100% {
        opacity: 1;
        -webkit-transform: scale3d(1, 1, 1);
        transform: scale3d(1, 1, 1);
    }
}


/* animate all of the ball tubes */


/* Apply the animation to each .tube-img with increasing delay */

.tube-img {
    opacity: 0.6;
    animation: tubeHighlight 2s linear 1;
    animation-fill-mode: forwards;
    animation-delay: .5s;
}

@keyframes tubeHighlight {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    20% {
        opacity: 1;
        transform: scale(2.8);
    }
    40% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
}

.tube-img:hover {
    transform: scale(1.5) !important;
    /* Add a transition for a smooth effect */
    transition: transform 2s ease-in-out !important;
    opacity: 1 !important;
    cursor: pointer;
}