:root {
    --bg: #071525;
    --bg2: #0d2138;
    --card: #102b46;
    --card2: #153b5f;
    --line: rgba(77, 163, 255, 0.20);
    --text: #f4f9ff;
    --muted: #9fb4c9;
    --gold: #38a8ff;
    --gold2: #1677d2;
    --orange: #0b5cad;
    --green: #38d39f;
    --blue: #4da3ff;
    --red: #ff5d6c;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --dock-h: 74px;
    --font: 'Outfit', system-ui, sans-serif;
    --display: 'Russo One', 'Outfit', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
    user-select: none;
}

.bg-glow {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(700px 420px at 50% 18%, rgba(30, 136, 229, 0.24), transparent 60%),
        radial-gradient(500px 300px at 80% 80%, rgba(77, 163, 255, 0.10), transparent 55%),
        linear-gradient(180deg, #091b2d 0%, #071525 45%, #050f1a 100%);
}
.bg-grid {
    position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .22;
    background-image:
        linear-gradient(rgba(77,163,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77,163,255,.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 75%);
}

.topbar, #app, .dock, .toast, .boot { position: relative; z-index: 1; }

.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px 8px; gap: 12px;
}
.profile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar-ring {
    width: 44px; height: 44px; border-radius: 50%;
    padding: 2px; background: linear-gradient(135deg, var(--gold), var(--orange));
}
.avatar {
    width: 100%; height: 100%; border-radius: 50%;
    background: #173653; display: grid; place-items: center;
    font-family: var(--display); color: var(--gold); font-size: 18px;
}
.profile-meta { min-width: 0; }
.name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.lvl-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
#level-text { font-size: 11px; font-weight: 800; color: var(--gold); letter-spacing: .04em; }
.lvl-bar { width: 72px; height: 5px; background: rgba(255,255,255,.10); border-radius: 99px; overflow: hidden; }
.lvl-fill { height: 100%; width: 10%; background: linear-gradient(90deg, var(--gold), var(--green)); }

.daily-pill {
    background: rgba(255,184,0,.08); border: 1px solid var(--line);
    border-radius: 14px; padding: 8px 12px; text-align: right;
    min-width: 128px; max-width: 170px; overflow: hidden;
}
.daily-label { display: block; font-size: 10px; color: var(--muted); font-weight: 800; letter-spacing: .08em; }
.package-val {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--text); font-size: 11px; font-weight: 800; margin-top: 2px;
}
.daily-val { display: block; font-family: var(--display); color: var(--gold); font-size: 12px; margin-top: 2px; }

#app {
    height: calc(100vh - 78px - var(--dock-h) - var(--safe-b));
    overflow-y: auto; overflow-x: hidden;
    padding: 4px 16px calc(18px + var(--safe-b));
    -webkit-overflow-scrolling: touch;
}
.screen { display: none; animation: up .28s ease; }
.screen.active { display: block; }
@keyframes up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.balance-block { text-align: center; margin-top: 6px; }
.balance-label {
    font-size: 11px; letter-spacing: .18em; font-weight: 800;
    color: var(--muted); margin-bottom: 8px;
}
.balance-row { display: flex; justify-content: center; align-items: center; gap: 10px; }
.balance-row.center { justify-content: center; }
.balance-num {
    font-family: var(--display); font-size: 42px; line-height: 1;
    background: linear-gradient(180deg, #d9f1ff, var(--gold) 45%, var(--orange));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 28px rgba(56,168,255,.28);
}
.coin-3d {
    width: 38px; height: 38px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #dff5ff, #38a8ff 45%, #07569e);
    color: #06233e; display: grid; place-items: center;
    font-family: var(--display); font-size: 18px;
    box-shadow: 0 8px 20px rgba(30,136,229,.35), inset 0 2px 4px rgba(255,255,255,.45);
}
.coin-3d.sm { width: 30px; height: 30px; font-size: 14px; }

.tap-arena { position: relative; display: grid; place-items: center; margin: 18px 0 10px; min-height: 230px; }
.tap-orb {
    position: relative; width: 210px; height: 210px; border: 0; background: transparent;
    border-radius: 50%; cursor: pointer; outline: none;
}
.orb-ring {
    position: absolute; inset: 8px; border-radius: 50%;
    border: 2px solid rgba(56,168,255,.28);
    animation: pulse 2.4s ease-out infinite;
}
.orb-ring.delay { animation-delay: 1.1s; inset: 0; }
@keyframes pulse {
    0% { transform: scale(.85); opacity: .8; }
    100% { transform: scale(1.2); opacity: 0; }
}
.orb-core {
    position: absolute; inset: 28px; border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #e8f7ff, #38a8ff 40%, #0d6fd1 78%, #8a3d00);
    box-shadow:
        0 0 0 8px rgba(255,140,0,.12),
        0 18px 50px rgba(30,136,229,.45),
        inset 0 8px 18px rgba(255,255,255,.40);
    display: grid; place-items: center;
    transition: transform .08s ease;
}
.tap-orb:active .orb-core { transform: scale(.92); }
.orb-letter {
    font-family: var(--display); font-size: 72px; color: #06233e;
    text-shadow: 0 2px 0 rgba(255,255,255,.25);
}
.tap-hint {
    position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
    font-size: 11px; font-weight: 800; letter-spacing: .14em; color: rgba(244,249,255,.88);
    background: rgba(2,15,29,.45); padding: 5px 10px; border-radius: 999px;
}
.float-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.float-plus {
    position: absolute; left: 50%; top: 40%;
    font-family: var(--display); color: var(--gold); font-size: 22px;
    animation: floatUp .8s ease forwards; text-shadow: 0 0 12px rgba(56,168,255,.8);
}
@keyframes floatUp {
    from { opacity: 1; transform: translate(-50%, 0) scale(1); }
    to { opacity: 0; transform: translate(-50%, -70px) scale(1.2); }
}

.energy-wrap { margin: 8px 0 18px; }
.energy-top {
    display: flex; justify-content: space-between; font-size: 12px;
    font-weight: 700; color: var(--muted); margin-bottom: 6px;
}
.energy-track {
    height: 12px; border-radius: 99px; background: rgba(255,255,255,.07);
    border: 1px solid rgba(56,168,255,.18); overflow: hidden;
}
.energy-fill {
    height: 100%; width: 100%;
    background: linear-gradient(90deg, #1677d2, #73c7ff, #38d39f);
    box-shadow: 0 0 16px rgba(56,168,255,.45);
    transition: width .25s ease;
}

.section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin: 8px 0 10px;
}
.section-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.section-head.mt { margin-top: 22px; }
.mini-btn {
    border: 1px solid var(--line); background: rgba(255,184,0,.08);
    color: var(--gold); border-radius: 999px; padding: 6px 12px;
    font-weight: 800; font-size: 12px;
}

.miners, .list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }

.miner-card, .item-card {
    background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--line); border-radius: 18px;
    padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.miner-left, .item-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.miner-ico, .item-ico {
    width: 48px; height: 48px; border-radius: 14px;
    //background: radial-gradient(circle at 30% 30%, #ffe08a, #1677d2);
    display: grid; place-items: center; color: #06233e;
    font-family: var(--display); font-size: 18px; flex-shrink: 0;
	margin:5px;
}
.miner-info h4, .item-info h4 { margin: 0 0 4px; font-size: 14px; }
.miner-info p, .item-info p { margin: 0; color: var(--muted); font-size: 12px; }
.miner-right { text-align: right; }
.miner-level {
    font-family: color: white; font-size: 18px; margin-bottom: 2px;
}
.miner-cost { color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.btn-up {
    border: 0; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 12px;
    //background: linear-gradient(135deg, var(--gold), var(--orange)); color: #06233e;
}
.btn-up:disabled { opacity: .45; }
.det {font-size:12px; color:white; font-family:verdana;}

.//title { margin: 8px 0 4px; font-family: var(--display); font-size: 28px; letter-spacing: .02em; }
.subtitle { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.subtitle b { color: var(--gold); }

.invite-hero {
    width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
    background: linear-gradient(135deg, rgba(255,184,0,.16), rgba(11,92,173,.10));
    border: 1px solid var(--line); border-radius: 18px; padding: 16px; color: inherit; margin-bottom: 12px;
}
.invite-ico { font-size: 28px; }
.invite-title { font-weight: 800; }
.invite-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.invite-arrow { margin-left: auto; font-size: 28px; color: var(--gold); }

.btn-primary {
    border: 0; border-radius: 16px; padding: 14px 16px; font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #06233e; box-shadow: 0 10px 28px rgba(30,136,229,.28);
}
.w-full { width: 100%; }

.task-go {
    width: 42px; height: 42px; border-radius: 50%; border: 0;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #06233e; font-weight: 900; flex-shrink: 0;
}
.task-go.done { background: rgba(255,255,255,.1); color: var(--green); }
.task-go.daily {
    width: auto;
    min-width: 72px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 10px;
    white-space: nowrap;
}

.wallet-hero {
    background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--line); border-radius: 22px; padding: 22px; text-align: center; margin-bottom: 14px;
}
.wallet-min { margin-top: 10px; color: var(--muted); font-size: 13px; }
.wallet-min b { color: var(--gold); }

.form-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
    padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.form-card label { font-size: 12px; color: var(--muted); font-weight: 700; }
.form-card input {
    width: 100%; border: 1px solid rgba(255,255,255,.10); background: #091b2d;
    color: #fff; border-radius: 12px; padding: 12px; outline: none; font: inherit;
}
.form-card input:focus { border-color: rgba(56,168,255,.45); }

.rank-card {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, rgba(56,168,255,.16), rgba(11,92,173,.10));
    border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px;
}
.rank-big { font-family: var(--display); font-size: 20px; color: var(--gold); }
.rank-score { text-align: right; font-weight: 800; font-size: 20px; }
.muted { color: var(--muted); font-size: 18px; }
.bonus-summary-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px;
}
.bonus-stat {
    min-width: 0; padding: 13px; border-radius: 16px;
    background: linear-gradient(145deg, rgba(56,168,255,.16), rgba(10,52,88,.32));
    border: 1px solid var(--line);
}
.bonus-stat span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.bonus-stat strong { display: block; margin-top: 5px; color: var(--gold); font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.bonus-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(6,28,47,.62); }
.bonus-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bonus-table th, .bonus-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: center; font-size: 12px; }
.bonus-table th { color: var(--muted); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; background: rgba(0,0,0,.18); }
.bonus-table tbody tr:last-child td { border-bottom: 0; }
.bonus-table tbody tr.active { background: linear-gradient(90deg, rgba(56,168,255,.24), rgba(44,211,184,.10)); box-shadow: inset 3px 0 var(--gold); }
.bonus-table tbody tr.active td { color: #fff; font-weight: 800; }
.bonus-level { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 800; }
.bonus-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--level-color); box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 10px var(--level-color); }
.hidden { display: none !important; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }

.status-pill {
    display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase;
    padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.10);
}
.status-pending { color: var(--gold); }
.status-approved { color: var(--green); }
.status-rejected { color: var(--red); }

.dock {
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b));
    height: var(--dock-h); z-index: 20;
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
    padding: 8px; border-radius: 22px;
    background: rgba(18, 14, 10, 0.92);
    border: 1px solid var(--line);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.dock-item {
    border: 0; background: transparent; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 10px; font-weight: 800; border-radius: 16px;
}
.dock-ico { font-size: 18px; line-height: 1; }
.dock-item.active {
    color: #06233e;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    box-shadow: 0 8px 20px rgba(30,136,229,.28);
}

.toast {
    position: fixed; left: 50%; top: -80px; transform: translateX(-50%);
    z-index: 50; background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #06233e; font-weight: 800; padding: 12px 18px; border-radius: 999px;
    transition: top .28s ease, opacity .28s ease; max-width: calc(100% - 24px);
    text-align: center; font-size: 13px; opacity: 0; pointer-events: none;
}
.toast.show {
    top: calc(78px + env(safe-area-inset-top, 0px));
    opacity: 1;
}

.ad-modal {
    position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
    padding: 24px; background: rgba(2, 10, 18, .78); backdrop-filter: blur(8px);
}
.ad-card {
    width: min(340px, 100%); padding: 22px; text-align: center;
    background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--line); border-radius: 22px;
    box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.ad-card h3 { margin: 10px 0 6px; font-size: 20px; }
.ad-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.ad-badge {
    display: inline-block; padding: 5px 9px; border-radius: 999px;
    color: var(--gold); background: rgba(56,168,255,.12);
    font-size: 10px; font-weight: 900; letter-spacing: .12em;
}
.ad-cancel {
    margin-top: 12px; border: 0; background: transparent; color: var(--muted);
    font: inherit; font-size: 12px; font-weight: 700;
}

.boot {
    position: fixed; inset: 0; z-index: 100;
    background: radial-gradient(circle at 50% 35%, #103b61, #071525 65%);
    display: grid; place-items: center; align-content: center; gap: 10px;
    transition: opacity .35s ease, visibility .35s ease;
}
.boot.hide { opacity: 0; visibility: hidden; pointer-events: none; }
//.boot-coin {
    width: 88px; height: 88px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e8f7ff, #38a8ff 45%, #0d6fd1);
    display: grid; place-items: center; font-family: var(--display); font-size: 42px; color: #06233e;
    box-shadow: 0 0 40px rgba(255,140,0,.45); animation: spinPulse 1.4s ease-in-out infinite;
}
@keyframes spinPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.boot-text {  letter-spacing: .12em; font-size: 18px; color: var(--gold); }
.boot-sub { color: var(--muted); font-size: 13px; }

@media (max-height: 700px) {
    .tap-orb { width: 180px; height: 180px; }
    .orb-letter { font-size: 58px; }
    .tap-arena { min-height: 190px; }
    .balance-num { font-size: 34px; }
}
