* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    background-color: #2d414b;
    color: #F2C14E; 
    font-family: 'Finger Paint', cursive;
}

h2 {
    font-size: 3em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    margin: 0.5em;
}

.containerMorpion {
    height: 100vh;
    width: 100%; 
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    gap: 1em;
    padding: 1em;
}

.contentMorpion {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: repeat(3, 1fr); 
    gap: 0;
    width: 90vw; 
    height: 90vw;
    max-width: 450px;
    max-height: 450px;
    margin-top: 2em;
}

.box {
    border: 1px solid #F2C14E;
    display: flex;
    color: #F2C14E; 
    justify-content: center;
    align-items: center;
    font-size: 5em;
    transition: background-color 0.3s ease;
    background-color: #1e2a31;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.box:hover {
    background-color: #3b4b5b;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
}

.btnResetMorpion {
    width: 100%;
    max-width: 200px;
    padding: 12px 20px;
    background-color: #F2C14E;
    color:black;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-color 0.3s ease;
    text-align: center;
    margin-top: 2em;
}

.btnResetMorpion:hover {
    background-color: rgb(255, 255, 255);
    color: #F2C14E;
}

#snackbar {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #7b6222;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
    border-radius: 10px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 600;
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}


@-webkit-keyframes fadein {
    from {bottom: 0; opacity: 0;} 
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
    from {bottom: 30px; opacity: 1;} 
    to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

#victoryMessage {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 100;
    display: none;
    font-size: 1.3em;
    font-family: Arial, Helvetica, sans-serif;
    color: rgb(35, 35, 35);
    width: 50%; 
    max-width: 250px;
    height: auto;
}

.winner {
    color: green; 
}

img {
    width: 30%;
    height: 30%;
    object-fit: cover;
}

/* Media Queries */
@media (max-width: 768px) {
    h2 {
        font-size: 2.5em;
    }

    .contentMorpion {
        width: 90vw;
        height: 90vw;
        max-width: 400px;
        max-height: 400px;
    }

    .box {
        font-size: 4em;
    }

    .btnResetMorpion {
        max-width: 180px;
    }

    #snackbar {
        font-size: 15px;
    }

    #victoryMessage {
        font-size: 1.2em;
        top: 30%;
        width: 55%;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 2em;
    }

    .contentMorpion {
        width: 90vw;
        height: 90vw;
        max-width: 350px;
        max-height: 350px;
    }

    .box {
        font-size: 3.5em;
    }

    .btnResetMorpion {
        max-width: 160px;
    }

    #snackbar {
        font-size: 14px;
    }

    #victoryMessage {
        font-size: 1.1em;
        top: 50%;
        width: 50%;
        max-width: 300px;
    }

}
