/* * LeadScout - Main Stylesheet
 *
 * - 响应式: 移动优先
 * - 可访问性: 焦点可见, 高对比度
 * - 主题: 支持浅色/深色模式
 */

/* --- 1. 变量与基础设定 --- */
:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --text-primary-color: #0f172a;
    --text-secondary-color: #64748b;
    --border-color: #e2e8f0;
    --focus-ring-color: #60a5fa;

    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --header-height: 60px;
}

html[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary-color: #f8fafc;
    --text-secondary-color: #94a3b8;
    --border-color: #334155;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 防止所有元素水平溢出 */
* {
    max-width: 100%;
}

/* 但允许某些元素正常显示 */
html,
body,
.container {
    max-width: none;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* 防止水平滚动条 */
}

body {
    font-family: var(--font-family-base);
    background-color: var(--background-color);
    color: var(--text-primary-color);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    /* 防止水平滚动条 */
}

/* --- 2. 可访问性与通用类 --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: 1400px;
    /* 使用固定最大宽度而不是百分比 */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
    /* 确保padding包含在宽度内 */
}

/* --- 3. 头部与导航 --- */
.main-header {
    min-height: var(--header-height);
    height: auto;
    background-color: var(--surface-color) !important;
    background-image: none !important;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.main-header:first-child {
    top: 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-height);
    background: transparent;
    /* 确保容器背景透明 */
}

/* 强制header背景样式 */
#main-header {
    background-color: var(--surface-color) !important;
    background-image: none !important;
    background: var(--surface-color) !important;
}

.logo a {
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--text-primary-color);
    display: flex;
    align-items: center;
}

.logo svg {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    fill: var(--primary-color);
}

.logo-text {
    font-size: 1.5rem;
    /* 设置字体大小 */
    font-weight: bold;
    /* 设置字体加粗 */
    color: var(--text-primary-color);
    /* 跟随主题颜色（暗色为白色） */
    margin-left: 10px;
    /* 图标和文本之间添加间距 */
    vertical-align: middle;
    /* 垂直对齐 */
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-primary-color);
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle,
.lang-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary-color);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.theme-toggle:hover,
.lang-toggle:hover {
    background-color: var(--background-color);
    color: var(--text-primary-color);
}

.theme-toggle svg,
.lang-toggle span {
    width: 20px;
    height: 20px;
}

.lang-toggle {
    font-weight: bold;
}

.mobile-nav-toggle {
    display: none;
}



/* --- 新增：导航栏下拉菜单样式 --- */
.nav-item-dropdown {
    position: relative;
}

.dropdown-toggle .bx {
    font-size: 1rem;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.nav-item-dropdown:hover .dropdown-toggle .bx {
    transform: rotate(180deg);
}

.dropdown-menu {
    /* 默认状态下完全隐藏 */
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    position: absolute;
    top: calc(100% + 10px);
    /* 定位在父元素的下方，并留出10px间隙 */
    left: 50%;
    transform: translateX(-50%);
    /* 水平居中对齐 */

    background-color: var(--surface-color);
    /* 使用表面颜色，深色模式下效果更好 */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    /* 圆角稍大一些 */
    padding: 0.5rem 0;
    list-style: none;
    min-width: 320px;
    /* 增加最小宽度以适应长文本 */
    max-width: 400px;
    /* 设置最大宽度防止过宽 */
    width: max-content;
    /* 根据内容自动调整宽度 */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    /* 阴影效果更柔和 */
    z-index: 101;

    /* 添加平滑的过渡动画效果，缩短时间减少闪现 */
    transition: opacity 0.15s ease, top 0.15s ease, visibility 0.15s;
}

.nav-item-dropdown:hover>.dropdown-menu,
.nav-item-dropdown:focus-within>.dropdown-menu,
.nav-item-dropdown.active>.dropdown-menu {
    display: block;
    /* 让菜单占据空间 */
    visibility: visible;
    /* 让菜单可见 */
    opacity: 1;
    /* 渐显 */
    top: 100%;
    /* 向上移动到最终位置 */
    pointer-events: auto;
}


.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    white-space: normal;
    /* 允许文本换行 */
    line-height: 1.4;
    /* 设置行高 */
    word-break: keep-all;
    /* 避免中文逐字断行导致“垂直”效果 */
    overflow-wrap: anywhere;
    /* 英文长词在必要时断行 */
    color: var(--text-primary-color);
    /* 跟随主题：暗色为白色 */
    border-bottom: none !important;
    /* 确保没有下划线 */
    width: 100%;
    /* 确保链接占满整个宽度 */
    box-sizing: border-box;
    /* 包含padding在宽度计算中 */
    min-height: 2.5rem;
    /* 设置最小高度保持一致性 */
    font-size: 0.9rem;
    /* 稍微减小字体以适应更多内容 */
}

.dropdown-menu a:hover {
    background-color: var(--background-color);
    /* 修正悬浮背景色 */
    color: var(--primary-color);
}



/* --- 4. 尾部 --- */
.main-footer {
    background-color: var(--surface-color);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary-color);
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-about .logo {
    margin-bottom: 1rem;
}

.footer-address {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-address h4 {
    color: var(--text-primary-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.footer-address p {
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.footer-links h3 {
    color: var(--text-primary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary-color);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-social .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background-color);
    color: var(--text-secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.footer-social .social-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-social .social-link i {
    font-size: 1.4rem;
}

/* Facebook specific hover color */
.footer-social .social-link:hover .bxl-facebook-circle {
    color: white;
}

/* YouTube specific hover color */
.footer-social .social-link:hover .bxl-youtube {
    color: white;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* --- 5. 按钮与表单 --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-primary-color);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--background-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--background-color);
    color: var(--text-primary-color);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--focus-ring-color);
}

/* --- 6. 页面特定内容 --- */
/* 首页 Hero */
.hero {
    text-align: center;
    padding: 5rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary-color);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* 特性 */
.features {
    padding: 4rem 0;
}

.features h2,
.cta-section h2,
.page-header h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    gap: 2rem;
}

.feature-card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

/* CTA */
.cta-section {
    padding: 4rem 0;
    background-color: var(--surface-color);
    text-align: center;
}

.cta-section p {
    margin-bottom: 2rem;
}

/* 定价 */
.pricing-grid {
    display: grid;
    gap: 2rem;
}

.pricing-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: var(--surface-color);
    display: flex;
    flex-direction: column;
}

.pricing-card.popular {
    position: relative;
    border-color: var(--primary-color);
    border-width: 2px;

    /* 为“推荐”卡片设置一个独特的背景色 */
    background-color: var(--surface-color);

    /* 添加柔和的、有色调的阴影，使其“浮”起来 */
    box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.2);

    /* 使用负外边距和内边距来让卡片在垂直方向上“凸出”，这种方法比 transform 更稳定 */
    margin-top: -1.5rem;
    margin-bottom: -1.5rem;
    padding-top: 3.5rem;
    /* 增加的上内边距，也是为顶部的徽章留出空间 */
    padding-bottom: 3.5rem;
    /* 增加下内边距，让卡片整体更高 */
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.pricing-card h2 {
    font-size: 1.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 1rem 0;
}

.price-period {
    font-size: 1rem;
    font-weight: normal;
    color: var(--text-secondary-color);
}

.pricing-features {
    list-style: none;
    margin: 1.5rem 0;
    flex-grow: 1;
}

.pricing-features li {
    margin-bottom: 0.75rem;
}

/* 联系表单 */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.page-header {
    padding: 4rem 0;
    text-align: center;
}

.page-header p {
    max-width: 600px;
    margin: 1rem auto 0;
    color: var(--text-secondary-color);
}

/* 产品页: How it works */
.how-it-works {
    padding: 4rem 0;
    background-color: var(--surface-color);
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    align-items: stretch;
    position: relative;
}

.step {
    text-align: left;
    position: relative;
    padding-top: 1.75rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.how-it-works .steps-container::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 60px;
    right: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    opacity: 0.3;
}

.how-it-works .step-card {
    padding: 2rem 1.5rem 1.75rem;
    border-radius: 12px;
}

.how-it-works .step-badge {
    position: absolute;
    top: -14px;
    left: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.how-it-works .step-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.how-it-works .step:hover .step-icon-wrapper {
    background: rgba(37, 99, 235, 0.15);
}

.how-it-works .step h3 {
    margin: 0.25rem 0 0.5rem;
    font-size: 1.15rem;
}

@media (max-width: 1023px) {
    .how-it-works .steps-container {
        grid-template-columns: 1fr;
    }

    .how-it-works .steps-container::before {
        content: none;
    }

    .how-it-works .step-badge {
        top: -12px;
        left: 1rem;
    }
}

/* 文档页 */
.docs-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.docs-sidebar {
    width: 100%;
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.docs-sidebar nav ul {
    list-style: none;
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.docs-sidebar nav a {
    display: block;
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    color: var(--text-secondary-color);
    border-left: 3px solid transparent;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.docs-sidebar nav a:hover {
    color: var(--text-primary-color);
    background-color: rgba(37, 99, 235, 0.08);
    border-left-color: var(--primary-color);
    transform: translateX(2px);
}

.docs-sidebar nav a.active {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.12);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.docs-sidebar nav a.active::before {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.docs-content {
    background-color: var(--background-color);
    border-radius: 12px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.docs-content section {
    margin-bottom: 4rem;
    scroll-margin-top: calc(var(--header-height) + 2rem);
    position: relative;
}

.docs-content section:last-child {
    margin-bottom: 0;
}

.docs-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
    position: relative;
}

.docs-content h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 1px;
}

.docs-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary-color);
    margin: 2rem 0 1rem 0;
    padding-left: 1rem;
    border-left: 4px solid var(--secondary-color);
    position: relative;
}

.docs-content h3::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
    border-radius: 2px;
}

.docs-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary-color);
    margin-bottom: 1.5rem;
}

.docs-content ul {
    margin: 1rem 0 1.5rem 1.5rem;
}

.docs-content li {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-primary-color);
    margin-bottom: 0.5rem;
    position: relative;
}

.docs-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* 文档图片容器 */
.docs-image-container {
    margin: 2.5rem 0;
    text-align: center;
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.docs-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.docs-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 特色框 */
.docs-highlight-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.docs-highlight-box::before {
    content: '💡';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 1.2rem;
}

.docs-highlight-box p {
    margin-left: 2rem;
    margin-bottom: 0;
    font-weight: 500;
}

/* 步骤指示器 */
.docs-step-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* 文档阅读进度条 */
.docs-progress-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 50;
    transition: width 0.3s ease;
}

/* 返回顶部按钮 */
.docs-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 40;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.docs-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.docs-back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 章节导航增强 */
.docs-sidebar nav a {
    position: relative;
}

.docs-sidebar nav a::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid var(--primary-color);
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.docs-sidebar nav a.active::after {
    opacity: 1;
}

/* 内容块动画 */
.docs-content section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.docs-content section:nth-child(1) {
    animation-delay: 0.1s;
}

.docs-content section:nth-child(2) {
    animation-delay: 0.2s;
}

.docs-content section:nth-child(3) {
    animation-delay: 0.3s;
}

.docs-content section:nth-child(4) {
    animation-delay: 0.4s;
}

.docs-content section:nth-child(5) {
    animation-delay: 0.5s;
}

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

/* 代码块 */
.code-block {
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

/* FAQ 页 */
.faq-section {
    padding-bottom: 4rem;
    /* 修正: --background -> --background-color */
    background: var(--background-color);
}

.faq-section h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    /* 修正: --text -> --text-primary-color */
    color: var(--text-primary-color);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.faq-question button {
    all: unset;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.faq-question button:hover {
    color: var(--primary);
}

.faq-question button::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--text-secondary-color);
    transition: transform 0.2s ease;
}

.faq-question button[aria-expanded="true"]::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    padding-left: 0.5rem;
}

h2.faq-question:has(button[aria-expanded="true"])+.faq-answer {
    max-height: 300px;
    /* 确保这个高度足够容纳最长的答案 */
    opacity: 1;
    padding-top: 0.5rem;
}

.faq-answer p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 1rem;
}

/* 法律文本页 */
.legal-content {
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    margin-bottom: 1rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary-color);
}

.legal-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content a {
    color: var(--primary-color);
}

/* --- 7. 通知横幅 --- */
.notification-banner {
    padding: 1rem;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    font-weight: 500;
}

.notification-banner.show {
    transform: translateY(0);
}

.notification-banner.success {
    background-color: var(--secondary-color);
    color: #fff;
}

.notification-banner.error {
    background-color: #ef4444;
    color: #fff;
}


/* --- 9. 悬浮联系按钮与弹窗 --- */

/* 悬浮按钮容器 */
.floating-contact-container {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    z-index: 99;
}

/* 悬浮按钮本身 */
.contact-fab {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.contact-fab:hover {
    transform: scale(1.1);
    background-color: #1d4ed8;
    /* 悬浮时颜色加深 */
}

.contact-fab .bx {
    font-size: 2rem;
}

/* 弹窗容器 (遮罩层) */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;

    /* 默认隐藏 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 当弹窗激活时 */
.modal-container.active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗内容区域 */
.modal-content {
    background-color: var(--background-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 750px;
    position: relative;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-container.active .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-secondary-color);
    cursor: pointer;
}

/* 图片灯箱 */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.82);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.show {
    opacity: 1;
}

.lightbox-modal .lightbox-content {
    display: block;
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-modal .lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.modal-content h2 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-channel .bx {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.contact-channel h3 {
    margin: 0.5rem 0;
}

.qr-code {
    max-width: 180px;
    margin: 1rem auto;
    border: 1px solid var(--border-color);
    padding: 5px;
    border-radius: 8px;
}

/* 响应式调整 */
@media (min-width: 768px) {
    .contact-channels {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        /* 修改为 center */
    }

    .contact-channel {
        flex: 1;
    }
}

/* --- 8. 响应式设计 (移动优先) --- */

/* 移动端样式 (360px+) - 这是基础 */
/* --- 8. 响应式设计 (移动优先) --- */

/* 移动端样式 (屏幕宽度小于 768px 时生效) */
@media (max-width: 767px) {
    .main-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: var(--header-height);
        height: auto;
        padding: 0 1rem;
        flex-wrap: wrap;
        /* 避免内容拥挤时溢出 */
    }

    /* 移动端logo优化 */
    .logo {
        display: flex !important;
        align-items: center !important;
        justify-content: center;
        gap: 0.5rem;
    }

    .logo img {
        height: 40px !important;
        /* 移动端减小logo尺寸 */
        width: auto;
    }

    .logo-text {
        font-size: 1.2rem !important;
        /* 移动端减小字体 */
        font-weight: bold;
        color: var(--text-primary-color);
        white-space: nowrap;
        /* 防止文本换行 */
    }

    /* --- 基础与布局优化 --- */
    .container {
        max-width: 100%;
        /* 增加内容宽度，减少左右留白 */
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* --- 文档页面移动端优化 --- */
    .docs-layout {
        padding: 1rem 0;
        gap: 1.5rem;
    }

    .docs-sidebar {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .docs-sidebar nav ul {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .docs-sidebar nav a {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }

    .docs-content {
        padding: 1.5rem;
        margin: 0 -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .docs-content h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .docs-content h3 {
        font-size: 1.3rem;
        margin: 1.5rem 0 1rem 0;
        padding-left: 0.75rem;
    }

    .docs-content p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }

    .docs-content section {
        margin-bottom: 2.5rem;
    }

    .docs-image-container {
        margin: 1.5rem 0;
        padding: 1rem;
    }

    .docs-highlight-box {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .docs-highlight-box p {
        margin-left: 1.5rem;
        font-size: 0.95rem;
    }

    /* 移动端隐藏进度条和返回顶部按钮的一些调整 */
    .docs-back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .docs-progress-bar {
        height: 2px;
    }

    /* 页面头部移动端优化 */
    .page-header {
        padding: 2rem 0;
        text-align: center;
    }

    .page-header h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .page-header p {
        font-size: 1rem;
        margin: 0;
        padding: 0 1rem;
    }

    .header-actions {
        justify-content: flex-end;
        margin-right: 10px;
    }

    .section-header h2 {
        font-size: 1.8rem;
        /* 统一调整分区标题在手机上的大小 */
    }

    /* 减少所有分区的垂直间距，让页面更紧凑 */
    .why-us-section,
    .how-it-works,
    .testimonials-section,
    .cta-section {
        padding: 3rem 0;
    }

    /* --- 头部与移动导航 --- */
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--surface-color);
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav a.active,
    .main-nav a:hover {
        border-bottom: 1px solid var(--border-color);
        background-color: var(--background-color);
    }

    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 4px;
        transition: background-color 0.2s;
    }

    .mobile-nav-toggle:hover {
        background-color: var(--surface-color);
    }

    .mobile-nav-toggle .icon-bar {
        display: block;
        width: 22px;
        height: 2px;
        background-color: var(--text-primary-color);
        border-radius: 1px;
        transition: transform 0.2s, opacity 0.2s;
    }

    .mobile-nav-toggle .icon-bar+.icon-bar {
        margin-top: 4px;
    }

    .mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-toggle[aria-expanded="true"] .icon-bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* 移动端下拉菜单优化 */
    .dropdown-menu {
        position: static;
        /* 移动端使用静态定位 */
        transform: none;
        /* 移除变换 */
        left: auto;
        top: auto;
        display: block;
        /* 移动端直接显示 */
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        /* 移除阴影 */
        border: none;
        /* 移除边框 */
        background-color: transparent;
        /* 透明背景 */
        min-width: auto;
        /* 移除最小宽度限制 */
        max-width: none;
        /* 移除最大宽度限制 */
        width: 100%;
        /* 全宽显示 */
        padding: 0;
        /* 移除内边距 */
    }

    .dropdown-menu a {
        padding: 0.75rem 2rem;
        /* 增加左边距以显示层级 */
        font-size: 0.85rem;
        /* 稍小的字体 */
        background-color: var(--background-color);
        /* 背景色区分 */
        border-left: 3px solid var(--primary-color);
        /* 左边框指示 */
        word-break: keep-all;
        /* 避免中文逐字断行导致"垂直"效果 */
        overflow-wrap: anywhere;
        /* 英文长词在必要时断行 */
    }

    /* --- 顶部 Hero 区域 --- */
    .hero-new {
        padding: 4rem 0;
    }

    .hero-grid {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    /* 调整主标题大小 */
    .hero-actions {
        flex-direction: column;
        /* 按钮垂直堆叠 */
        align-items: center;
        gap: 1rem;
    }

    .hero-actions .btn {
        width: 80%;
        max-width: 280px;
    }

    /* --- “为何选择我们” & “客户评价”板块 --- */
    .new-features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        /* 强制单列显示 */
    }

    /* --- “三步上手”板块 --- */
    .steps-container {
        flex-direction: column;
        /* 确保垂直堆叠 */
        gap: 2rem;
    }

    /* --- 尾部 --- */
    .footer-content {
        flex-direction: column;
        /* 垂直堆叠尾部链接 */

    }

    .footer-about {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* 平板端样式 */
@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-container {
        flex-direction: row;
    }

    .docs-layout {
        flex-direction: row;
        gap: 3rem;
        align-items: flex-start;
    }

    .docs-sidebar {
        flex: 0 0 280px;
        position: sticky;
        top: calc(var(--header-height) + 2rem);
        max-height: calc(100vh - var(--header-height) - 4rem);
        overflow-y: auto;
    }

    .docs-content {
        flex: 1;
        min-width: 0;
        /* 防止flex子项溢出 */
    }

    /* 文档内容优化 */
    .docs-content h2 {
        font-size: 2.25rem;
    }

    .docs-content h3 {
        font-size: 1.5rem;
    }
}

/* 桌面端样式 */
@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-card.popular {
        margin-top: -1rem;
        margin-bottom: -1rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    /* 大屏幕文档优化 */
    .docs-layout {
        gap: 4rem;
        max-width: 1600px;
    }

    .docs-sidebar {
        flex: 0 0 320px;
    }

    .docs-content {
        padding: 3rem;
    }

    .docs-content h2 {
        font-size: 2.5rem;
        margin-bottom: 2.5rem;
    }

    .docs-content h3 {
        font-size: 1.6rem;
        margin: 2.5rem 0 1.25rem 0;
    }

    .docs-content p {
        font-size: 1.1rem;
        line-height: 1.8;
    }

    .docs-image-container {
        margin: 3rem 0;
        padding: 2.5rem;
    }
}

/* 超小屏幕优化 (360px以下) */
@media (max-width: 360px) {
    .logo img {
        height: 35px !important;
        /* 超小屏幕进一步减小logo */
    }

    .logo-text {
        font-size: 1rem !important;
        /* 超小屏幕减小字体 */
    }

    .main-header .container {
        padding: 0 0.5rem;
        /* 减少左右边距 */
    }
}

/* --- 交互增强：视口进入动画 --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* --- 交互增强：返回顶部按钮 --- */
#back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

#back-to-top:hover {
    background-color: #1e40af;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- 首页：数据规模统计 --- */
.stats-section {
    padding: 4rem 0;
    background-color: var(--surface-color);
    opacity: 1 !important;
    visibility: visible !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.stat-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.stat-top {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stat-num {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-unit {
    font-weight: 700;
    color: var(--text-primary-color);
    font-size: 1.1rem;
}

.stat-text {
    color: var(--text-secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

/* --- 首页：数据来源与渠道 --- */
.sources-section {
    padding: 4rem 0;
    background-color: var(--background-color);
    opacity: 1 !important;
    visibility: visible !important;
}

.sources-logos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: center;
    justify-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-weight: 500;
    color: var(--text-primary-color);
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
    height: 60px;
    justify-content: center;
    box-sizing: border-box;
}

.source-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.source-item .bx {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* --- 首页：线索中心与增长效果 --- */
.leads-center-section {
    padding: 5rem 0;
    background-color: var(--surface-color);
    opacity: 1 !important;
    visibility: visible !important;
}

.growth-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.growth-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.growth-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.growth-card .icon-wrapper {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.growth-card h3 {
    margin: 0.5rem 0 1rem;
    font-size: 1.25rem;
    color: var(--text-primary-color);
}

.growth-card p {
    color: var(--text-secondary-color);
    line-height: 1.6;
}

/* 响应式 */
@media (max-width: 1023px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sources-logos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .growth-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sources-logos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .growth-grid {
        grid-template-columns: 1fr;
    }

    .stat-num {
        font-size: 2.25rem;
    }

    .stat-item {
        padding: 1.5rem 1rem;
    }

    .source-item {
        padding: 0.75rem 0.75rem;
        font-size: 0.85rem;
        gap: 0.5rem;
        height: 50px;
        min-height: 50px;
    }

    .growth-card {
        padding: 2rem 1.5rem;
    }

    .stats-section,
    .sources-section,
    .leads-center-section {
        padding: 3rem 0;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .sources-logos {
        gap: 1rem;
    }

    .source-item {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
        height: 3rem;
        min-height: 3rem;
        justify-content: center;
        text-align: center;
    }

    .source-item i {
        font-size: 1.2rem;
    }
}

/* --- 桌面端：避免hover位移与JS卡片倾斜冲突 --- */
@media (pointer: fine) {
    .card-hover-effect:hover {
        transform: none;
    }
}

/* --- 无障碍：减少动效支持 --- */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    #back-to-top {
        transition: none !important;
    }
}
