/* ===== KOYNPY DASHBOARD — base styles ===== */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --bg: #0a0a0f;
    --green: #00ff9d;
    --red: #ff3865;
    --cyan: #00d4ff;
    --violet: #b366ff;
    --gold: #ffd166;
    --gray: rgba(255, 255, 255, 0.5);
    --gray2: rgba(255, 255, 255, 0.08);
    --card: rgba(255, 255, 255, 0.04);
}

html, body {
    background: var(--bg);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'tnum';
}

/* Body scroll lock — applied via JS when any sidebar/modal is open.
   Pins the page at its current visual offset so touch scrolling on the
   underlying content is impossible, while preserving scroll position on close. */
body.no-scroll {
    position: fixed;
    width: 100%;
    overflow: hidden;
    /* Without this the address bar can show/hide during the lock and shift content */
    overscroll-behavior: contain;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 212, 255, 0.18), transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(179, 102, 255, 0.18), transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 157, 0.08), transparent 60%);
    animation: bgmove 20s ease-in-out infinite alternate;
}
@keyframes bgmove {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.15) rotate(8deg); }
}

.container { max-width: 480px; margin: 0 auto; padding: 20px 16px 80px; }

.header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.logo {
    font-size: 22px; font-weight: 900; letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, #00d4ff);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.live { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--gray); font-weight: 600; letter-spacing: 1px; }
.live::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--green); animation: pulse 1.5s ease infinite; box-shadow: 0 0 12px var(--green);
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.pos { color: var(--green); }
.neg { color: var(--red); }

.section-title-row {
    display: flex; align-items: center; justify-content: space-between;
    margin: 24px 4px 12px;
}
.section-title { font-size: 11px; color: var(--gray); letter-spacing: 2px; font-weight: 700; }

.loading { text-align: center; color: var(--gray); padding: 40px; font-size: 13px; }
.hidden { display: none !important; }

.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9); border: 1px solid var(--gray2); color: #fff;
    padding: 10px 18px; border-radius: 12px; font-size: 13px; font-weight: 600;
    z-index: 200; opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.ok { border-color: rgba(0, 255, 157, 0.3); color: var(--green); }
.toast.err { border-color: rgba(255, 56, 101, 0.3); color: var(--red); }
