/* ============================================================
   操作说明页 · 视觉训练系统使用指南
   深色科技风 · 毛玻璃卡片 · 金色点缀
   ============================================================ */

#helpOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(8, 16, 36, 0.94) 0%, rgba(4, 10, 26, 0.97) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    color: #e8edf7;
    animation: helpFadeIn 0.28s ease;
    overflow: hidden;
}

@keyframes helpFadeIn {
    from { opacity: 0; transform: scale(0.985); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---------- 主面板 ---------- */
.help-panel {
    width: 100%;
    max-width: 1020px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, rgba(23, 35, 66, 0.92) 0%, rgba(12, 20, 42, 0.96) 100%);
    border: 1px solid rgba(120, 160, 255, 0.28);
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 24px 60px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(25, 118, 210, 0.15) inset;
    overflow: hidden;
}

/* ---------- 头部 ---------- */
.help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px 16px 28px;
    border-bottom: 1px solid rgba(120, 160, 255, 0.18);
    background: linear-gradient(90deg, rgba(25, 118, 210, 0.18), rgba(25, 118, 210, 0.02));
    position: relative;
    flex-shrink: 0;
}

.help-header::after {
    content: '';
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, #ffd54f, rgba(255, 213, 79, 0.15));
    opacity: 0.7;
}

.help-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.help-title-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(145deg, #1976d2, #0d47a1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.45);
    flex-shrink: 0;
    object-fit: cover;
}

.help-title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
    line-height: 1.2;
}

.help-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 3px;
    margin-top: 3px;
}

.help-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.help-close:hover {
    background: rgba(229, 57, 53, 0.8);
    border-color: transparent;
    transform: rotate(90deg);
}

/* ---------- 滚动内容区 ---------- */
.help-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 28px 26px 28px;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 160, 255, 0.4) transparent;
}

.help-body::-webkit-scrollbar {
    width: 8px;
}

.help-body::-webkit-scrollbar-track {
    background: transparent;
}

.help-body::-webkit-scrollbar-thumb {
    background: rgba(120, 160, 255, 0.35);
    border-radius: 4px;
}

/* ---------- 板块 ---------- */
.help-section {
    margin-bottom: 26px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

.help-section-title .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: linear-gradient(145deg, #ffd54f, #ff9800);
    color: #1a1a2e;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(255, 152, 0, 0.4);
}

.help-section-title .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(120, 160, 255, 0.35), transparent);
}

/* ---------- 操作说明（双栏） ---------- */
.help-ops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.help-op-card {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(120, 160, 255, 0.16);
    border-radius: 14px;
    padding: 14px 16px;
}

.help-op-title {
    font-size: 14px;
    font-weight: bold;
    color: #ffd54f;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.help-op-title .dev {
    margin: 0 4px;
    color: rgba(255, 255, 255, 0.3);
}

.help-kv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 2px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}

.help-kv-row:last-child {
    border-bottom: none;
}

.help-kv-row .help-kv-key {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

kbd.help-key {
    display: inline-block;
    min-width: 26px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 6px;
    background: linear-gradient(180deg, #3a4a6e, #232f4d);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-bottom-width: 3px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    font-family: Consolas, 'Courier New', monospace;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

kbd.help-key.pad {
    background: linear-gradient(180deg, #4a3a6e, #2f234d);
    border-color: rgba(255, 255, 255, 0.2);
}

.help-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(25, 118, 210, 0.08);
    border-left: 3px solid #1976d2;
    border-radius: 6px;
}

/* ---------- 训练流程 ---------- */
.help-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(120, 160, 255, 0.12);
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.help-step .step-badge {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(145deg, #26c6da, #1976d2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 3px 8px rgba(25, 118, 210, 0.4);
    margin-top: 2px;
}

.help-step b {
    color: #ffd54f;
}

/* ---------- 训练项目卡片 ---------- */
.help-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.help-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(120, 160, 255, 0.16);
    border-radius: 14px;
    padding: 14px 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.help-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-color, #1976d2), transparent);
    opacity: 0.8;
}

.help-card:hover {
    transform: translateY(-3px);
    border-color: rgba(120, 160, 255, 0.4);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.help-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.help-card-name {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.help-tag {
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.help-tag.zengshi   { background: rgba(38, 198, 218, 0.18);  color: #4dd0e1; border: 1px solid rgba(38, 198, 218, 0.4); }
.help-tag.tiaojie   { background: rgba(25, 118, 210, 0.18);  color: #64b5f6; border: 1px solid rgba(25, 118, 210, 0.4); }
.help-tag.shigong   { background: rgba(171, 71, 188, 0.18);  color: #ce93d8; border: 1px solid rgba(171, 71, 188, 0.4); }
.help-tag.ronghe    { background: rgba(102, 187, 106, 0.18); color: #81c784; border: 1px solid rgba(102, 187, 106, 0.4); }
.help-tag.sejue     { background: rgba(255, 152, 0, 0.18);   color: #ffb74d; border: 1px solid rgba(255, 152, 0, 0.4); }
.help-tag.core      { background: rgba(255, 213, 79, 0.2);   color: #ffd54f; border: 1px solid rgba(255, 213, 79, 0.5); }

.help-card-desc {
    font-size: 12px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.7);
}

.help-card-desc b {
    color: rgba(255, 255, 255, 0.95);
}

/* ---------- 免责声明 ---------- */
.help-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    margin-top: 18px;
    background: rgba(255, 152, 0, 0.06);
    border: 1px solid rgba(255, 152, 0, 0.22);
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.help-disclaimer .warn-ico {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 152, 0, 0.25);
    color: #ffb74d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    margin-top: 1px;
}

/* ---------- 底部 ---------- */
.help-footer {
    flex-shrink: 0;
    padding: 12px 28px;
    border-top: 1px solid rgba(120, 160, 255, 0.15);
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.18);
}

.help-footer b {
    color: #ffd54f;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
    .help-ops-grid { grid-template-columns: 1fr; }
    .help-cards { grid-template-columns: repeat(2, 1fr); }
    .help-title { font-size: 20px; }
    .help-panel { max-height: 96vh; }
}

@media (max-width: 560px) {
    .help-cards { grid-template-columns: 1fr; }
    .help-body { padding: 16px; }
    .help-header { padding: 14px 16px 12px 16px; }
    .help-footer { padding: 10px 16px; }
}

/* ============================================================
   高阶文档扩展 · 动态视标训练系统
   ============================================================ */

/* ---------- 核心总特性 Banner ---------- */
.help-hero {
    position: relative;
    padding: 18px 20px;
    border-radius: 14px;
    background:
        radial-gradient(600px 120px at 85% -10%, rgba(255, 213, 79, 0.14), transparent 60%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(255, 213, 79, 0.32);
    overflow: hidden;
    margin-bottom: 14px;
}

.help-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd54f, transparent);
    opacity: 0.7;
}

.help-hero-title {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
    color: #ffd54f;
    margin-bottom: 8px;
}

.help-hero-txt {
    font-size: 13px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
}

.help-hero-txt b {
    color: #ffd54f;
}

.help-feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.help-hero-tag {
    font-size: 11px;
    color: rgba(255, 213, 79, 0.9);
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 213, 79, 0.08);
    border: 1px solid rgba(255, 213, 79, 0.28);
    letter-spacing: 1px;
}

/* ---------- 核心能力标签 ---------- */
.help-chips-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 2px;
    margin: 6px 0 10px 0;
}

.help-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.help-chip {
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    padding: 4px 14px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(38, 198, 218, 0.22), rgba(25, 118, 210, 0.22));
    border: 1px solid rgba(120, 160, 255, 0.35);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
    letter-spacing: 1px;
}

/* ---------- 训练项目模块卡 ---------- */
.help-module {
    position: relative;
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(120, 160, 255, 0.16);
    border-radius: 14px;
    padding: 16px 18px 14px 18px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.help-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--m-color, #1976d2), transparent);
    opacity: 0.85;
}

.help-module:hover {
    transform: translateY(-2px);
    border-color: rgba(120, 160, 255, 0.4);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.help-module-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.help-module-idx {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(145deg, var(--m-color, #1976d2), rgba(0, 0, 0, 0.35));
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.help-module-head {
    flex: 1;
    min-width: 0;
}

.help-module-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 1px;
}

.help-module-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    letter-spacing: 1px;
}

.help-module-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.help-badge {
    font-size: 11px;
    font-weight: bold;
    color: #ffd54f;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(255, 213, 79, 0.1);
    border: 1px solid rgba(255, 213, 79, 0.35);
    letter-spacing: 1px;
}

.help-module-desc {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 10px;
}

.help-module-desc b {
    color: #fff;
}

/* 范式要点三列 */
.help-para-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.help-para {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(120, 160, 255, 0.12);
    border-radius: 10px;
    padding: 9px 12px;
    border-left: 3px solid var(--m-color, #1976d2);
}

.help-para-label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    color: var(--m-color, #4dd0e1);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.help-para-txt {
    display: block;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.68);
}

.help-para-txt b {
    color: rgba(255, 255, 255, 0.92);
}

/* 叠加效果高亮 */
.help-boost {
    font-size: 12.5px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.85);
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, rgba(255, 213, 79, 0.09), rgba(255, 152, 0, 0.03));
    border: 1px solid rgba(255, 213, 79, 0.25);
    border-left: 3px solid #ffd54f;
}

.help-boost b {
    color: #ffd54f;
}

/* 独有配置 / 扩展叠加 */
.help-extra {
    font-size: 12px;
    line-height: 1.7;
    color: rgba(120, 200, 255, 0.85);
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(25, 118, 210, 0.08);
    border-left: 3px solid #4dd0e1;
    margin-bottom: 4px;
}

.help-extra b {
    color: #4dd0e1;
}

.help-warn-tip {
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 179, 71, 0.9);
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 152, 0, 0.07);
    border-left: 3px solid #ffb74d;
    margin-bottom: 10px;
}

.help-warn-tip b {
    color: #ffb74d;
}

/* ---------- 软件独有附加能力 ---------- */
.help-feats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-feat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(120, 160, 255, 0.14);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
}

.help-feat-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffd54f, #ff9800);
    color: #1a1a2e;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
}

.help-feat b {
    color: #ffd54f;
}

/* ---------- 合规风险提示 ---------- */
.help-risk {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    margin-top: 18px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(229, 57, 53, 0.1), rgba(229, 57, 53, 0.02));
    border: 1px solid rgba(229, 57, 53, 0.3);
    font-size: 12.5px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.75);
}

.help-risk-ico {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(229, 57, 53, 0.25);
    color: #ef5350;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.help-risk b {
    color: #ef5350;
}

@media (max-width: 860px) {
    .help-para-grid { grid-template-columns: 1fr; }
    .help-module-top { flex-wrap: wrap; }
    .help-module-badges { justify-content: flex-start; }
}
