@import url('https://fonts.googleapis.com/css2?family=Spicy+Rice&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playwrite+PT:wght@100..400&display=swap');
body{
    /* background-color: grey; */
    margin: 0;
    background: url(../src/img/cuisine.jpg) no-repeat;
    background-size: 100vw 100vh;
    width: 100dvw;
    height: 100dvh;
}

.strip{
    display: grid;
    /* grid-auto-flow: column; */
    grid-template-columns: repeat(9, 1fr);
}

.timerPosition{
    position: relative;
}
    
.timerHandler{
    background: url(../src/img/Timer.png) no-repeat center;
    background-size: 100% auto;
    width: 110%;
    grid-column: 6;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: right;
}

.timerAdjuster{
    position: relative;
    display: flex;
    align-items: center;
    margin-right: .8vw;
}

.timer{
    font-size: 1.5vw;
}

.removeNumber{
    animation: removeNumber .25s forwards;
    transform-origin: bottom;
}

.addNumber{
    animation: addNumber .25s forwards;
    transform-origin: top;
}

@keyframes removeNumber {
    0%{
        transform: rotateX(0deg);
        }
    100%{
        transform: rotateX(90deg);
    }
}
@keyframes addNumber {
    0%{
        transform: rotateX(-90deg);
        }
    100%{
        transform: rotateX(0deg);
    }
}

.counterHandler{
    background: url(../src/img/Compteur.png) no-repeat center;
    background-size: 100% auto;
    width: 80%;
    grid-column: 4;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: right;
}

/* chiffre clignotte et couleur rouge */

.counter{
    margin-right: .7vw;
    font-size: 1.5vw;
}


.menu{
    position: absolute;
    background-color: peru;
    width: 40vw;
    height: 80vh;
    left: 30vw;
    top: 10vh;
    z-index: 10;
    border-radius: 5vw;
    display: flex;
    justify-content: center;
    font-family: "Playwrite PT", cursive;
    font-size: 1vw;
    /* visibility: hidden; */
}

.menu .underline{
    text-decoration: underline;
    display: inline-block;
}

.menu .bold{
    font-weight: bold;
    display: inline-block;
}

.menu .main{
    /* visibility: hidden */
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
}

.menu .rules{
    position: absolute;
    left: 15%;
    top: 15%;
    margin-right: 1vw;
}

/* .menu .startGame{
    position: absolute;
    align-self: center;
    width: 40%;
    height: 10%;
    bottom: 5%;
    font-size: larger;
    color: black;
    background-color: crimson;
    cursor: pointer;
} */

.menu .result{
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    visibility: hidden;
}

.menu .content{
    position: absolute;
    /* display: flex;
    flex-direction: column; */
    top: 15%;
}

.menu .result .centered{
    position: relative;
    width: 35vw;
    margin-left: 5vw;
    display: flex;
    justify-content: center;
}

.menu .marge{
    position: relative;
    width: 33vw;
    left: 15%;
    margin-right: 1vw;
    
}

.menu .button{
    position: absolute;
    align-self: center;
    width: 40%;
    height: 10%;
    bottom: 5%;
    font-size: larger;
    color: black;
    background-color: crimson;
    cursor: pointer;
    background: url("../src/img/plank.png") no-repeat;
    background-size: 100% 100%;
    display: flex;
    align-items: center; 
    justify-items: center;
}

.menu .button .text{
    width: 100%;
    text-align: center;
    /* position: absolute; */
    /* align-self: center; */
}

.container{
    position: fixed;
    top: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.countdown{
    display: inline-block;
    font-size: 10vw;
    color: black;
}

.animCountdown{
    animation: countdownAnim .9s forwards;
}

@keyframes countdownAnim {
    0%{
        transform: scale(1);
        }
    25%{
        transform: scale(1.4);
    }
    100%{
        transform: scale(1);
    }
}

.spawner{
    width: 100vw;
    height: 1px;
}

.game{
    width: 0;
    position: fixed;
    top: 0;
}

.bag{
    user-select: none;
    width: 0;
}


.gift{
    user-select: none;
    position: absolute;
    width: 10vw;
    height: auto;
    top: 0;
    /* background: url("../src/img/panier.png") no-repeat;
    background-size: 100%; */

}

.gift img{
    width: 5vw;
    height: auto;
}


.basket{
    width: 10vw;
    height: 10vw;
    background: url("../src/img/panier.png") no-repeat;
    background-size: 100%;
    position: fixed;
    bottom: 5vh;
    left: 45vw;
}

.collider{
    position: absolute;
    height: 60%;
    width: 90%;
    bottom: 0;
}

.basketBounce{
    animation: basketBounce .2s forwards;
    transform-origin: bottom;
}

.shake{
    animation: shakeBasket .5s forwards;
}

:root {
    --shakingAmplitude: 1vw;
}

@keyframes basketBounce {
    0%{
        transform: scaleY(1);
    }
    50%{
        transform: scaleY(.8);
    }
    100%{
        transform: scaleY(1);
    }
}

@keyframes shakeBasket {
    0% { transform: translateX(0) }
    25% { transform: translateX(var(--shakingAmplitude)) }
    50% { transform: translateX(calc(var(--shakingAmplitude)*-1)) }
    75% { transform: translateX(var(--shakingAmplitude)) }
    100% { transform: translateX(0) }
}

@media (max-width: 480px) {
    body{
        height: 100dvh;
    }
    /* menu result broke */
    .menu{
        width: 80dvw;
        height: 50dvh;
        left: 10dvw;
        top: 20dvh;
        font-size: 3.5dvw;
        line-height: 2.5dvh;
    }
    .menu .button{
        width: 60%;
        /* height: 10%; */
        bottom: 2.5%;
    }
    .menu .button .text{
        font-size: 3.5dvw;
    }
    .menu .result .centered{
        font-size: 3dvw;
        width: 80dvw;
        margin-left: 2dvw;
    }
    .menu .marge{
        position: relative;
        width:80dvw;
        left: 5dvw;
        margin-right: 1dvw;
        
    }
    .menu .result ul{
        line-height: 4dvh;
    }
    
    .gift{
        position: absolute;
        width: 36dvw;
        height: auto;
    }
    .gift img{
        width: 18vw;
        height: auto;
    }
    .basket{
        width: 35dvw;
        height: 35dvw;
        bottom: 2dvh;
        left: 32.5dvw;
    }
    .strip{
        height: 5dvh;
    }
    .timerHandler{
        width: 300%;
        padding: 25%;
        grid-column: 7;
    }
    .timerAdjuster{
        margin-right: 0dvw;
    }
    .timer{
        font-size: 4dvw;
    }
    .counterHandler{
        width: 250%;
        grid-column: 3;
    }
    .counter{
        margin-right: 8.5%;
        font-size: 4dvw;
    }
}