@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&family=Press+Start+2P&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    width: 100%;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: "Pixelify Sans", sans-serif;

    background-color: #ffb6d5;

    background-image:
        linear-gradient(45deg, #ffc5df 25%, transparent 25%),
        linear-gradient(-45deg, #ffc5df 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ffc5df 75%),
        linear-gradient(-45deg, transparent 75%, #ffc5df 75%);

    background-size: 40px 40px;
    background-position:
        0 0,
        0 20px,
        20px -20px,
        -20px 0;
}


main {
    width: 100%;
    text-align: center;
}


header h1 {
    font-family: "Press Start 2P", cursive;
    font-size: 40px;
    margin-bottom: 15px;
}


#message {
    font-size: 22px;
    margin-bottom: 25px;
}


.gameArea {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
}


.character {
    width: 200px;
    height: 300px;

    display: flex;
    justify-content: center;
    align-items: center;
}


.character img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


.boardArea {
    display: flex;
    justify-content: center;
    align-items: center;
}


#grille {
    width: 300px;
    height: 300px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);

    border: 5px solid black;

    background: white;
}


.case {
    display: flex;
    justify-content: center;
    align-items: center;

    border: 3px solid black;

    cursor: pointer;

    font-size: 70px;
    font-weight: bold;
}


.case:hover {
    background: #ffc0d9;
}


.case .paw {
    width: 75px;
    height: 75px;

    object-fit: contain;

    animation: pawAppear 0.2s ease;
}


@keyframes pawAppear {

    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }

}


#pie {
    position: fixed;

    width: 50px;
    height: 50px;

    object-fit: contain;

    display: none;

    pointer-events: none;

    z-index: 100;
}


/* START SCREEN */

#startScreen {
    position: fixed;

    inset: 0;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    gap: 40px;

    background: #ffb6d5;

    z-index: 9999;

    transform: translateY(0);

    transition: transform 0.7s ease;
}


#startScreen.hide {
    transform: translateY(-100%);
}


#startScreen h2 {
    font-family: "Press Start 2P", cursive;

    font-size: 70px;

    text-align: center;
}


#play {
    padding: 20px 40px;

    font-family: "Press Start 2P", cursive;

    font-size: 20px;

    background: white;

    border: 5px solid black;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}


#play:hover {
    transform: scale(1.15);
    background: #fb6853;
}

/* END SCREEN */

#endScreen {
    position: fixed;

    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;

    background: #ffb6d5;

    transform: translateY(-100%);

    transition: transform 0.7s ease;

    z-index: 9998;
}


#endScreen.show {
    transform: translateY(0);
}


#winnerImage {
    position: absolute;

    width: 100%;
    height: 100%;

    object-fit: contain;

    z-index: 1;
}


.endContent {
    position: relative;

    z-index: 2;

    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 40px;
}


#endTitle {
    font-family: "Press Start 2P", cursive;

    font-size: 70px;

    text-align: center;

    color: white;

    text-shadow:
        5px 5px 0 black,
        -3px -3px 0 black,
        3px -3px 0 black,
        -3px 3px 0 black;
}


#endReplay {
    padding: 20px 40px;

    font-family: "Press Start 2P", cursive;

    font-size: 20px;

    background: white;

    border: 5px solid black;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}


#endReplay:hover {
    transform: scale(1.15);
    background: #fb6853;
}

/* MOBILE */

@media (max-width: 800px) {

    header h1 {
        font-size: 25px;
    }


    #message {
        font-size: 18px;
    }


    .gameArea {
        gap: 10px;
    }


    .character {
        width: 100px;
        height: 180px;
    }


    #grille {
        width: 240px;
        height: 240px;
    }


    .case .paw {
        width: 55px;
        height: 55px;
    }


    #startScreen h2,
    #endTitle {
        font-size: 35px;
    }


    #play,
    #endReplay {
        font-size: 14px;
        padding: 15px 25px;
    }

}