/* Lobby styles for Moonfall game */

#lobby-view {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 90%;
    max-width: 500px;
}

.panel {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px; /* Match the other buttons */
    border: 1px solid rgba(238, 219, 241, 0.5);
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

#pvp-game {
    width: 100%;
    margin: 0 auto 20px;
}

#pvp-game .button-row {
    display: flex;
    justify-content: center; /* Center buttons */
    gap: 10px; /* Space between buttons */
    margin-bottom: 10px;
}

#join-room-bar {
    margin-top: 10px;
}

#room-info {
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(116, 89, 128, 0.7);
    border-radius: 5px;
}

#game-status {
    margin-top: 20px;
    width: 100%;
    margin: 20px auto 0;
}

#players-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

#players-status div {
    background-color: rgba(116, 89, 128, 0.7);
    padding: 8px;
    border-radius: 4px;
}

#waiting-host {
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(116, 89, 128, 0.7);
    border-radius: 5px;
}

.lobby-panels-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.go-back-btn {
    position: absolute;
    left: -120px; /* Position to the left of the panels */
    top: 80px; /* Align with the create/join buttons */
    background-color: rgba(116, 89, 128, 0.7);
    border: 1px solid rgba(238, 219, 241, 0.5);
    border-radius: 4px; /* Match the other buttons */
    padding: 10px 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #eedbf1;
    margin-top: 0 !important; /* Prevent margin issues with media queries */
}

.go-back-btn:hover {
    background-color: rgba(116, 89, 128, 0.9);
}

/* Show the back button when relevant panels are visible */
#lobby-view.show-back-button .go-back-btn {
    opacity: 1;
    margin-top: 0 !important; /* Prevent margin issues with media queries */
}

/* Responsive adjustments for lobby */
@media screen and (max-width: 600px) {
    #lobby-view {
        width: 95%;
    }
}