:root {
    --bg: #0c0f14;           /* общий фон */
    --panel: #11151d;        /* панели/карточки */
    --text: #e8edf7;         /* основной текст */
    --muted: #9aa7b8;        /* вторичный текст */
    --brand: #ffb020;        /* фирменный жёлто-оранжевый */
    --brand-2: #f08a00;      /* акцент для градиентов/ховеров */
    --ok: #27c77f;           /* зелёный */
    --danger: #ff5757;       /* красный */
    --radius: 16px;
    --shadow: 0 10px 24px rgba(0,0,0,.32);
    --primary-color: #7e57ff;
    --secondary-color: #5a3fb5;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #0a0a0f;
    --card-bg: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #2a2a3e;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    /*background: radial-gradient(1200px 600px at -10% -10%, rgba(255,176,32,.12), transparent 50%),
    radial-gradient(1000px 600px at 110% 10%, rgba(255,176,32,.1), transparent 50%),
    var(--bg);*/
    background: var(--bg);
}

/* Шапка */
.header {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.06);
    background: linear-gradient(180deg, rgba(12,15,20,.85), rgba(12,15,20,.65));
    backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; letter-spacing: .5px; }
.brand__dot { width: 3px; height: 12px; background: var(--brand); display: inline-block; border-radius: 2px; margin-top: -8px; }

.shell {
    max-width: 980px; margin: 0 auto; padding: 24px 18px 80px;
}

/* Карточка-герой */
.card {
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(18px, 4.5vw, 32px);
}

.hero {
    display: grid; gap: 18px; align-items: center; grid-template-columns: 1.2fr .8fr;
}
.hero h1 { margin: 0; font-size: clamp(28px, 4.2vw, 44px); }
.hero p { color: var(--muted); margin: 10px 0 0; line-height: 1.6; }

.hero__art { display: grid; place-items: center; }
.coin {
    width: min(340px, 80%); aspect-ratio: 1/1; border-radius: 50%;
    background:
            radial-gradient(circle at 30% 30%, rgba(255,255,255,.24), rgba(255,255,255,0) 36%),
            radial-gradient(circle at 70% 70%, rgba(0,0,0,.35), rgba(0,0,0,0) 40%),
            linear-gradient(135deg, #ffc14d, #ff9c00);
    box-shadow: inset 0 8px 18px rgba(0,0,0,.35), 0 18px 30px rgba(0,0,0,.4);
    display: grid; place-items: center;
    border: 6px solid rgba(255,255,255,.08);
}
.coin svg { width: 58%; height: auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }

/* Иконки преимуществ */
.perks { display: block; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.perk { display: block; width: 100%; gap: 8px; justify-items: start; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.perk b { color: var(--text); }
.perk .perk-label {
    display: block;
}

@media (min-width: 510px) {
    .perk {
        display: grid !important; gap: 8px; justify-items: start; color: var(--muted); font-size: 14px; margin-bottom: 0px;
    }

    .perks { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }

    .perk .perk-label {
        display: grid !important;
        height: 2.5em;
    }

    .perk .perk-text {
        display: grid !important;
        height: 2.5em;
    }
}

/* Кнопка */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
    color: #181818; font-weight: 700; border: none; cursor: pointer; text-decoration: none;
    border-radius: 14px; padding: 14px 22px; font-size: 16px; margin-top: 10px;
    box-shadow: 0 8px 18px rgba(240,138,0,.28), inset 0 -2px 0 rgba(0,0,0,.2);
    transition: transform .12s ease, filter .2s ease, box-shadow .2s ease;
    width: 100%;
}

@media (min-width: 768px) {
    .btn {
        width: auto;
    }
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 12px 26px rgba(240,138,0,.35), inset 0 -2px 0 rgba(0,0,0,.25); }
.btn:active { transform: translateY(0); filter: brightness(.98); }

.btn.btn-action {
    margin-top: 25px;
}

/* Экраны */
.screen { display: none; }
.screen.active { display: block; }

/* Экран 2: подключение кошелька */
.centered {
    display: grid; place-items: center; text-align: center; gap: 18px; min-height: 58vh;
}
.tron {
    width: 88px; height: 88px; border-radius: 999px; display: grid; place-items: center;
    background: radial-gradient(60px 60px at 30% 30%, rgba(255,255,255,.18), rgba(255,255,255,0) 50%), #ea2e2e;
    box-shadow: inset 0 -10px 18px rgba(0,0,0,.35), 0 8px 24px rgba(234,46,46,.25);
}
.tron svg { width: 56%; height: 56%; }

/* Экран 3: отчёт */
.report {
    display: grid; gap: 18px; max-width: 760px; margin: 0 auto;
}
.bar {
    height: 8px; background: #1a202a; border-radius: 99px; overflow: hidden; border: 1px solid rgba(255,255,255,.06);
}
.bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffce5a, #ff8f1f); }

.kv { display: grid; grid-template-columns: 1.1fr 1fr; row-gap: 10px; column-gap: 18px; }
.kv div { padding: 12px 0; border-bottom: 1px dashed rgba(255,255,255,.08); font-size: 12px; }
.kv .k { color: var(--muted); font-size: 13px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 99px;
    background: rgba(39,199,127,.12); border: 1px solid rgba(39,199,127,.35); color: var(--ok); font-weight: 600; font-size: 14px;
}

/* Низ навигации (как на скрине iOS) */
.dock {
    position: fixed; inset: auto 0 16px; display: grid; grid-auto-flow: column; gap: 12px; justify-content: center;
    pointer-events: none;
}
.dock > * { pointer-events: all; }
.dockbtn {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.02); box-shadow: var(--shadow); cursor: pointer;
}

/* Адаптив */
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero__art { order: -1; } }

.net { display:flex; flex-direction:column; gap:12px; margin:8px 0 20px; }
.netitem {
    display:flex; align-items:center; width:100%;
    background:#1a1f28; border:1px solid rgba(255,255,255,.08);
    border-radius:14px; padding:14px 16px; color:var(--text); text-align:left;
    cursor:pointer; transition:border-color .2s, box-shadow .2s, transform .05s;
}
.netitem:hover { border-color: rgba(255,255,255,.18); box-shadow: 0 6px 14px rgba(0,0,0,.3); }
.netitem:active { transform: translateY(1px); }
.netitem.selected { border-color: rgba(255,176,32,.6); box-shadow: 0 0 0 3px rgba(255,176,32,.15); }

.tokenicon {
    width:44px; height:44px; border-radius:50%; display:grid; place-items:center;
    background:#ea2e2e; box-shadow: inset 0 -6px 12px rgba(0,0,0,.35), 0 6px 16px rgba(234,46,46,.15);
    margin-right:12px;
}
.tokenicon svg { width:60%; height:60%; }

.netmeta .title { font-weight:600; font-size: 15px;}
.netmeta .sub { color: var(--muted); font-size:12px; }
.netmeta .ok { color: var(--ok); font-weight:600; }

.agree { display:flex; gap:10px; align-items:flex-start; color: var(--text); margin:10px 0 8px; font-size: 12px;}
.agree input { width:18px; height:18px; margin-top:2px; }
.agree a { color: var(--brand); text-decoration:none; }
.agree a:hover { text-decoration:underline; }

.agree .noticed-text {
    color: var(--brand); text-decoration:none;
}

.btn[disabled] { opacity:.55; pointer-events:none; filter: grayscale(.15); }

.fineprint { color: var(--muted); font-size:13px; margin-top:18px; }
.fineprint a { color: var(--brand); text-decoration:none; }

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.modal-icon.success {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.modal-icon.error {
    background: linear-gradient(135deg, var(--error-color), #dc2626);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.preloader {
    height: 50px;
    width: 50px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 75px;
    margin-top: 25px;
}

.preloader img {
    width: 100%;
    height: 100%;
    display: block;
    margin-left: -3px;
    margin-top: -3px;
}

.preloader.hidden {
    display: none;
}

.coin-new {
    width: min(340px, 80%);
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: url('/safe.png');
    display: grid;
    place-items: center;
    background-size: 100% 75%;
    background-repeat: no-repeat;
    background-position-y: 45%;
    transform: scaleX(-1);
    position: relative;
}

.coin-new .coin-new-sub {
    background: url("/token.png") 0% 0% / 100% 81% no-repeat;
    width: 60%;
    display: grid;
    aspect-ratio: 1 / 1;
    place-items: center;
    position: absolute;
    transform: scaleX(-1);
    bottom: 3%;
    right: 28%;
}