/* =========================================================
   SOLO魔法 官方网站 - 全局样式
   现代科技感 (参考小米 / Nokia 官网)
   ========================================================= */

/* ---------- 主题变量 ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f9;
  --bg-dark: #0b0b12;
  --bg-dark-soft: #14141f;
  --text: #0b0b0f;
  --text-soft: #5b5f6b;
  --text-invert: #f3f4f8;
  --border: #e7e8ee;
  --border-dark: #2a2a3a;
  --brand: #6d5efc;
  --brand-2: #22d3ee;
  --grad: linear-gradient(120deg, #6d5efc 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(109, 94, 252, .14), rgba(34, 211, 238, .14));
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(20, 20, 40, .06);
  --shadow: 0 12px 40px rgba(20, 20, 40, .12);
  --shadow-lg: 0 30px 80px rgba(20, 20, 40, .18);
  --nav-h: 64px;
  --maxw: 1200px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section-dark {
  background: var(--bg-dark);
  color: var(--text-invert);
}
.section-soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.section-sub {
  margin-top: 14px;
  font-size: 17px;
  color: var(--text-soft);
  max-width: 620px;
}
.section-dark .section-sub { color: rgba(243, 244, 248, .7); }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 24px rgba(109, 94, 252, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(109, 94, 252, .45); }
.btn-ghost {
  background: rgba(255, 255, 255, .08);
  color: var(--text-invert);
  border: 1px solid rgba(255, 255, 255, .2);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-line {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-line:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.01em;
}
.brand img { width: 30px; height: 30px; }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  transition: color .2s;
}
.nav-menu a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  transition: background .2s, color .2s;
}
.lang-switch button.active { background: var(--grad); color: #fff; }

.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); position: relative; transition: .3s; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--text); transition: .3s;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 120px;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(109, 94, 252, .16), transparent 60%),
              radial-gradient(900px 500px at 90% 20%, rgba(34, 211, 238, .14), transparent 60%);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}
.hero-orb.o1 { width: 380px; height: 380px; background: #6d5efc; top: -80px; left: -60px; }
.hero-orb.o2 { width: 420px; height: 420px; background: #22d3ee; bottom: -120px; right: -80px; }
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero h1 {
  font-size: clamp(34px, 6vw, 68px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.05;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p {
  margin: 22px auto 0;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-soft);
  max-width: 640px;
}
.hero-cta { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-stat b { display: block; font-size: 30px; font-weight: 800; }
.hero-stat span { font-size: 14px; color: var(--text-soft); }

/* ---------- 广告位 ---------- */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--grad-soft);
  color: var(--text-soft);
  text-align: center;
  gap: 4px;
}
.ad-slot .ad-tag {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  background: #fff;
}
.ad-slot .ad-desc { font-size: 14px; }

/* ---------- 工具网格 ---------- */
.tools-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.tool-card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  overflow: hidden;
  cursor: pointer;
}
.tool-card::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--grad-soft);
  opacity: 0; transition: opacity .3s;
}
.tool-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.tool-card:hover::after { opacity: 1; }
.tool-card > * { position: relative; z-index: 1; }
.tool-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: var(--grad);
  margin-bottom: 18px;
}
.tool-name { font-size: 19px; font-weight: 700; }
.tool-desc { margin-top: 8px; font-size: 14px; color: var(--text-soft); min-height: 44px; }
.tool-cta {
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--brand);
}
.tool-card:hover .tool-cta { gap: 10px; }

/* ---------- 特色区 ---------- */
.features-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.feature { padding: 4px; }
.feature .f-icon { font-size: 32px; margin-bottom: 14px; }
.feature h3 { font-size: 18px; font-weight: 700; }
.feature p { margin-top: 8px; font-size: 14.5px; color: rgba(243, 244, 248, .68); }

/* ---------- 下载区 ---------- */
.download-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.download-badges { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 14px;
  background: #0b0b12;
  color: #fff;
  border: 1px solid var(--border-dark);
  transition: transform .25s var(--ease), background .25s;
}
.store-btn:hover { transform: translateY(-2px); background: #1c1c2b; }
.store-btn .s-ico { font-size: 24px; }
.store-btn small { display: block; font-size: 11px; opacity: .7; }
.store-btn b { display: block; font-size: 15px; }

.phone-mock {
  position: relative;
  width: 260px;
  height: 520px;
  margin: 0 auto;
  border-radius: 40px;
  background: linear-gradient(160deg, #14141f, #0b0b12);
  border: 8px solid #1c1c2b;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.phone-mock::before {
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 20px; border-radius: 12px; background: #05050a;
}
.phone-screen {
  position: absolute; inset: 18px;
  border-radius: 28px;
  background: radial-gradient(400px 300px at 30% 10%, rgba(109,94,252,.5), transparent 60%),
              radial-gradient(400px 300px at 90% 90%, rgba(34,211,238,.4), transparent 60%),
              #0b0b12;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: #fff; text-align: center; padding: 20px;
}
.phone-screen .logo-lg { font-size: 46px; }
.phone-screen b { font-size: 22px; }
.phone-screen span { font-size: 13px; opacity: .7; }

/* ---------- 页脚 ---------- */
.footer {
  background: #05050a;
  color: rgba(243, 244, 248, .7);
  padding: 64px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; padding: 5px 0; color: rgba(243,244,248,.6); transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-brand p { font-size: 14px; margin-top: 12px; max-width: 280px; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(243,244,248,.5);
}

/* ---------- 弹窗 (通用) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5, 5, 12, .55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98);
  transition: transform .3s var(--ease);
}
.modal-overlay.open .modal { transform: none; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.modal-title { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; }
.modal-title .m-ico {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-soft);
  transition: background .2s;
}
.modal-close:hover { background: var(--bg-soft); }
.modal-body { padding: 24px; }

/* 二维码弹窗 */
.qr-modal { max-width: 360px; text-align: center; }
.qr-box {
  width: 200px; height: 200px; margin: 8px auto 16px;
  border-radius: 16px; border: 1px solid var(--border); padding: 12px; background: #fff;
}
.qr-box svg { width: 100%; height: 100%; }

/* ---------- 练习工具通用 UI ---------- */
.play-status {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.stat-pill {
  background: var(--bg-soft); border-radius: 999px; padding: 6px 14px;
  font-size: 14px; font-weight: 600;
}
.stat-pill b { color: var(--brand); }
.play-q { font-size: 22px; font-weight: 800; text-align: center; margin: 12px 0 20px; min-height: 34px; }
.play-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt-btn {
  padding: 16px; border-radius: 14px; border: 1px solid var(--border);
  font-size: 16px; font-weight: 600; background: #fff;
  transition: border-color .2s, background .2s, transform .15s;
}
.opt-btn:hover { border-color: var(--brand); }
.opt-btn.correct { background: #e6f9ef; border-color: #34c77b; color: #128a4f; }
.opt-btn.wrong { background: #fdeaea; border-color: #e35d5d; color: #c23b3b; }
.opt-btn:disabled { cursor: default; }
.play-feedback { text-align: center; margin-top: 16px; font-weight: 600; min-height: 24px; }
.play-actions { margin-top: 20px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.field-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.field-row label { font-size: 14px; font-weight: 600; min-width: 96px; }
.field-row input[type="number"], .field-row input[type="text"] {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; width: 100px;
}
.field-row input[type="range"] { flex: 1; }
.type-target {
  background: var(--bg-soft); border-radius: 14px; padding: 18px; font-size: 17px; line-height: 1.8;
  letter-spacing: .01em; margin-bottom: 14px;
}
.type-target .done { color: #34c77b; }
.type-target .cur { background: var(--brand); color: #fff; border-radius: 3px; }
.type-target .err { color: #fff; background: #e35d5d; border-radius: 3px; }
.type-input {
  width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 12px;
  font-size: 16px; font-family: inherit; resize: none;
}
.big-timer { font-size: 56px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.big-label { text-align: center; color: var(--text-soft); font-weight: 600; margin-bottom: 8px; }

/* 记忆序列 / 反应测试 面板 */
.pad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 320px; margin: 0 auto; }
.pad {
  aspect-ratio: 1; border-radius: 18px; opacity: .55; transition: opacity .15s, transform .15s;
}
.pad.lit { opacity: 1; transform: scale(1.04); box-shadow: 0 0 30px currentColor; }
.pad.p0 { background: #6d5efc; color: #6d5efc; }
.pad.p1 { background: #22d3ee; color: #22d3ee; }
.pad.p2 { background: #f59e0b; color: #f59e0b; }
.pad.p3 { background: #34c77b; color: #34c77b; }

.react-box {
  height: 220px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff; cursor: pointer; user-select: none; text-align: center; padding: 20px;
}
.react-wait { background: #c23b3b; }
.react-go { background: #34c77b; }
.react-ready { background: #6d5efc; }

/* 呼吸 */
.breath-circle {
  width: 180px; height: 180px; border-radius: 50%; margin: 10px auto 20px;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
  transition: transform 4s ease-in-out;
}
.breath-circle.inhale { transform: scale(1.35); }
.breath-circle.exhale { transform: scale(.85); }

/* ---------- 滚动入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* 返回顶部 */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ---------- 简易内容页 (privacy/terms/404) ---------- */
.doc {
  max-width: 780px; margin: 0 auto; padding: 60px 0;
}
.doc h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.doc .updated { color: var(--text-soft); font-size: 14px; margin-bottom: 28px; }
.doc h2 { font-size: 20px; margin: 28px 0 10px; }
.doc p, .doc li { color: var(--text-soft); font-size: 15.5px; }
.doc ul { list-style: disc; padding-left: 22px; margin: 8px 0; }
.error-page {
  min-height: 70vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 16px;
}
.error-page .code {
  font-size: 96px; font-weight: 900; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .download-wrap { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 68px 0; }
  .nav-menu, .nav-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .nav-menu.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }
  .nav-menu.open a { padding: 10px 0; width: 100%; }
  .hero-stats { gap: 28px; }
  .play-options { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
  .breath-circle { transition: none; }
}
