﻿/* ===== 侧边栏底部 - 登录按钮 + 扩展按钮 (替换原 newSessionBtn) ===== */
.sidebar-footer .footer-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-footer .new-session-btn {
    flex: 1;
    padding: 10px 0;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
}

    .sidebar-footer .new-session-btn:hover {
        background: #1d4ed8;
    }

    .sidebar-footer .new-session-btn:active {
        transform: scale(0.97);
    }

    .sidebar-footer .new-session-btn.logged-in {
        background: #f1f5f9;
        color: #1e293b;
    }

        .sidebar-footer .new-session-btn.logged-in:hover {
            background: #e2e8f0;
        }

/* 扩展功能按钮 */
.sidebar-footer .expand-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #f1f5f9;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

    .sidebar-footer .expand-btn:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

    .sidebar-footer .expand-btn:active {
        transform: scale(0.92);
    }

    .sidebar-footer .expand-btn.active {
        background: #e2e8f0;
        color: #0f172a;
    }

/* ===== 功能菜单下拉 ===== */
.menu-dropdown {
    position: fixed;
    bottom: 100px;
    left: 20px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0f0f0;
    padding: 6px 0;
    min-width: 160px;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    transform-origin: bottom left;
}

    .menu-dropdown.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .menu-dropdown .menu-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 18px;
        font-size: 14px;
        color: #1e293b;
        cursor: pointer;
        transition: background 0.15s;
        border: none;
        background: none;
        width: 100%;
        text-align: left;
        font-family: inherit;
        line-height: 1.4;
    }

        .menu-dropdown .menu-item:hover {
            background: #f1f5f9;
        }

        .menu-dropdown .menu-item .menu-icon {
            font-size: 16px;
            width: 24px;
            text-align: center;
            flex-shrink: 0;
        }

        .menu-dropdown .menu-item.danger {
            color: #ef4444;
        }

            .menu-dropdown .menu-item.danger:hover {
                background: #fef2f2;
            }

    .menu-dropdown .menu-divider {
        height: 1px;
        background: #f0f0f0;
        margin: 4px 12px;
    }

/* ===== 登录/注册弹窗 ===== */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

    .auth-modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.auth-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px 32px;
    width: 400px;
    max-width: 92vw;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
    position: relative;
}

.auth-modal-overlay.active .auth-modal {
    transform: scale(1) translateY(0);
}

.auth-modal .close-auth-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 4px;
}

    .auth-modal .close-auth-btn:hover {
        color: #0f172a;
    }

.auth-modal .auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    margin-top: 20px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

    .auth-modal .auth-tabs .tab-btn {
        flex: 1;
        padding: 10px 0;
        background: none;
        border: none;
        font-size: 16px;
        font-weight: 600;
        color: #94a3b8;
        cursor: pointer;
        transition: color 0.2s;
        position: relative;
        font-family: inherit;
    }

        .auth-modal .auth-tabs .tab-btn.active {
            color: #2563eb;
        }

            .auth-modal .auth-tabs .tab-btn.active::after {
                content: '';
                position: absolute;
                bottom: -2px;
                left: 20%;
                right: 20%;
                height: 2px;
                background: #2563eb;
                border-radius: 2px;
            }

        .auth-modal .auth-tabs .tab-btn:hover {
            color: #1e293b;
        }

.auth-modal .auth-form {
    display: none;
    flex-direction: column;
    gap: 14px;
}

    .auth-modal .auth-form.active {
        display: flex;
    }

    .auth-modal .auth-form .form-group {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

        .auth-modal .auth-form .form-group label {
            font-size: 13px;
            font-weight: 500;
            color: #475569;
        }

        .auth-modal .auth-form .form-group input {
            padding: 10px 14px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            font-size: 15px;
            outline: none;
            transition: border-color 0.2s;
            font-family: inherit;
            background: #fafbfc;
        }

            .auth-modal .auth-form .form-group input:focus {
                border-color: #3b82f6;
                box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
            }

    .auth-modal .auth-form .submit-btn {
        padding: 11px 0;
        background: #2563eb;
        color: #fff;
        border: none;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
        margin-top: 6px;
        font-family: inherit;
    }

        .auth-modal .auth-form .submit-btn:hover {
            background: #1d4ed8;
        }

        .auth-modal .auth-form .submit-btn:active {
            transform: scale(0.97);
        }

        .auth-modal .auth-form .submit-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

    .auth-modal .auth-form .form-error {
        color: #ef4444;
        font-size: 13px;
        text-align: center;
        min-height: 20px;
    }

    .auth-modal .auth-form .form-success {
        color: #22c55e;
        font-size: 13px;
        text-align: center;
        min-height: 20px;
    }

.auth-modal .auth-switch {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

    .auth-modal .auth-switch a {
        color: #2563eb;
        cursor: pointer;
        text-decoration: none;
        font-weight: 500;
    }

        .auth-modal .auth-switch a:hover {
            text-decoration: underline;
        }

/* ===== 充值弹窗 ===== */
.recharge-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

    .recharge-modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.recharge-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px 32px;
    width: 480px;
    max-width: 92vw;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
    position: relative;
}

.recharge-modal-overlay.active .recharge-modal {
    transform: scale(1) translateY(0);
}

.recharge-modal .close-recharge-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 4px;
}

    .recharge-modal .close-recharge-btn:hover {
        color: #0f172a;
    }

.recharge-modal h4 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
    text-align: center;
}

.recharge-modal .recharge-sub {
    font-size: 14px;
    color: #64748b;
    text-align: center;
    margin-bottom: 20px;
}

.recharge-modal .qr-grid {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.recharge-modal .qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 120px;
    max-width: 180px;
}

    .recharge-modal .qr-item .qr-label {
        font-size: 14px;
        font-weight: 600;
        color: #1e293b;
    }

    .recharge-modal .qr-item .qr-placeholder {
        width: 140px;
        height: 140px;
        background: #f8fafc;
        border: 2px dashed #e2e8f0;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        color: #94a3b8;
        gap: 4px;
        transition: border-color 0.2s;
    }

        .recharge-modal .qr-item .qr-placeholder .qr-icon {
            font-size: 48px;
            line-height: 1;
        }

        .recharge-modal .qr-item .qr-placeholder .qr-hint {
            font-size: 12px;
            color: #94a3b8;
        }

        .recharge-modal .qr-item .qr-placeholder.wechat {
            border-color: #07c160;
        }

            .recharge-modal .qr-item .qr-placeholder.wechat .qr-icon {
                color: #07c160;
            }

        .recharge-modal .qr-item .qr-placeholder.alipay {
            border-color: #1677ff;
        }

            .recharge-modal .qr-item .qr-placeholder.alipay .qr-icon {
                color: #1677ff;
            }

/* 移动端适配（响应式） */
@media (max-width: 480px) {
    .recharge-modal .qr-grid {
        gap: 16px;
    }

    .recharge-modal .qr-item .qr-placeholder {
        width: 110px;
        height: 110px;
    }

        .recharge-modal .qr-item .qr-placeholder .qr-icon {
            font-size: 36px;
        }

    .auth-modal {
        padding: 20px 18px 24px;
    }

        .auth-modal .auth-tabs .tab-btn {
            font-size: 14px;
            padding: 8px 0;
        }

    .menu-dropdown {
        left: 12px;
        min-width: 140px;
    }

        .menu-dropdown .menu-item {
            padding: 8px 14px;
            font-size: 13px;
        }
}

@media (max-width: 600px) {
    .sidebar-footer .footer-row {
        gap: 6px;
    }

    .sidebar-footer .new-session-btn {
        font-size: 13px;
        min-height: 38px;
        padding: 8px 0;
    }

    .sidebar-footer .expand-btn {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .menu-dropdown {
        bottom: 80px;
        left: 12px;
        min-width: 140px;
    }
}
