@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Pacifico&family=Montserrat:wght@600&display=swap');

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #2c2c2c;
    color: white;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    border: 10px solid transparent;
    border-image: linear-gradient(45deg, red, yellow, green, blue) 10;
    animation: border-animation 5s linear infinite;
}

@keyframes border-animation {
    0% {
        border-image: linear-gradient(45deg, red, yellow, green, blue) 10;
    }
    100% {
        border-image: linear-gradient(405deg, red, yellow, green, blue) 10;
    }
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #2c2c2c;
    z-index: 9999;
}

.hidden {
    display: none;
}

.title-3d {
    font-size: 4em;
    font-family: 'Pacifico', cursive;
    color: #fff;
    text-shadow: 3px 3px 5px #aaa;
}

.subtitle {
    font-size: 0.8em;
    color: #aaa;
    margin-top: -20px;
    text-align: center; /* Centrer le texte */
}

.setup {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.setup div {
    margin: 10px 0;
}

input, select {
    padding: 10px;
    margin-top: 5px;
    font-size: 1em;
    border: 2px solid #444;
    border-radius: 5px;
    background-color: #444;
    color: white;
}

input:focus, select:focus {
    outline: none;
    border-color: #888;
}

button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

button:hover {
    background-color: #45a049;
}

#quitButton, #quitButtonWinning {
    background-color: #ff4c4c;
}

#quitButton:hover, #quitButtonWinning:hover {
    background-color: #ff1f1f;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    grid-template-rows: repeat(3, 120px);
    gap: 10px;
    margin-top: 20px;
}

.board.hidden {
    display: none;
}

.cell {
    width: 120px;
    height: 120px;
    background-color: #fff;
    border: 2px solid #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cell:hover {
    background-color: #f0f0f0;
}

.cell.x::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: '\f00d'; /* FontAwesome icon for 'X' */
    color: black;
}

.cell.o::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: 'O'; /* FontAwesome icon for 'O' */
    color: black;
}

.winning-message {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 2em;
}

.winning-message.show {
    display: flex;
}

.winning-message button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.winning-message button:hover {
    background-color: #45a049;
}

#players {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1em;
    font-family: 'Montserrat', sans-serif;
    background-color: #444;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
