/* public/css/loginModal.css */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.mb-20 {
    margin-bottom: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.login-dialog {
    width: 450px;
    max-width: 94vw;
    background: #fff;
    border-radius: 30px;
    padding: 80px 30px;
    box-sizing: border-box;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-contain {
    width: 310px;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: color 0.2s;
}

.login-close-btn:hover {
    color: #000;
}

.login-logo {
    text-align: center;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img {
    width: 260px;
    height: 28px;
}

.welcome-text {
    text-align: center;
    margin-bottom: 30px;

    color: #444444;
    font-family: Roboto;
    font-weight: 400;
    font-size: 20px;
    line-height: 140%;
    letter-spacing: 0%;
}

.login-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.login-methods .login-btn {
    width: 100%;
    height: 50px;
    border-radius: 25px;
    border: 1px solid #969592;
    background: transparent;
    font-family: Roboto;
    font-weight: 400;
    font-size: 18px;
    line-height: 140%;
    letter-spacing: 0%;
    text-align: center;
    color: #969592;
    cursor: pointer;
}

.login-methods .login-btn:hover {
    border: 1.5px solid #444444;
    color: #444444;
}

.login-methods .login-btn.active {
    border: 1.5px solid #444444;
    color: #444444;
}

.exact-match-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444444;
    margin: 16px 0 20px;
    position: relative;

    font-family: Roboto;
    font-weight: 400;
    font-size: 15px;
    line-height: 140%;
    letter-spacing: 0%;
}

.exact-match-separator::before,
.exact-match-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d9d9d9;
    margin: 0 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-form .form-group {
    width: 100%;
    max-width: 350px;
    margin-bottom: 18px;
}

.login-form .form-group label {
    display: none;
}

.login-form .form-input {
    width: 100%;
    height: 50px;
    line-height: 50px;
    border-radius: 25px;
    border: 1px solid #000;
    padding: 0 18px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: Roboto;
    font-weight: 400;
    font-size: 15px;
}

.login-form .form-input:focus {
    border-color: #444444 !important;
    box-shadow: none !important;
}

.login-form .form-input::placeholder {
    color: #969592;
}

.form-group.has-error .form-input {
    border-color: #ff4d4f;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.form-group .error-message {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    padding-left: 18px;
}

.form-group.has-error .error-message {
    display: block;
}

.code-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 350px;
    margin-bottom: 20px;
}

.code-input-group .form-input {
    flex: 1;
}

.send-code-btn {
    flex-shrink: 0;
    height: 50px;
    border-radius: 25px;
    border: 1px solid #000000;
    padding: 0 18px;
    cursor: pointer;
    white-space: nowrap;
    font-family: Roboto;
    font-weight: 400;
    font-size: 15px;
    line-height: 140%;
    letter-spacing: 0%;
    text-align: center;
    color: #444444;
}

.send-code-btn:hover:not(:disabled) {
    border-color: #000000;
}

.send-code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-submit-btn {
    width: 100%;
    max-width: 350px;
    height: 50px;
    border-radius: 25px;
    border: none;
    background: #444444;
    color: #fff;
    font-family: Inter;
    font-weight: 500;
    font-size: 20px;
    line-height: 140%;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
}

.login-submit-btn:hover:not(:disabled) {
    background: #000;
}

.login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.forgot-link {
    width: 100%;
    max-width: 350px;
    text-align: right;
    margin-bottom: 20px;
    color: #969592;
    cursor: pointer;
    font-family: Roboto;
    font-weight: 400;
    font-size: 15px;
    line-height: 140%;
    letter-spacing: 0%;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    font-family: Roboto;
    font-weight: 400;
    font-size: 15px;
    line-height: 140%;
    letter-spacing: 0%;
    color: #555555;
}

.register-link .link-text {
    color: #A45433;
    cursor: pointer;
}

.wechat-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.wechat-section .qrcode-container {
    text-align: center;
}

.wechat-section .qrcode-container img {
    width: 200px;
    height: 200px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.wechat-section .qrcode-tip {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.wechat-section .reload-qrcode-btn {
    margin-top: 12px;
    height: 36px;
    border-radius: 18px;
    border: 1px solid #1890ff;
    background: transparent;
    color: #1890ff;
    padding: 0 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s;
}

.wechat-section .reload-qrcode-btn:hover {
    background: #e6f7ff;
}

.agreement-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #444444;
    width: 100%;
    max-width: 350px;
    margin-bottom: 18px;
    font-family: Roboto;
    font-weight: 400;
    font-size: 12px;
    line-height: 140%;
    letter-spacing: 0%;
    white-space: nowrap;
}

.agreement-group input[type="checkbox"] {
    width: 10px;
    height: 10px;
    accent-color: #A45433;
    flex-shrink: 0;
    cursor: pointer;
}

.agreement-group span {
    color: #A45433;
    text-decoration: none;
    cursor: pointer;
}

.agreement-group span:hover {
    text-decoration: underline;
}

/* 密码框包装器（输入框 + 切换按钮） */
.password-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
}

.password-wrapper .form-input {
    padding-right: 44px;
    /* 为按钮留出空间 */
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: #333;
}

.password-toggle-btn:focus {
    outline: none;
}

/* ========== 登录按钮 loading 状态 ========== */
/* 接口调用中：禁用 + 旋转 spinner + 「登录中...」文案反馈 */
.login-submit-btn.is-loading {
    opacity: 0.85;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-submit-btn.is-loading:hover {
    background: #000000;
}

.login-submit-btn .btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}

.login-submit-btn .btn-loading-text {
    font-size: 16px;
    font-weight: 500;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}