@charset "utf-8";
/* CSS Document - 互么工具箱协议统一布局样式系统 */

/* ============ 主题色变量 ============ */
:root {
    --primary-color: #1677ff;
    --primary-light: #e6f4ff;
    --primary-dark: #0958d9;
    --accent-color: #ff7a45;
    --highlight-bg: #fff8e1;
    --highlight-border: #ffa726;

    /* 浅色模式（默认） */
    --bg-color: #f5f7fa;
    --surface-color: #ffffff;
    --text-primary: #1f2329;
    --text-secondary: #4e5969;
    --text-tertiary: #86909c;
    --border-color: #e5e6eb;
    --divider-color: #f2f3f5;
    --link-color: #1677ff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --header-bg: rgba(255, 255, 255, 0.95);
    --code-bg: #f7f8fa;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #4d94ff;
        --primary-light: #1a3560;
        --primary-dark: #4d94ff;
        --accent-color: #ff8a65;
        --highlight-bg: #3d3419;
        --highlight-border: #ffa726;

        --bg-color: #121212;
        --surface-color: #1e1e1e;
        --text-primary: #e8eaed;
        --text-secondary: #bdc1c6;
        --text-tertiary: #9aa0a6;
        --border-color: #2d2d2d;
        --divider-color: #262626;
        --link-color: #4d94ff;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
        --header-bg: rgba(30, 30, 30, 0.95);
        --code-bg: #2a2a2a;
    }
}

/* ============ 基础重置 ============ */
html {
    margin: 0;
    font: "微软雅黑";
    -webkit-text-size-adjust: 100%;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    font-size: 15px;
    line-height: 1.75;
    letter-spacing: 0.3px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* iPhone 全面屏底部安全区适配:避免 Safari 底部工具栏遮挡页面最后一行内容 */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

a {
    color: var(--link-color);
    text-decoration: none;
    word-break: break-all;
}

a:hover {
    text-decoration: underline;
}

ul {
    padding: 0;
    margin: 0;
}

li {
    list-style-type: none;
}

/* ============ 整体容器 ============ */
.body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ============ 顶部导航 ============ */
.body .header {
    width: 100%;
    height: 56px;
    line-height: 56px;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

/* ============ 主内容容器 ============ */
.body .maincontent {
    max-width: 820px;
    margin: 72px auto 32px;
    padding: 28px 24px 40px;
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    line-height: 1.85;
    color: var(--text-primary);
}

.body .maincontent h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 16px;
}

.body .maincontent h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 16px;
}

.body .maincontent h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
    letter-spacing: 1px;
}

.body .maincontent h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 28px 0 14px;
    padding: 8px 0 8px 14px;
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
    border-radius: 0 4px 4px 0;
}

.body .maincontent h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 18px 0 10px;
    padding-left: 10px;
    border-left: 3px solid var(--primary-color);
}

.body .maincontent p {
    margin: 10px 0;
    color: var(--text-primary);
    word-wrap: break-word;
    word-break: normal;
}

.body .maincontent strong {
    color: var(--text-primary);
    font-weight: 600;
}

.body .maincontent br + br {
    content: "";
    display: block;
    margin-top: 8px;
}

/* ============ 文档元信息（版本日期等） ============ */
.body .maincontent .meta-info {
    background: var(--primary-light);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============ 强调提示块 ============ */
.body .maincontent .alert,
.body .maincontent .highlight {
    background: var(--highlight-bg);
    border-left: 4px solid var(--highlight-border);
    padding: 12px 16px;
    margin: 14px 0;
    border-radius: 0 6px 6px 0;
    color: var(--text-primary);
}

.body .maincontent .alert strong,
.body .maincontent .highlight strong {
    color: var(--accent-color);
}

/* ============ 章节分隔 ============ */
.body .maincontent .divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 24px 0;
    border: none;
}

/* ============ 目录索引样式 ============ */
.body .maincontent .toc {
    background: var(--primary-light);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0 24px;
}

.body .maincontent .toc-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.body .maincontent .toc-item {
    padding: 4px 0;
    color: var(--text-secondary);
}

/* ============ 编号列表优化 ============ */
.body .maincontent .numbered-list {
    counter-reset: section;
    padding-left: 0;
    margin: 12px 0;
}

.body .maincontent .numbered-list > li {
    position: relative;
    padding: 6px 0 6px 28px;
    border-bottom: 1px dashed var(--divider-color);
    color: var(--text-primary);
}

.body .maincontent .numbered-list > li:last-child {
    border-bottom: none;
}

.body .maincontent .numbered-list > li::before {
    content: counter(section);
    counter-increment: section;
    position: absolute;
    left: 0;
    top: 8px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

/* ============ 卡片样式（用于第三方SDK、规则条款等） ============ */
.body .maincontent .card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 12px 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.body .maincontent .card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.body .maincontent .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--divider-color);
}

.body .maincontent .card-row {
    display: flex;
    flex-wrap: wrap;
    padding: 4px 0;
    color: var(--text-primary);
}

.body .maincontent .card-label {
    flex: 0 0 110px;
    font-weight: 600;
    color: var(--text-secondary);
}

.body .maincontent .card-value {
    flex: 1 1 200px;
    color: var(--text-primary);
}

/* ============ 表格样式（权限清单） ============ */
.body .maincontent .perm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}

.body .maincontent .perm-table th {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
}

.body .maincontent .perm-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--divider-color);
    color: var(--text-primary);
}

.body .maincontent .perm-table tr:nth-child(even) td {
    background: var(--divider-color);
}

/* ============ 帮助与反馈 ============ */
.body .maincontent li {
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.body .maincontent li a {
    color: var(--text-primary);
}

.body .maincontent li p {
    width: 90%;
}

.body .maincontent .question {
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

/* ============================================================
   三端响应式适配（手机 / 平板 / 电脑）
   断点说明：
   - 手机：max-width: 767px（含小屏 480px 增强）
   - 平板：768px ~ 1023px
   - 电脑：min-width: 1024px（含大屏 1440px 增强）
   ============================================================ */

/* ============ 一、电脑端（>= 1024px） ============ */
@media screen and (min-width: 1024px) {
    body {
        font-size: 16px;
    }

    .body .maincontent {
        max-width: 880px;
        margin: 80px auto 40px;
        padding: 40px 48px 52px;
    }

    .body .maincontent h3 {
        font-size: 1.6rem;
        padding-bottom: 18px;
    }

    .body .maincontent h4 {
        font-size: 1.2rem;
        margin: 32px 0 16px;
        padding: 10px 0 10px 16px;
    }

    .body .maincontent h5 {
        font-size: 1.05rem;
        margin: 22px 0 12px;
    }

    .body .maincontent .card {
        padding: 18px 22px;
    }

    .body .maincontent .card-label {
        flex: 0 0 130px;
    }
}

/* 电脑大屏增强（>= 1440px）：内容区更宽，阅读更舒展 */
@media screen and (min-width: 1440px) {
    body {
        font-size: 17px;
    }

    .body .maincontent {
        max-width: 960px;
        padding: 48px 56px 60px;
    }

    .body .maincontent h3 {
        font-size: 1.75rem;
    }

    .body .maincontent h4 {
        font-size: 1.3rem;
    }
}

/* ============ 二、平板端（768px ~ 1023px） ============ */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    body {
        font-size: 15px;
    }

    .body .maincontent {
        max-width: 720px;
        margin: 72px auto 32px;
        padding: 28px 32px 40px;
    }

    .body .maincontent h3 {
        font-size: 1.45rem;
        padding-bottom: 14px;
    }

    .body .maincontent h4 {
        font-size: 1.1rem;
        margin: 26px 0 14px;
        padding: 8px 0 8px 14px;
    }

    .body .maincontent h5 {
        font-size: 1rem;
        margin: 20px 0 10px;
    }

    .body .maincontent .card {
        padding: 14px 18px;
    }

    .body .maincontent .card-label {
        flex: 0 0 110px;
    }
}

/* ============ 三、手机端（<= 767px） ============ */
@media screen and (max-width: 767px) {
    body {
        font-size: 14px;
        line-height: 1.7;
    }

    .body .maincontent {
        margin: 64px 12px 20px;
        padding: 20px 16px 28px;
        border-radius: 8px;
    }

    .body .maincontent h3 {
        font-size: 1.3rem;
        padding-bottom: 12px;
    }

    .body .maincontent h4 {
        font-size: 1.05rem;
        margin: 22px 0 12px;
        padding: 6px 0 6px 12px;
    }

    .body .maincontent h5 {
        font-size: 0.95rem;
    }

    .body .maincontent .card {
        padding: 12px 14px;
    }

    .body .maincontent .card-label {
        flex: 0 0 90px;
        font-size: 13px;
    }

    .body .maincontent .card-value {
        font-size: 13px;
    }

    .body .maincontent .perm-table {
        font-size: 12px;
    }

    .body .maincontent .perm-table th,
    .body .maincontent .perm-table td {
        padding: 6px 8px;
    }
}

/* 手机小屏增强（<= 480px）：卡片字段纵向堆叠,避免横向挤压 */
@media screen and (max-width: 480px) {
    .body .maincontent {
        margin: 60px 8px 16px;
        padding: 16px 12px 24px;
    }

    .body .maincontent h3 {
        font-size: 1.2rem;
    }

    /* SDK 卡片字段改为纵向排列 */
    .body .maincontent .card-row {
        flex-direction: column;
    }

    .body .maincontent .card-label {
        flex: none;
        margin-bottom: 2px;
    }
}