/* ==================== 全局 ==================== */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
:root {
    --gold: #D4A84B; --gold-light: #F5E6C8; --gold-dark: #B8892E;
    --bg: #F5F5F7; --bg-card: #FFFFFF; --bg-glass: rgba(255,255,255,0.75);
    --text: #1A1A2E; --text-secondary: #6B7280; --text-muted: #9CA3AF;
    --green: #00C853; --red: #FF3B30; --border: rgba(0,0,0,0.06);
    --radius: 14px; --shadow: 0 2px 16px rgba(0,0,0,0.06);
    --nav-height: 64px; --status-height: 40px;
}
body { font-family: -apple-system,BlinkMacSystemFont,'PingFang SC','Helvetica Neue',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; -webkit-font-smoothing:antialiased; padding-bottom:calc(var(--nav-height) + 30px); }
.tab-page { display:none; padding:0; }
.tab-page.active { display:block; }
.tab-page-pad { padding:0 14px 20px; }

/* ==================== 顶部状态条 ==================== */
.status-bar { display:flex; justify-content:space-between; align-items:center; padding:8px 14px; background:var(--bg); height:var(--status-height); position:sticky; top:0; z-index:100; border-bottom:1px solid var(--border); }
.status-left { display:flex; align-items:center; gap:6px; }
.status-dot { width:6px; height:6px; border-radius:50%; background:var(--green); animation:pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
.status-text { font-size:12px; color:var(--text-secondary); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:140px; }
.status-right { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--text-muted); }
#navAchieveBadge { color:var(--gold); font-weight:600; font-size:12px; }
#achieveCount { font-weight:700; }

/* ==================== 磨砂玻璃卡片 ==================== */
.glass-card { margin:10px 14px; padding:14px 16px; background:var(--bg-glass); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); border-radius:var(--radius); border:1px solid rgba(255,255,255,0.5); box-shadow:0 4px 20px rgba(0,0,0,0.04); }
.glass-card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.glass-title { font-size:13px; font-weight:600; color:var(--text); }
.glass-link { font-size:11px; color:var(--gold); font-weight:500; cursor:pointer; }
.glass-link:active { opacity:0.6; }
.glass-card-body { }
.glass-row { display:flex; gap:6px; }
.glass-item { flex:1; text-align:center; padding:4px 0; }
.glass-label { display:block; font-size:10px; color:var(--text-muted); margin-bottom:2px; }
.glass-val { font-size:13px; font-weight:700; color:var(--text); }
.glass-val.profit { color:var(--green); }
.glass-val.loss { color:var(--red); }
.glass-divider { height:1px; background:var(--border); margin:6px 0; }

/* ==================== 今日盈亏 ==================== */
.today-pl { margin:0 14px 8px; padding:9px 14px; background:var(--bg-card); border-radius:10px; border:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.today-pl-label { font-size:12px; color:var(--text-secondary); }
.today-pl-value { font-size:16px; font-weight:700; }
.today-pl-value.profit { color:var(--green); }
.today-pl-value.loss { color:var(--red); }

/* ==================== 走势图 ==================== */
.chart-box { margin:0 14px 8px; background:var(--bg-card); border-radius:var(--radius); border:1px solid var(--border); padding:10px 12px 8px; }
.chart-header { display:flex; justify-content:space-between; font-size:12px; color:var(--text-secondary); margin-bottom:6px; }
.chart-dir { font-weight:600; }
.chart-dir.up { color:var(--green); }
.chart-dir.down { color:var(--red); }

/* 周期按钮 */
.chart-periods { display:flex; gap:3px; margin-bottom:6px; flex-wrap:wrap; }
.period-btn { padding:2px 9px; border:1px solid var(--border); border-radius:4px; background:var(--bg); color:var(--text-muted); font-size:10px; cursor:pointer; transition:all 0.15s; line-height:1.6; }
.period-btn:hover { border-color:var(--gold); color:var(--gold); }
.period-btn.active { background:var(--gold); color:#fff; border-color:var(--gold); }
.more-btn { color:var(--gold); font-weight:600; }
.chart-more { display:none; flex-wrap:wrap; gap:3px; margin-bottom:6px; padding:5px 6px; background:#f0f0f2; border-radius:6px; }
.chart-more.show { display:flex; }

.chart-canvas-wrap { position:relative; }
#priceChart { width:100%; height:130px; border-radius:4px; cursor:crosshair; }
.chart-tooltip { position:absolute; background:rgba(0,0,0,0.85); color:#fff; padding:5px 10px; border-radius:6px; font-size:11px; pointer-events:none; z-index:10; white-space:nowrap; transform:translate(-50%,-120%); }
.tooltip-time { font-size:10px; color:#aaa; margin-bottom:1px; }
.tooltip-price { font-weight:600; color:var(--gold); font-size:12px; }

/* ==================== 大金价 ==================== */
.big-price { text-align:center; padding:14px; margin:0 14px 10px; background:var(--bg-card); border-radius:var(--radius); border:1px solid var(--border); }
.big-price-label { font-size:11px; color:var(--text-secondary); margin-bottom:3px; }
.big-price-value { font-size:42px; font-weight:700; line-height:1; margin-bottom:2px; transition:color 0.2s; }
.big-price-value.up { color:var(--green); }
.big-price-value.down { color:var(--red); }
.big-price-unit { font-size:13px; color:var(--text-muted); margin-bottom:4px; }
.big-price-change { font-size:13px; font-weight:500; margin-bottom:3px; }
.big-price-change.up { color:var(--green); }
.big-price-change.down { color:var(--red); }
.big-price-sub { font-size:10px; color:var(--text-muted); }

/* ==================== 交易按钮 ==================== */
.trade-actions { display:flex; gap:10px; padding:0 14px 10px; }
.trade-action-btn { flex:1; display:flex; align-items:center; justify-content:center; gap:6px; padding:14px; border:none; border-radius:var(--radius); font-size:15px; font-weight:600; cursor:pointer; transition:all 0.2s; color:#fff; }
.trade-action-btn:active { transform:scale(0.97); }
.trade-action-btn.buy { background:linear-gradient(135deg,#00C853,#009624); }
.trade-action-btn.sell { background:linear-gradient(135deg,#FF3B30,#CC2D24); }
.trade-action-btn .tab-icon { font-size:18px; }

/* ==================== 底部导航 ==================== */
.bottom-nav { position:fixed; bottom:14px; left:12px; right:12px; height:var(--nav-height); background:rgba(255,250,240,0.85); backdrop-filter:blur(30px); -webkit-backdrop-filter:blur(30px); border-radius:18px; box-shadow:0 4px 20px rgba(0,0,0,0.05), 0 2px 8px rgba(0,0,0,0.03); display:flex; z-index:200; padding-bottom:env(safe-area-inset-bottom,0); overflow:hidden; border:0.5px solid rgba(0,0,0,0.04); transition:transform 0.25s, opacity 0.25s; }
.nav-hidden .bottom-nav { transform:translateY(80px); opacity:0; pointer-events:none; }
.nav-hidden .tab-page.active { padding-bottom:0; }
.nav-item { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; cursor:pointer; transition:all 0.25s; color:rgba(0,0,0,0.25); }
.nav-item:hover { color:rgba(212,168,75,0.50); }
.nav-item:active { opacity:0.5; }
.nav-item.active { color:var(--gold); }
.nav-icon { font-size:20px; line-height:1; transition:transform 0.2s; }
.nav-item.active .nav-icon { transform:scale(1.12); }
.nav-label { font-size:10px; font-weight:500; }
@media (prefers-color-scheme: dark) {
    .bottom-nav { background:rgba(55,50,44,0.80); backdrop-filter:blur(35px); box-shadow:0 4px 20px rgba(0,0,0,0.15); border-color:rgba(255,255,255,0.06); }
    .nav-item { color:rgba(255,255,255,0.28); }
    .nav-item:hover { color:rgba(232,195,106,0.5); }
    .nav-item.active { color:#E8C36A; }
}

/* ==================== 工具 Tab ==================== */
.tools-section { margin-bottom:14px; }
.tools-section-title { font-size:14px; font-weight:600; margin-bottom:8px; display:flex; align-items:center; gap:4px; }
.tools-subtitle { font-size:11px; color:var(--text-muted); font-weight:400; }
.badge-bar { display:flex; gap:6px; overflow-x:auto; padding:2px 0; }
.badge-item { display:flex; flex-direction:column; align-items:center; gap:2px; padding:8px 12px; background:var(--bg-card); border:1px solid var(--border); border-radius:10px; min-width:60px; cursor:default; transition:all 0.3s; }
.badge-item span:first-child { font-size:22px; }
.badge-item span:last-child { font-size:10px; color:var(--text-muted); }
.badge-item.unlocked { border-color:var(--gold); background:var(--gold-light); }
.badge-item.unlocked span:last-child { color:var(--gold-dark); font-weight:600; }

.tools-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.tool-item { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:14px; text-align:center; }
.tool-item span:first-child { display:block; font-size:24px; margin-bottom:4px; }
.tool-item span:nth-child(2) { display:block; font-size:12px; color:var(--text-secondary); margin-bottom:4px; }
.tool-badge { display:inline-block; font-size:9px; background:var(--gold-light); color:var(--gold-dark); padding:2px 6px; border-radius:3px; }

/* ==================== 我的 Tab ==================== */
.profile-card { display:flex; align-items:center; gap:12px; padding:14px; background:var(--bg-card); border-radius:var(--radius); border:1px solid var(--border); margin:8px 0 12px; }
.profile-avatar { font-size:36px; }
.profile-name { font-size:16px; font-weight:700; }
.profile-id { font-size:11px; color:var(--text-muted); }

.profile-section { margin-bottom:12px; }
.profile-section-title { font-size:13px; font-weight:600; color:var(--text-secondary); margin-bottom:6px; }
.profile-assets { display:grid; grid-template-columns:repeat(2,1fr); gap:6px; }
.profile-asset-item { background:var(--bg-card); border:1px solid var(--border); border-radius:8px; padding:10px; text-align:center; }
.pa-label { display:block; font-size:10px; color:var(--text-muted); margin-bottom:2px; }
.pa-val { font-size:14px; font-weight:700; }
.pa-val.gold { color:var(--gold); }

.profile-action-btn { display:flex; align-items:center; gap:10px; width:100%; padding:12px 14px; background:var(--bg-card); border:1px solid var(--border); border-radius:10px; margin-bottom:6px; cursor:pointer; transition:all 0.2s; font-size:13px; color:var(--text); }
.profile-action-btn:active { transform:scale(0.98); }
.profile-action-btn span:first-child { font-size:18px; }
.profile-action-btn span:nth-child(2) { flex:1; text-align:left; }
.profile-action-btn span:last-child { color:var(--text-muted); font-size:18px; }

.profile-tx-list { max-height:240px; overflow-y:auto; }
.transaction-item { background:var(--bg-card); border:1px solid var(--border); border-radius:8px; padding:8px 10px; margin-bottom:4px; display:flex; justify-content:space-between; align-items:center; }
.tx-left { flex:1; }
.tx-type { font-size:12px; font-weight:500; margin-bottom:1px; }
.tx-type.buy { color:var(--green); }
.tx-type.sell { color:var(--red); }
.tx-type.recharge { color:var(--gold); }
.tx-time { font-size:10px; color:var(--text-muted); }
.tx-remark { font-size:10px; color:var(--text-secondary); }
.tx-right { text-align:right; }
.tx-amount { font-size:13px; font-weight:600; }
.tx-amount.buy { color:var(--green); }
.tx-amount.sell { color:var(--red); }
.tx-amount.recharge { color:var(--gold); }
.loading { text-align:center; padding:20px 0; color:var(--text-muted); font-size:12px; }

/* ==================== 交易页 ==================== */
.page-title-bar { display:flex; align-items:center; gap:6px; padding:8px 14px; background:var(--bg); border-bottom:1px solid var(--border); position:sticky; top:var(--status-height); z-index:99; }
.back-btn { font-size:26px; background:none; border:none; color:var(--text); cursor:pointer; padding:0 2px; line-height:1; }
.page-title-bar h2 { font-size:15px; font-weight:600; flex:1; }
.trade-container { padding:14px; }
.trade-price { text-align:center; padding:12px; margin-bottom:8px; background:var(--bg-card); border-radius:var(--radius); border:1px solid var(--border); }
.trade-price-label { display:block; font-size:11px; color:var(--text-secondary); margin-bottom:3px; }
.trade-price-value { font-size:32px; font-weight:700; transition:color 0.2s; }
.trade-price-value.up { color:var(--green); }
.trade-price-value.down { color:var(--red); }
.trade-price-unit { font-size:12px; color:var(--text-muted); margin-left:4px; }
.trade-balance-info { display:flex; justify-content:space-between; font-size:11px; color:var(--text-secondary); margin-bottom:8px; padding:8px 10px; background:var(--bg-card); border-radius:8px; }
.trade-balance-info strong { color:var(--text); }
.form-group { margin-bottom:10px; }
.form-group label { display:block; font-size:11px; color:var(--text-secondary); margin-bottom:3px; font-weight:500; }
.ai-input { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--bg); color:var(--text); font-size:13px; outline:none; transition:border 0.2s; }
.ai-input:focus { border-color:var(--gold); }
.ai-textarea { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--bg); color:var(--text); font-size:13px; outline:none; transition:border 0.2s; font-family:inherit; line-height:1.6; resize:vertical; min-height:70px; }
.ai-textarea:focus { border-color:var(--gold); }
.avatar-upload-row { display:flex; gap:6px; align-items:stretch; }
.file-upload-label { display:flex; align-items:center; justify-content:center; width:40px; background:var(--bg-card); border:1px dashed var(--border); border-radius:10px; cursor:pointer; transition:all 0.2s; font-size:18px; flex-shrink:0; }
.file-upload-label:hover { border-color:var(--gold); background:var(--gold-light); }
.form-row-2 { display:flex; gap:8px; }
.group-member-list { max-height:240px; overflow-y:auto; }
.group-member-check { display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid var(--border); cursor:pointer; }
.group-member-check input[type="checkbox"] { accent-color:var(--gold); width:16px; height:16px; }
.group-member-avatar { width:32px; height:32px; border-radius:16px; background:var(--gold-light); display:flex; align-items:center; justify-content:center; font-size:14px; overflow:hidden; flex-shrink:0; }
.group-member-avatar img { width:100%; height:100%; object-fit:cover; }
.group-member-name { font-size:13px; font-weight:500; flex:1; }
.contacts-actions { display:flex; gap:4px; }
.btn-smart-fill { width:100%; padding:9px 0; border:1px dashed var(--gold); border-radius:10px; background:rgba(212,168,75,0.06); color:var(--gold-dark); font-size:12px; font-weight:600; cursor:pointer; transition:all 0.2s; }
.btn-smart-fill:hover { background:rgba(212,168,75,0.12); }
.btn-smart-fill:active { transform:scale(0.98); }
.key-list { margin-bottom:8px; }
.key-item { display:flex; align-items:center; gap:8px; padding:10px 0; border-bottom:1px solid var(--border); }
.key-icon { font-size:18px; width:28px; text-align:center; }
.key-info { flex:1; min-width:0; }
.key-platform { font-size:12px; font-weight:600; }
.key-label { font-size:10px; color:var(--text-muted); }
.key-masked { font-size:10px; color:var(--text-secondary); font-family:monospace; }
.key-status { font-size:9px; padding:1px 5px; border-radius:3px; }
.key-status.active { background:var(--green); color:#fff; }
.key-status.inactive { background:var(--border); color:var(--text-muted); }
.key-actions { display:flex; gap:4px; }
.key-actions button { background:none; border:1px solid var(--border); border-radius:6px; padding:4px 6px; font-size:11px; cursor:pointer; transition:all 0.15s; }
.key-actions button:hover { border-color:var(--gold); color:var(--gold); }
.key-actions .key-del:hover { border-color:var(--red); color:var(--red); }
.key-divider { height:1px; background:var(--border); margin:8px 0; }
.key-input-row { display:flex; gap:4px; align-items:stretch; }
.key-toggle-btn { background:var(--bg-card); border:1px solid var(--border); border-radius:8px; padding:0 10px; cursor:pointer; transition:all 0.15s; font-size:14px; }
.key-toggle-btn:hover { border-color:var(--gold); }
.input-group { display:flex; align-items:center; border:1px solid var(--border); border-radius:8px; background:var(--bg); overflow:hidden; }
.input-group input { border:none; background:transparent; padding:10px 12px; flex:1; font-size:14px; }
.input-prefix, .input-suffix { padding:10px 12px; color:var(--text-muted); font-size:12px; background:var(--bg-card); }
.quick-gram { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
.quick-gram button { padding:5px 10px; background:var(--bg-card); border:1px solid var(--border); border-radius:6px; color:var(--text-secondary); font-size:11px; cursor:pointer; transition:all 0.2s; }
.quick-gram button:hover { border-color:var(--gold); color:var(--gold); background:var(--gold-light); }
.fee-tip { text-align:right; font-size:10px; color:var(--text-muted); margin:-4px 0 8px; }
.trade-total { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; background:var(--bg-card); border-radius:8px; margin-bottom:8px; }
.trade-total span { font-size:12px; color:var(--text-secondary); }
.trade-total-value { font-size:18px; font-weight:700; color:var(--text); }

/* ==================== 弹窗 ==================== */
.modal-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); z-index:998; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-box { background:#fff; border-radius:16px; width:100%; max-width:340px; box-shadow:0 8px 40px rgba(0,0,0,0.2); overflow:hidden; }
.modal-title { text-align:center; padding:18px 20px 8px; font-size:16px; font-weight:700; }
.modal-body { padding:0 20px 12px; }
.modal-row { display:flex; justify-content:space-between; align-items:center; padding:7px 0; }
.modal-row.total { padding:10px 0; }
.modal-label { font-size:12px; color:var(--text-secondary); }
.modal-value { font-size:13px; font-weight:600; }
.modal-value.gold { color:var(--gold-dark); font-size:16px; }
.modal-value.total { color:var(--gold-dark); font-size:18px; font-weight:700; }
.modal-divider { height:1px; background:var(--border); margin:3px 0; }
.modal-time { font-size:10px; color:var(--text-muted); text-align:center; padding-top:6px; }
.modal-actions { display:flex; gap:10px; padding:0 20px 18px; }
.modal-actions .btn { flex:1; text-align:center; }
.btn { padding:12px 20px; border:none; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; transition:all 0.2s; }
.btn-gold { background:linear-gradient(135deg,var(--gold),var(--gold-dark)); color:#fff; }
.btn-gold:active { transform:scale(0.97); }
.btn-block { width:100%; }
.btn-cancel { background:#f0f0f0; color:var(--text-secondary); }
.form-error { color:var(--red); font-size:11px; margin-top:3px; text-align:center; min-height:16px; }

/* 充值弹窗内 */
.recharge-balance-inline { text-align:center; font-size:13px; padding:6px 0 10px; }
.recharge-balance-inline strong { font-size:15px; }
.recharge-amounts { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:10px; }
.recharge-amounts button { padding:10px; background:var(--bg); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:13px; font-weight:600; cursor:pointer; transition:all 0.2s; }
.recharge-amounts button:hover { border-color:var(--gold); color:var(--gold); }
.recharge-amounts button.active { border-color:var(--gold); background:var(--gold-light); color:var(--gold-dark); }

/* 成就弹窗 */
.achieve-box { text-align:center; }
.achieve-icon { font-size:60px; margin:6px 0; animation:bounce 0.6s; }
@keyframes bounce { 0%{transform:scale(0);} 50%{transform:scale(1.2);} 100%{transform:scale(1);} }
.achieve-name { font-size:18px; font-weight:700; color:var(--gold-dark); margin-bottom:3px; }
.achieve-desc { font-size:12px; color:var(--text-secondary); margin-bottom:10px; }

/* ==================== Toast ==================== */
.toast { position:fixed; top:50px; left:50%; transform:translateX(-50%) translateY(-20px); background:rgba(0,0,0,0.85); color:#fff; padding:8px 18px; border-radius:8px; font-size:12px; z-index:999; opacity:0; transition:all 0.3s; pointer-events:none; max-width:85%; text-align:center; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.toast.success { border-left:3px solid var(--green); }
.toast.error { border-left:3px solid var(--red); }

/* ==================== 对话通讯录 ==================== */
.contacts-header { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; position:sticky; top:var(--status-height); z-index:99; background:var(--bg); border-bottom:1px solid var(--border); }
.contacts-title { font-size:16px; font-weight:700; }
.contacts-add-btn { padding:6px 14px; border:none; border-radius:8px; background:var(--gold); color:#fff; font-size:12px; font-weight:600; cursor:pointer; transition:all 0.2s; }
.contacts-add-btn:active { transform:scale(0.95); }
.contacts-list { padding:4px 14px; }
.contact-card { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); cursor:pointer; transition:all 0.15s; }
.contact-card:active { opacity:0.6; }
.contact-avatar { width:42px; height:42px; border-radius:21px; background:var(--gold-light); display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; overflow:hidden; }
.contact-avatar img { width:100%; height:100%; object-fit:cover; }
.contact-info { flex:1; min-width:0; }
.contact-name-row { display:flex; align-items:center; gap:6px; }
.contact-name { font-size:14px; font-weight:600; }
.contact-badge { font-size:9px; background:var(--gold-light); color:var(--gold-dark); padding:1px 5px; border-radius:3px; }
.contact-nickname { font-size:11px; color:var(--text-muted); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.contact-preview { font-size:12px; color:var(--text-secondary); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.contact-right { text-align:right; flex-shrink:0; }
.contact-time { font-size:10px; color:var(--text-muted); }
.contact-online { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--green); margin-top:4px; }
.contact-online.offline { background:#ccc; }

/* ==================== 聊天页面 ==================== */
.chat-header { display:flex; align-items:center; gap:8px; padding:8px 14px; background:var(--bg); border-bottom:1px solid var(--border); position:sticky; top:var(--status-height); z-index:99; }
.chat-header-info { flex:1; }
.chat-header-name { font-size:15px; font-weight:600; display:block; }
.chat-header-status { font-size:11px; color:var(--green); }
.chat-header-more { background:none; border:none; font-size:20px; color:var(--text); cursor:pointer; padding:4px; }
.chat-messages { padding:10px 14px; overflow-y:auto; min-height:calc(100vh - 160px); display:flex; flex-direction:column; gap:8px; }
.chat-msg { max-width:80%; padding:8px 12px; border-radius:12px; font-size:13px; line-height:1.5; word-break:break-word; }
.chat-msg.admin { align-self:flex-end; background:var(--gold); color:#fff; border-bottom-right-radius:4px; }
.chat-msg.ai { align-self:flex-start; background:var(--bg-card); border:1px solid var(--border); border-bottom-left-radius:4px; }
.chat-msg-time { font-size:9px; color:var(--text-muted); margin-top:2px; text-align:right; }
.chat-msg .chat-sender-label { font-size:10px; font-weight:600; color:var(--gold-dark); display:block; margin-bottom:2px; }
.chat-input-bar { display:flex; gap:8px; padding:8px 14px; background:var(--bg); border-top:1px solid var(--border); position:sticky; bottom:0; }
.chat-input { flex:1; padding:10px 14px; border:1px solid var(--border); border-radius:20px; background:var(--bg-card); font-size:14px; outline:none; transition:border 0.2s; }
.chat-input:focus { border-color:var(--gold); }
.chat-send-btn { padding:10px 18px; border:none; border-radius:20px; background:var(--gold); color:#fff; font-size:13px; font-weight:600; cursor:pointer; transition:all 0.2s; }
.chat-send-btn:active { transform:scale(0.95); }
.chat-load-more { text-align:center; padding:8px; color:var(--text-muted); font-size:11px; cursor:pointer; }
.chat-load-more:active { opacity:0.6; }
.chat-typing { align-self:flex-start; padding:8px 12px; background:var(--bg-card); border:1px solid var(--border); border-radius:12px; border-bottom-left-radius:4px; font-size:13px; color:var(--text-muted); display:flex; gap:3px; }
.chat-typing span { animation:dotPulse 1.4s infinite; }
.chat-typing span:nth-child(2) { animation-delay:0.2s; }
.chat-typing span:nth-child(3) { animation-delay:0.4s; }
@keyframes dotPulse { 0%,60%,100%{opacity:0.3;} 30%{opacity:1;} }

/* ==================== AI个人主页 ==================== */
.ai-profile-content { padding:0 14px 20px; }
.ai-profile-header { display:flex; align-items:center; gap:12px; padding:16px 0; border-bottom:1px solid var(--border); margin-bottom:12px; }
.ai-profile-avatar { width:56px; height:56px; border-radius:28px; background:var(--gold-light); display:flex; align-items:center; justify-content:center; font-size:28px; overflow:hidden; }
.ai-profile-avatar img { width:100%; height:100%; object-fit:cover; }
.ai-profile-names { flex:1; }
.ai-profile-nickname { font-size:18px; font-weight:700; }
.ai-profile-dispname { font-size:12px; color:var(--text-muted); margin-top:2px; }
.ai-profile-tags { display:flex; gap:4px; margin-top:4px; flex-wrap:wrap; }
.ai-profile-tag { font-size:10px; background:var(--gold-light); color:var(--gold-dark); padding:2px 8px; border-radius:10px; }
.ai-profile-section { margin-bottom:12px; }
.ai-profile-section-title { font-size:13px; font-weight:600; color:var(--text-secondary); margin-bottom:6px; display:flex; align-items:center; gap:4px; }
.ai-profile-desc { font-size:12px; color:var(--text); line-height:1.6; padding:10px; background:var(--bg-card); border-radius:8px; border:1px solid var(--border); }
.ai-profile-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.ai-profile-stat { background:var(--bg-card); border:1px solid var(--border); border-radius:8px; padding:8px; text-align:center; }
.ai-profile-stat span { display:block; font-size:10px; color:var(--text-muted); margin-bottom:2px; }
.ai-profile-stat strong { font-size:14px; }
.ai-profile-stat strong.profit { color:var(--green); }
.ai-profile-stat strong.loss { color:var(--red); }
.ai-tx-list { max-height:300px; overflow-y:auto; }
.ai-tx-item { display:flex; justify-content:space-between; align-items:center; padding:8px 10px; background:var(--bg-card); border:1px solid var(--border); border-radius:6px; margin-bottom:4px; }
.ai-tx-left { flex:1; }
.ai-tx-type { font-size:11px; font-weight:600; }
.ai-tx-type.buy { color:var(--green); }
.ai-tx-type.sell { color:var(--red); }
.ai-tx-type.red_packet { color:var(--gold); }
.ai-tx-detail { font-size:10px; color:var(--text-muted); margin-top:1px; }
.ai-tx-right { text-align:right; }
.ai-tx-amount { font-size:12px; font-weight:600; }

/* ==================== 红包弹窗 ==================== */
.redpacket-section { text-align:center; padding:10px 0; }
.redpacket-balance { font-size:13px; margin-bottom:8px; }
.redpacket-balance strong { font-size:16px; color:var(--gold); }
.redpacket-amounts { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:8px; }
.redpacket-amounts button { padding:10px; background:var(--bg); border:1px solid var(--border); border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; transition:all 0.2s; }
.redpacket-amounts button:hover { border-color:var(--gold); color:var(--gold); }
.redpacket-amounts button.active { background:var(--gold-light); border-color:var(--gold); color:var(--gold-dark); }

/* ==================== 手机适配 ==================== */
@media (min-width:500px) { body{ max-width:480px; margin:0 auto; } }
