/* 拼音打字练习 —— 官网样式
   纯手写 CSS，无外部依赖（避免 CDN 不可用导致页面裸奔） */

:root {
    --blue: #1e88e5;
    --blue-dark: #1565c0;
    --blue-light: #e3f2fd;
    --ink: #1a1a1a;
    --ink-2: #4a4a4a;
    --ink-3: #767676;
    --line: #e8eaed;
    --bg: #ffffff;
    --bg-soft: #f7f9fc;
    --radius: 14px;
    --shadow: 0 2px 12px rgba(30, 136, 229, .08);
    --shadow-lg: 0 12px 40px rgba(30, 136, 229, .14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶栏 ---------------- */
header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 32px; height: 32px; border-radius: 9px;
    background: linear-gradient(135deg, #42a5f5, #1565c0);
    color: #fff; font-size: 17px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--blue); text-decoration: none; }

/* ---------------- Hero ---------------- */
.hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--blue-light) 0%, #fff 78%); }
.hero-inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 42px; line-height: 1.25; letter-spacing: -.5px; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p.lead { font-size: 17px; color: var(--ink-2); margin-bottom: 28px; }
.hero-shot { position: relative; }
.hero-shot img {
    width: 100%; display: block; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); border: 1px solid rgba(0, 0, 0, .05);
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px; border-radius: 10px; font-size: 16px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; transition: .18s;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(30, 136, 229, .28); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.hero-meta { margin-top: 18px; font-size: 13px; color: var(--ink-3); }

/* ---------------- 通用区块 ---------------- */
section { padding: 72px 0; }
section.soft { background: var(--bg-soft); }
.sec-head { text-align: center; margin-bottom: 44px; }
.sec-head h2 { font-size: 30px; letter-spacing: -.3px; margin-bottom: 10px; }
.sec-head p { color: var(--ink-3); font-size: 15px; }

/* ---------------- 功能卡片 ---------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 24px; transition: .2s;
}
.card:hover { border-color: #bbdefb; box-shadow: var(--shadow); transform: translateY(-2px); }
.card-ico {
    width: 42px; height: 42px; border-radius: 11px; margin-bottom: 16px;
    background: var(--blue-light); color: var(--blue);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--ink-2); }

/* ---------------- 截图 ---------------- */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.shot { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shot img { width: 100%; display: block; }
.shot figcaption { padding: 14px 18px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); }

/* ---------------- 下载 ---------------- */
.dl {
    background: linear-gradient(135deg, #1565c0, #42a5f5);
    border-radius: 20px; padding: 48px; color: #fff;
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.dl h2 { font-size: 28px; margin-bottom: 12px; }
.dl p { color: rgba(255, 255, 255, .88); font-size: 15px; }
.dl .btn-primary { background: #fff; color: var(--blue-dark); box-shadow: 0 8px 24px rgba(0, 0, 0, .16); }
.dl .btn-primary:hover { background: #f1f8ff; }
.dl-meta { margin-top: 16px; font-size: 13px; color: rgba(255, 255, 255, .78); }
.dl-steps { list-style: none; font-size: 14px; }
.dl-steps li { padding: 8px 0 8px 26px; position: relative; color: rgba(255, 255, 255, .9); }
.dl-steps li::before {
    content: ""; position: absolute; left: 0; top: 15px;
    width: 16px; height: 16px; border-radius: 50%;
    background: rgba(255, 255, 255, .25);
}

/* ---------------- 联系 ---------------- */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.contact-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.contact-item dt { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.contact-item dd { font-size: 16px; font-weight: 600; color: var(--ink); word-break: break-all; }

/* ---------------- 页脚 ---------------- */
footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 44px 0 32px; }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 28px; }
.foot-col h4 { font-size: 14px; margin-bottom: 12px; color: var(--ink); }
.foot-col a, .foot-col span { display: block; font-size: 14px; color: var(--ink-3); margin-bottom: 8px; }
.foot-bottom {
    padding-top: 22px; border-top: 1px solid var(--line);
    font-size: 13px; color: var(--ink-3); display: flex; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}

/* ---------------- 法律页 ---------------- */
.doc { padding: 56px 0 80px; }
.doc-inner { max-width: 780px; margin: 0 auto; }
.doc h1 { font-size: 30px; margin-bottom: 8px; }
.doc .updated { color: var(--ink-3); font-size: 14px; margin-bottom: 36px; }
.doc h2 { font-size: 19px; margin: 34px 0 12px; padding-top: 8px; }
.doc h3 { font-size: 16px; margin: 22px 0 8px; color: var(--ink); }
.doc p, .doc li { font-size: 15px; color: var(--ink-2); margin-bottom: 10px; }
.doc ul, .doc ol { padding-left: 22px; margin-bottom: 12px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 14.5px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-soft); font-weight: 600; color: var(--ink); }
.doc blockquote {
    background: var(--blue-light); border-left: 3px solid var(--blue);
    padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 16px 0;
    font-size: 14.5px; color: var(--ink-2);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
    .hero-inner, .grid-3, .shots, .contact, .dl { grid-template-columns: 1fr; }
    .hero { padding: 44px 0 36px; }
    .hero h1 { font-size: 30px; }
    .nav-links { display: none; }
    section { padding: 48px 0; }
    .dl { padding: 30px; }
    .sec-head h2 { font-size: 24px; }
}

/* ---------------- 小屏表格卡片化 ----------------
   4 列的信息表在 640px 以下会被压成一条线，字全折行看不清。
   这里把每行变成一张卡：字段名放到 td::before，靠 data-label 取。 */
@media (max-width: 640px) {
    table, tbody, tr, td { display: block; width: 100%; box-sizing: border-box; }
    thead { display: none; }
    table { border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
    tr {
        border: 1px solid #ECEEF4; border-radius: 10px;
        margin: 0 0 12px; padding: 2px 0; overflow: hidden; background: #FFFFFF;
    }
    tr td {
        border: none; border-bottom: 1px solid #F2F4F8;
        padding: 9px 12px; text-align: left;
    }
    tr td:last-child { border-bottom: none; }
    tr td::before {
        content: attr(data-label);
        display: block;
        font-size: 11.5px; font-weight: 600; color: #98A1B3;
        letter-spacing: .02em; margin-bottom: 3px;
    }
    tr td:not([data-label])::before { display: none; }
    /* 长串（如 ANDROID_ID、包名）不换行会撑破卡片 */
    tr td, tr td code { word-break: break-word; overflow-wrap: anywhere; }
}
