/* AIBook v3 — 对标 ai-bot.cn：紧凑、扁平、信息密集 */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.9375rem;line-height:1.7;color:var(--text);background:var(--bg);overflow-x:hidden;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;word-wrap:break-word}
img{max-width:100%;height:auto;display:block}
a{color:var(--text);text-decoration:none;transition:color .15s}
a:hover{color:var(--accent)}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}

/* ---- 主题变量（照抄 ai-bot.cn） ---- */
:root{
  --bg:#f9f9f9;
  --bg-alt:#f1f3f5;
  --bg-card:#ffffff;
  --border:rgba(130,130,130,0.15);
  --border-strong:rgba(130,130,130,0.28);
  --text:#282a2d;
  --text-soft:#4a4d52;
  --text-muted:#6c757d;
  --accent:#f1404b;
  --accent-hover:#d63540;
  --accent-light:rgba(241,64,75,0.08);
  --radius:8px;
  --shadow-xs:0 1px 2px rgba(20,20,20,.04);
  --shadow-sm:0 2px 8px rgba(20,20,20,.06);
  --container-max:1200px;
}
[data-theme="dark"]{
  --bg:#1a1c1f;
  --bg-alt:#22252a;
  --bg-card:#2c2e2f;
  --border:rgba(255,255,255,0.1);
  --border-strong:rgba(255,255,255,0.18);
  --text:#e4e6e8;
  --text-soft:#c6c9cd;
  --text-muted:#9aa0a6;
  --accent:#f1404b;
  --accent-hover:#ff5a64;
  --accent-light:rgba(241,64,75,0.14);
  --shadow-xs:0 1px 2px rgba(0,0,0,.4);
  --shadow-sm:0 2px 8px rgba(0,0,0,.45);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#1a1c1f;
    --bg-alt:#22252a;
    --bg-card:#2c2e2f;
    --border:rgba(255,255,255,0.1);
    --border-strong:rgba(255,255,255,0.18);
    --text:#e4e6e8;
    --text-soft:#c6c9cd;
    --text-muted:#9aa0a6;
    --accent-hover:#ff5a64;
    --accent-light:rgba(241,64,75,0.14);
    --shadow-xs:0 1px 2px rgba(0,0,0,.4);
    --shadow-sm:0 2px 8px rgba(0,0,0,.45);
  }
}

/* ---- 容器 ---- */
.container{width:100%;max-width:var(--container-max);margin:0 auto;padding:0 1rem}

/* ---- 顶部导航 ---- */
.nav{position:sticky;top:0;z-index:100;background:var(--bg-card);border-bottom:1px solid var(--border);transition:box-shadow .2s}
.nav.is-scrolled{box-shadow:var(--shadow-sm)}
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:56px;padding:0 1rem;max-width:var(--container-max);margin:0 auto}
.nav-logo{display:flex;align-items:center;gap:8px;font-size:1.0625rem;font-weight:700;color:var(--text)}
.nav-logo:hover{color:var(--accent)}
.nav-logo-icon{width:28px;height:28px;background:var(--accent);border-radius:6px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:.75rem;font-weight:700}
.nav-menu-btn{padding:8px;color:var(--text);font-size:1.25rem;display:flex;align-items:center;min-width:40px;min-height:40px;justify-content:center;border-radius:6px}
.nav-menu-btn:hover{background:var(--bg-alt)}
.nav-links{display:none;flex-direction:column;list-style:none;background:var(--bg-card);border-top:1px solid var(--border);padding:.25rem 0}
.nav-links.open{display:flex}
.nav-links a{display:block;padding:.75rem 1rem;color:var(--text);font-size:.9375rem;border-bottom:1px solid var(--border);min-height:40px}
.nav-theme-toggle{padding:8px;color:var(--text-muted);font-size:1.125rem;min-width:40px;min-height:40px;border-radius:6px;transition:color .15s,background .15s}
.nav-theme-toggle:hover{color:var(--accent);background:var(--bg-alt)}

/* ---- Hero（简洁，无装饰球） ---- */
.hero{padding:2.5rem 1rem 2rem;text-align:center;background:var(--bg)}
.hero h1{font-size:1.5rem;font-weight:700;line-height:1.4;margin-bottom:.75rem;color:var(--text)}
.hero h1 .gradient{color:var(--accent)}
.hero p{font-size:.9375rem;color:var(--text-muted);max-width:640px;margin:0 auto 1.25rem;line-height:1.7}
.hero-stats{display:inline-flex;flex-wrap:wrap;justify-content:center;gap:.4rem .9rem;padding:.4rem 1rem;margin:.25rem auto 1.25rem;background:var(--bg-card);border:1px solid var(--border);border-radius:999px;font-size:.8125rem;color:var(--text-muted)}
.hero-stats strong{color:var(--accent);font-weight:600;margin-right:.15rem}
.hero-stats .dot{width:3px;height:3px;background:var(--border-strong);border-radius:50%;display:inline-block;align-self:center}

/* ---- 按钮 ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:.55rem 1.25rem;border-radius:var(--radius);font-size:.875rem;font-weight:500;min-height:38px;transition:background .15s,color .15s,border-color .15s}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-hover);color:#fff}
.btn-outline{background:var(--bg-card);color:var(--text);border:1px solid var(--border-strong)}
.btn-outline:hover{border-color:var(--accent);color:var(--accent)}

/* ---- Section ---- */
.section{padding:2.5rem 0}
.section-header{text-align:center;margin-bottom:1.5rem}
.section-label{display:inline-block;font-size:.6875rem;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:var(--accent);margin-bottom:.5rem;padding:.2rem .6rem;background:var(--accent-light);border-radius:999px}
.section-title{font-size:1.25rem;font-weight:700;color:var(--text);margin-bottom:.4rem;line-height:1.4}
.section-desc{font-size:.875rem;color:var(--text-muted);max-width:600px;margin:0 auto;line-height:1.7}

/* ---- 工具卡片（统一主题色，无分类色） ---- */
.tools-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.75rem}
.tool-card{display:flex;flex-direction:column;padding:.85rem .9rem;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);text-decoration:none;color:var(--text);transition:border-color .15s,box-shadow .15s,transform .15s;min-height:100px}
.tool-card:hover{border-color:var(--accent);box-shadow:var(--shadow-sm);transform:translateY(-1px);color:var(--text)}
.tool-icon{width:34px;height:34px;border-radius:6px;background:var(--accent-light);display:flex;align-items:center;justify-content:center;font-size:1.05rem;margin-bottom:.45rem}
.tool-name{font-size:.9375rem;font-weight:600;margin-bottom:.2rem;color:var(--text)}
.tool-desc{font-size:.8125rem;color:var(--text-muted);line-height:1.55;flex:1;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tool-category{font-size:.6875rem;color:var(--accent);margin-top:.4rem;font-weight:500}

/* ---- 文章卡片 ---- */
.article-card{display:block;padding:.9rem 1rem;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:.6rem;color:var(--text);transition:border-color .15s,box-shadow .15s}
.article-card:hover{border-color:var(--accent);box-shadow:var(--shadow-sm);color:var(--text)}
.article-card h3{font-size:.9375rem;font-weight:600;margin-bottom:.3rem;line-height:1.5;color:var(--text);border-left:none;padding-left:0}
.article-card p{font-size:.8125rem;color:var(--text-muted);line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.article-meta{display:flex;flex-wrap:wrap;gap:.4rem .9rem;font-size:.75rem;color:var(--text-muted);margin-top:.5rem}

/* ---- 面包屑 ---- */
.breadcrumb{padding:.85rem 0 .3rem;font-size:.8125rem;color:var(--text-muted)}
.breadcrumb a{color:var(--text-muted)}
.breadcrumb a:hover{color:var(--accent)}
.breadcrumb .sep{margin:0 .35rem;opacity:.6}

/* ---- 文章正文（h2/h3 招牌红色左条） ---- */
.article-body{max-width:760px;margin:0 auto;padding:1.25rem 1rem 2rem;font-size:.9375rem;color:var(--text-soft);line-height:1.75}
.article-body h1{font-size:1.5rem;font-weight:700;line-height:1.5;margin-bottom:.9rem;color:var(--text)}
.article-body h2{font-size:1.25rem;font-weight:700;color:var(--text);border-left:3px solid var(--accent);padding:.25rem 0 .25rem 1.25rem;margin:1.8rem 0 .8rem;line-height:1.5}
.article-body h2:first-of-type{margin-top:.8rem}
.article-body h3{font-size:1.125rem;font-weight:600;color:var(--text);border-left:3px solid var(--accent);padding-left:1.25rem;margin:1.3rem 0 .5rem;line-height:1.5}
.article-body p{margin-bottom:1rem}
.article-body ul,.article-body ol{margin:0 0 1rem 1.4rem}
.article-body li{margin-bottom:.3rem}
.article-body li::marker{color:var(--accent)}
.article-body .lede{font-size:.9375rem;line-height:1.75;color:var(--text-soft);padding:.85rem 1rem;background:var(--accent-light);border-left:3px solid var(--accent);border-radius:0 var(--radius) var(--radius) 0;margin:1rem 0 1.25rem}
.article-body blockquote{border-left:3px solid var(--accent);padding:.6rem 1rem;margin:1rem 0;background:var(--bg-alt);color:var(--text-muted);border-radius:0 var(--radius) var(--radius) 0}
.article-body table{width:100%;border-collapse:separate;border-spacing:0;margin:1rem 0;font-size:.875rem;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--bg-card)}
.article-body th,.article-body td{text-align:left;padding:.6rem .85rem;border-bottom:1px solid var(--border)}
.article-body tr:last-child td{border-bottom:none}
.article-body th{background:var(--bg-alt);font-weight:600;color:var(--text);font-size:.8125rem}
.article-body tbody tr:hover{background:var(--accent-light)}
.article-body pre{background:#0d1117;color:#c9d1d9;padding:1rem;border-radius:var(--radius);overflow-x:auto;font-family:"SF Mono","JetBrains Mono",Consolas,monospace;font-size:.8125rem;line-height:1.65;margin:1rem 0;border:1px solid var(--border)}
.article-body p code,.article-body li code,.article-body td code{background:var(--accent-light);color:var(--accent-hover);padding:.1em .4em;border-radius:4px;font-family:"SF Mono","JetBrains Mono",Consolas,monospace;font-size:.875em}
.article-body img{border-radius:var(--radius);margin:1rem 0}
.article-body a{color:var(--accent);text-decoration:none}
.article-body a:hover{color:var(--accent-hover);text-decoration:underline}

/* ---- FAQ ---- */
.faq-item{border:1px solid var(--border);border-radius:var(--radius);margin-bottom:.6rem;background:var(--bg-card);overflow:hidden}
.faq-item[open]{border-color:var(--accent)}
.faq-question{padding:.85rem 1rem;font-weight:500;color:var(--text);cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-size:.9375rem;list-style:none;gap:1rem}
.faq-question::-webkit-details-marker{display:none}
.faq-question::after{content:"+";font-size:1.25rem;color:var(--accent);transition:transform .2s;width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1}
details[open] .faq-question::after{transform:rotate(45deg)}
.faq-answer{padding:0 1rem 1rem;color:var(--text-muted);font-size:.875rem;line-height:1.75}
.faq-answer a{color:var(--accent)}

/* ---- 下载 CTA ---- */
.download-cta{display:flex;flex-direction:column;align-items:center;padding:1.75rem 1.25rem;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);margin:1.5rem 0;text-align:center}
.download-cta h3{font-size:1.125rem;margin-bottom:.4rem;font-weight:600;color:var(--text);border-left:none;padding-left:0}
.download-cta p{color:var(--text-muted);font-size:.875rem;margin-bottom:1rem}

/* ---- 友情链接 chip ---- */
.friends{padding:1.75rem 1rem;background:var(--bg-alt);border-top:1px solid var(--border)}
.friends-list{display:flex;flex-wrap:wrap;gap:.45rem;max-width:var(--container-max);margin:0 auto;align-items:center}
.friends-title{flex:0 0 100%;font-weight:600;margin-bottom:.6rem;color:var(--text);font-size:.875rem}
.friends-list a{display:inline-flex;align-items:center;padding:.3rem .75rem;background:var(--bg-card);border:1px solid var(--border);border-radius:999px;color:var(--text-soft);font-size:.75rem;transition:border-color .15s,color .15s}
.friends-list a:hover{border-color:var(--accent);color:var(--accent)}

/* ---- Footer ---- */
.footer{padding:2rem 1rem 1.5rem;background:var(--bg-alt);border-top:1px solid var(--border);text-align:center;font-size:.8125rem;color:var(--text-muted)}
.footer .container>*+*{margin-top:.75rem}
.footer-nav,.footer-legal{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem 1.2rem}
.footer-nav a,.footer-legal a{color:var(--text-soft);font-size:.8125rem;transition:color .15s}
.footer-nav a:hover,.footer-legal a:hover{color:var(--accent)}
.footer-legal a{font-size:.75rem;color:var(--text-muted)}
.footer-copy{line-height:1.8;font-size:.75rem;padding-top:.75rem;border-top:1px solid var(--border);margin-top:1rem}
.footer-copy a{color:var(--text-muted)}
.footer-copy a:hover{color:var(--accent)}
.footer-copy p{margin:.2rem 0}
.aigc-notice{font-size:.75rem;color:var(--text-muted);opacity:.85;margin-top:.4rem;line-height:1.6}

/* ===== 平板 ≥768px ===== */
@media (min-width:768px){
  .container{padding:0 1.5rem}
  .nav-inner{height:60px;padding:0 1.5rem}
  .nav-menu-btn{display:none}
  .nav-links{display:flex!important;flex-direction:row;gap:1.5rem;background:transparent;border:none;padding:0}
  .nav-links a{padding:.3rem 0;border:none;font-size:.875rem;color:var(--text-soft)}
  .nav-links a:hover{color:var(--accent)}
  .hero{padding:3rem 1.5rem 2.5rem}
  .hero h1{font-size:1.75rem}
  .hero p{font-size:.9375rem}
  .section{padding:3rem 0}
  .section-title{font-size:1.5rem}
  .section-header{margin-bottom:2rem}
  .tools-grid{grid-template-columns:repeat(3,1fr);gap:.85rem}
  .tool-card{padding:.95rem 1rem;min-height:110px}
  .tool-icon{width:36px;height:36px;font-size:1.1rem}
  .article-body{padding:1.75rem 1.5rem 2.5rem}
  .friends-list{gap:.5rem}
  .friends-list a{padding:.35rem .85rem;font-size:.8125rem}
  .footer{text-align:left;padding:2.25rem 1.5rem 1.5rem}
  .footer .container{display:grid;grid-template-columns:1.2fr 1fr 1.3fr;gap:1.75rem;align-items:start}
  .footer .container>*+*{margin-top:0}
  .footer-nav,.footer-legal{flex-direction:column;align-items:flex-start;gap:.45rem}
  .footer-copy{text-align:left;grid-column:1/-1;border-top:1px solid var(--border);padding-top:1rem;margin-top:.5rem}
}

/* ===== 桌面 ≥1024px ===== */
@media (min-width:1024px){
  .hero{padding:3.5rem 2rem 3rem}
  .hero h1{font-size:2rem}
  .hero p{font-size:1rem;max-width:680px;margin-bottom:1.5rem}
  .section{padding:3.5rem 0}
  .section-title{font-size:1.625rem}
  .section-header{margin-bottom:2.25rem}
  .tools-grid{grid-template-columns:repeat(4,1fr);gap:1rem}
  .article-body{font-size:1rem;padding:2rem 2rem 3rem}
}

/* ===== 大屏 ≥1280px ===== */
@media (min-width:1280px){
  .tools-grid{grid-template-columns:repeat(5,1fr)}
}

/* ===== 小屏 <480px ===== */
@media (max-width:479px){
  .hero{padding:2rem 1rem 1.75rem}
  .hero h1{font-size:1.375rem}
  .hero p{font-size:.875rem}
  .tool-card{min-height:92px;padding:.75rem .8rem}
  .tool-icon{width:32px;height:32px;font-size:1rem}
  .article-body h2{font-size:1.125rem}
  .article-body h3{font-size:1rem}
}

@media print{
  .nav,.footer,.friends,.download-cta{display:none}
  body{background:#fff;color:#000}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
