body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    text-align: center;
    margin: 0;
    padding: 20px;
}

#lobby, #game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lists-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.list-box {
    width: 45%;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
}

ul {
    list-style-type: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

li {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

li.game-item {
    cursor: pointer;
}

li.game-item:hover {
    background-color: #e9f5ff;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    margin: 5px;
}

button:hover {
    background-color: #0056b3;
}

#game-canvas {
    background-color: #fafafa;
    border: 1px solid #ccc;
    margin-top: 20px;
}

#input-area {
    margin-top: 20px;
}

.input-btn.active {
    background-color: #28a745;
}

/* --- Mobile Support --- */

/* Make buttons more touch-friendly */
#input-area .input-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 14px;
    -webkit-user-select: none; /* Prevent text selection on tap */
    user-select: none;
}

/* Media Query for smaller screens */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .lists-container {
        flex-direction: column;
        gap: 15px;
    }

    .list-box {
        width: 100%;
        box-sizing: border-box;
    }

    #game-canvas {
        width: 100%;
        height: auto; /* Maintain aspect ratio */
    }

    #input-area {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #button-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 20px; /* Adds space between the buttons */
    }
}
