/* AI4Trade Signals — 移动端优先的深色交易风 UI */
:root {
  --bg: #0b1220;
  --bg-2: #111a2e;
  --card: #16223c;
  --line: #24324f;
  --text: #e7edf7;
  --muted: #9fb0cc;
  --up: #22c55e;
  --down: #ef4444;
  --accent: #3b82f6;
  --gold: #f5b301;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  min-height: 100dvh;
  padding-bottom: calc(64px + var(--safe-b));
}
main { max-width: 640px; margin: 0 auto; padding: 16px; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: rgba(11,18,32,.85);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; letter-spacing: .3px; }
.ghost-btn {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
}

/* 卡片 */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.card h2 { margin: 0 0 6px; font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.spread { justify-content: space-between; }

/* 免责声明条 */
.disclaimer {
  font-size: 12px; line-height: 1.6; color: var(--muted);
  background: rgba(245,179,1,.06); border: 1px solid rgba(245,179,1,.28);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 14px;
}
.disclaimer b { color: var(--gold); }

/* 信号卡 */
.sig { position: relative; overflow: hidden; }
.sig .head { display: flex; align-items: baseline; gap: 8px; }
.ticker { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.dir { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.dir.bull { color: var(--up); background: rgba(34,197,94,.12); }
.dir.bear { color: var(--down); background: rgba(239,68,68,.12); }
.tag {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.tag.demo { color: var(--gold); border-color: rgba(245,179,1,.4); }
.conf-wrap { margin: 12px 0 8px; }
.conf-bar { height: 7px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.conf-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--up)); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.metric { background: var(--bg-2); border-radius: 12px; padding: 10px; text-align: center; }
.metric .k { font-size: 11px; color: var(--muted); }
.metric .v { font-size: 16px; font-weight: 800; margin-top: 2px; }
.metric .v.up { color: var(--up); } .metric .v.down { color: var(--down); }
/* 具体价位表 */
.levels { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lv { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.lv:last-child { border-bottom: none; }
.lv .lab { font-size: 13px; color: var(--muted); flex: 1; }
.lv .px { font-size: 18px; font-weight: 800; }
.lv .pc { font-size: 12px; width: 60px; text-align: right; }
.lv .pc.up { color: var(--up); } .lv .pc.down { color: var(--down); }

.alloc {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.3);
  border-radius: 12px; padding: 10px 12px; margin-top: 6px;
}
.alloc .amt { font-size: 18px; font-weight: 800; color: var(--accent); }
.reason { font-size: 13px; line-height: 1.7; color: var(--muted); margin-top: 10px; }
.reason.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 表单 */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type="number"] {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 14px; font-size: 16px;
}
.field-suffix { position: relative; }
.field-suffix .suf { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }

/* 按钮 */
.btn {
  width: 100%; border: none; border-radius: 14px; padding: 15px;
  font-size: 16px; font-weight: 800; cursor: pointer; margin-top: 14px;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.gold { background: var(--gold); color: #1a1200; }
.btn.outline { background: transparent; border: 1px solid var(--line); color: var(--text); }

/* 付费墙 / 价格卡 */
.plans { display: grid; gap: 12px; margin-top: 8px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--card); }
.plan.best { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245,179,1,.3) inset; }
.plan .price { font-size: 30px; font-weight: 900; }
.plan .price s { font-size: 16px; color: var(--muted); font-weight: 600; margin-right: 8px; }
.plan .per { color: var(--muted); font-size: 13px; }
.badge-save { display: inline-block; background: rgba(245,179,1,.15); color: var(--gold); font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; margin-left: 8px; }
.locked { filter: blur(6px); pointer-events: none; user-select: none; }
.lock-overlay { text-align: center; padding: 24px 16px; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; background: rgba(11,18,32,.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tab {
  flex: 1; background: transparent; border: none; color: var(--muted);
  padding: 14px 0; font-size: 13px; font-weight: 700;
}
.tab.active { color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }
/* hidden 属性要盖过 .tabbar 的 display:flex(否则落地页/填表页底栏会漏出来) */
.tabbar[hidden] { display: none; }

.hero { text-align: center; padding: 22px 0 6px; }
.hero .logo { font-size: 40px; }
.hero h1 { font-size: 24px; margin: 10px 0 6px; }

/* 落地首页 */
.landing { padding-bottom: 8px; }
.lhero { text-align: center; padding: 28px 4px 20px; }
.lhero .logo { font-size: 44px; }
.lhero h1 { font-size: 27px; line-height: 1.25; margin: 12px 0 10px; font-weight: 800; }
.lhero .lsub { font-size: 15px; line-height: 1.7; max-width: 30rem; margin: 0 auto 18px; }
.lhero .btn { max-width: 320px; margin-left: auto; margin-right: auto; }
.lsec { border-top: 1px solid var(--line); padding: 20px 0; }
.lsec h2 { font-size: 18px; margin: 0 0 14px; }
.feat { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.feat .fi { font-size: 22px; flex: 0 0 auto; }
.feat b { display: block; margin-bottom: 2px; }
.feat p { margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-size: 14px; line-height: 1.6; }
.steps .sn { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.lprice { display: flex; gap: 12px; }
.lp { flex: 1; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 8px; }
.lp.best { border-color: var(--gold); }
.lp .amt { font-size: 26px; font-weight: 900; }
.qa { margin-bottom: 14px; }
.qa b { display: block; margin-bottom: 3px; }
.qa p { margin: 0; }

/* 法律页排版 */
.legal { font-size: 14px; line-height: 1.75; color: var(--muted); }
.legal h3 { font-size: 15px; color: var(--text); margin: 18px 0 6px; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 10px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal b { color: var(--text); }
.list { margin: 0; padding-left: 18px; line-height: 1.9; color: var(--muted); font-size: 14px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.toast {
  position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%);
  background: #000; color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 13px; z-index: 50; opacity: 0; transition: opacity .2s;
}
.toast.show { opacity: .95; }

/* 语言切换菜单 */
.lang-menu {
  position: fixed; top: 58px; right: 12px; z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; min-width: 160px; box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.lang-title { font-size: 11px; color: var(--muted); padding: 4px 10px 6px; }
.lang-item {
  display: block; width: 100%; text-align: left; background: transparent;
  border: none; color: var(--text); padding: 10px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
}
.lang-item:hover, .lang-item.active { background: var(--bg-2); }
.lang-item.active { color: var(--accent); }

/* 安装提示条 */
.install-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(76px + var(--safe-b)); z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.install-bar button {
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 8px 14px; font-weight: 700; font-size: 13px; margin-left: 6px;
}
.install-bar button.x { background: transparent; color: var(--muted); padding: 8px; }
