/* ============================================================
   responsive-doc.css
   通用多端响应式内容样式（应用于 video/ code/ calc/ 下产品介绍页、文档页、表格页、表单页）
   在 default.css / default_doc.css 之后引用，用于覆盖并增强多端显示。

   设计要点：
   - 解决字号过小：默认 14px -> 正文 16px(桌面) / 15px(手机)
   - 解决排版不佳：限阅读宽度并居中、优化间距
   - 解决表格窄屏拥挤：单元格长 URL 自动折行、列自适应
   - 解决表单窄屏拥挤：输入框/按钮宽度自适应
   - 保留原有内容结构（span/br 换行体系不变），仅增强样式
   ============================================================ */

:root {
    --doc-text: #30343a;
    --doc-title: #1a1d21;
    --doc-sub: #5c6670;
    --doc-accent: #0a7d74;
    --doc-border: #e4e9ee;
    --doc-soft: #f6f8fa;
    --doc-radius: 10px;
}

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

body {
    width: 100%;
    max-width: 860px;
    margin: 0 auto !important;         /* 覆盖 default.css 的 5% 左右边距 */
    padding: 20px 16px 48px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
                 "Microsoft YaHei", "微软雅黑", sans-serif;
    color: var(--doc-text);
    background-color: #fff;
    line-height: 1.9;
    word-wrap: break-word;
    font-size: 16px;
    overflow-x: hidden;
}

/* ---------- 文字 / 段落（覆盖 default.css 的 14px） ---------- */
span {
    font-size: 16px;
    color: var(--doc-text);
}

p {
    font-size: 16px;
    color: var(--doc-text);
    text-indent: 0;                    /* 去掉强制首行缩进 */
    margin: 0.3em 0 0.85em;
}

a {
    font-size: 16px;
    color: var(--doc-accent);
    text-decoration: none;
    word-break: break-all;
}

a:hover {
    text-decoration: underline;
}

b {
    font-weight: 600;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 14px auto;
    border-radius: var(--doc-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ---------- 标题 ---------- */
h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--doc-title);
    margin: 0.5em 0 0.7em;
    line-height: 1.4;
}

h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--doc-title);
    margin: 1.4em 0 0.4em;
    line-height: 1.5;
}

/* 文档/产品页中常见的小节标题组合：<b><span>标题</span></b><br/> */
b span {
    font-size: 17px;
    color: var(--doc-title);
    font-weight: 600;
}

/* 直接以 <b> 承载的小节（如 usage 的 “• 会员...”） */
body > b {
    display: inline-block;
    margin-top: 0.6em;
    font-size: 17px;
    color: var(--doc-title);
    font-weight: 600;
}

/* 文档页日期等右对齐信息：限制宽度防止溢出 */
body > div[style*="text-align: right"] {
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

body > div[style*="text-align: right"] span {
    word-break: break-all;
}

/* ---------- 产品介绍页：居中标题与下载按钮 ---------- */
/* 页面顶部“产品介绍 / 使用说明”等居中大标题 */
body > div[style*="text-align: center"] b span {
    font-size: 20px;
    color: var(--doc-title);
}

/* 下载链接行 -> 按钮化，方便点按 */
a[href*="apps.apple.com"],
a[href*="sj.qq.com"],
a[href*="detail.htm?apkName"] {
    display: inline-block;
    padding: 11px 26px;
    margin: 6px 4px;
    background: var(--doc-accent);
    color: #fff;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(10, 125, 116, 0.22);
}

a[href*="apps.apple.com"]:hover,
a[href*="sj.qq.com"]:hover,
a[href*="detail.htm?apkName"]:hover {
    text-decoration: none;
    opacity: 0.92;
}

/* 让下载按钮所在的居中 span 完整容纳按钮 */
span[style*="text-align: center"] {
    text-align: center;
}

/* ---------- 产品介绍页的多功能列表项排版 ---------- */
/* 形如：<span>【功能名】说明...</span><br/> */
body > span {
    display: block;
    margin: 0.35em 0;
}

/* 显眼的【】功能名 */
body > span:not([style]) b {
    color: var(--doc-accent);
}

/* ---------- 表格（open_source.html） ---------- */
table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
    background: #fff;
}

table tr:nth-child(even) td {
    background: var(--doc-soft);
}

table td {
    padding: 10px 12px;
    border: 1px solid var(--doc-border);
    vertical-align: top;
    word-break: break-word;
}

table td:first-child { font-weight: 500; }

table td b {
    color: var(--doc-title);
}

table a {
    font-size: 14px;
    word-break: break-all;
    color: var(--doc-accent);
}

/* ---------- 表单（logout.html）：用户名/密码字段左对齐垂直表单 ---------- */
form {
    width: 100%;
    max-width: 460px;
    margin: 20px 0;                 /* 卡片靠左，随正文对齐 */
    padding: 30px 28px;
    background: var(--doc-soft);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    box-sizing: border-box;
}

form .formLabel {
    width: auto !important;
    display: block;
    text-align: left;               /* 用户名/密码文字左对齐 */
    color: var(--doc-text);
    margin-top: 10px;
    margin-bottom: 6px;
}

form label {
    font-size: 15px;
    white-space: nowrap;
}

form input[type="text"],
form input[type="password"] {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    margin: 0 0 10px;
    border: 1px solid var(--doc-border);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
}

form input[type="hidden"] {
    display: none;
}

form input[type="text"]:focus,
form input[type="password"]:focus {
    outline: none;
    border-color: var(--doc-accent);
    box-shadow: 0 0 0 3px rgba(10, 125, 116, 0.12);
}

form button[type="submit"],
form input[type="submit"] {
    width: 130px !important;
    padding: 11px 0;
    margin-top: 14px;
    border: none;
    border-radius: 30px;
    background: var(--doc-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

form button[type="submit"]:hover {
    opacity: 0.92;
}

/* 文档标题统一左对齐（h1 主标题 / h2 章节标题），
   元素自身声明覆盖外层 div 的 text-align:center 继承，无需改 HTML */
h1, h2 {
    text-align: left;
}

/* ============================================================
   响应式断点
   ============================================================ */

/* 平板及以下 */
@media (max-width: 720px) {
    body {
        padding: 14px 18px 40px;
        line-height: 1.85;
    }
    h1 { font-size: 22px; }
    h2 { font-size: 19px; }
    b span, body > b { font-size: 16px; }
}

/* 手机 */
@media (max-width: 480px) {
    body {
        padding: 12px 16px 36px;
        font-size: 15px;
    }
    span, p {
        font-size: 15px;
    }
    b span, body > b { font-size: 16px; }
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }

    table { font-size: 13px; }
    table td { padding: 8px; }
    table a { font-size: 13px; }

    form { padding: 24px 16px; }
    form .formLabel {
        width: auto !important;
        text-align: left;
        margin-bottom: 4px;
    }
    form input[type="text"],
    form input[type="password"] { width: 100%; }
}

/* 超小屏兜底，防止任何横向滚动 */
@media (max-width: 340px) {
    img { border-radius: 8px; }
    form button[type="submit"],
    form input[type="submit"] { width: 100% !important; }
}
