#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 998;
    pointer-events: none;
    transition: background 0.3s ease;
}

#overlay.active {
    background: rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

#userMenu {
    position: fixed;
    top: 0;
    right: -40%;
    width: 40%;
    height: 100%;
    background: #fff;
    z-index: 999;
    transition: right 0.3s ease;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

#userMenu.active {
    right: 0;
}

#userMenuClose {
    align-self: flex-end;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px 16px;
    color: #555;
    line-height: 1;
}

#userMenuClose:hover {
    color: #000;
}

#loggedOutInfo {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 0 0;
    box-sizing: border-box;
}

#loginBtn, #registerBtn {
    font-family: "等线", "DengXian", sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 8px 0;
    width: 60%;
    text-align: center;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.5px;
}

#loginBtn {
    color: #fff;
    background: #2c7be5;
    margin-top: 10px;
}

#loginBtn:hover {
    background: #1a5ec4;
}

#registerBtn {
    color: #2c7be5;
    border: 1px solid #2c7be5;
    margin-top: 12px;
}

#registerBtn:hover {
    background: #2c7be5;
    color: #fff;
}

#userInfo {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 0 0;
    box-sizing: border-box;
}

#UserImage {
    width: 7vh;
    height: 7vh;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

#Username {
    font-family: "等线", "DengXian", sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
    margin-top: 14px;
    letter-spacing: 0.5px;
}

#UserUID {
    font-family: "等线", "DengXian", sans-serif;
    font-size: 0.85rem;
    color: #888;
    margin-top: 6px;
    letter-spacing: 0.3px;
}

#logoutBtn {
    font-family: "等线", "DengXian", sans-serif;
    font-size: 0.9rem;
    color: #e74c3c;
    margin-top: 24px;
    cursor: pointer;
    padding: 6px 28px;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

#logoutBtn:hover {
    background: #e74c3c;
    color: #fff;
}

@media (max-width: 768px) {
    #userMenu {
        width: 70%;
        right: -70%;
    }
}
