/* ===== 黑暗陨石风格 · 天体 IDO ===== */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
    --bg: #05060a;
    --bg2: #0b0e17;
    --gold: #f5b23b;
    --gold2: #ff7b28;
    --fire: #ff5f2e;
    --crimson: #c2182c;
    --txt: #e6e9f2;
    --txt-dim: #97a0b5;
    --line: rgba(245,178,59,.18);
    --ok: #3ddc84;
    --err: #ff5068;
}

html, body { height: 100%; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    color: var(--txt);
    background: radial-gradient(1200px 800px at 80% -10%, #2a1622 0%, transparent 55%),
                radial-gradient(1000px 700px at -10% 20%, #14203a 0%, transparent 55%),
                linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== 背景：星云 + 星星 + 陨石 ===== */
.cosmos { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.nebula { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; }
.nebula-a { width: 520px; height: 420px; background: #7a2f2f; top: -120px; right: -140px; }
.nebula-b { width: 560px; height: 460px; background: #1f3a7a; bottom: -160px; left: -160px; }
.stars {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, #fff 40%, transparent 42%),
        radial-gradient(1px 1px at 60% 70%, #fff 40%, transparent 42%),
        radial-gradient(1px 1px at 80% 20%, #fff 40%, transparent 42%),
        radial-gradient(1.5px 1.5px at 40% 80%, #fff 40%, transparent 42%),
        radial-gradient(1px 1px at 10% 60%, #fff 40%, transparent 42%),
        radial-gradient(1.5px 1.5px at 90% 55%, #fff 40%, transparent 42%);
    background-size: 700px 700px;
    opacity: .5;
}
.meteor { position: absolute; width: 120px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, #fff, var(--gold2), transparent); opacity: 0; }
.meteor-a { top: 18%; left: -140px; animation: fly 9s linear infinite; }
.meteor-b { top: 55%; left: 40%; animation: fly 14s linear infinite 3s; }
@keyframes fly {
    0% { transform: translateX(0) rotate(var(--r,20deg)); opacity: 0; }
    8% { opacity: .9; }
    100% { transform: translateX(130vw) rotate(var(--r,20deg)); opacity: 0; }
}

/* ===== 布局 ===== */
.wrap { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; padding: 18px 16px 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 26px; filter: drop-shadow(0 0 6px var(--gold)); }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: 1px;
    background: linear-gradient(90deg, var(--gold), var(--fire));
    -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== 按钮 ===== */
.btn { border: 0; cursor: pointer; font-size: 15px; font-weight: 700; border-radius: 12px;
    transition: transform .15s, opacity .2s, box-shadow .2s; font-family: inherit; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-wallet {
    padding: 9px 16px; color: #fff; border: 1px solid var(--line);
    background: linear-gradient(135deg, #1d2438, #141a2b);
    display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 18px rgba(0,0,0,.4);
}
.btn-wallet .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
    box-shadow: 0 0 8px var(--gold); }
.btn-primary {
    width: 100%; margin-top: 6px; padding: 15px; color: #1a1206; font-size: 17px;
    background: linear-gradient(135deg, var(--gold), var(--fire));
    box-shadow: 0 8px 26px rgba(245,178,59,.35);
}
.btn-next { margin-top: 10px; background: linear-gradient(135deg, #2a3348, #1c2336); color: #fff; }

/* ===== 状态条 ===== */
.statusbar { display: flex; justify-content: space-between; align-items: center;
    background: rgba(15,20,34,.7); border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 14px; margin-bottom: 16px; font-size: 13px; backdrop-filter: blur(6px); }
.ssl { display: flex; align-items: center; gap: 7px; color: var(--txt-dim); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--txt-dim); }
.ssr { color: var(--txt); font-family: "Menlo", monospace; }

/* ===== 卡片 ===== */
.card { background: linear-gradient(160deg, rgba(24,30,48,.92), rgba(12,16,28,.92));
    border: 1px solid var(--line); border-radius: 20px; padding: 20px; margin-bottom: 16px;
    backdrop-filter: blur(8px); box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.card-head { text-align: center; margin-bottom: 18px; }
.ido-title { font-size: 28px; font-weight: 800; }
.ido-title span { font-size: 16px; font-weight: 600; color: var(--txt-dim); }
.ido-sub { color: var(--txt-dim); font-size: 13px; margin-top: 6px; }

/* ===== 档位选择 ===== */
.amount-select { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.amt-card { padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(10,14,24,.6); color: var(--txt); cursor: pointer; transition: all .2s; }
.amt-card.active { border-color: var(--gold); background: linear-gradient(160deg, rgba(245,178,59,.14), rgba(255,123,40,.05));
    box-shadow: 0 0 18px rgba(245,178,59,.3); }
.amt-value { font-size: 22px; font-weight: 800; }
.amt-value small { font-size: 13px; font-weight: 500; color: var(--txt-dim); }
.amt-card.active .amt-value small { color: var(--gold); }
.amt-tag { margin-top: 4px; font-size: 12px; color: var(--txt-dim); }
.amt-card.active .amt-tag { color: var(--gold); }

/* ===== 表单 ===== */
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 13px; color: var(--txt-dim); margin-bottom: 6px; }
.input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
    background: rgba(8,11,20,.8); color: var(--txt); font-size: 14px; outline: none; transition: border .2s; }
.input:focus { border-color: var(--gold); }
.input::placeholder { color: #5b6479; }

/* ===== 我的认购 ===== */
.invest-box { background: rgba(8,11,20,.55); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.invest-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.invest-row strong { color: var(--gold); font-family: "Menlo", monospace; }
.progress { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08);
    overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; border-radius: 6px; transition: width .6s;
    background: linear-gradient(90deg, var(--gold), var(--fire)); } 

/* ===== 提示 ===== */
.tx-hint { min-height: 18px; font-size: 13px; color: var(--txt-dim); text-align: center; margin-top: 10px; }
.tx-hint.ok { color: var(--ok); }
.tx-hint.err { color: var(--err); }

/* ===== 规则 ===== */
.rules-title { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.rules-title::before { content: "☄"; }
.rules { list-style: none; }
.rules li { position: relative; padding: 6px 0 6px 18px; font-size: 13.5px; color: var(--txt-dim); line-height: 1.6; }
.rules li::before { content: ""; position: absolute; left: 0; top: 13px; width: 7px; height: 7px; border-radius: 2px;
    background: linear-gradient(135deg, var(--gold), var(--fire)); transform: rotate(45deg); }
.rules li b { color: var(--txt); }
.rules code { color: var(--gold); font-size: 12px; }

/* ===== 页脚 ===== */
.foot { text-align: center; font-size: 12px; color: var(--txt-dim); padding-top: 8px; word-break: break-all; }
.foot a { color: var(--gold); text-decoration: none; }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 20px);
    background: rgba(20,24,40,.96); color: var(--txt); padding: 11px 18px; border-radius: 12px;
    border: 1px solid var(--line); font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 99; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--err); color: var(--err); }
.toast.ok { border-color: var(--ok); color: var(--ok); }
