/* ===========================================
   公共样式：chanluntu.com 全站共享
   覆盖首页与使用说明页的基础视觉与布局
   =========================================== */

/* CSS 变量定义 */
:root {
    /* 主色板：Structured Confidence 方向
       以暖中性色为基底，暗红色作为信任强调色，
       琥珀色仅用于金融数据相关的点缀。 */
    --bg: #fafaf9;
    --bg-elevated: #ffffff;
    --bg-soft: #f5f5f4;
    --text: #1c1917;
    --text-secondary: #57534e;
    --text-tertiary: #78716c;
    --border: #e7e5e4;
    --border-strong: #d6d3d1;

    --accent: #b91c1c;
    --accent-dark: #991b1b;
    --accent-light: #dc2626;
    --amber: #b45309;
    --amber-light: #f59e0b;

    --code-bg: #f5f5f4;
    --warning-bg: #fff7ed;
    --warning-border: #fdba74;
    --tip-bg: #fef2f2;
    --tip-border: #fecaca;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.06), 0 4px 6px -4px rgb(0 0 0 / 0.06);

    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* 基础重置 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 顶部导航栏 */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 249, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-nav .nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-nav .logo {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.site-nav .logo span {
    color: var(--accent);
}
.site-nav .nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav .nav-links a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.site-nav .nav-links a:hover {
    color: var(--text);
}
.site-nav .nav-links a.active {
    color: var(--accent);
}

/* 通用容器 */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ===========================================
   首页样式
   =========================================== */

/* Hero 区域：左右两栏，左侧文案，右侧产品示意 */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--bg);
    padding: 80px 24px 100px;
    border-bottom: 1px solid var(--border);
}
.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tip-bg);
    border: 1px solid var(--tip-border);
    color: var(--accent-dark);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    background: var(--accent-light);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}
.hero h1 {
    margin: 0 0 20px;
    font-size: 46px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}
.hero h1 .highlight {
    color: var(--accent);
}
.hero-subtitle {
    font-size: 18px;
    line-height: 1.7;
    margin: 0 0 32px;
    color: var(--text-secondary);
    max-width: 480px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow);
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}
.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover {
    border-color: var(--text-tertiary);
    background: var(--bg-soft);
}
.hero-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-tertiary);
}
.hero-note a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.hero-note a:hover { text-decoration: none; }

/* Hero 右侧产品示意图 */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chart-card {
    width: 100%;
    max-width: 520px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-lg);
}
.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-tertiary);
}
.chart-card-header .ticker {
    font-weight: 700;
    color: var(--text);
    font-size: 14px;
}
.chart-card-header .badge-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
    font-weight: 600;
}
.chart-card-header .badge-live::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent-light);
    border-radius: 50%;
}

/* 社会证明条 */
.social-proof {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 28px 24px;
}
.social-proof-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 48px;
    text-align: center;
}
.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}
.stat-value.free {
    color: var(--accent);
}
.stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* 通用章节标题 */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}
.section-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.section-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
}
.section-lead {
    font-size: 17px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
}

/* 功能特点：交替大图布局 */
.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    margin: 80px 0;
}
.feature-block.reverse {
    direction: rtl;
}
.feature-block.reverse > * {
    direction: ltr;
}
.feature-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--tip-bg);
    color: var(--accent);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 16px;
}
.feature-block h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 14px;
    letter-spacing: -0.01em;
    color: var(--text);
}
.feature-block p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 20px;
    line-height: 1.7;
}
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.feature-list li {
    position: relative;
    padding-left: 26px;
    margin: 10px 0;
    font-size: 15px;
    color: var(--text-secondary);
}
.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 14px;
    height: 14px;
    background: var(--tip-bg);
    border-radius: 50%;
}
.feature-list li::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 11px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}
.feature-visual {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 三步上手：编号步骤卡片 */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 48px 0;
}
.step-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.step-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.step-card .step-number {
    position: absolute;
    top: -18px;
    left: 28px;
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    box-shadow: var(--shadow);
}
.step-card h3 {
    margin: 12px 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.step-card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* 缠论助手引导区 */
.alternative-section {
    margin-top: 80px;
    padding-top: 64px;
    border-top: 1px solid var(--border);
}
.alternative-callout {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-top: 40px;
}
.alternative-callout h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.alternative-callout .callout-subtitle {
    margin: 0 0 20px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.platform-list {
    display: grid;
    gap: 12px;
}
.platform-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.platform-row:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.platform-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--tip-bg);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.platform-row .pt-info {
    flex: 1;
}
.platform-row .pt-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.platform-row .pt-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 2px 0 0;
}
.platform-row .pt-go {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}
.platform-row .pt-go:hover { color: var(--accent-dark); }

/* 价格说明 */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 48px 0;
}
.pricing-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}
.pricing-card h3 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pricing-card .price {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}
.pricing-card .price small {
    font-size: 14px;
    color: var(--text-tertiary);
    font-weight: 500;
}
.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.pricing-card li {
    position: relative;
    padding-left: 24px;
    margin: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.pricing-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* FAQ */
.faq-list {
    max-width: 760px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}
.faq-item summary {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: 22px;
    color: var(--accent);
    font-weight: 300;
}
.faq-item[open] summary::after {
    content: "−";
}
.faq-item p {
    margin: 14px 0 0;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* CTA 区域 */
.cta-section {
    background: var(--text);
    border-radius: var(--radius-xl);
    padding: 64px 40px;
    text-align: center;
    margin: 80px 0 0;
    color: #fff;
}
.cta-section h2 {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    border: none;
}
.cta-section p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}
.cta-section .btn-primary {
    background: #fff;
    color: var(--text);
}
.cta-section .btn-primary:hover {
    background: var(--bg-soft);
}
.cta-section .btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}
.cta-section .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 页脚 */
footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 13.5px;
    text-align: center;
}
footer a {
    color: var(--text-secondary);
    text-decoration: none;
}
footer a:hover { color: var(--accent); }
/* 页脚免责声明：弱化展示 */
.footer-disclaimer {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ===========================================
   使用说明页样式
   =========================================== */

/* 页面页眉（说明页） */
.page-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 56px 24px 44px;
    text-align: center;
    margin-bottom: 32px;
}
.page-header h1 {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.page-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 16px;
}

/* 目录 */
nav.toc {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 26px;
    margin-bottom: 40px;
}
nav.toc h2 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
nav.toc ul { margin: 0; padding-left: 20px; columns: 2; column-gap: 40px; }
nav.toc a { color: var(--accent); text-decoration: none; font-weight: 500; }
nav.toc a:hover { text-decoration: none; }

/* 通用排版 */
h2 {
    font-size: 24px;
    margin: 44px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    letter-spacing: -0.01em;
}
h3 { font-size: 18px; margin: 28px 0 12px; color: var(--text); font-weight: 600; }
p { margin: 12px 0; }
ul, ol { padding-left: 24px; }
li { margin: 8px 0; }

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14.5px;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
th, td {
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}
th { background: var(--bg-soft); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }

/* 代码 */
pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.6;
}
code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}
pre code { background: none; padding: 0; }

/* 提示 / 警告 / 注意事项 */
.notice {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin: 18px 0;
    font-size: 14.5px;
}
.notice-warn { background: var(--warning-bg); border: 1px solid var(--warning-border); }
.notice-tip  { background: var(--tip-bg); border: 1px solid var(--tip-border); }
.notice-tip strong, .notice-warn strong { color: var(--amber); }

/* 风险提示：红色系强调，左侧加粗竖线增强警示感 */
.notice-risk {
    background: var(--tip-bg);
    border: 1px solid var(--tip-border);
    border-left: 4px solid var(--accent);
}
.notice-risk strong { color: var(--accent-dark); }
.notice-risk ul {
    margin: 10px 0 0;
    padding-left: 20px;
}
.notice-risk li { margin: 8px 0; }
.notice-risk li strong { color: var(--accent); }

blockquote {
    margin: 18px 0;
    padding: 8px 18px;
    border-left: 3px solid var(--accent);
    background: var(--bg-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}

/* FAQ 列表（说明页） */
.faq dt { font-weight: 600; margin-top: 18px; color: var(--text); }
.faq dd { margin: 6px 0 0 0; color: var(--text-secondary); }

/* 响应式 */
@media (max-width: 900px) {
    .hero-inner,
    .feature-block,
    .feature-block.reverse {
        grid-template-columns: 1fr;
        gap: 40px;
        direction: ltr;
    }
    .feature-block.reverse > * { direction: ltr; }
    .alternative-callout { grid-template-columns: 1fr; gap: 32px; }
    .hero h1 { font-size: 38px; }
    .hero { padding: 60px 24px 70px; }
    .steps-grid,
    .pricing-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 28px; }
}

@media (max-width: 640px) {
    .site-nav .nav-inner {
        height: 56px;
        padding: 0 16px;
    }
    .site-nav .nav-links { gap: 20px; }
    .container { padding: 0 16px 60px; }
    .hero { padding: 48px 16px 56px; }
    .hero h1 { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }
    .section-title { font-size: 26px; }
    .feature-block { margin: 56px 0; }
    .feature-block h3 { font-size: 22px; }
    .chart-card { padding: 20px; }
    .cta-section { padding: 48px 24px; }
    .cta-section h2 { font-size: 24px; }
    .social-proof-inner { gap: 28px; }
    nav.toc ul { columns: 1; }
    table { font-size: 13px; }
    th, td { padding: 10px 12px; }
}

/* ===========================================
   弹窗组件：居中提示框
   =========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    opacity: 1;
    transition: opacity 0.2s ease;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modal-in 0.25s ease;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-box h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.modal-box p {
    margin: 0 0 24px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1 1 auto;
    min-width: 120px;
}

@media (max-width: 480px) {
    .modal-box {
        padding: 24px 20px;
    }
    .modal-actions {
        flex-direction: column;
    }
    .modal-actions .btn {
        width: 100%;
    }
}
