/* 🌍 Style général */
body {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
    margin: 0;
    padding: 20px;
}

/* 🎮 Titre du jeu */
h1 {
    font-size: 32px;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(255, 255, 255, 0.3);
}

/* 🎛️ Sélecteur de difficulté */
label {
    font-size: 18px;
    margin-right: 10px;
}

select {
    font-size: 16px;
    padding: 5px;
    border-radius: 5px;
    border: none;
    background-color: white;
    color: black;
    cursor: pointer;
}

/* 🎲 Plateau de jeu */
#gameBoard {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    grid-template-rows: repeat(3, 120px);
    gap: 10px;
    justify-content: center;
    margin: 20px auto;
    max-width: 400px;
}

/* 🎯 Cases du morpion */
.cell {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* ✨ Effet de survol */
.cell:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.5);
}

/* ✨ Animation quand un joueur joue */
.cell.X {
    color: #ff6b6b;
    animation: pop 0.3s ease-in-out;
}

.cell.O {
    color: #4ecdc4;
    animation: pop 0.3s ease-in-out;
}

@keyframes pop {
    0% {
        transform: scale(0.5);
    }
    100% {
        transform: scale(1);
    }
}

/* 📢 Texte de statut */
#status {
    font-size: 22px;
    margin-top: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 10px rgba(255, 255, 255, 0.3);
}

/* 🔁 Bouton Rejouer */
#restart {
    font-size: 20px;
    padding: 10px 20px;
    margin-top: 20px;
    border: none;
    border-radius: 5px;
    background: #ff8d30;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#restart:hover {
    background: #fca23b;
    transform: scale(1.1);
}
.cartita-btn {
    font-size: 20px;
    padding: 10px 20px;
    margin-top: 20px;
    border: none;
    border-radius: 5px;
    background: #ff8d30;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cartita-btn:hover {
    background: #fca23b;
    transform: scale(1.1);
}
/* 📱 Responsive pour mobile */
@media screen and (max-width: 768px) {
    #gameBoard {
        grid-template-columns: repeat(3, 80px);
        grid-template-rows: repeat(3, 80px);
        gap: 8px;
    }

    .cell {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    h1 {
        font-size: 24px;
    }

    #restart {
        font-size: 18px;
        padding: 8px 15px;
    }
}
