:root {
    --neon-primary: #5b8def;
    --neon-secondary: #9b6dde;
    --bg-primary: #f0f4f8;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --player1-color: rgba(91, 141, 239, 0.3);
    --player2-color: rgba(155, 109, 222, 0.3);
}

#lobby {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 80%;
}

#lobby_upper_panel {
    height: 50%;
    width: 100%;

    display: flex;
    justify-content: space-around;
    align-items: center;
}

.lobby_player_panel {
    width: 35%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transition: all 0.3s ease;

    /* separate border radius for each corner: */
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 130px;
    border-bottom-right-radius: 130px;

    font-size: 1.8em;
}

#lobby_player_panel_1 {
    background: linear-gradient(135deg, var(--player1-color), rgba(0, 0, 255, 0.2));
}

#lobby_player_panel_2 {
    background: linear-gradient(135deg, var(--player2-color), rgba(255, 0, 0, 0.2));
}

.lobby_inner_player_panel {
    width: 75%;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0 0 179px 179px;
    transition-duration: 0.3s;
    /* background: rgba(255, 255, 255, 0.05); */
    /* backdrop-filter: blur(5px); */
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    cursor: pointer;
}

.lobby_inner_player_panel:hover {
    /* background: rgba(255, 255, 255, 0.1); */
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(91, 141, 239, 0.2);
}

.player_name {
    width: 100%;
    height: 15%;
    text-align: center;
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(91, 141, 239, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
}

.player_image_place {
    width: 100%;
    height: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.player_image_place img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

#lobby_between_players_panel {
    width: 40%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#VS {
    width: 100%;
    height: 20%;
    font-size: 4em;
    text-align: center;
    background: linear-gradient(45deg, var(--neon-primary), var(--neon-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(91, 141, 239, 0.3);
}

#watchers_panel {
    width: 70%;
    height: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.watchers_panel_row {
    width: 90%;
    height: 40%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.lobby_watcher_panel {
    width: 30%;
    height: 95%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    backdrop-filter: blur(5px);
    border-radius: 20px;
    transition-duration: 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(91, 141, 239, 0.15);
}

.lobby_watcher_panel::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 22px;
    background: linear-gradient(45deg, 
        rgba(91, 141, 239, 0.5),
        rgba(155, 109, 222, 0.5),
        rgba(91, 141, 239, 0.5));
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lobby_watcher_panel:hover {
    background: rgba(255, 255, 255, 0.1);
    width: 35%;
    height: 100%;
    box-shadow: 
        0 0 20px rgba(91, 141, 239, 0.2),
        0 0 30px rgba(91, 141, 239, 0.1),
        inset 0 0 15px rgba(91, 141, 239, 0.1);
}

.lobby_watcher_panel:hover::before {
    opacity: 1;
}

@keyframes borderGlow {
    0% {
        filter: blur(3px);
        transform: scale(0.98);
    }
    50% {
        filter: blur(4px);
        transform: scale(1);
    }
    100% {
        filter: blur(3px);
        transform: scale(0.98);
    }
}

.lobby_inner_watcher_panel {
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.watcher_name {
    width: 100%;
    height: 15%;
    text-align: center;
}

.watcher_image_place {
    width: 100%;
    height: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lobby_watcher_panel img {
    width: 80%;
    height: 90%;
    border-radius: 50%;
}

#lobby_info_panel {
    height: 25%;
    width: 30%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(91, 141, 239, 0.2);
    border-radius: 28px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    overflow-y: hidden;
    overflow-x: hidden;
}

#lobby_info_panel:hover {
    /* transform: translateY(-5px); */
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
    overflow-y: auto;
}

#lobby_info_panel > div {
    width: 100%;
    margin-bottom: 10px;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.row > div {
    width: 48%;
}

.lobby_info_title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input#lobby_name_input {
    font-size: 1em;
    /* font-weight: 500; */
    color: var(--text-primary);
    background: rgba(91, 141, 239, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

input#lobby_name_input:hover {
    background: rgba(91, 141, 239, 0.1);
}

input#lobby_name_input:focus {
    border-color: var(--neon-primary);
    background: rgba(91, 141, 239, 0.15);
    box-shadow: 0 0 15px rgba(91, 141, 239, 0.2);
}

#lobby_map {
    width: 28%;
}

#lobby_timer_type {
    width: 40%;
}

#lobby_heroes_amount {
    width: 28%;
}



select#lobby_map_select,
select#lobby_heroes_amount_select,
select#lobby_timer_type_select {
    background: rgba(91, 141, 239, 0.05);
    border: 2px solid transparent;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

select#lobby_map_select:hover,
select#lobby_heroes_amount_select:hover,
select#lobby_timer_type_select {
    background: rgba(91, 141, 239, 0.1);
}

select#lobby_map_select:focus,
select#lobby_heroes_amount_select:focus,
select#lobby_timer_type_select:focus {
    border-color: var(--neon-primary);
    background: rgba(91, 141, 239, 0.15);
    box-shadow: 0 0 15px rgba(91, 141, 239, 0.2);
}

#save_lobby_button {
    width: 50%;
    margin-top: 10px;
    /* background: linear-gradient(45deg, var(--neon-primary), var(--neon-secondary)); */
    font-size: 0.9em;
    padding: 10px 20px;
    color: white;
}

#save_lobby_button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    /* box-shadow: 0 5px 15px rgba(91, 141, 239, 0.3); */
}

div.lobby > div:first-child {
    font-weight: bold;
    margin-bottom: 5px;
}

input, select, button {
    width: 100%;
    padding: 8px;
    margin-top: 2px;
    border: 1px solid #ccc;
    border-radius: 15px;
    box-sizing: border-box; /* Makes sure padding does not affect width */
    cursor: pointer;
}

input, select {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(91, 141, 239, 0.3);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--neon-primary);
    box-shadow: 0 0 10px rgba(91, 141, 239, 0.2);
    outline: none;
}

button {
    /* background: linear-gradient(45deg, var(--neon-primary), var(--neon-secondary)); */
    color: #5a5a5a;
    border: none;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    /* box-shadow: 0 2px 10px rgba(91, 141, 239, 0.2); */
    background-color: rgba(240, 240, 240, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

button:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 4px 15px rgba(91, 141, 239, 0.3); */
    /* filter: brightness(1.1); */
    background-color: rgba(200, 200, 200, 1);
}

button:active {
    transform: translateY(1px);
}

#lobby_lower_buttons_panel {
    display: flex;
    justify-content: center;
    width: 50%;
    gap: 15px;
    margin-top: 20px;
}

#lobby_lower_buttons_panel button {
    flex: 1;
    padding: 12px 24px;
    min-width: 120px;
    max-width: 150px;
    font-size: 0.9em;
}

/* Remove the existing margin-right properties */
#lobby_lower_buttons_panel button:last-child {
    margin-right: 0;
}

#start_lobby_button {
    background: linear-gradient(45deg, #7cc6ab, #66b78f);
    color: white;
}

#leave_lobby_button {
    background: linear-gradient(45deg, #d3a18b, #cb896a);
    color: white;
}

#delete_lobby_button {
    background: linear-gradient(45deg, #d88383, #cc6060);
    color: white;
}

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

#save_container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 10px;
}

#what_you_will_win {
    display: flex;
}

#unsaved_changes_indicator {
    color: #ff9800;
    font-weight: bold;
    font-size: 0.9em;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
    white-space: pre-wrap; /* This will make sure that \n in the text will be rendered as line breaks */
}
.hidden {
    opacity: 0;
    visibility: hidden;
}

#unsaved_changes_indicator.hidden {
    opacity: 0;
    visibility: hidden;
}

#save_lobby_button {
    flex: 1;
    min-width: 100px;
    margin-top: 0;
}

#unsaved_changes_indicator {
    color: #ff9800;
    font-weight: bold;
    margin-top: 10px;
    transition: opacity 0.3s ease;
}
#unsaved_changes_indicator.hidden {
    opacity: 0;
    visibility: hidden;
}
#save_lobby_button.unsaved {
    background: linear-gradient(45deg, #ff9800, #f57c00);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
}
#saved_confirmation {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 1000;
}
#saved_confirmation.fade-out {
    opacity: 0;
}
/* ...existing code... */

#lobby_increase_hp_for_players {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

#lobby_increase_hp_for_players > div:last-child {
    display: flex;
    gap: 20px; /* Adjust spacing between checkboxes */
}

.increase_hp_for_players_checkbox {
    display: none;
}

.increase_hp_for_players_checkbox + label {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 500;
    user-select: none;
}

.increase_hp_for_players_checkbox + label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid var(--neon-primary);
    border-radius: 4px;
    background: transparent;
}

.increase_hp_for_players_checkbox:checked + label::before {
    background: var(--neon-primary);
}

.increase_hp_for_players_checkbox:checked + label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 53%;
    transform: translateY(-50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
}

.increase_hp_for_players_checkbox + label:hover::before {
    box-shadow: 0 0 5px var(--neon-primary);
}

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