/* 思想空间 官网样式
 * 配色取自 App 调色板 sxkj_palette.dart（indigo / blue / teal / sunset 四套主题）
 * 通过 <html data-theme="..."> 切换，默认 indigo */

:root {
  --p: #4F46E5; --p-50: #EEF2FF; --p-100: #E0E7FF; --p-500: #6366F1; --p-700: #4338CA;
  --g1: #6366F1; --g2: #7C3AED; --g1d: #2D2A6E; --g2d: #3C2270;
  --ink: #0F172A; --ink-soft: #475569; --ink-faint: #94A3B8;
  --line: #E2E8F0; --bg: #FFFFFF; --bg-soft: #F8FAFC;
  --night: #0E121C;
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="blue"]   { --p:#2563EB; --p-50:#EFF6FF; --p-100:#DBEAFE; --p-500:#3B82F6; --p-700:#1D4ED8; --g1:#38BDF8; --g2:#2563EB; --g1d:#14396B; --g2d:#122E70; }
html[data-theme="teal"]   { --p:#0D9488; --p-50:#F0FDFA; --p-100:#CCFBF1; --p-500:#14B8A6; --p-700:#0F766E; --g1:#34D399; --g2:#0D9488; --g1d:#124E47; --g2d:#0B3A38; }
html[data-theme="sunset"] { --p:#EA580C; --p-50:#FFF7ED; --p-100:#FFEDD5; --p-500:#F97316; --p-700:#C2410C; --g1:#FB923C; --g2:#F43F5E; --g1d:#743523; --g2d:#5E2038; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }

/* ---------- 导航 ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s, color .3s; color: #fff; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav.solid { background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); box-shadow: 0 1px 0 var(--line); color: var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: .02em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.nav-links a { opacity: .78; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-links .btn-sm { opacity: 1; padding: 8px 18px; border-radius: 999px; background: #fff; color: var(--p); font-weight: 600; }
.nav.solid .nav-links .btn-sm { background: var(--p); color: #fff; }

/* ---------- 按钮 ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 12px; width: 176px; height: 56px; padding: 0 18px; border-radius: 14px; font-size: 15px; font-weight: 600; transition: transform .2s, background .2s, opacity .2s; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-size: 12px; font-weight: 400; opacity: .7; line-height: 1.3; }
.btn span { line-height: 1.25; text-align: left; }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.btn:hover { transform: translateY(-2px); }
.btn.soon { pointer-events: none; opacity: .55; }

/* ---------- 首屏 ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(160deg, #141A2B 0%, var(--g1d) 52%, var(--g2d) 100%); transition: background .6s; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.hero::before { width: 520px; height: 520px; left: -160px; top: -120px; background: var(--g1); opacity: .28; }
.hero::after { width: 460px; height: 460px; right: -120px; bottom: -160px; background: var(--g2); opacity: .3; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; min-height: 100vh; min-height: 100svh; padding: 112px 0 72px; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .2em; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); margin-bottom: 28px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.15; font-weight: 700; letter-spacing: .04em; margin-bottom: 24px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #fff, var(--p-100) 40%, var(--g1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; max-width: 30em; color: rgba(255,255,255,.72); margin-bottom: 40px; }

/* 手机样机 */
.phone-col { display: flex; justify-content: center; }
.phone { position: relative; width: 300px; height: 620px; border-radius: 46px; padding: 10px; background: #0B0E16; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 40px 80px -20px rgba(0,0,0,.6), 0 0 120px -20px var(--g1); transition: box-shadow .6s; }
.screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; display: flex; flex-direction: column; background: radial-gradient(120% 70% at 20% 10%, rgba(255,255,255,.12), transparent 60%), linear-gradient(170deg, var(--g1d), var(--g2d)); transition: background .6s; }
.screen .notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 86px; height: 24px; border-radius: 999px; background: #0B0E16; }
.screen .app-title { padding: 52px 22px 0; font-size: 15px; font-weight: 600; }
.screen .stage { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring { overflow: visible; position: absolute; width: 226px; height: 226px; opacity: 0; transform: scale(.92); transition: opacity .5s, transform .5s; }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: rgba(255,255,255,.14); }
.ring .bar, .ring .glow { stroke: #fff; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring .glow { stroke-width: 10; opacity: .18; }
.timer { font-size: 46px; font-weight: 200; letter-spacing: .02em; font-variant-numeric: tabular-nums; transition: font-size .4s; }
.below { position: absolute; left: 0; right: 0; top: calc(50% + 34px); display: flex; flex-direction: column; align-items: center; }
.hint { font-size: 12px; padding: 5px 14px; border-radius: 999px; border: 1px dashed rgba(255,255,255,.35); color: rgba(255,255,255,.8); transition: opacity .3s; }
.presets { display: flex; gap: 8px; margin-top: 28px; transition: opacity .3s; }
.presets button { width: 50px; height: 32px; border-radius: 999px; font-size: 13px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: background .2s, color .2s; }
.presets button.on { background: #fff; color: var(--p); font-weight: 600; }
.play { width: 64px; height: 64px; margin: 0 auto 26px; border-radius: 50%; background: #fff; color: var(--p); display: grid; place-items: center; box-shadow: 0 10px 30px -6px var(--g1); transition: transform .2s; }
.play:hover { transform: scale(1.06); }
.play svg { width: 24px; height: 24px; }
.play .i-pause, .running .play .i-play { display: none; }
.running .play .i-pause { display: block; }
.running .ring { opacity: 1; transform: none; }
.running .timer { font-size: 38px; }
.running .presets, .running .hint { opacity: 0; pointer-events: none; }
.tabbar { display: flex; justify-content: space-around; padding: 10px 0 18px; background: rgba(11,14,22,.55); font-size: 11px; color: rgba(255,255,255,.5); }
.tabbar div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tabbar svg { width: 20px; height: 20px; }
.tabbar .on { color: #fff; }

/* ---------- 通用区块 ---------- */
section { padding: 120px 0; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.sec-head .tag { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .16em; color: var(--p); margin-bottom: 14px; }
.sec-head h2, .cta h2, .split .txt h2 { text-wrap: balance; }
.sec-head h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.25; letter-spacing: .03em; margin-bottom: 16px; }
.sec-head p { font-size: 17px; color: var(--ink-soft); }

/* 功能卡片 */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { padding: 32px 26px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); transition: transform .3s, box-shadow .3s, border-color .3s; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(15,23,42,.25); border-color: var(--p-100); }
.feature .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--p); background: var(--p-50); margin-bottom: 22px; transition: background .4s, color .4s; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 10px; }
.feature p { font-size: 14.5px; color: var(--ink-soft); }

/* 左右分栏展示 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split + .split { margin-top: 120px; }
.split .txt .tag { font-size: 13px; font-weight: 600; letter-spacing: .16em; color: var(--p); }
.split .txt h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.3; margin: 14px 0 18px; letter-spacing: .03em; }
.split .txt p { font-size: 16.5px; color: var(--ink-soft); max-width: 28em; }
.split .txt ul { list-style: none; margin-top: 26px; display: grid; gap: 12px; font-size: 15px; }
.split .txt li { display: flex; align-items: center; gap: 10px; }
.split .txt li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p); flex: none; }

/* 音律面板 */
.panel { border-radius: 28px; padding: 28px; background: linear-gradient(160deg, #141A2B, var(--night)); color: #fff; box-shadow: 0 40px 80px -40px rgba(15,23,42,.6); }
.panel h4 { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.55); margin: 0 0 14px 2px; }
.sounds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.sound { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; background: #1B2130; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); cursor: pointer; transition: background .2s, box-shadow .2s; text-align: left; }
.sound:hover { background: #222A3C; }
.sound.on { box-shadow: inset 0 0 0 1.5px var(--p-500); }
.sound .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--p) 32%, #1B2130); color: var(--p-100); flex: none; }
.sound .ic svg { width: 22px; height: 22px; }
.sound b { font-size: 15px; font-weight: 600; }
.sound .eq { margin-left: auto; display: flex; gap: 3px; align-items: flex-end; height: 16px; opacity: 0; }
.sound.on .eq { opacity: 1; }
.eq i { width: 3px; border-radius: 2px; background: var(--p-500); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 16px; } }
.amb { border-radius: 18px; background: #1B2130; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.amb div { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.amb div + div { border-top: 1px solid rgba(255,255,255,.06); }
.amb .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #141A26; color: rgba(255,255,255,.75); }
.amb .ic svg { width: 20px; height: 20px; }
.amb b { font-size: 15px; font-weight: 500; display: block; line-height: 1.3; }
.amb small { font-size: 12.5px; color: rgba(255,255,255,.5); }

/* 统计卡片 */
.stats { display: grid; gap: 14px; }
.stat-hero { border-radius: 24px; padding: 28px; color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); position: relative; overflow: hidden; transition: background .6s; }
.stat-hero::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.12); }
.stat-hero small { font-size: 14px; opacity: .85; }
.stat-hero .big { font-size: 52px; font-weight: 700; line-height: 1.1; margin: 6px 0; font-variant-numeric: tabular-nums; }
.stat-hero .big sub { font-size: 20px; font-weight: 500; vertical-align: baseline; margin-left: 4px; }
.stat-hero p { font-size: 14px; opacity: .85; }
.chart { border-radius: 24px; padding: 24px 24px 18px; background: var(--bg); border: 1px solid var(--line); }
.chart h5 { font-size: 15px; margin-bottom: 18px; display: flex; justify-content: space-between; }
.chart h5 span { font-weight: 400; color: var(--ink-faint); font-size: 13px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; align-items: end; height: 140px; }
.bars i { display: block; border-radius: 8px 8px 4px 4px; background: var(--p-100); height: 0; transition: height 1s cubic-bezier(.2,.8,.2,1), background .4s; }
.bars i.hi { background: var(--p); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-top: 10px; text-align: center; font-size: 12px; color: var(--ink-faint); }

/* 主题色切换 */
.swatches { display: flex; gap: 14px; margin-top: 30px; }
.swatches button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.swatches i { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); transition: box-shadow .2s, transform .2s; }
.swatches button:hover i { transform: scale(1.06); }
.swatches button.on i { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--p); }
.swatches button.on { color: var(--ink); font-weight: 600; }

.mini-phones { display: flex; justify-content: center; gap: 18px; }
.mini { width: 168px; height: 340px; border-radius: 30px; padding: 7px; background: #0B0E16; box-shadow: 0 30px 60px -30px rgba(15,23,42,.6); }
.mini > div { height: 100%; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; gap: 8px; font-weight: 200; font-size: 26px; font-variant-numeric: tabular-nums; background-size: cover; background-position: center; transition: background .6s; }
.mini small { font-size: 11px; font-weight: 400; opacity: .7; }
.mini.m1 > div { background: radial-gradient(90% 60% at 30% 15%, rgba(255,255,255,.18), transparent 60%), linear-gradient(170deg, var(--g1d), var(--g2d)); }
.mini.m2 { transform: translateY(36px); }
.mini.m2 > div { background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.35)), linear-gradient(160deg, var(--g1), var(--g2)); }

/* 隐私承诺 */
.privacy { background: var(--bg-soft); border-block: 1px solid var(--line); }
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.promise div { text-align: center; padding: 36px 24px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.promise .ic { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: var(--p-50); color: var(--p); }
.promise .ic svg { width: 26px; height: 26px; }
.promise h3 { font-size: 18px; margin-bottom: 8px; }
.promise p { font-size: 14.5px; color: var(--ink-soft); }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 4px; font-size: 17px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint); transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s; flex: none; }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details p { padding: 0 4px 24px; color: var(--ink-soft); font-size: 15.5px; }

/* 底部下载 */
.cta { text-align: center; color: #fff; background: linear-gradient(160deg, #141A2B, var(--g1d) 60%, var(--g2d)); position: relative; overflow: hidden; transition: background .6s; }
.cta::before { content: ""; position: absolute; width: 600px; height: 600px; left: 50%; top: -300px; transform: translateX(-50%); border-radius: 50%; background: var(--g1); opacity: .22; filter: blur(90px); }
.cta .wrap { position: relative; }
.cta img { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 28px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.5); }
.cta h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: .04em; margin-bottom: 14px; }
.cta p { color: rgba(255,255,255,.7); font-size: 17px; margin-bottom: 40px; }
.cta .btns { justify-content: center; }

/* 页脚 */
footer { background: var(--night); color: rgba(255,255,255,.55); font-size: 14px; padding: 40px 0; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer .brand { color: #fff; font-size: 15px; }
footer .brand img { width: 26px; height: 26px; border-radius: 7px; }
footer nav { display: flex; gap: 24px; }
footer nav a:hover { color: #fff; }

/* 内置浏览器引导遮罩 */
.wx-mask { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,20,.93); color: #fff; display: none; }
.wx-mask.show { display: block; }
.wx-arrow { position: absolute; top: 6px; right: 22px; width: 80px; height: 90px; }
.wx-tip { position: absolute; top: 112px; left: 0; right: 0; margin: 0 auto; width: min(300px, 86%); text-align: center; }
.wx-tip b { display: block; font-size: 20px; letter-spacing: .04em; margin-bottom: 18px; }
.wx-tip p { font-size: 16px; line-height: 2; color: rgba(255,255,255,.85); }
.wx-tip i { font-style: normal; display: inline-block; padding: 0 8px; border-radius: 6px; background: rgba(255,255,255,.18); font-weight: 700; letter-spacing: 1px; }
.wx-tip button { display: block; width: 100%; height: 46px; margin-top: 14px; border-radius: 12px; font: inherit; font-size: 15px; cursor: pointer; }
.wx-copy { margin-top: 30px !important; border: 0; background: #fff; color: var(--ink); font-weight: 600 !important; }
.wx-close { border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; }

/* 滚动渐显 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .eq i { animation: none; height: 10px; }
}

/* ---------- 法律文档页 ---------- */
.doc-page .nav { position: sticky; }
.doc { max-width: 760px; margin: 0 auto; padding: 72px 0 120px; }
.doc h1 { font-size: 36px; letter-spacing: .04em; margin-bottom: 10px; }
.doc .meta { font-size: 14px; color: var(--ink-faint); padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.doc h2 { font-size: 19px; margin: 40px 0 12px; }
.doc p { font-size: 16px; color: var(--ink-soft); line-height: 1.9; }
.doc a { color: var(--p); }
.doc p + p { margin-top: 14px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 14.5px; line-height: 1.7; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border: 1px solid var(--line); color: var(--ink-soft); }
.doc th { color: var(--ink); font-weight: 600; background: var(--bg-soft); }
.doc table.kv th { width: 132px; white-space: nowrap; }
.doc .grid-wrap { overflow-x: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .features { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .split.rev .txt { order: -1; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding-top: 120px; gap: 56px; }
  .hero p.lead { margin-inline: auto; }
  .hero .btns { justify-content: center; }
}
@media (max-width: 720px) {
  section { padding: 84px 0; }
  .nav-links a:not(.btn-sm) { display: none; }
  .features, .promise { grid-template-columns: 1fr; }
  .split + .split { margin-top: 84px; }
  .sec-head { margin-bottom: 44px; }
  .phone { width: 272px; height: 560px; }
  .ring { width: 206px; height: 206px; }
  .mini { width: 140px; height: 290px; }
  .mini > div { font-size: 22px; }
  .sounds { grid-template-columns: 1fr; }
  .btns { flex-direction: column; align-items: center; }
  .btn { width: min(260px, 100%); }
  footer .wrap { flex-direction: column; text-align: center; }
  .doc { padding: 48px 0 84px; }
  .doc h1 { font-size: 28px; }
  .doc table.grid { min-width: 560px; }
  .doc table.kv th { width: 104px; }
}
