/**
 * 帮助中心 / 说明文档统一布局，与登录页青系终端风对齐。
 * 使用：<body class="cw-help-body">，保留原有 .wrap / .card 等结构。
 */
:root {
    --cw-help-bg: #030508;
    --cw-help-primary: #00d2ff;
    --cw-help-accent: #00f5a0;
    --cw-help-text: #e2e8f0;
    --cw-help-sub: #94a3b8;
    --cw-help-border: rgba(0, 210, 255, 0.18);
}

body.cw-help-body {
    margin: 0;
    min-height: 100vh;
    color: var(--cw-help-text);
    font-family: 'Bahnschrift', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--cw-help-bg);
    background-image:
        radial-gradient(ellipse 75% 50% at 10% 0%, rgba(0, 210, 255, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 45% at 95% 20%, rgba(184, 77, 255, 0.07), transparent 48%),
        radial-gradient(ellipse 55% 40% at 50% 100%, rgba(0, 245, 160, 0.06), transparent 45%);
    background-attachment: fixed;
}

body.cw-help-body .wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 22px 20px 40px;
}

/* 策略说明页顶栏：coinwin +「公告与帮助中心」+ 返回首页（与 help_martingale 等一致） */
body.cw-help-body .topbar {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(36, 53, 80, 0.9);
    border-radius: 12px;
    background: rgba(6, 10, 16, 0.94);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-sizing: border-box;
}

body.cw-help-body .brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

body.cw-help-body .brand h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(120deg, #fff 0%, var(--cw-help-primary) 50%, var(--cw-help-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.cw-help-body .brand span {
    color: var(--cw-help-sub);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.cw-help-body .topbar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 210, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
    color: var(--cw-help-text);
    text-decoration: none;
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
    transition: border-color 0.15s ease, color 0.15s ease;
}

body.cw-help-body .topbar .btn:hover {
    border-color: rgba(0, 210, 255, 0.55);
    color: #ffffff;
}

body.cw-help-body .hero,
body.cw-help-body .tools,
body.cw-help-body .panel,
body.cw-help-body .card {
    background: rgba(12, 18, 28, 0.82) !important;
    border: 1px solid rgba(0, 210, 255, 0.14) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 20px 40px -18px rgba(0, 0, 0, 0.6),
        0 0 40px -20px rgba(0, 210, 255, 0.1);
}

body.cw-help-body .btn.primary {
    background: linear-gradient(135deg, #00d2ff, #0072ff) !important;
    border-color: rgba(0, 210, 255, 0.45) !important;
}

body.cw-help-body .back,
body.cw-help-body a.back {
    color: rgba(0, 210, 255, 0.9) !important;
}

body.cw-help-body h2 {
    color: #bae6fd !important;
}

body.cw-help-body .matrix th {
    background: rgba(0, 210, 255, 0.08) !important;
    color: #e2e8f0 !important;
}

body.cw-help-body .tag {
    border-color: rgba(0, 210, 255, 0.35) !important;
}

body.cw-help-body .item {
    background: rgba(8, 14, 22, 0.75) !important;
    border-color: rgba(0, 210, 255, 0.1) !important;
}

body.cw-help-body .panel-head h3 {
    color: rgba(0, 210, 255, 0.88) !important;
}

/*
 * 用户中心 / 工作台 iframe 内嵌打开说明页（body.embedded）：
 * - 取消 .topbar 底边线，避免与 iframe 顶边叠成「一条线」、看起来像内容被裁掉
 * - fixed 背景在子文档 iframe 内易导致滚动/视口异常，改为 scroll
 * - 略收紧上内边距，首屏卡片与「返回首页」区留白更自然
 */
body.cw-help-body.embedded {
    background-attachment: scroll;
    min-height: 100%;
}

body.cw-help-body.embedded .topbar {
    border-bottom: none !important;
    padding-bottom: 8px !important;
    margin-bottom: 10px !important;
}

body.cw-help-body.embedded .links {
    display: none !important;
}

body.cw-help-body.embedded .wrap {
    padding-top: 16px !important;
}
