/* ============ 文章页共享样式 — 与首页设计系统统一 ============ */

:root {
    --primary: #0a2540;
    --primary-light: #1a3a5c;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --bg: #ffffff;
    --bg-soft: #f7f9fc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-soft: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --max-width: 1140px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-soft);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ 导航栏（与首页统一） ============ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}
.nav-brand img { height: 36px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-soft);
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

.nav-cta {
    background: var(--accent-gradient);
    color: #fff !important;
    padding: 9px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59,130,246,0.4); }

/* ============ 面包屑 ============ */
.breadcrumb {
    padding-top: 92px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.breadcrumb-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
}
.breadcrumb a { color: var(--text-soft); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-light); margin: 0 2px; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ============ 文章主体布局 ============ */
.article-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 64px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
}

/* ============ 文章内容区 ============ */
.article-content {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.article-header {
    padding: 40px 44px 28px;
    border-bottom: 1px solid var(--border);
}

.article-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.4;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
}
.article-meta .tag {
    display: inline-block;
    padding: 3px 10px;
    background: #eff6ff;
    color: var(--accent);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}
.article-meta .dot { color: var(--border); }

.article-body {
    padding: 36px 44px;
    font-size: 16px;
    line-height: 1.9;
    color: var(--text);
}

.article-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 40px 0 16px;
    padding-left: 14px;
    border-left: 4px solid var(--accent);
    line-height: 1.4;
}

.article-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 28px 0 12px;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body strong {
    color: var(--primary);
    font-weight: 700;
}

.article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
.article-body a:hover { color: var(--primary); }

.article-body ul, .article-body ol {
    margin: 12px 0 20px 20px;
    padding-left: 8px;
}
.article-body ul li {
    list-style: disc;
    margin-bottom: 8px;
    padding-left: 4px;
}
.article-body ol li {
    list-style: decimal;
    margin-bottom: 8px;
    padding-left: 4px;
}

.article-body blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    background: var(--bg-soft);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-soft);
    font-size: 15px;
}
.article-body blockquote strong { color: var(--primary); }

/* ============ 文章内配图容器 ============ */
.figure {
    margin: 28px 0;
    text-align: center;
}
.figure svg {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.figure .caption {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

/* ============ 信息提示框 ============ */
.callout {
    margin: 24px 0;
    padding: 18px 22px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.callout-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
.callout-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
}
.callout-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.callout-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.callout-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-top: 1px;
}
.callout-info .callout-icon { background: var(--accent); color: #fff; }
.callout-warn .callout-icon { background: var(--warning); color: #fff; }
.callout-success .callout-icon { background: var(--success); color: #fff; }
.callout-danger .callout-icon { background: var(--danger); color: #fff; }
.callout-body { flex: 1; }
.callout-body strong { color: var(--primary); }

/* ============ 文章内CTA ============ */
.inline-cta {
    margin: 32px 0;
    padding: 28px 32px;
    background: linear-gradient(135deg, #0a2540 0%, #1a3a5c 100%);
    border-radius: var(--radius);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.inline-cta::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 60%);
}
.inline-cta h3 {
    position: relative;
    color: #fff;
    font-size: 20px;
    margin-bottom: 8px;
}
.inline-cta p {
    position: relative;
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    margin-bottom: 20px;
}
.inline-cta .btn {
    position: relative;
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 12px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(59,130,246,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.inline-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.5);
}
.inline-cta .invite-code {
    position: relative;
    display: inline-block;
    margin-top: 12px;
    padding: 6px 18px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    color: #fff;
    font-size: 14px;
}
.inline-cta .invite-code code {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-light);
    margin-left: 6px;
}

/* ============ 文章底部 ============ */
.article-footer {
    padding: 28px 44px 36px;
    border-top: 1px solid var(--border);
}
.article-footer .labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.article-footer .labels a, .article-footer .labels span {
    padding: 4px 12px;
    background: var(--bg-soft);
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-soft);
    transition: all 0.2s;
}
.article-footer .labels a:hover {
    background: #eff6ff;
    color: var(--accent);
}

/* ============ 相关推荐模块 ============ */
.related-recommend {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.related-recommend h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}
.related-recommend .rec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.related-recommend .rec-item {
    display: block;
    padding: 12px 14px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
    line-height: 1.5;
}
.related-recommend .rec-item:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: var(--accent);
}

.prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}
.prev-next a {
    padding: 16px 20px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.prev-next a:hover {
    background: #eff6ff;
}
.prev-next .label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}
.prev-next .title {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}
.prev-next .prev { text-align: left; }
.prev-next .next { text-align: right; }

/* ============ 侧边栏 ============ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 88px;
    align-self: start;
}

/* 注册CTA卡片 */
.cta-card {
    background: linear-gradient(135deg, #0a2540 0%, #1a3a5c 100%);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: '';
    position: absolute;
    top: -60%; right: -40%;
    width: 180%; height: 180%;
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 55%);
}
.cta-card h4 {
    position: relative;
    color: #fff;
    font-size: 18px;
    margin-bottom: 6px;
}
.cta-card p {
    position: relative;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin-bottom: 18px;
}
.cta-card .qr-placeholder {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.cta-card .qr-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cta-card .code-display {
    position: relative;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}
.cta-card .code-display code {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-light);
    letter-spacing: 2px;
}
.cta-card .btn-register {
    position: relative;
    display: block;
    background: var(--accent);
    color: #fff;
    padding: 11px 0;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
    transition: transform 0.2s;
}
.cta-card .btn-register:hover { transform: translateY(-1px); }

/* CTA卡片 — 滚动触发高亮动效 */
.cta-card.highlight {
    animation: ctaPulse 0.6s ease-out;
    box-shadow: 0 0 32px rgba(59,130,246,0.35), 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid rgba(59,130,246,0.3);
}
@keyframes ctaPulse {
    0%   { transform: scale(1); box-shadow: 0 0 0 rgba(59,130,246,0); border-color: transparent; }
    40%  { transform: scale(1.03); box-shadow: 0 0 40px rgba(59,130,246,0.5), 0 4px 24px rgba(0,0,0,0.2); border-color: rgba(59,130,246,0.4); }
    100% { transform: scale(1); box-shadow: 0 0 32px rgba(59,130,246,0.35), 0 4px 20px rgba(0,0,0,0.15); border-color: rgba(59,130,246,0.3); }
}

/* 二次微弱呼吸动画（持续吸引但不骚扰） */
.cta-card.highlight::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: calc(var(--radius) + 2px);
    background: transparent;
    border: 2px solid transparent;
    animation: ctaBreath 3s ease-in-out 0.6s infinite;
    pointer-events: none;
}
@keyframes ctaBreath {
    0%, 100% { border-color: rgba(59,130,246,0); }
    50%      { border-color: rgba(59,130,246,0.25); }
}

/* 目录卡片 */
.toc-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}
.toc-card h4 {
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.toc-card ol {
    list-style: none;
    padding: 0;
}
.toc-card ol li {
    margin-bottom: 8px;
}
.toc-card ol li a {
    font-size: 14px;
    color: var(--text-soft);
    line-height: 1.6;
    transition: color 0.2s;
    display: block;
    padding: 3px 0;
}
.toc-card ol li a:hover { color: var(--accent); }
.toc-card ol li.active a { color: var(--accent); font-weight: 600; }

/* 相关文章卡片 */
.related-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}
.related-card h4 {
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.related-card ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.related-card ul li:last-child { border-bottom: none; }
.related-card ul li a {
    font-size: 14px;
    color: var(--text-soft);
    line-height: 1.5;
    transition: color 0.2s;
}
.related-card ul li a:hover { color: var(--accent); }

/* ============ 页脚 ============ */
.site-footer {
    background: var(--primary);
    padding: 48px 0 28px;
    color: rgba(255,255,255,0.5);
}
.site-footer .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.footer-brand img { height: 36px; }
.footer-brand .name {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}
.footer-grid p { font-size: 14px; line-height: 1.8; }
.footer-grid h5 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-grid ul li {
    font-size: 14px;
    margin-bottom: 8px;
}
.footer-grid ul li a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-grid ul li a:hover { color: #fff; }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 13px;
    line-height: 1.8;
}

/* ============ 佣金表格 ============ */
.commission-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 24px;
    font-size: 14px;
}
.commission-table thead th {
    background: var(--primary);
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}
.commission-table thead th:first-child { border-radius: 8px 0 0 0; }
.commission-table thead th:last-child { border-radius: 0 8px 0 0; }
.commission-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}
.commission-table tbody tr:nth-child(even) { background: #f8fafc; }
.commission-table tbody tr:hover { background: #eff6ff; }
.commission-table tbody tr:last-child td:first-child { border-radius: 0 0 0 8px; }
.commission-table tbody tr:last-child td:last-child { border-radius: 0 0 8px 0; }

/* ============ FAQ单项 ============ */
.faq-item {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}
.faq-item:last-child { border-bottom: none; margin-bottom: 0; }
.faq-item h3 {
    font-size: 16px;
    color: var(--primary);
    margin: 0 0 10px 0;
    font-weight: 600;
    padding-left: 0;
    border-left: none;
}
.faq-item p {
    margin: 0;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.8;
}

/* ============ 响应式 ============ */
@media (max-width: 960px) {
    .article-wrap {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .sidebar {
        position: static;
        order: 2;
    }
    .nav-links { display: none; }
    .article-header { padding: 32px 28px 24px; }
    .article-body { padding: 28px; }
    .article-footer { padding: 24px 28px 32px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
    .article-header h1 { font-size: 22px; }
    .article-body { padding: 20px; font-size: 15px; }
    .article-body h2 { font-size: 19px; }
    .article-body h3 { font-size: 16px; }
    .prev-next { grid-template-columns: 1fr; }
    .related-recommend .rec-grid { grid-template-columns: 1fr; }
    .inline-cta { padding: 24px 20px; }
    .inline-cta h3 { font-size: 17px; }
    .commission-table { font-size: 12px; }
    .commission-table thead th, .commission-table tbody td { padding: 8px 6px; }
}
