/* ============================================================
   Phony — first-time onboarding (spotlight tutorial + Telegram CTA).
   Spotlight uses a giant box-shadow on the highlighted element so
   the rest of the page is dimmed but the target itself stays sharp
   (no full-screen blur).
   ============================================================ */

/* ---- Spotlighted element: stays crisp, gets a glowing pulsing ring ---- */
.onb-target {
    position: relative;
    z-index: 99991 !important;
    border-radius: 14px !important;
    box-shadow:
        0 0 0 4px rgba(74, 158, 255, 0.85),
        0 0 0 10px rgba(124, 92, 255, 0.30) !important;
    transition: box-shadow 0.25s ease;
    animation: onb-pulse 1.6s ease-in-out infinite;
}
@keyframes onb-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 4px rgba(74, 158, 255, 0.85),
            0 0 0 10px rgba(124, 92, 255, 0.30);
    }
    50% {
        box-shadow:
            0 0 0 4px rgba(74, 158, 255, 1),
            0 0 0 16px rgba(124, 92, 255, 0.20);
    }
}

/* Floating "mask" — a transparent rectangle aligned to the target.
   Its giant 9999px box-shadow paints darkness everywhere outside,
   creating a clean rectangular hole around the target without blur
   and without depending on the target's overflow context. */
.onb-mask {
    position: fixed;
    z-index: 99988;
    background: transparent;
    border-radius: 14px;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(8, 8, 14, 0.74);
    transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
}

/* Catch clicks anywhere outside the target — and outside the card.
   No blur, no opacity stacking with the spotlight. */
.onb-shield {
    position: fixed; inset: 0;
    z-index: 99989;
    background: transparent;
    cursor: default;
    animation: onb-fade 0.2s ease-out;
}
@keyframes onb-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Tooltip card pinned next to the spotlight ---- */
.onb-card {
    position: fixed;
    z-index: 99992;
    width: min(360px, calc(100vw - 32px));
    background: rgba(20, 20, 28, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    color: #e8e8ef;
    padding: 18px 18px 16px;
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    animation: onb-pop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    box-sizing: border-box;
}
@keyframes onb-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
.onb-card-step {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #8b85ff;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: flex; align-items: center; gap: 8px;
}
.onb-card-step .onb-dots { display: inline-flex; gap: 4px; }
.onb-card-step .onb-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}
.onb-card-step .onb-dot.active {
    background: linear-gradient(135deg, #4a9eff, #7c5cff);
    width: 18px; border-radius: 999px;
}
.onb-card-title {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
}
.onb-card-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: #c8c8d4;
    margin: 0 0 16px;
}
.onb-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.onb-card-skip {
    background: transparent;
    border: none;
    color: #9a9aa8;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
}
.onb-card-skip:hover { color: #fff; }
.onb-card-spacer { flex: 1; }
.onb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s, transform 0.15s;
}
.onb-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #e8e8ef;
    border: 1px solid rgba(255, 255, 255, 0.10);
}
.onb-btn-ghost:hover { background: rgba(255, 255, 255, 0.10); }
.onb-btn-primary {
    background: linear-gradient(135deg, #4a9eff, #7c5cff);
    color: #fff;
    box-shadow: 0 8px 22px -10px rgba(74, 158, 255, 0.6);
}
.onb-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ---- Mobile: card centred at the bottom ---- */
@media (max-width: 720px) {
    .onb-card {
        left: 12px !important;
        right: 12px !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        top: auto !important;
        width: auto;
        animation: onb-slideup 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    }
}
@keyframes onb-slideup {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

/* ============================================================
   Telegram channel CTA modal — shown after the tutorial finishes.
   ============================================================ */
.onb-tg-modal {
    position: fixed; inset: 0; z-index: 99993;
    display: none;
    align-items: center; justify-content: center;
    padding: 20px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}
.onb-tg-modal.open {
    display: flex;
    animation: onb-fade 0.2s ease-out;
}
.onb-tg-overlay {
    position: absolute; inset: 0;
    background: rgba(8, 8, 14, 0.78);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.onb-tg-card {
    position: relative; z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(20, 20, 28, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;
    padding: 0 26px 24px;
    color: #e8e8ef;
    overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.7);
    animation: onb-tg-pop 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    box-sizing: border-box;
}
@keyframes onb-tg-pop {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: none; }
}
.onb-tg-head {
    margin: 0 -26px;
    padding: 22px 26px 60px;
    background: linear-gradient(135deg, #229ED9 0%, #2CABE3 60%, #4a9eff 100%);
    position: relative;
    overflow: hidden;
}
.onb-tg-head::before, .onb-tg-head::after {
    content: ''; position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}
.onb-tg-head::before { top: -55px; right: -30px; width: 170px; height: 170px; }
.onb-tg-head::after  { bottom: -60px; left: -20px; width: 130px; height: 130px; background: rgba(255,255,255,0.08); }
.onb-tg-brand {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
}
.onb-tg-brand svg { width: 22px; height: 22px; }
.onb-tg-close {
    position: absolute; top: 18px; right: 18px;
    width: 34px; height: 34px;
    background: rgba(255, 255, 255, 0.18);
    border: none; border-radius: 50%;
    color: #fff;
    font-size: 22px; line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.onb-tg-close:hover { background: rgba(255, 255, 255, 0.32); }

.onb-tg-icon {
    position: relative; z-index: 2;
    width: 86px; height: 86px;
    margin: -43px auto 16px;
    background: #14141c;
    border-radius: 26px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 32px -10px rgba(34, 158, 217, 0.55);
}
.onb-tg-icon svg {
    width: 46px; height: 46px;
    fill: url(#onb-tg-grad);
}

.onb-tg-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 0 0 6px;
    color: #fff;
}
.onb-tg-handle {
    text-align: center;
    color: #2CABE3;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
}
.onb-tg-text {
    text-align: center;
    color: #c8c8d4;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 18px;
}
.onb-tg-perks {
    list-style: none;
    margin: 0 0 22px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}
.onb-tg-perks li {
    display: flex; align-items: center; gap: 9px;
    padding: 5px 0;
    font-size: 13px;
    color: #cfcfdb;
}
.onb-tg-perks li svg {
    width: 16px; height: 16px; flex: none;
    stroke: #2ecc71;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.onb-tg-actions {
    display: flex; gap: 10px;
}
.onb-tg-btn {
    flex: 1;
    padding: 13px 18px;
    border-radius: 14px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    transition: filter 0.15s, transform 0.15s;
    box-sizing: border-box;
}
.onb-tg-btn-primary {
    background: linear-gradient(135deg, #229ED9, #2CABE3);
    color: #fff;
    box-shadow: 0 10px 26px -10px rgba(34, 158, 217, 0.6);
}
.onb-tg-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.onb-tg-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #c8c8d4;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.onb-tg-btn-ghost:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }

@media (max-width: 480px) {
    .onb-tg-modal { padding: 0; align-items: flex-end; }
    .onb-tg-card {
        max-width: 100%;
        border-radius: 22px 22px 0 0;
        padding-bottom: calc(22px + env(safe-area-inset-bottom));
        animation: onb-tg-slideup 0.36s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .onb-tg-title { font-size: 20px; }
}
@keyframes onb-tg-slideup {
    from { transform: translateY(100%); }
    to { transform: none; }
}
