/* ============================================================
   登录/注册/忘记密码/第三方绑定页面样式
   ============================================================ */

/* 页面加载器 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================================
   第三方账号绑定页面样式
   ============================================================ */

.tp-bind-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tp-bind-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    padding: 40px;
    text-align: center;
}

.tp-bind-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.tp-bind-icon.success {
    background: linear-gradient(135deg, #00D4AA 0%, #00B894 100%);
    color: #ffffff;
}

.tp-bind-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.tp-bind-icon.loading {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    animation: tp-bind-pulse 2s ease-in-out infinite;
}

@keyframes tp-bind-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.tp-bind-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.tp-bind-message {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.tp-bind-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.tp-bind-btn-primary {
    background: linear-gradient(135deg, #00D4AA 0%, #00B894 100%);
    color: #ffffff;
}

.tp-bind-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.tp-bind-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.tp-bind-btn-secondary:hover {
    background: #e5e5e5;
}

.tp-bind-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.tp-bind-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top-color: #00D4AA;
    border-radius: 50%;
    animation: tp-bind-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes tp-bind-spin {
    to {
        transform: rotate(360deg);
    }
}

.tp-bind-tips {
    margin-top: 24px;
    padding: 16px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 3px solid #0ea5e9;
}

.tp-bind-tips p {
    margin: 0;
    font-size: 14px;
    color: #0369a1;
}

.loader-text {
    margin-top: 16px;
    font-size: 14px;
    color: #999;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    margin: 16px auto 0;
    border: 3px solid #e5e5e5;
    border-top-color: #00D4AA;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 登录页面基础 */
.login-page {
    min-height: 100vh;
    overflow-y: auto; /* 允许页面上下滚动 */
    overflow-x: hidden;
}

/* 全屏背景 */
.login-full-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* 背景图片 */
.login-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #00D4AA;
}

/* 背景遮罩 - 半透明渐变 */
.login-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 212, 170, 0.85) 0%, 
        rgba(0, 139, 114, 0.88) 50%, 
        rgba(0, 102, 85, 0.92) 100%);
}

/* 背景装饰 */
.login-bg-overlay::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.login-bg-overlay::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 60%;
    height: 120%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* 登录表单容器 */
.login-center-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* 登录表单卡片 */
.login-center-card {
    width: 100%;
    max-width: 420px;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    margin: auto; /* 在flex容器中垂直居中，但允许滚动 */
}

/* 注册表单 - 移除内部滚动，让整个页面滚动 */
.login-form {
    width: 100%;
}

/* 带按钮的输入框容器 */
.form-input-with-btn {
    position: relative;
}

.form-input-with-btn .form-input {
    padding-right: 120px;
}

.btn-send-code {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 14px;
    background: #00D4AA;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-send-code:hover:not(:disabled) {
    background: #00b894;
}

.btn-send-code:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 表单头部 */
.login-center-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-center-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.login-center-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.login-center-logo img {
    height: 48px;
    object-fit: contain;
}

.login-center-logo span {
    font-size: 26px;
    font-weight: 700;
    color: #222222;
}

.login-center-title {
    font-size: 24px;
    font-weight: 700;
    color: #222222;
    margin: 0 0 6px 0;
}

.login-center-subtitle {
    font-size: 14px;
    color: #888888;
    margin: 0;
}

/* Tab切换 */
.form-tabs {
    display: flex;
    background: #F5F5F5;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 32px;
}

.form-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #888888;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.form-tab.active {
    background: #FFFFFF;
    color: #00D4AA;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 表单面板 */
.form-panel {
    display: none;
}

.form-panel.active {
    display: block;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 18px;
    z-index: 1;
    pointer-events: none;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 46px;
}

.form-input {
    width: 100%;
    padding: 15px 16px 15px 56px;
    border: 1.5px solid #E8E8E8;
    border-radius: 10px;
    font-size: 15px;
    color: #333333;
    transition: all 0.3s;
    background: #FFFFFF;
    text-indent: 4px;
}

.form-input::placeholder {
    color: #aaa;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #00D4AA;
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.12);
}

/* 表单消息提示 */
.form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.form-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.form-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* 注册协议复选框 */
.agree-term {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
}

.agree-term input[type="checkbox"] {
    display: none;
}

.agree-term .checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d0d0d0;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all 0.3s;
}

.agree-term input[type="checkbox"]:checked + .checkbox-custom {
    background: #00D4AA;
    border-color: #00D4AA;
}

.agree-term input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
}

.agree-text {
    flex: 1;
}

.agree-text a {
    color: #00D4AA;
    text-decoration: underline;
}

.agree-text a:hover {
    color: #00B894;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666666;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid #CCCCCC;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remember-me input[type="checkbox"]:checked + .checkbox-custom {
    background: #00D4AA;
    border-color: #00D4AA;
}

.remember-me input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: #FFFFFF;
    font-size: 11px;
}

.forgot-link {
    font-size: 13px;
    color: #00D4AA;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #008B72;
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B894 100%);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 3px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* 第三方登录 */
.third-party-login {
    margin-top: 24px;
}

.tp-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.tp-divider::before,
.tp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.tp-divider span {
    padding: 0 16px;
    font-size: 12px;
    color: #999999;
}

.tp-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.tp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: all 0.3s;
    text-decoration: none;
}

.tp-icon svg {
    transition: all 0.3s;
}

.tp-qq {
    background: #f0f7ff;
    color: #12b7f5;
}

.tp-qq:hover {
    background: #12b7f5;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(18, 183, 245, 0.3);
}

.tp-wechat {
    background: #f0fff4;
    color: #07c160;
}

.tp-wechat:hover {
    background: #07c160;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(7, 193, 96, 0.3);
}

.tp-alipay {
    background: #f0f7ff;
    color: #1677ff;
}

.tp-alipay:hover {
    background: #1677ff;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(22, 119, 255, 0.3);
}

/* 表单底部 */
.login-footer {
    margin-top: 24px;
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: #999999;
    margin: 0;
}

.login-footer a {
    color: #00D4AA;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 登录页面响应式 */
@media (max-width: 768px) {
    .login-center-wrapper {
        padding: 30px 16px;
        align-items: flex-start; /* 小屏幕从顶部开始 */
    }
    
    .login-center-card {
        padding: 36px 28px;
        max-width: 380px;
        margin: 0 auto; /* 水平居中 */
    }
    
    .login-center-title {
        font-size: 22px;
    }
    
    .form-input {
        padding: 13px 14px 13px 44px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .login-center-wrapper {
        padding: 20px 12px;
        align-items: flex-start; /* 小屏幕从顶部开始 */
    }
    
    .login-center-card {
        padding: 28px 20px;
        border-radius: 16px;
        margin: 0 auto; /* 水平居中 */
    }
    
    .login-center-logo img {
        height: 40px;
    }
    
    .login-center-logo span {
        font-size: 22px;
    }
    
    .login-center-title {
        font-size: 20px;
    }
    
    .btn-submit {
        padding: 14px;
        font-size: 15px;
    }
    
    .tp-icons {
        gap: 16px;
    }
    
    .tp-icon {
        width: 44px;
        height: 44px;
    }
}
