/* AISTOCK Commercial Cloud PWA — 移动优先深色主题 */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
:root {
  --bg:#0f1023; --card:#1a1b36; --card2:#232448; --text:#eef0ff; --muted:#9aa0c3;
  --accent:#7c6cff; --accent2:#4ecdc4; --gold:#ffd166; --red:#ff6b6b; --green:#06d6a0;
  --radius:16px;
}
body { background:var(--bg); color:var(--text); font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; min-height:100vh; }
#app { max-width:520px; margin:0 auto; padding:16px 16px 90px; }

/* 顶部栏 */
.topbar { display:flex; align-items:center; justify-content:space-between; padding:12px 0 20px; }
.topbar h1 { font-size:20px; font-weight:700; letter-spacing:.5px; }
.topbar .logo { display:flex; align-items:center; gap:8px; }
.topbar .logo .dot { width:10px; height:10px; border-radius:50%; background:var(--accent2); box-shadow:0 0 12px var(--accent2); }
.topbar .user-chip { font-size:13px; color:var(--muted); background:var(--card); padding:6px 12px; border-radius:20px; cursor:pointer; }

/* 卡片 */
.card { background:var(--card); border-radius:var(--radius); padding:18px; margin-bottom:14px; }
.card h2 { font-size:16px; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.card h2 .badge { font-size:11px; background:var(--accent); padding:2px 8px; border-radius:10px; color:#fff; }
.muted { color:var(--muted); font-size:13px; }
.row { display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px solid rgba(255,255,255,.05); }
.row:last-child { border-bottom:none; }
.row .label { color:var(--muted); font-size:14px; }
.row .value { font-size:14px; font-weight:600; }

/* 按钮 */
.btn { display:block; width:100%; padding:14px; border:none; border-radius:14px; font-size:16px; font-weight:600;
  background:linear-gradient(135deg,var(--accent),#5b4bf0); color:#fff; cursor:pointer; margin-top:10px; }
.btn:active { transform:scale(.98); }
.btn.ghost { background:var(--card2); color:var(--text); }
.btn.gold { background:linear-gradient(135deg,#f5a623,#ffd166); color:#3a2a00; }
.btn:disabled { opacity:.5; }

/* 表单 */
.field { margin-bottom:14px; }
.field label { display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
.field input { width:100%; padding:13px 14px; border-radius:12px; border:1px solid #33365e; background:var(--card2); color:var(--text); font-size:15px; }
.field input:focus { outline:none; border-color:var(--accent); }
.error { color:var(--red); font-size:13px; margin-top:6px; min-height:18px; }
.hint { color:var(--muted); font-size:12px; margin-top:6px; }

/* 股票列表 */
.stock-item { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid rgba(255,255,255,.05); cursor:pointer; }
.stock-item:last-child { border-bottom:none; }
.rank { width:34px; height:34px; border-radius:10px; background:var(--card2); display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--accent2); flex-shrink:0; }
.rank.r1 { background:linear-gradient(135deg,#f5a623,#ffd166); color:#3a2a00; }
.rank.r2 { background:linear-gradient(135deg,#b8b8c8,#e0e0ef); color:#333; }
.rank.r3 { background:linear-gradient(135deg,#cd7f32,#e8a55c); color:#fff; }
.stock-main { flex:1; min-width:0; }
.stock-main .name { font-weight:600; font-size:15px; }
.stock-main .code { font-size:12px; color:var(--muted); }
.score { font-size:15px; font-weight:700; color:var(--accent2); }
.risk-tag { font-size:11px; padding:2px 8px; border-radius:8px; }
.risk-low { background:rgba(6,214,160,.15); color:var(--green); }
.risk-mid { background:rgba(255,209,102,.15); color:var(--gold); }
.risk-high { background:rgba(255,107,107,.15); color:var(--red); }
.tags { display:flex; gap:6px; margin-top:4px; flex-wrap:wrap; }
.tag { font-size:11px; background:var(--card2); color:var(--muted); padding:2px 8px; border-radius:8px; }

/* 统计网格 */
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.stat { background:var(--card2); border-radius:12px; padding:12px 8px; text-align:center; }
.stat .num { font-size:20px; font-weight:700; color:var(--accent2); }
.stat .num.red { color:var(--red); }
.stat .num.gold { color:var(--gold); }
.stat .lbl { font-size:11px; color:var(--muted); margin-top:4px; }

/* 会员 */
.member-card { background:linear-gradient(135deg,#2a2b5e,#1a1b36); border:1px solid var(--accent); position:relative; overflow:hidden; }
.member-card::before { content:""; position:absolute; top:-40px; right:-40px; width:120px; height:120px; border-radius:50%; background:rgba(124,108,255,.25); }
.member-plan { font-size:22px; font-weight:800; }
.member-status { font-size:12px; padding:3px 10px; border-radius:10px; background:rgba(6,214,160,.2); color:var(--green); display:inline-block; }
.member-status.expired { background:rgba(255,107,107,.2); color:var(--red); }

/* 套餐 */
.plan { border:1px solid #33365e; border-radius:14px; padding:16px; margin-bottom:12px; cursor:pointer; transition:.2s; }
.plan.selected { border-color:var(--accent); background:rgba(124,108,255,.08); }
.plan .plan-name { font-weight:700; font-size:16px; }
.plan .plan-price { font-size:20px; font-weight:800; color:var(--gold); margin-top:4px; }
.plan .plan-days { font-size:12px; color:var(--muted); }

/* 二维码 */
.qr-row { display:flex; gap:12px; margin-top:12px; }
.qr-box { flex:1; background:#fff; border-radius:12px; padding:10px; text-align:center; }
.qr-box img { width:100%; max-width:160px; border-radius:8px; }
.qr-box .qr-label { font-size:12px; color:#333; margin-top:6px; font-weight:600; }
.qr-placeholder { width:100%; height:120px; display:flex; align-items:center; justify-content:center; color:#aaa; font-size:12px; }

/* 底部导航 */
.bottom-nav { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:520px;
  background:rgba(15,16,35,.95); backdrop-filter:blur(10px); border-top:1px solid rgba(255,255,255,.06);
  display:flex; z-index:100; padding-bottom:env(safe-area-inset-bottom); }
.bottom-nav button { flex:1; background:none; border:none; color:var(--muted); padding:10px 0 8px; font-size:11px; cursor:pointer; }
.bottom-nav button.active { color:var(--accent2); }
.bottom-nav .nav-icon { font-size:20px; display:block; margin-bottom:2px; }

/* 登录页 */
.auth-wrap { padding-top:60px; text-align:center; }
.auth-wrap .big-logo { font-size:40px; margin-bottom:8px; }
.auth-wrap h1 { font-size:26px; margin-bottom:6px; }
.auth-wrap .sub { color:var(--muted); font-size:14px; margin-bottom:40px; }
.auth-card { text-align:left; }

/* Toast */
.toast { position:fixed; top:20px; left:50%; transform:translateX(-50%); background:#2a2b5e; color:#fff;
  padding:10px 20px; border-radius:12px; font-size:14px; z-index:999; opacity:0; transition:.3s; max-width:90%; }
.toast.show { opacity:1; }

/* 加载 */
.loading { text-align:center; padding:40px; color:var(--muted); }
.spinner { width:28px; height:28px; border:3px solid var(--card2); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; margin:0 auto 12px; }
@keyframes spin { to { transform:rotate(360deg); } }

/* 详情 */
.detail-head { text-align:center; padding:10px 0 20px; }
.detail-head .d-code { font-size:14px; color:var(--muted); }
.detail-head .d-name { font-size:26px; font-weight:800; margin-top:2px; }
.detail-score { font-size:44px; font-weight:800; background:linear-gradient(135deg,var(--accent2),#7c6cff); -webkit-background-clip:text; background-clip:text; color:transparent; }

/* 历史 */
.period-tabs { display:flex; gap:8px; margin-bottom:14px; }
.period-tabs button { flex:1; padding:10px; border-radius:10px; border:none; background:var(--card2); color:var(--muted); font-size:13px; cursor:pointer; }
.period-tabs button.active { background:var(--accent); color:#fff; }
