body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Press Start 2P', cursive; /* Retro font */
    background-color: #000000; /* Black background */
    color: #00FF00; /* Green text */
    touch-action: manipulation; /* Disable double-tap zoom */
}

#sidebar {
    width: auto;
    padding: 20px;
    box-sizing: border-box;
    background-color: #000000; /* Black background */
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); /* Green shadow */
    margin-right: 20px;
    border-radius: 8px;
    color: #00FF00; /* Green text */
}

#gameCanvas {
    border: 2px solid #00FF00; /* Green border */
    border-radius: 8px;
    background-color: #000000; /* Black background */
}

#start-screen, #end-screen, #countdown, #pause-screen, #room-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.9); /* Semi-transparent black */
    border-radius: 8px;
    z-index: 2000; /* Ensure it is always on top */
    color: #00FF00; /* Green text */
}

#start-screen {
    background-color: #000000; /* Black background */
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5); /* Green shadow */
    gap: 20px;
}

#start-screen h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

#start-screen p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

#start-screen input {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #00FF00; /* Green border */
    border-radius: 5px;
    width: 100%;
    max-width: 300px;
    background-color: #000000; /* Black background */
    color: #00FF00; /* Green text */
}

#start-screen button {
    padding: 10px 20px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    background-color: #00FF00; /* Green background */
    color: #000000; /* Black text */
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-screen button:hover {
    background-color: #00CC00; /* Darker green */
}

#start-screen div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background-color: #000000; /* Black background */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); /* Green shadow */
}

.input-group p {
    font-size: 1.2em;
    margin: 0;
}

.input-group input {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #00FF00; /* Green border */
    border-radius: 5px;
    width: 100%;
    max-width: 300px;
    background-color: #000000; /* Black background */
    color: #00FF00; /* Green text */
}

#end-screen, #pause-screen {
    display: none;
}

#countdown {
    display: none;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black */
    width: 100px;
    height: 50px;
    justify-content: center;
    position: absolute;
    top: 150px; /* Just below the canvas */
    left: 50%;
    transform: translateX(-50%);
    color: #00FF00; /* Green text */
}

#countdown h1 {
    margin: 0;
}

#scoreboard {
    margin-top: 20px;
}

#score-table {
    width: 100%;
    border-collapse: collapse;
    color: #00FF00; /* Green text */
}

#score-table th, #score-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #00FF00; /* Green border */
}

#score-table th {
    background-color: #000000; /* Black background */
}

#end-scoreboard {
    margin-top: 20px;
}

#end-score-table {
    width: 100%;
    border-collapse: collapse;
    color: #00FF00; /* Green text */
}

#end-score-table th, #end-score-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #00FF00; /* Green border */
}

#end-score-table th {
    background-color: #000000; /* Black background */
}

.player-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.player-buttons {
    display: flex;
    align-items: center;
}

.player-buttons button {
    margin: 0 5px;
}

.btn {
    background-color: #00FF00; /* Green background */
    color: #000000; /* Black text */
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #00CC00; /* Darker green */
}

input[readonly] {
    background-color: #000000; /* Black background */
    border: 1px solid #00FF00; /* Green border */
    border-radius: 4px;
    padding: 5px;
    width: 100%;
    margin-top: 5px;
    color: #00FF00; /* Green text */
}

label {
    display: block;
    margin-top: 10px;
}

.player-configs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.player-config {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    background-color: #000000; /* Black background */
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5); /* Green shadow */
    min-width: 200px;
    color: #00FF00; /* Green text */
}

.player-config input {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    font-size: 14px;
    background-color: #000000; /* Black background */
    border: 1px solid #00FF00; /* Green border */
    color: #00FF00; /* Green text */
}

.dead-player {
    background-color: rgb(0, 0, 0);
    opacity: 0.5;
}

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3000;
}

.notification {
    background-color: #00FF00; /* Green background */
    color: #000000; /* Black text */
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.notification.show {
    display: block;
}

/* Admin styles */
#auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

#auth-container input {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #00FF00; /* Green border */
    border-radius: 5px;
    width: 100%;
    max-width: 300px;
    background-color: #000000; /* Black background */
    color: #00FF00; /* Green text */
}

#auth-container button {
    padding: 10px 20px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    background-color: #00FF00; /* Green background */
    color: #000000; /* Black text */
    cursor: pointer;
    transition: background-color 0.3s;
}

#auth-container button:hover {
    background-color: #00CC00; /* Darker green */
}

#rooms-container {
    margin-top: 20px;
    width: 80%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#rooms-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    color: #00FF00; /* Green text */
}

#rooms-table th, #rooms-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #00FF00; /* Green border */
}

#rooms-table th {
    background-color: #000000; /* Black background */
}

#rooms-table tr:nth-child(even) {
    background-color: #000000; /* Black background */
}

#rooms-table tr:hover {
    background-color: #001100; /* Dark green */
}

#rooms-table button {
    padding: 5px 10px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    background-color: #dc3545;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

#rooms-table button:hover {
    background-color: #c82333;
}

/* ...existing code... */

.logs-container {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    background-color: #000000; /* Black background */
    padding: 10px;
    border: 1px solid #00FF00; /* Green border */
    border-radius: 5px;
    color: #00FF00; /* Green text */
}

/* ...existing code... */

.notification.error {
    background-color: #dc3545; /* Red color for errors */
}

/* Mobile styles */
@media (max-width: 768px) {
    body {
        font-size: 1em;
        overflow: hidden; /* Prevent scrolling */
        position: fixed; /* Prevent page shifting when keyboard appears */
        width: 100%;
        height: 100%;
        touch-action: manipulation; /* Disable double-tap zoom */
        -webkit-user-select: none; /* Désactive la sélection sur iOS */
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-touch-callout: none; /* Désactive le menu contextuel sur iOS */
    }

    #gameCanvas {
        width: 90%;
        height: auto;
        margin: 0 auto; /* Center the canvas */
        touch-action: manipulation; /* Disable double-tap zoom */
        -webkit-user-select: none; /* Désactive la sélection sur iOS */
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-touch-callout: none; /* Désactive le menu contextuel sur iOS */
    }

    #start-screen, #end-screen, #countdown, #pause-screen, #room-screen {
        padding: 0px;
    }

    #start-screen h1, #start-screen p, #start-screen button {
        font-size: 1em;
    }

    #start-screen input {
        font-size: 1em;
    }

    #sidebar {
        display: none;
    }

    .game-container {
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    #end-screen, #room-screen {
        flex-direction: column;
        align-items: center;
        justify-content: center;

    }

    #winner-text {
        text-align: center;
    }
}


