:root {
    --bg:#f5f7fa;
    --card:#ffffff;
    --border:#e2e8f0;
    --text:#0f172a;
    --muted:#64748b;
    --accent:#7c3aed;
    --accent2:#0891b2;
    --success:#10b981;
    --danger:#ef4444;
    --gold:#f59e0b;
    --radius:16px;
    --radius-sm:10px;
    --shadow:0 1px 3px rgba(0,0,0,.06),0 4px 12px rgba(0,0,0,.04);
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
body{
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro','Segoe UI',Roboto,'Helvetica Neue',sans-serif;
    background:var(--bg);color:var(--text);min-height:100vh;
    display:flex;justify-content:center;align-items:center;overflow:hidden;
}
.app{
    width:100%;max-width:430px;height:100vh;max-height:950px;background:var(--bg);
    display:flex;flex-direction:column;position:relative;overflow:hidden;
}
@media(min-width:480px){
    .app{border-radius:36px;height:92vh;max-height:860px;border:1px solid #cbd5e1;box-shadow:0 18px 45px rgba(0,0,0,.08)}
    body{background:#e2e8f0;padding:20px}
}
.splash{
    position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:24px;transition:opacity .8s;background:#000;
}
.blackhole{
    width:180px;height:180px;border-radius:50%;
    background:radial-gradient(circle at 45% 40%,#4c1d95 0%,#1e0a3c 40%,#000 80%);
    box-shadow:0 0 80px #6d28d9,0 0 160px #3b1d5e,inset 0 0 60px #000;
    animation:spin 12s linear infinite;position:relative;
}
.blackhole::before{
    content:'';position:absolute;top:25%;left:25%;width:50%;height:50%;border-radius:50%;
    background:radial-gradient(circle,#8b5cf6,#2a0a5e 50%,#000);filter:blur(3px);
}
.blackhole::after{
    content:'';position:absolute;top:38%;left:38%;width:24%;height:24%;border-radius:50%;
    background:#000;box-shadow:0 0 50px #8b5cf6;
}
@keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
.splash .brand{font-size:1.6rem;font-weight:700;color:#fff;letter-spacing:3px}
.splash .sub{color:#8b5cf6;font-size:.8rem}
.header{
    height:56px;display:flex;align-items:center;justify-content:center;
    padding:0 16px;background:#fff;border-bottom:1px solid var(--border);flex-shrink:0;position:relative;
}
.header .logo{font-size:1rem;font-weight:700;color:var(--text)}
.header .back-btn{
    position:absolute;left:8px;top:50%;transform:translateY(-50%);
    background:none;border:none;font-size:1.2rem;cursor:pointer;padding:6px 10px;border-radius:8px;display:none;
}
.header .right-btn{
    position:absolute;right:12px;top:50%;transform:translateY(-50%);
    background:none;border:none;font-size:.85rem;cursor:pointer;color:var(--accent);padding:6px 10px;border-radius:8px;font-weight:600;
}
.main{flex:1;overflow-y:auto;padding:16px;scrollbar-width:thin}
.main::-webkit-scrollbar{width:3px}
.main::-webkit-scrollbar-thumb{background:var(--border);border-radius:10px}
.card{
    background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
    padding:18px 16px;margin-bottom:14px;box-shadow:var(--shadow);
}
.card-title{font-size:.85rem;font-weight:700;color:var(--muted);margin-bottom:12px}
.btn{
    display:flex;align-items:center;justify-content:center;gap:6px;width:100%;
    padding:14px 20px;border-radius:12px;border:none;font-size:.9rem;font-weight:600;
    cursor:pointer;transition:all .2s;font-family:inherit;
}
.btn:active{transform:scale(.98)}
.btn-primary{background:var(--accent);color:#fff}
.btn-secondary{background:#f8fafc;color:var(--text);border:1px solid var(--border)}
.btn-gold{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff}
.btn-danger{background:#fee2e2;color:#ef4444;border:none}
.btn-sm{padding:8px 14px;font-size:.75rem;border-radius:8px;width:auto;display:inline-flex}
.input{
    width:100%;padding:12px 14px;background:#f8fafc;border:1px solid var(--border);
    border-radius:10px;color:var(--text);font-size:.9rem;outline:none;font-family:inherit;
}
.input:focus{border-color:var(--accent)}
.label{font-size:.7rem;font-weight:600;color:var(--muted);margin-bottom:6px;display:block}
.balance-display{text-align:center;padding:16px 0}
.balance-display .amount{font-size:2.2rem;font-weight:800}
.balance-display .unit{font-size:.85rem;color:var(--muted)}
.quick-actions{display:flex;gap:8px;margin-top:14px}
.quick-action{
    flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;
    padding:12px 4px;background:#f8fafc;border-radius:12px;border:1px solid var(--border);cursor:pointer;
}
.quick-action .badge{
    width:28px;height:28px;border-radius:8px;background:var(--accent);color:#fff;
    display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;
}
.quick-action .text{font-size:.7rem;color:var(--muted)}
.bottom-nav{
    display:flex;border-top:1px solid var(--border);background:#fff;flex-shrink:0;
    height:64px;padding-bottom:4px;
}
.nav-item{
    flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    cursor:pointer;color:#94a3b8;border:none;background:transparent;font-family:inherit;
}
.nav-item.active{color:var(--accent)}
.nav-item .nav-icon{font-size:1.1rem;font-weight:700}
.nav-item .nav-label{font-size:.65rem;font-weight:500}
.modal-overlay{
    position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);
    z-index:200;display:flex;align-items:center;justify-content:center;
}
.modal-box{
    background:#fff;border-radius:16px;padding:20px;max-width:90%;width:360px;
    max-height:80vh;overflow-y:auto;position:relative;
}
.modal-close{
    position:absolute;top:10px;right:10px;background:#f1f5f9;border:none;
    font-size:1rem;cursor:pointer;color:var(--muted);padding:6px;width:32px;height:32px;
    border-radius:50%;display:flex;align-items:center;justify-content:center;
}
.qr-container{
    display:flex;justify-content:center;padding:12px;background:#fff;
    border-radius:10px;border:1px solid var(--border);margin:8px 0;min-height:150px;
}
.addr-display{
    background:#f8fafc;border:1px solid var(--border);border-radius:10px;padding:10px 12px;
    font-family:monospace;font-size:.7rem;word-break:break-all;display:flex;justify-content:space-between;align-items:center;gap:8px;
}
.copy-btn{background:#eff6ff;border:none;color:var(--accent);padding:4px 10px;border-radius:6px;font-size:.7rem;cursor:pointer}
.key-display{
    background:#fef3c7;border:1px solid #fde68a;border-radius:10px;padding:10px 12px;
    font-family:monospace;font-size:.65rem;word-break:break-all;color:#92400e;display:flex;justify-content:space-between;align-items:center;gap:8px;
}
.toast{
    position:fixed;bottom:90px;left:50%;transform:translateX(-50%);background:#1e293b;color:#fff;
    padding:10px 20px;border-radius:40px;font-size:.8rem;z-index:300;opacity:0;pointer-events:none;transition:opacity .3s;
}
.toast.show{opacity:1}
.toast.success{color:#bbf7d0}
.toast.error{color:#fecaca}
.generating{
    position:fixed;top:0;left:0;right:0;bottom:0;background:#0d0a1a;z-index:400;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;
}
.generating .spinner{width:50px;height:50px;border-radius:50%;border:4px solid #2a0a5e;border-top-color:#8b5cf6;animation:spin 1s linear infinite}
.generating .text{color:#fff;font-size:.9rem}
.ad-footer{
    background:#1e293b;color:#cbd5e1;text-align:center;padding:6px 12px;font-size:.65rem;flex-shrink:0;
}
.ad-footer .ad-title{color:#fbbf24;font-weight:700}
.coin-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.75rem;flex-shrink:0}
.coin-trx{background:#ef4444;color:#fff}
.coin-usdt{background:#26a17b;color:#fff}
.coin-btc{background:#f7931a;color:#fff}
.coin-eth{background:#627eea;color:#fff}
.market-item{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #f1f5f9}
.market-item:last-child{border-bottom:none}
.market-item .coin{display:flex;align-items:center;gap:8px}
.market-item .price{font-weight:700;font-size:.85rem}
.market-item .change{font-size:.75rem;font-weight:600;padding:4px 8px;border-radius:6px}
.change.up{color:var(--success);background:#ecfdf5}
.change.down{color:var(--danger);background:#fef2f2}
.tx-history-item{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #f1f5f9}
.tx-history-item:last-child{border-bottom:none}
.tx-history-item .tx-info{flex:1}
.tx-history-item .tx-type{font-size:.8rem;font-weight:600}
.tx-history-item .tx-time{font-size:.68rem;color:var(--muted)}
.tx-history-item .tx-amount{font-weight:700;font-size:.85rem}
.tx-history-item .tx-amount.in{color:var(--success)}
.tx-history-item .tx-amount.out{color:var(--danger)}
.badge-dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:4px}
.badge-dot.in{background:var(--success)}
.badge-dot.out{background:var(--danger)}
.notice-item{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid #f1f5f9}
.notice-item:last-child{border-bottom:none}
.notice-item .notice-dot{width:6px;height:6px;border-radius:50%;background:var(--accent);margin-top:5px;flex-shrink:0}
.notice-item .notice-content{font-size:.78rem;line-height:1.5}
.notice-item .notice-time{font-size:.68rem;color:var(--muted)}
