/* Scratch 中文网 - www.scratchs.com.cn */
:root {
  --blue: #4C97FF;
  --blue-deep: #3373CC;
  --blue-dark: #1E4568;
  --orange: #FF8C1A;
  --orange-soft: #FFAB19;
  --green: #4CBF56;
  --purple: #855CD6;
  --text: #2b3a4e;
  --text-light: #5c6f87;
  --bg: #f5f8fd;
  --card: #ffffff;
  --border: #e3eaf4;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue-deep); text-decoration: none; }
a:hover { color: var(--orange); }
ul, ol { padding-left: 1.2em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(30, 69, 104, .06);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand .brand-name b { color: var(--blue-deep); }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  padding: 8px 16px; border-radius: 20px; color: var(--text-light); font-size: 15px;
  transition: all .2s;
}
.nav-links a:hover { color: var(--blue-deep); background: #eef4ff; }
.nav-links a.active { color: #fff; background: var(--blue); }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; color: var(--text); cursor: pointer; padding: 6px 10px; }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section-title { text-align: center; font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.section-title .bar { display: inline-block; width: 46px; height: 5px; background: var(--orange-soft); border-radius: 3px; margin-bottom: 10px; }
.section-desc { text-align: center; color: var(--text-light); max-width: 640px; margin: 0 auto 36px; }
.white { background: #fff; }

.btn {
  display: inline-block; padding: 13px 34px; border-radius: 28px; font-size: 16px; font-weight: 600;
  border: none; cursor: pointer; transition: all .25s; text-align: center;
}
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(76,151,255,.35); }
.btn-orange { background: var(--orange-soft); color: #fff; }
.btn-orange:hover { background: #f0930c; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(255,171,25,.4); }
.btn-outline { background: #fff; color: var(--blue-deep); border: 2px solid var(--blue); }
.btn-outline:hover { background: #eef4ff; color: var(--blue-deep); }
.btn-lg { padding: 16px 44px; font-size: 17px; }

/* ---------- 首页 Hero ---------- */
.hero {
  background: linear-gradient(135deg, #4C97FF 0%, #3373CC 55%, #2a5cab 100%);
  color: #fff; padding: 64px 0 72px; overflow: hidden; position: relative;
}
.hero::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255,255,255,.07); top: -160px; right: -120px;
}
.hero::after {
  content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,.06); bottom: -90px; left: -70px;
}
.hero-inner { display: flex; align-items: center; gap: 48px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-text { flex: 1 1 460px; min-width: 320px; }
.hero-text h1 { font-size: 38px; line-height: 1.3; margin-bottom: 16px; font-weight: 800; }
.hero-text h1 .hl { color: #ffd257; }
.hero-text p { font-size: 16.5px; opacity: .95; margin-bottom: 26px; max-width: 520px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hero-meta span {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  padding: 4px 14px; border-radius: 16px; font-size: 13px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-shot { flex: 1 1 440px; min-width: 300px; }
.browser-frame {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(13, 40, 73, .45);
}
.browser-bar { background: #e8edf5; padding: 9px 14px; display: flex; align-items: center; gap: 7px; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.browser-bar i:nth-child(1) { background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar .url {
  flex: 1; margin-left: 10px; background: #fff; border-radius: 6px; font-size: 12px;
  color: #8a97ab; padding: 3px 12px; white-space: nowrap; overflow: hidden;
}
.hero-shot .caption { text-align: center; font-size: 13px; opacity: .8; margin-top: 12px; }

/* ---------- 数据统计条 ---------- */
.stats-band { background: var(--blue-dark); color: #fff; padding: 26px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stats-grid .num { font-size: 30px; font-weight: 800; color: #ffd257; }
.stats-grid .num small { font-size: 16px; font-weight: 600; }
.stats-grid .lab { font-size: 13.5px; opacity: .85; }

/* ---------- 卡片 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: all .25s;
}
.card:hover { box-shadow: 0 10px 28px rgba(30, 69, 104, .1); transform: translateY(-4px); border-color: #cfe0fb; }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { font-size: 14.5px; color: var(--text-light); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; margin-bottom: 16px;
}

/* ---------- 积木类别 ---------- */
.block-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.block-chip {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border);
  padding: 9px 18px; border-radius: 10px; font-size: 15px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(30,69,104,.05); transition: transform .2s;
}
.block-chip:hover { transform: translateY(-3px); }
.block-chip .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.block-chip small { color: var(--text-light); font-weight: 400; font-size: 12.5px; }

/* ---------- 截图画廊 ---------- */
.shot-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .25s; }
.shot-card:hover { box-shadow: 0 12px 30px rgba(30, 69, 104, .13); transform: translateY(-4px); }
.shot-card img { display: block; width: 100%; height: auto; }
.shot-card .shot-body { padding: 16px 20px; }
.shot-card .shot-body h3 { font-size: 16.5px; margin-bottom: 6px; }
.shot-card .shot-body p { font-size: 13.5px; color: var(--text-light); }

/* ---------- 场景人群 ---------- */
.persona {
  display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.persona .p-icon {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 19px;
}

/* ---------- 版本信息 ---------- */
.ver-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; font-size: 14.5px; }
.ver-table th, .ver-table td { padding: 13px 18px; border-bottom: 1px solid var(--border); text-align: left; }
.ver-table th { background: #eef4ff; color: var(--blue-dark); font-weight: 700; white-space: nowrap; }
.ver-table tr:last-child td { border-bottom: none; }
.ver-table tr:hover td { background: #f7faff; }

/* ---------- 下载区 ---------- */
.dl-panel {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 36px; box-shadow: 0 8px 30px rgba(30, 69, 104, .07);
}
.dl-grid { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.dl-info { flex: 1 1 380px; }
.dl-qr { flex: 0 0 auto; text-align: center; }
.dl-list { list-style: none; padding: 0; margin: 18px 0 24px; }
.dl-list li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; font-size: 15px; }
.dl-list li i { color: var(--green); margin-top: 5px; flex: none; }
.dl-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.dl-tip {
  margin-top: 20px; background: #fff8ec; border: 1px solid #ffe1a8; border-radius: 10px;
  padding: 12px 16px; font-size: 13.5px; color: #8a6116;
}
.dl-tip i { margin-right: 6px; }

/* 二维码呼吸边框（不刺眼） */
.qr-breath {
  display: inline-block; padding: 10px; background: #fff; border-radius: 14px;
  animation: qrBreath 3.2s ease-in-out infinite;
}
@keyframes qrBreath {
  0%, 100% { box-shadow: 0 0 0 2px rgba(76,151,255,.75); transform: scale(1); }
  50% { box-shadow: 0 0 0 5px rgba(76,151,255,.35), 0 6px 18px rgba(76,151,255,.25); transform: scale(1.03); }
}
.qr-breath img { display: block; width: 150px; height: 150px; }
.qr-caption { font-size: 13.5px; color: var(--text-light); margin-top: 12px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  display: none; position: fixed; inset: 0; background: rgba(15, 35, 60, .55);
  z-index: 999; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-mask.show { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff; border-radius: 18px; width: 360px; max-width: 100%;
  padding: 30px 28px; text-align: center; position: relative;
  animation: popIn .25s; box-shadow: 0 20px 60px rgba(13, 40, 73, .35);
}
@keyframes popIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 22px;
  color: #9aa8bc; cursor: pointer; line-height: 1;
}
.modal-box h3 { font-size: 19px; margin-bottom: 6px; }
.modal-box .modal-sub { font-size: 13.5px; color: var(--text-light); margin-bottom: 20px; }
.modal-tips { text-align: left; margin: 18px 0 4px; padding: 12px 14px; background: #f2f7ff; border-radius: 10px; font-size: 13px; color: var(--text-light); }
.modal-tips p { margin-bottom: 4px; }
.modal-tips i { color: var(--orange); margin-right: 6px; }
.modal-tips p:last-child { margin-bottom: 0; }

/* ---------- 步骤教程 ---------- */
.steps { counter-reset: step; }
.step-item { display: flex; gap: 22px; margin-bottom: 44px; }
.step-item:last-child { margin-bottom: 0; }
.step-num {
  counter-increment: step; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 19px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step-num::before { content: counter(step); }
.step-body h3 { font-size: 19px; margin-bottom: 8px; }
.step-body .step-text { font-size: 15px; color: var(--text-light); margin-bottom: 14px; }
.step-body img {
  border-radius: 10px; border: 1px solid var(--border); display: block;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 14px; overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 17px 22px; font-size: 15.5px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "\2b"; font-size: 20px; color: var(--blue); font-weight: 400; transition: transform .2s; }
.faq-item details[open] summary::after, .faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 22px 18px; color: var(--text-light); font-size: 14.5px; }
.faq-item[open] { border-color: #b9d3fb; }

/* ---------- 页脚 ---------- */
.site-footer { background: #1c3049; color: #b8c6d8; padding: 46px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; padding-bottom: 32px; }
.footer-grid h4 { color: #fff; font-size: 15.5px; margin-bottom: 14px; }
.footer-grid p, .footer-grid a { font-size: 13.5px; color: #b8c6d8; line-height: 2; }
.footer-grid a { display: block; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #fff; font-weight: 700; font-size: 18px; }
.footer-brand img { width: 30px; height: 30px; border-radius: 7px; }
.copyright {
  border-top: 1px solid #2b425e; padding: 18px 0; text-align: center; font-size: 13px; color: #8fa2b8;
}

/* ---------- 面包屑 ---------- */
.crumb { padding: 18px 0 0; font-size: 13.5px; color: var(--text-light); }
.crumb a { color: var(--text-light); }
.crumb a:hover { color: var(--blue-deep); }

/* ---------- 文章排版 ---------- */
.article { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 40px; }
.article h2 { font-size: 22px; margin: 30px 0 14px; padding-left: 12px; border-left: 5px solid var(--blue); }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 17.5px; margin: 22px 0 10px; }
.article p { margin-bottom: 13px; font-size: 15px; color: #3a4c63; }
.article img { border-radius: 10px; border: 1px solid var(--border); margin: 10px 0; display: block; }
.article ul, .article ol { margin-bottom: 13px; }
.article li { font-size: 15px; color: #3a4c63; margin-bottom: 6px; }
.note-box {
  background: #f2f7ff; border-left: 4px solid var(--blue); border-radius: 0 10px 10px 0;
  padding: 14px 18px; font-size: 14px; color: var(--text-light); margin: 14px 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-text h1 { font-size: 30px; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 12px 20px 18px; border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(30,69,104,.1);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .article { padding: 24px 20px; }
  .dl-panel { padding: 24px; }
  .section { padding: 40px 0; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 50px; }
  .hero-text h1 { font-size: 26px; }
  .step-item { flex-direction: column; gap: 12px; }
  .qr-breath img { width: 130px; height: 130px; }
}
