/* 会员认证页面统一样式 - 登录、注册、找回密码 */

/* 页面基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}



/* 主容器 */
.auth-container {
    width: 900px;
    min-height: 580px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    overflow: hidden;
    position: relative;
    z-index: 1;
    border-radius: 15px;
}

/* 左侧 - 品牌区域 */
.brand-section {
    width: 40%;
    min-width: 360px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 15px 0 0 15px;
}

/* 返回首页按钮样式 */
.back-home-btn {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.btn-back-home {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.btn-back-home:hover {
    color: white;
    text-decoration: none;
}

.btn-back-home i {
    font-size: 16px;
}

.btn-back-home span {
    font-size: 14px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: white;
    min-height: 80px;
    position: relative;
    z-index: 1;
}

/* LOGO链接样式 */
.brand-logo a {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.brand-logo a:hover {
    opacity: 0.8;
}

/* 默认图标样式 */
.brand-logo i {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

/* LOGO图片样式 - 保持原图比例 */
.brand-logo .logo-img {
    max-width: 120px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.brand-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.brand-features li::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: rgb(76, 175, 80);
    border-radius: 50%;
    margin-right: 0.8rem;
    vertical-align: middle;
    margin-top: -2px;
}

/* 右侧 - 表单区域 */
.form-section {
    width: 60%;
    min-height: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 0 15px 15px 0;
}

/* 表单头部 */
.form-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* OAuth头像样式 */
.oauth-avatar {
    margin-bottom: 1rem;
}

.oauth-avatar .avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #e8ecf4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.form-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    width: 100%;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    color: #666;
    background: white;
    border: 2px solid #e5e7eb;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tab-btn:first-child {
    border-radius: 8px 0 0 8px;
    border-right: 1px solid #e5e7eb;
}

.tab-btn:last-child {
    border-radius: 0 8px 8px 0;
    border-left: 1px solid #e5e7eb;
}

.tab-btn:hover {
    background: #f8faff;
    color: #667eea;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}



.form-subtitle {
    color: #6b7280;
    text-align: center;
    margin-bottom: 1.2rem;
    margin-top: 0.5rem;
}



/* 表单容器 */
.auth-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* 表单样式增强 */
.form-input {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1rem 1rem 3rem;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
    background: white;
    outline: none;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #667eea;
    box-shadow: inset 0 0 0 2px rgba(102, 126, 234, 0.15);
}





/* 表单组样式 */
.form-group {
    position: relative;
    margin-bottom: 1.2rem;
}

/* 注册页面表单组间距调整 */
.register-page .form-group {
    margin-bottom: 0.8rem;
}

.register-page .protocol-group {
    margin-bottom: 0.8rem;
    margin-top: 0.3rem;
}

/* 注册页面表单区域调整 */
.register-page .form-section {
    padding: 1.5rem 3rem 1.5rem 3rem;
    justify-content: flex-start;
    padding-top: 1.5rem;
}

.register-page .form-subtitle {
    margin-bottom: 1rem;
}

/* 输入框图标 */
.form-group::before {
    content: '';
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
}

.form-group.username::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.form-group.password::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.form-group.email::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
}

.form-group.phone::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='5' y='2' width='14' height='20' rx='2' ry='2'/%3E%3Cline x1='12' y1='18' x2='12.01' y2='18'/%3E%3C/svg%3E");
}

.form-group.code::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3Cpath d='M21 12c0 4.97-4.03 9-9 9s-9-4.03-9-9 4.03-9 9-9 9 4.03 9 9z'/%3E%3C/svg%3E");
}

/* 验证码组合 */
.code-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.code-input {
    flex: 1;
}

.code-btn {
    padding: 0.8rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.code-btn:hover {
    background: #5a6fd8;
}

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

/* 验证码图片 - 登录页面特有 */
.code-image {
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
}

/* 短信验证码组合 */
.sms-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sms-input {
    flex: 1;
}

.sms-btn {
    padding: 12px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.sms-btn:hover {
    background: #5a6fd8;
}

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

/* 按钮样式 */
.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background: #5a6fd8;
}

/* 登录选项样式 */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    color: #666;
    cursor: default;
    user-select: none;
}

.remember-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    accent-color: #667eea;
    cursor: pointer;
}



.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.forgot-password:hover {
    text-decoration: underline;
    color: #5a6fd8;
}

/* 底部链接 */
.form-footer {
    text-align: center;
    margin-top: 1rem;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* 协议勾选框样式 */
.protocol-group {
    margin-bottom: 1.5rem;
}

.protocol-checkbox {
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
    color: #666;
    cursor: default;
    line-height: 1.5;
}

.protocol-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    margin-top: 2px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}



.protocol-link {
    color: #667eea;
    text-decoration: none;
    margin-left: 2px;
    font-weight: 500;
    cursor: pointer;
    display: inline;
}

.protocol-link:hover {
    text-decoration: underline;
    color: #5a6fd8;
}

/* 切换链接样式 */
.switch-section {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8ecf4;
}

.switch-section p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.switch-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.switch-link:hover {
    text-decoration: underline;
    color: #5a6fd8;
}

/* 模态框样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.show {
    display: flex !important;
}

.modal-container {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #6b7280;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.8;
    font-size: 14px;
    color: #374151;
}

/* 模态框底部 */
.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}



.modal-body p {
    margin-bottom: 1.2rem;
    color: #374151;
}

.modal-body strong {
    color: #111827;
    font-weight: 600;
}

/* 协议内容特定样式 */
.protocol-content {
    text-align: justify;
}

.protocol-content p {
    margin-bottom: 1rem;
    text-indent: 0;
}

.protocol-content span {
    color: inherit;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    min-width: 120px;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-container {
        width: 95%;
        height: auto;
        flex-direction: column;
    }

    .brand-section,
    .form-section {
        width: 100%;
    }

    .brand-section {
        padding: 2rem 1rem;
        border-radius: 15px 15px 0 0;
    }

    /* 移动端返回首页按钮调整 */
    .back-home-btn {
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
    }

    .btn-back-home {
        font-size: 13px;
        gap: 6px;
    }

    .btn-back-home i {
        font-size: 14px;
    }

    .btn-back-home span {
        font-size: 13px;
    }

    /* 移动端模态框调整 */
    .modal-container {
        max-width: 95%;
        margin: 1rem;
    }

    .modal-body {
        padding: 1.5rem;
        max-height: 50vh;
    }

    .modal-footer {
        padding: 1rem 1.5rem;
    }

    .btn-agree {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
    }

    .form-section {
        border-radius: 0 0 15px 15px;
        padding: 2rem 1rem;
    }
}



/* 确保模态框在最顶层 */
.modal-overlay {
    z-index: 99999 !important;
}

/* 防止页面滚动时的布局问题 */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* 第三方登录样式 */
.oauth-section {
    margin-top: 1rem;
    text-align: center;
}

.oauth-divider {
    position: relative;
    margin: 1.5rem 0;
    text-align: center;
}

.oauth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.oauth-divider span {
    background: white;
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.oauth-buttons {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: nowrap;
}

.oauth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 140px;
    justify-content: center;
}

.oauth-btn:hover {
    border-color: #667eea;
    background: #f8faff;
    color: #667eea;
    transform: translateY(-1px);
}

.oauth-btn i {
    font-size: 1.2rem;
}

.oauth-btn .fab.fa-qq {
    color: #12b7f5;
}

.oauth-btn .fab.fa-weixin {
    color: #07c160;
}

.oauth-btn .fab.fa-weibo {
    color: #e6162d;
}
