/* ============================================
   首页仪表盘 - 电商全流程工作台样式
   ============================================ */

/* ── 精简 Hero ── */
.db-hero {
    background: linear-gradient(-45deg, #1e3a5f, #2c5282, #3b82f6, #1e40af);
    background-size: 300% 300%;
    animation: dbHeroShift 10s ease infinite;
    color: white;
    padding: var(--spacing-2xl) var(--spacing-xl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    text-align: center;
}

@keyframes dbHeroShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.db-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* 粒子效果 Canvas 容器 */
.db-hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.db-hero-content {
    position: relative;
    z-index: 2;
}

.db-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.01em;
}

.db-hero-sub {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: var(--spacing-lg);
}

/* Hero 统计条（嵌入 Hero 内部） */
.db-hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-lg);
}

.db-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.db-hero-stat-num {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.db-hero-stat-label {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Hero 快捷按钮 */
.db-hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

.db-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: white;
    border: 1.5px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.08);
}

.db-hero-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.7);
    transform: translateY(-1px);
}

.db-hero-btn--primary {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.6);
}

/* 工具标签（AI / PPTX / 电脑端） */
.db-tag {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.db-tag--ai {
    background: #ede9fe;
    color: #7c3aed;
}

.db-tag--pptx {
    background: #fef3c7;
    color: #b45309;
}

.db-tag--desktop {
    background: #f0f9ff;
    color: #0369a1;
}

.db-tag--hot {
    background: #fef2f2;
    color: #dc2626;
}

/* ── 底部知识速查横条 ── */
.db-knowledge-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.db-knowledge-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.db-knowledge-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.db-knowledge-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.db-knowledge-text {
    flex: 1;
    min-width: 0;
}

.db-knowledge-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.db-knowledge-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── 平台入口条 ── */
.db-platforms-row {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.db-platform-chip {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.db-platform-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--platform-color, var(--primary-light));
}

.db-platform-chip i {
    font-size: 1.2rem;
}

/* ── 分区标题（复用） ── */
.db-section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.db-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.db-section-icon {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.db-section-line {
    flex: 1;
    height: 1px;
    background: var(--border-light);
    margin-left: var(--spacing-sm);
}

/* ============================================
   响应式
   ============================================ */

/* 手机 */
@media (max-width: 768px) {
    .db-hero {
        padding: var(--spacing-xl) var(--spacing-md);
        border-radius: 0;
        margin: 0 calc(-1 * var(--spacing-md));
        margin-bottom: var(--spacing-lg);
    }

    .db-hero-title {
        font-size: 1.35rem;
    }

    .db-hero-stats {
        gap: var(--spacing-lg);
    }

    .db-hero-stat-num {
        font-size: 1.1rem;
    }

    .db-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .db-hero-btn {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }

    .db-knowledge-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .db-knowledge-item {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .db-knowledge-icon {
        font-size: 1.2rem;
    }

    .db-knowledge-name {
        font-size: 0.82rem;
    }

    .db-knowledge-desc {
        display: none;
    }

    .db-platforms-row {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .db-platform-chip {
        padding: 8px 14px;
        font-size: 0.82rem;
    }
}

/* 超小屏 */
@media (max-width: 480px) {
    .db-hero-stats {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

    .db-knowledge-bar {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   电商卖家经营全旅程 — 神经网络树状结构 (jrn-*)
   ============================================ */

.jrn-section {
    margin-bottom: var(--spacing-2xl);
}

.jrn-header {
    text-align: center;
    margin-bottom: calc(var(--spacing-2xl) + 8px);
}

.jrn-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.jrn-title i {
    color: var(--primary-color);
    margin-right: 6px;
}

.jrn-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ── 树容器：3列思维导图网格 ── */
.jrn-tree {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl) var(--spacing-lg);
    position: relative;
}

/* 移除旧版垂直主干线 */
.jrn-tree::before {
    display: none;
}

/* ── 节点：圆点在上，卡片在下 ── */
.jrn-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    position: relative;
}

.jrn-node:last-child {
    margin-bottom: 0;
}

/* 移除旧版横向连接线 */
.jrn-node::after {
    display: none;
}

/* 节点顶部（圆点居中） */
.jrn-node-left {
    width: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    margin-bottom: var(--spacing-sm);
}

/* ── 节点圆点 ── */
.jrn-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--node-color, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(var(--node-rgb, 59,130,246), 0.16),
                0 2px 8px rgba(var(--node-rgb, 59,130,246), 0.3);
    transition: box-shadow var(--transition-normal);
}

.jrn-node:hover .jrn-dot {
    box-shadow: 0 0 0 7px rgba(var(--node-rgb, 59,130,246), 0.22),
                0 4px 14px rgba(var(--node-rgb, 59,130,246), 0.45);
}

.jrn-dot-num {
    line-height: 1;
    display: flex;
    align-items: center;
}

.jrn-dot-num i {
    font-size: 1rem;
}

/* ── 节点卡片：顶部彩色边框 ── */
.jrn-card {
    width: 100%;
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--node-color, #3b82f6);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    transition: all var(--transition-normal);
    min-width: 0;
    box-sizing: border-box;
}

.jrn-node:hover .jrn-card {
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
    border-top-color: var(--node-color, #3b82f6);
}

.jrn-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.jrn-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.jrn-card-q {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
}

.jrn-count-badge {
    font-size: 0.68rem;
    color: var(--text-light);
    background: var(--bg-color);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 3px;
}

/* ── 工具芯片区 ── */
.jrn-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--spacing-sm);
}

/* 工具芯片（可点击链接） */
.jrn-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
}

a.jrn-chip:hover {
    background: white;
    border-color: var(--node-color, var(--primary-light));
    color: var(--node-color, var(--primary-color));
    box-shadow: 0 2px 8px rgba(var(--node-rgb, 59,130,246), 0.18);
    transform: translateY(-1px);
}

.jrn-chip i {
    font-size: 0.88rem;
    flex-shrink: 0;
}

.jrn-chip em {
    font-style: normal;
}

/* 预留工具芯片（不可点击，虚线边框） */
.jrn-chip--ghost {
    opacity: 0.5;
    cursor: default;
    border-style: dashed;
}

.jrn-chip--ghost:hover {
    transform: none;
    box-shadow: none;
    background: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* ── 整节点锁定（即将上线阶段） ── */
.jrn-node--locked .jrn-card {
    background: var(--bg-color);
    border-style: dashed;
    border-top-style: solid;
    opacity: 0.72;
}

.jrn-node--locked:hover .jrn-card {
    box-shadow: none;
    opacity: 0.82;
}

.jrn-node--locked .jrn-dot {
    box-shadow: 0 0 0 4px rgba(148,163,184,0.15);
}

.jrn-node--locked:hover .jrn-dot {
    box-shadow: 0 0 0 6px rgba(148,163,184,0.22);
}

/* 即将上线大标签（卡片标题内） */
.jrn-coming-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    padding: 2px 7px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: var(--radius-full);
    border: 1px solid #e2e8f0;
    font-weight: 500;
    white-space: nowrap;
    vertical-align: middle;
    letter-spacing: 0;
}

/* 即将上线小标签（chip内部） */
.jrn-soon-tag {
    font-style: normal;
    display: inline-flex;
    align-items: center;
    font-size: 0.58rem;
    padding: 1px 5px;
    background: #f1f5f9;
    color: #94a3b8;
    border-radius: var(--radius-full);
    border: 1px dashed #cbd5e1;
    font-weight: 400;
}

/* ── 曲线动态效果 ── */

/* 入场动画：卡片从下方渐入 */
@keyframes jrnNodeIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 圆点脉冲波纹 */
@keyframes jrnDotPulse {
    0%   { box-shadow: 0 0 0 4px rgba(var(--node-rgb, 59,130,246), 0.18), 0 2px 8px rgba(var(--node-rgb, 59,130,246), 0.3); }
    50%  { box-shadow: 0 0 0 10px rgba(var(--node-rgb, 59,130,246), 0.08), 0 4px 16px rgba(var(--node-rgb, 59,130,246), 0.35); }
    100% { box-shadow: 0 0 0 4px rgba(var(--node-rgb, 59,130,246), 0.18), 0 2px 8px rgba(var(--node-rgb, 59,130,246), 0.3); }
}

/* 圆点内光晕旋转 */
@keyframes jrnDotGlow {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 卡片轻浮动 */
@keyframes jrnFloat {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-4px); }
    100% { transform: translateY(0px); }
}

/* 节点入场动画（由 JS 添加 data-jrn-index 驱动，或用 nth-child） */
.jrn-node {
    opacity: 0;
    animation: jrnNodeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.jrn-node:nth-child(1) { animation-delay: 0.05s; }
.jrn-node:nth-child(2) { animation-delay: 0.15s; }
.jrn-node:nth-child(3) { animation-delay: 0.25s; }
.jrn-node:nth-child(4) { animation-delay: 0.35s; }
.jrn-node:nth-child(5) { animation-delay: 0.45s; }
.jrn-node:nth-child(6) { animation-delay: 0.55s; }
.jrn-node:nth-child(7) { animation-delay: 0.65s; }
.jrn-node:nth-child(8) { animation-delay: 0.75s; }
.jrn-node:nth-child(9)  { animation-delay: 0.85s; }
.jrn-node:nth-child(10) { animation-delay: 0.95s; }
.jrn-node:nth-child(11) { animation-delay: 1.05s; }
.jrn-node:nth-child(12) { animation-delay: 1.15s; }

/* 圆点持续脉冲 */
.jrn-dot {
    animation: jrnDotPulse 2.8s ease-in-out infinite;
}

/* 各圆点错开脉冲相位 */
.jrn-node:nth-child(1) .jrn-dot { animation-delay: 0s; }
.jrn-node:nth-child(2) .jrn-dot { animation-delay: 0.3s; }
.jrn-node:nth-child(3) .jrn-dot { animation-delay: 0.6s; }
.jrn-node:nth-child(4) .jrn-dot { animation-delay: 0.9s; }
.jrn-node:nth-child(5) .jrn-dot { animation-delay: 1.2s; }
.jrn-node:nth-child(6) .jrn-dot { animation-delay: 1.5s; }
.jrn-node:nth-child(7) .jrn-dot { animation-delay: 1.8s; }
.jrn-node:nth-child(8) .jrn-dot { animation-delay: 2.1s; }
.jrn-node:nth-child(9)  .jrn-dot { animation-delay: 2.4s; }
.jrn-node:nth-child(10) .jrn-dot { animation-delay: 2.7s; }
.jrn-node:nth-child(11) .jrn-dot { animation-delay: 3.0s; }
.jrn-node:nth-child(12) .jrn-dot { animation-delay: 3.3s; }

/* ── 工具类节点（使用说明 / 服务支持）── */
.jrn-card--link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    gap: 10px;
    padding: var(--spacing-lg);
    border-style: dashed;
    border-top-style: solid;
    background: linear-gradient(135deg, var(--bg-color) 0%, rgba(var(--node-rgb,100,116,139),0.04) 100%);
    min-height: 140px;
    transition: box-shadow var(--transition-normal), transform 0.18s;
}

.jrn-card--link:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--node-color, #64748b);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(var(--node-rgb,100,116,139),0.08) 100%);
}

.jrn-utility-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: rgba(var(--node-rgb,100,116,139), 0.12);
    color: var(--node-color, #64748b);
    flex-shrink: 0;
}

.jrn-card--link .jrn-card-title {
    margin: 0;
    font-size: 1rem;
}

.jrn-card--link .jrn-card-q {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.jrn-utility-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--node-color, #64748b);
    margin-top: 4px;
    letter-spacing: 0.01em;
}

/* 卡片入场完成后加浮动（通过 .jrn-node--ready 类） */
.jrn-node--ready .jrn-card {
    animation: jrnFloat 4s ease-in-out infinite;
}

.jrn-node:nth-child(odd)--ready .jrn-card   { animation-delay: 0s; }
.jrn-node:nth-child(even)--ready .jrn-card  { animation-delay: 2s; }

/* SVG 曲线画布覆盖层 */
.jrn-curve-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

/* 曲线路径样式 */
.jrn-curve-path {
    fill: none;
    stroke: url(#jrnCurveGrad);
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.55;
}

/* 行进光点 */
.jrn-curve-dot {
    r: 4;
    fill: #3b82f6;
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.8));
}

/* ── 旅程区响应式 ── */
@media (max-width: 1024px) {
    .jrn-tree {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .jrn-tree {
        grid-template-columns: 1fr;
    }

    .jrn-dot {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .jrn-card-q {
        display: none;
    }

    .jrn-count-badge {
        display: none;
    }

    .jrn-chip {
        font-size: 0.75rem;
        padding: 5px 9px;
    }
}
