/* ========================================
   登录/注册/找回密码 弹出层样式
   虫虫下载站 - 统一蓝色科技主题
   ======================================== */

/* ===== 通用模态框样式 ===== */
.auth-modal .modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

/* 通用渐变头部 */
.auth-modal .modal-header {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 60%, #0EA5E9 100%);
    color: white;
    border: none;
    padding: 22px 28px;
    position: relative;
}

.auth-modal .modal-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.auth-modal .modal-title .title-icon {
    font-size: 26px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.auth-modal .modal-title .title-sub {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

/* 关闭按钮 */
.auth-modal .modal-header .close {
    color: white;
    opacity: 1;
    text-shadow: none;
    font-size: 28px;
    font-weight: 300;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
    padding: 0;
    line-height: 1;
}

.auth-modal .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) rotate(90deg);
    color: white;
}

/* 模态框body加载状态 */
.auth-modal .modal-loading {
    padding: 50px 30px;
    text-align: center;
}

.auth-modal .modal-loading .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.25em;
    color: #2563EB;
    margin-bottom: 15px;
}

.auth-modal .modal-loading p {
    color: #64748B;
    font-size: 14px;
}

/* ===== 响应式 ===== */
@media (max-width: 576px) {
    .auth-modal .modal-dialog {
        margin: 0.5rem;
    }

    .auth-modal .modal-content {
        border-radius: 16px;
    }

    .auth-modal .modal-header {
        padding: 18px 20px;
    }

    .auth-modal .modal-title {
        font-size: 17px;
    }

    .auth-modal .modal-title .title-icon {
        font-size: 22px;
    }
}

/* ===== 登录表单内容 ===== */
.login-form-container {
    padding: 0;
    background: #fff;
}

.signup-form-container {
    padding: 24px 30px 24px 24px;
    background: #fff;
}

/* 标签页切换 */
.login-tabs {
    display: flex;
    margin: 0;
    background: #F8FAFC;
    border-bottom: 2px solid #E2E8F0;
}

.login-tabs .tab-item {
    flex: 1;
    text-align: center;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    position: relative;
}

.login-tabs .tab-item i {
    margin-right: 6px;
    font-size: 14px;
}

.login-tabs .tab-item:hover {
    color: #2563EB;
    background: rgba(37, 99, 235, 0.05);
}

.login-tabs .tab-item.active {
    color: #2563EB;
    background: #fff;
    font-weight: 700;
    border-bottom-color: #2563EB;
}

/* 表单内容区 */
.tab-content {
    padding: 28px 28px 24px;
    background: #fff;
}

.tab-pane {
    display: none;
    animation: authFadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表单控件 */
.login-form-container .form-group,
.signup-form-container .form-group {
    margin-bottom: 18px;
}

.login-form-container label,
.signup-form-container label {
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 8px;
    display: block;
    font-size: 13px;
}

.login-form-container label i,
.signup-form-container label i {
    margin-right: 5px;
    color: #2563EB;
}

.login-form-container .form-control,
.signup-form-container .form-control {
    height: 46px;
    border-radius: 10px;
    border: 2px solid #E2E8F0;
    padding: 10px 15px;
    font-size: 14px;
    transition: all 0.25s ease;
    background: #F8FAFC;
    color: #1E293B;
}

.login-form-container .form-control:hover,
.signup-form-container .form-control:hover {
    border-color: #CBD5E1;
    background: #fff;
}

.login-form-container .form-control:focus,
.signup-form-container .form-control:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
    background: #fff;
}

/* 错误状态 */
.login-form-container .has-error .form-control,
.signup-form-container .has-error .form-control {
    border-color: #EF4444;
    background: #FFF5F5;
}

.login-form-container .has-error .form-control:focus,
.signup-form-container .has-error .form-control:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.login-form-container .help-block,
.signup-form-container .help-block {
    color: #EF4444;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 4px;
}

.login-form-container .has-error .help-block,
.signup-form-container .has-error .help-block {
    display: flex;
}

.login-form-container .has-error .help-block::before,
.signup-form-container .has-error .help-block::before {
    content: "⚠";
    font-size: 12px;
}

/* 登录按钮 */
.login-form-container .btn-login {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.login-form-container .btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-form-container .btn-login:hover::after {
    left: 100%;
}

.login-form-container .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.login-form-container .btn-login:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.login-form-container .btn-login:disabled {
    background: linear-gradient(135deg, #94A3B8, #64748B);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 注册按钮 */
.signup-form-container .btn-signup {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #2563EB 0%, #0EA5E9 100%);
    border: none;
    border-radius: 26px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}

.signup-form-container .btn-signup::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s;
}

.signup-form-container .btn-signup:hover::after {
    left: 100%;
}

.signup-form-container .btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.45);
}

.signup-form-container .btn-signup:disabled {
    background: linear-gradient(135deg, #94A3B8, #64748B);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.signup-form-container .btn-signup i {
    margin-right: 8px;
    font-size: 16px;
}

/* 获取验证码按钮 */
.signup-form-container .btn-get-wechat-code {
    padding: 0 20px;
    height: 46px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.signup-form-container .btn-get-wechat-code:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.signup-form-container .btn-get-wechat-code:disabled {
    background: #94A3B8;
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== 分割线 ===== */
.auth-divider {
    margin: 20px 0;
    border-top: 2px solid #F1F5F9;
    position: relative;
}

.auth-divider span {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 15px;
    color: #94A3B8;
    font-size: 12px;
    font-weight: 600;
}

/* ===== 积分礼包提示 ===== */
.auth-bonus-tip {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 18px 0;
    text-align: center;
}

.auth-bonus-tip .bonus-gift {
    font-size: 22px;
    margin-bottom: 6px;
}

.auth-bonus-tip strong {
    font-size: 14px;
    color: #92400E;
    display: block;
    margin-bottom: 4px;
}

.auth-bonus-tip p {
    font-size: 12px;
    color: #92400E;
    opacity: 0.85;
    margin: 0;
}

/* ===== 底部链接 ===== */
.auth-footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 2px solid #F1F5F9;
    text-align: center;
    font-size: 14px;
    color: #64748B;
}

.auth-footer a {
    color: #2563EB;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.auth-footer a:hover {
    color: #1D4ED8;
    transform: translateX(3px);
}

/* ===== 密码框记住/忘记 ===== */
.auth-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 18px;
}

.auth-checkbox-row label {
    font-weight: normal;
    font-size: 13px;
    color: #64748B;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.auth-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2563EB;
}

.auth-checkbox-row .forgot-link {
    font-size: 13px;
    color: #64748B;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-checkbox-row .forgot-link:hover {
    color: #2563EB;
}

/* ===== 协议复选框 ===== */
.auth-agree-box {
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 18px 0;
}

.auth-agree-box label {
    font-weight: normal;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    line-height: 1.6;
}

.auth-agree-box input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #2563EB;
}

.auth-agree-box a {
    color: #2563EB;
    font-weight: 700;
    text-decoration: none;
}

.auth-agree-box a:hover {
    text-decoration: underline;
}

/* ===== 微信二维码区域 ===== */
.qrcode-login-container {
    text-align: center;
    padding: 20px 10px;
}

.qrcode-box {
    width: 210px;
    height: 210px;
    margin: 20px auto;
    border: 3px solid #E2E8F0;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.qrcode-box:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.qrcode-box img {
    max-width: 195px;
    max-height: 195px;
    border-radius: 10px;
}

.qrcode-placeholder {
    color: #94A3B8;
    font-size: 14px;
}

.qrcode-tips {
    color: #64748B;
    font-size: 13px;
    margin-top: 16px;
    line-height: 1.8;
}

.qrcode-tips i {
    color: #22C55E;
    margin-right: 5px;
    font-size: 15px;
}

.qrcode-refresh {
    margin-top: 16px;
}

.qrcode-refresh a {
    color: #2563EB;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    background: rgba(37, 99, 235, 0.08);
    transition: all 0.3s;
}

.qrcode-refresh a:hover {
    background: rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.qrcode-refresh a i {
    transition: transform 0.4s;
}

.qrcode-refresh a:hover i {
    transform: rotate(180deg);
}

/* ===== Alert 样式 ===== */
.login-form-container .alert,
.signup-form-container .alert {
    padding: 13px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    border: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    animation: authSlideDown 0.3s ease;
}

@keyframes authSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form-container .alert-success,
.signup-form-container .alert-success {
    background: linear-gradient(135deg, #DCFCE7 0%, #BBF7D0 100%);
    color: #166534;
    border-left: 4px solid #22C55E;
}

.login-form-container .alert-danger,
.signup-form-container .alert-danger {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

/* ===== 实时验证状态 ===== */
.signup-form-container .validation-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    animation: authFadeIn 0.2s ease;
}

.signup-form-container .form-control.validating {
    border-color: #60A5FA;
    background: #EFF6FF;
}

.signup-form-container .form-control.valid {
    border-color: #34D399;
    background: #ECFDF5;
}

.signup-form-container .form-control.invalid {
    border-color: #F87171;
    background: #FEF2F2;
}

/* ===== 注册模态框滚动条 ===== */
#signupModal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#signupModal .modal-body::-webkit-scrollbar-track {
    background: #F1F5F9;
}

#signupModal .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2563EB, #0EA5E9);
    border-radius: 6px;
}

/* ===== 需要登录弹窗 ===== */
#loginRequireModal .modal-header,
#logoutModal .modal-header {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
    color: white;
    border: none;
    padding: 18px 22px;
}

#loginRequireModal .modal-title,
#logoutModal .modal-title {
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: white;
}

#loginRequireModal .modal-content,
#logoutModal .modal-content {
    border-radius: 18px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

#loginRequireModal .close,
#logoutModal .close {
    color: white;
    opacity: 1;
    text-shadow: none;
    font-size: 26px;
    font-weight: 300;
}

#loginRequireModal .modal-body {
    padding: 24px;
}

#loginRequireModal .require-message {
    font-size: 15px;
    color: #1E293B;
    font-weight: 500;
    text-align: center;
    margin-bottom: 6px;
}

#loginRequireModal .require-sub {
    font-size: 13px;
    color: #64748B;
    text-align: center;
    margin-bottom: 18px;
}

#loginRequireModal .modal-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 20px 20px;
    border: none;
}

.btn-signup-bonus {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-signup-bonus:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.4);
}

.btn-login-now {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.3);
}

.btn-login-now:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.btn-later {
    width: 100%;
    padding: 8px;
    background: #F1F5F9;
    color: #64748B;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-later:hover {
    background: #E2E8F0;
    color: #475569;
}

/* ===== 退出模态框 ===== */
#logoutModal .modal-body {
    padding: 24px;
    text-align: center;
}

#logoutModal .logout-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

#logoutModal .modal-text {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 8px;
}

#logoutModal .modal-subtext {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 0;
}

#logoutModal .modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    border: none;
    padding: 0 20px 20px;
}

/* ===== 找回密码模态框 ===== */
#resetModal .modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

#resetModal .modal-header {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
    color: white;
    border: none;
    padding: 22px 28px;
}

#resetModal .modal-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

#resetModal .close {
    color: white;
    opacity: 1;
    text-shadow: none;
    font-size: 26px;
    font-weight: 300;
}