:root {
    --bg: #05060a;
    --bg-card: #111827;
    --bg-card-soft: #0b1020;
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.15);
    --text-main: #f9fafb;
    --text-dim: #9ca3af;
    --text-muted: #6b7280;
    --danger: #f97373;
    --success: #4ade80;
    --warning: #facc15;
    --border-subtle: #1f2933;
    --radius-xl: 16px;
    --radius-pill: 999px;
    --shadow-soft: 0 20px 45px rgba(0,0,0,0.45);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Base + layout */
* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: var(--font-main);
    background: radial-gradient(circle at top, #18212f 0, #05060a 55%);
    color: var(--text-main);
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;              /* page itself never scrolls */
}

/* top-level shell */
.cryader-swipe-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    box-sizing: border-box;
    background: radial-gradient(circle at top, #1e293b 0, #020617 60%);
}

/* stage: center column */
.cryader-swipe-stage {
    width: 100%;
    max-width: 480px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* card slot will get height from JS and scroll internally */
.cryader-swipe-card-slot {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: table-cell;
}

/* keep bottom rows fixed height */
.cryader-swipe-actions,
.cryader-swipe-meta {
    flex-shrink: 0;
}


/* ---- Card base ---- */

.cryader-card {
    position: relative;
    background: linear-gradient(145deg, var(--bg-card-soft), var(--bg-card));
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 16px 16px 14px;
    overflow: hidden;
}

.cryader-card-inner {
    position: relative;
    z-index: 1;
    padding: 15px;
    max-height: 300px;
}

/* subtle halo */
.cryader-card::before {
    content: "";
    position: absolute;
    inset: -45%;
    opacity: 0.06;
    background:
        radial-gradient(circle at 0% 0%, #22d3ee 0, transparent 55%),
        radial-gradient(circle at 100% 100%, #a855f7 0, transparent 55%);
    pointer-events: none;
}

/* ---- Card variants (theme by market state) ---- */

/* Bullish */
.cryader-card--bullish {
    border-color: rgba(34, 197, 94, 0.75);
}
.cryader-card--bullish::before {
    background:
        radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.7) 0, transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.6) 0, transparent 55%);
}

/* Bearish */
.cryader-card--bearish {
    border-color: rgba(248, 113, 113, 0.8);
}
.cryader-card--bearish::before {
    background:
        radial-gradient(circle at 0% 0%, rgba(248, 113, 113, 0.7) 0, transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(148, 163, 184, 0.4) 0, transparent 55%);
}

/* Sideways */
.cryader-card--sideways {
    border-color: rgba(148, 163, 184, 0.7);
}

/* Momentum emphasis */
.cryader-card--momentum-strong {
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.7), var(--shadow-soft);
}
.cryader-card--momentum-fading {
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.6), var(--shadow-soft);
}

/* ---- Signal card pieces ---- */

.signal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.signal-symbol-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Responsive symbol text */
.signal-symbol-main {
    font-size: clamp(22px, 5vw, 28px);
    font-weight: 700;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.signal-symbol-quote {
    font-size: clamp(11px, 2.6vw, 16px);
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.16em;
    font-weight: 600;
}

/* Market pill */
.market-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-size: clamp(11px, 2.6vw, 16px);
    color: var(--text-dim);
    margin-top: 8px;
    margin-right: 8px;
}
.market-pill span.label {
    color: var(--text-main);
    font-weight: 500;
}

/* Bias pills */
.bias-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    border: 1px solid transparent;
}
.bias-bull {
    background: rgba(22, 163, 74, 0.15);
    border-color: rgba(34, 197, 94, 0.55);
    color: var(--success);
}
.bias-bear {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(248, 113, 113, 0.65);
    color: var(--danger);
}
.bias-neutral {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.45);
    color: var(--text-dim);
}

/* Summary – bigger and more readable */
.signal-summary {
    font-size: clamp(15px, 3.7vw, 18px);
    line-height: 1.7;
    color: var(--text-dim);
    margin-top: 10px;
    margin-bottom: 14px;
}
.signal-summary strong {
    color: var(--text-main);
}
.signal-summary p {
    margin: 6px 0;
}

/* Confidence row */
.confidence-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    /*margin-bottom: 10px;*/
}
.conf-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: var(--text-muted);
}
.progress-track {
    flex: 1;
    height: 15px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fb7185, #fbbf24, #22c55e);
    transform-origin: left;
    transform: scaleX(0.0);
    transition: transform 0.25s ease-out;
}

.conf-percent {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 32px;
    text-align: right;
}

/* Chips / metrics */
.metrics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.chip {
    font-size: clamp(16px, 3.2vw, 14px);
    padding: 6px 11px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-dim);
    border: 1px solid rgba(30, 64, 175, 0.6);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.chip strong { color: var(--text-main); }

/* Momentum / target / RRR chips */
.chip {
    font-size: clamp(13px, 3.1vw, 16px);
    padding: 7px 12px;
    border-radius: var(--radius-pill);
}

/* Confidence row text */
.conf-label {
    font-size: 14px;
    color: var(--text-muted);
}
.conf-percent {
    font-size: 13px;
}

.chip--momentum {
    font-size: 16px;
    font-weight: 600;
}


/* Gains row */
.gains-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
    font-size: 11px;
}
.gain-box {
    padding: 4px 4px 5px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(31, 41, 55, 0.8);
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}
.gain-label {
    /* text-transform: uppercase; */
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-size: clamp(10px, 2.6vw, 11px);
}
.gain-value {
    font-variant-numeric: tabular-nums;
    font-size: clamp(16px, 3.4vw, 15px);
}
.gain-pos { color: var(--success); }
.gain-neg { color: var(--danger); }
.gain-flat { color: var(--text-muted); }

/* Footer row */
.footer-row {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*font-size: clamp(16px, 3vw, 14px);*/
    color: var(--text-muted);
}
.footer-row span.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* novice vs expert visibility */
.mode-novice .expert-only { display: none !important; }
.mode-expert .expert-only { display: block; }

/* basic modal styling for ModalModule */
.cryader-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9990;
}
.cryader-modal {
    background: #020617;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    width: 80vw;          /* 80% of viewport width */
    max-width: 80vw;
    max-height: 70vh;     /* 80% of viewport height */
    padding: 18px 18px 16px;
    box-shadow: 0 28px 80px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
}

.cryader-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.cryader-modal-title {
    font-size: 16px;
    font-weight: 600;
}
.cryader-modal-close {
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
}
.cryader-modal-body {
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.5;
    scrollbar-width: none;
}

/* ===== Mode Toggle Buttons (used in both grid + swipe) ===== */

.cryader-mode-toggle {
    display: inline-flex;
    padding: 6px;
    border-radius: var(--radius-pill);
    background: #020617;
    border: 1px solid var(--border-subtle);
    margin-bottom: 16px;
    gap: 4px;
}
.cryader-mode-toggle button {
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 16px;
    cursor: pointer;
    color: #9ca3af;
    background: transparent;
    transition: all 0.25s ease-out;
}
.cryader-mode-toggle button.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* ===== Swipe Layout (Dating-app style) ===== */

/* Full-screen app shell for swipe mode */
.cryader-swipe-shell {
    min-height: 100vh;
    background: radial-gradient(circle at top, #1e293b 0, #020617 60%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 4px;
}

/* Center mode toggle at top in swipe mode (can reuse same element) */
.cryader-swipe-shell .cryader-mode-toggle {
    margin: 15px auto 10px auto;
}

/* Swipe stage fills remaining height */
.cryader-swipe-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 20px;
}

/* Card slot: card is full width & height (minus controls) */
.cryader-swipe-card-slot {
    flex: 1;
    padding: 4px 10px;
    margin: 30px;
    /*display: flex;*/
    align-items: stretch;
    justify-content: center;
}

/* Make the card act like a full-screen panel in swipe mode */
.cryader-swipe-card-slot .cryader-card {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 150px); /* leave room for buttons/meta */
    border-radius: 24px;
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Swipe actions row (Tinder-style buttons) */
.cryader-swipe-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 6px 0 2px;
}

.cryader-swipe-btn {
    border: none;
    border-radius: 999px;
    padding: 16px 32px !important;
    font-size: clamp(15px, 4vw, 17px);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.15s ease-out;
}

.cryader-swipe-btn:active {
    transform: scale(0.96);
}

/* Stacked-card illusion behind main card */
.cryader-swipe-card-slot {
    position: relative;
}

/* back card 2 */
.cryader-swipe-card-slot::before,
.cryader-swipe-card-slot::after {
    content: "";
    position: absolute;
    inset: 10px 14px;
    border-radius: 24px;
    background: radial-gradient(circle at top, #020617 0, #020617 50%);
    border: 1px solid rgba(15,23,42,0.9);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

.cryader-swipe-card-slot::before {
    transform: translateY(10px) scale(0.97);
    opacity: 0.45;
}

.cryader-swipe-card-slot::after {
    transform: translateY(20px) scale(0.94);
    opacity: 0.3;
}

/* make real card sit on top */
.cryader-swipe-card-slot .cryader-card {
    position: relative;
    z-index: 1;
}


/* Button color variants */
.swipe-pass {
    background: #fecaca;
    box-shadow: 0 4px 16px rgba(248,113,113,0.4);
}
.swipe-pass:hover {
    background: #fca5a5;
}

.swipe-details {
    background: #e2e8f0;
    box-shadow: 0 4px 16px rgba(148,163,184,0.35);
}
.swipe-details:hover {
    background: #cbd5e1;
}

.swipe-like {
    background: #bbf7d0;
    box-shadow: 0 4px 16px rgba(34,197,94,0.45);
}
.swipe-like:hover {
    background: #86efac;
}

/* Meta row beneath buttons */
.cryader-swipe-meta {
    display: flex;
    justify-content: space-between;
    font-size: clamp(11px, 2.6vw, 16px);
    color: #cbd5e1;
    padding: 0 18px 4px;
}

/* Small phones fine-tuning */
@media (max-width: 480px) {
    .cryader-swipe-card-slot .cryader-card {
        border-radius: 18px;
        padding: 16px 14px 14px;
    }
    .cryader-swipe-actions {
        gap: 8px !important;
    }
    .cryader-swipe-btn {
        padding-inline: 14px;
    }
}




/* Swipe card as full-screen panel */
.cryader-swipe-card-slot .cryader-card {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 150px);
    border-radius: 24px;
    padding: 22px 26px 20px;      /* ⬅ more padding */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Section spacing */
.signal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;          /* ⬅ space under header */
}

.signal-summary {
    font-size: clamp(15px, 3.7vw, 18px);
    line-height: 1.8;
    color: var(--text-dim);
    margin-top: 16px;             /* ⬅ more top margin */
    margin-bottom: 18px;          /* ⬅ more bottom margin */
}

.metrics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;             /* ⬅ space before chips */
}

.gains-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;                     /* ⬅ wider gaps */
    margin-top: 16px;             /* ⬅ more above gains */
}

.footer-row {
    margin-top: 20px;             /* ⬅ push footer away from content */
    padding-top: 14px;
    border-top: 1px solid rgba(15,23,42,0.75);
}

@media (max-width: 480px) {
    .cryader-swipe-card-slot .cryader-card {
        border-radius: 18px;
        padding: 18px 16px 16px;
    }
}


.signal-symbol-main {
    font-size: clamp(22px, 5vw, 30px);  /* was 28px max */
}

.signal-summary {
    font-size: clamp(16px, 3.6vw, 20px);  /* was 18px max */
}

.chip {
    font-size: clamp(16px, 3.1vw, 15px);
}

.gain-label {
    font-size: clamp(11px, 2.6vw, 16px);
}

.gain-value {
    font-size: clamp(14px, 3.4vw, 16px);
}

.footer-row {
    /*font-size: clamp(16px, 3vw, 15px);*/
}

@media (min-width: 1024px) {
    .signal-symbol-main {
        font-size: 32px;
    }
    .signal-summary {
        font-size: 19px;
    }
    .chip {
        font-size: 15px;
    }
    .gain-value {
        font-size: 16px;
    }
    .cryader-swipe-btn {
        font-size: 17px;
    }
}

/* ================================
   📱 MOBILE OPTIMIZATION OVERRIDES
   ================================ */
   @media (max-width: 520px) {

    /* More padding around the whole card */
    .cryader-swipe-card-slot .cryader-card {
        padding: 24px 20px 22px;
        border-radius: 22px;
    }

    /* Extra spacing between major sections */
    .signal-header {
        margin-bottom: 20px;
    }

    .signal-summary {
        margin-top: 18px;
        margin-bottom: 22px;
        line-height: 1.9;
    }

    .metrics-row {
        gap: 10px;
        margin-top: 14px;
    }

    .gains-row {
        gap: 10px;
        margin-top: 18px;
    }

    .footer-row {
        margin-top: 24px;
        /*font-size: 15px;*/
    }

    /* Bigger, more readable symbols */
    .signal-symbol-main {
        font-size: 28px !important;
    }

    .signal-symbol-quote {
        font-size: 16px !important;
    }

    /* Summary text bigger */
    .signal-summary {
        font-size: 18px !important;
    }

    /* Chips and metrics */
    .chip {
        /*font-size: 0.8em !important;*/
        padding: 8px 16px;
    }

    /* Gains numbers bigger */
    .gain-value {
        /* font-size: 0.8em !important; */
        font-size: inerhit;
    }
    .gain-label {
        font-size: 16px !important;
    }

    /* Confidence bar labels */
    .conf-label {
        font-size: 16px !important;
    }
    .conf-percent {
        font-size: 16px !important;
    }

    /* Tinder buttons bigger + spaced */
    .cryader-swipe-btn {
        padding: 14px 26px !important;
        font-size: 0.8em;
        border-radius: 999px;
    }

    .cryader-swipe-actions {
        margin-top: 10px;
        gap: 18px !important;
            
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Card spacing from bottom */
    .cryader-swipe-meta {
        padding: 6px 20px 10px;
        font-size: 14px;
    }
}

/* ================================================
   🖥️ DESKTOP OPTIMIZATION — LARGE FONTS + SPACING
   ================================================ */
   @media (min-width: 1024px) {

    .cryader-modal{
        width: 80vw;
        max-width: 80vw;
        max-height: 80vh;
    }
    

    /* Card padding grows */
    .cryader-swipe-card-slot .cryader-card {
        padding: 36px 48px 40px;
        border-radius: 26px;
    }

    /* Header spacing */
    .signal-header {
        margin-bottom: 26px;
        gap: 16px;
    }

    /* Symbol text: large & bold */
    .signal-symbol-main {
        font-size: 40px !important;
    }
    .signal-symbol-quote {
        font-size: 16px !important;
    }

    /* Summary: premium, readable */
    .signal-summary {
        font-size: 22px !important;
        line-height: 1.9;
        margin-top: 24px;
        margin-bottom: 26px;
    }

    /* Chips: bigger + more breathing room */
    .chip {
        font-size: 17px !important;
        padding: 10px 16px !important;
        border-radius: 999px;
        gap: 8px;
    }

    /* Gains grid spacing */
    .gains-row {
        gap: 16px;
        margin-top: 22px;
    }

    .gain-label {
        font-size: 14px !important;
    }
    .gain-value {
        font-size: 20px !important;
    }

    /* Confidence row */
    .confidence-row {
        margin-top: 14px;
        margin-bottom: 20px;
    }
    .conf-label {
        font-size: 16px !important;
    }
    .conf-percent {
        font-size: 15px !important;
    }

    /* Footer section */
    .footer-row {
        margin-top: 24px;
        /*font-size: 18px !important;*/
        padding-top: 18px;
    }

    /* Swipe buttons: large & ergonomic */
    .cryader-swipe-btn {
        padding: 16px 32px !important;
        font-size: 20px !important;
        border-radius: 999px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    }

    .cryader-swipe-actions {
        gap: 20px;
        margin-top: 18px;
    }

    /* Meta text */
    .cryader-swipe-meta {
        font-size: 16px !important;
        padding: 0 28px 10px;
    }
}

/* Disable stacked-card background */
.cryader-swipe-card-slot::before,
.cryader-swipe-card-slot::after {
    content: none !important;
}

.cryader-swipe-actions {
    margin-bottom: 20px;    
    padding-left: 20px;
    padding-right: 20px;
}

/* Side navigation arrows */
.cryader-swipe-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
    z-index: 5;
    font-size: 20px;
    padding: 0;
}

.cryader-swipe-arrow:active {
    transform: translateY(-50%) scale(0.94);
}

.swipe-arrow-left {
    left: 10px;
}

.swipe-arrow-right {
    right: 10px;
}

@media (max-width: 520px) {
    .cryader-swipe-arrow {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

.signal-summary {
    font-size: clamp(16px, 3.8vw, 20px);
    line-height: 1.8;
    color: var(--text-dim);
    margin-top: 18px;
    margin-bottom: 22px;
}

.signal-summary p {
    margin: 8px 0;
}

.cryader-swipe-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    font-size: 42px;
    padding: 12px;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 50%;
    border: 1px solid rgba(148,163,184,0.3);
    cursor: pointer;
    transition: 0.2s ease;
}

.swipe-arrow-left { left: -56px; }
.swipe-arrow-right { right: -56px; }

.cryader-swipe-arrow:hover {
    background: rgba(56,189,248,0.2);
    color: #38bdf8;
}

.cryader-swipe-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
}

/* Base style already exists: .cryader-swipe-btn { ... } */

.cryader-swipe-btn.swipe-nav {
    min-width: 42px;
    padding-inline: 0;
    border-radius: 999px;
    font-size: 20px;
    font-weight: 600;
    background: #0f172a;
    color: #e5e7eb;
    box-shadow: 0 4px 16px rgba(15,23,42,0.7);
    display: table;
}

.cryader-swipe-btn.swipe-nav:hover {
    background: rgba(56,189,248,0.25);
    color: #38bdf8;
}

/* Optional: push arrows outward a bit */
.cryader-swipe-btn.swipe-prev { margin-right: 6px; }
.cryader-swipe-btn.swipe-next { margin-left: 6px; }

@media (max-width: 520px) {
    .cryader-swipe-btn.swipe-nav {
        min-width: 36px;
        font-size: 0.8em;
        color: #000;
        background: rgba(56,189,248,0.25);
    }
    #cryaderModeToggle{
        margin-top: 20px;
    }
    .cryader-mode-toggle button {
        font-size: 0.7em;
    }
    .bias-pill{
        display: none;
    }
}


/* REMOVE PASS */
.swipe-pass{
    display: none;
}

/* Filters button styling (slightly different accent) */
.cryader-swipe-btn.swipe-filter {
    background: #e0f2fe;
    color: #0f172a;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}

.cryader-swipe-btn.swipe-filter:hover {
    background: #bae6fd;
}

/* Modal footer for buttons */
.cryader-modal-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Generic modal buttons */
.cryader-btn-primary,
.cryader-btn-secondary {
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

.cryader-btn-primary {
    background: #38bdf8;
    color: #0f172a;
}

.cryader-btn-primary:hover {
    background: #0ea5e9;
}

.cryader-btn-secondary {
    background: #e5e7eb;
    color: #020617;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.cryader-btn-secondary:hover {
  background: #e5e7eb;
}

/* Filter form layout */
.cryader-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px 14px;
}

.cryader-filter-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    padding-top: 10px;
}

.cryader-filter-form label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cryader-filter-form input,
.cryader-filter-form select {
    border-radius: 999px;
    border: 1px solid rgba(31, 41, 55, 0.8);
    background: #020617;
    color: var(--text-main);
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
}

.cryader-filter-form input:focus,
.cryader-filter-form select:focus {
    border-color: #38bdf8;
}

.cryader-filter-presets {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cryader-filter-presets .presets-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.cryader-filter-presets .presets-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.preset-btn {
    border: none;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 11px;
    cursor: pointer;
    background: #020617;
    color: var(--text-dim);
    border: 1px solid rgba(148, 163, 184, 0.5);
    transition: all 0.18s ease-out;
}

.preset-btn:hover {
    background: rgba(56,189,248,0.12);
    border-color: #38bdf8;
    color: #e5f4ff;
}

.preset-btn.active {
    background: rgba(56,189,248,0.18);
    border-color: #38bdf8;
    color: #e5f4ff;
    font-weight: 600;
}


/* Full-width row inside the grid */
.cryader-filter-form .form-row-full {
    grid-column: 1 / -1;
}

/* Timeframe gain row: one line on desktop */
.timeframe-gain-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    align-items: flex-end;
}

.tf-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tf-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.tf-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(31, 41, 55, 0.8);
    background: #020617;
    color: var(--text-main);
    padding: 4px 8px;
    font-size: 11px;
    text-align: center;
}

.tf-input::placeholder {
    color: var(--text-muted);
}

.tf-input:focus {
    border-color: #38bdf8;
}

/* On small screens, allow wrapping into 2 rows */
@media (max-width: 640px) {
    .timeframe-gain-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .timeframe-gain-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ===== Visual stats row ===== */

.visual-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 6px;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(31, 41, 55, 0.9);
    font-size: 11px;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.stat-pill .stat-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 9px;
    color: var(--text-muted);
}

.stat-pill .stat-value {
    color: var(--text-main);
    font-weight: 500;
}

.stat-icon {
    font-size: 12px;
}

/* Bias colouring */
.stat-pill--bias-bullish {
    border-color: rgba(34, 197, 94, 0.7);
    background: rgba(22, 163, 74, 0.16);
    color: var(--success);
}
.stat-pill--bias-bearish {
    border-color: rgba(248, 113, 113, 0.8);
    background: rgba(220, 38, 38, 0.15);
    color: var(--danger);
}
.stat-pill--bias-neutral {
    border-color: rgba(148, 163, 184, 0.7);
    background: rgba(148, 163, 184, 0.18);
    color: var(--text-dim);
}

/* Spread positive / negative */
.stat-pill--spread-pos .stat-value {
    color: var(--success);
}
.stat-pill--spread-neg .stat-value {
    color: var(--danger);
}

/* Small screen tweak */
@media (max-width: 520px) {
    .visual-stats-row {
        gap: 4px;
        margin-top: 8px;
    }
    .stat-pill {
        padding: 3px 8px;
        font-size: 10px;
    }
}

.signal-summary {
    /* max-height: 200px; */
    overflow-y: auto;
}

/* card slot is the scroll container */
.cryader-swipe-card-slot {
    position: relative;
    flex: 1;                         /* fills most of the stage */
    /*display: flex;*/
    align-items: stretch;
    justify-content: center;
    padding: 8px 0 12px;
    overflow-y: auto;                /* ✅ vertical scroll ON */
    overflow-x: hidden;              /* keep horizontal scrollbars off */
    -webkit-overflow-scrolling: touch;
}

/* hide its scrollbar visually (optional) */
.cryader-swipe-card-slot::-webkit-scrollbar {
    width: 0;
    height: 0;
}
.cryader-swipe-card-slot {
    scrollbar-width: none; /* Firefox */
}

.cryader-swipe-actions,
.cryader-swipe-meta {
    flex-shrink: 0;          /* ✅ stay fixed */
}

/* existing buttons layout is fine */
.cryader-swipe-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 4px;
    padding-bottom: 20px;
}

/* ==== Mobile friendly controls ==== */
@media (max-width: 640px) {
    /* Actions row: a bit tighter */
    .cryader-swipe-actions {
      gap: 8px  !important;
      margin-top: 6px;
          
      padding-left: 20px;
      padding-right: 20px;
    }
  
    /* Main control pills */
    .cryader-swipe-btn {
      flex: inherit;
      min-width: 0;
      padding: 7px 10px !important;
      font-size: 0.8em;
      border-radius: 999px;
      box-shadow: 0 3px 10px rgba(0,0,0,0.35);
    }
  
    /* Icons and text closer together */
    .cryader-swipe-btn span,
    .cryader-swipe-btn svg {
      margin-right: 4px;
    }
  
    /* Left / right arrow pills smaller */
    .swipe-arrow-left,
    .swipe-arrow-right {
      width: 34px;
      height: 34px;
      font-size: 16px;
    }

    .cryader-swipe-stage{
        margin-bottom: 30px;
    }
    
    .market-pill{
        margin-top: 4px;
    }

  }
  
  /* Extra tight for very small devices */
  @media (max-width: 400px) {
    .cryader-swipe-actions {
      gap: 6px !important;
      padding: 0 4px 4px;
    }
  
    .cryader-swipe-btn {
      padding: 7px 10px !important;
      font-size: 0.8em;
    }
  }
  
  .cryader-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    position: relative;
    background: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 10px 36px 10px 12px; /* space for arrow */
    border-radius: 10px;
    font-size: 14px;
}

#cryaderFilterForm select, .cryader-filter-form select{
    border: none;
    border-radius: inherit;
    border-bottom: 1px solid rgba(31, 41, 55, 0.8);
}

/* MOBILE TYPOGRAPHY TUNING */
@media (max-width: 540px) {

    .cryader-card-inner {
      font-size: 0.88rem; /* down from 1rem */
      line-height: 1.45;
    }
  
    .cryader-card-inner p {
      font-size: 0.95rem;
      line-height: 1.48;
    }
  
    .signal-header .signal-symbol-main span[data-role="symbol"] {
      font-size: 1.4rem; /* slightly smaller title */
    }
  
    .bias-pill,
    .market-pill {
      font-size: 0.72rem;
      padding: 3px 8px;
    }
  
    .visual-stats-row .stat-pill {
      font-size: 0.75rem;
      padding: 6px 8px;
    }
  
    .confidence-row .conf-label,
    .confidence-row .conf-percent {
      font-size: 0.85rem;
    }
  
    .metrics-row .chip {
      font-size: 0.78rem;
      padding: 4px 6px;
    }
  
    .gains-row .gain-box {
      font-size: 0.78rem;
    }
  }
  

  .cryader-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9990;
  }
  
  /* Make the modal a flex column and cap its height */
  .cryader-modal {
    background: #020617;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    max-width: 640px;
    width: 80%;
    max-height: 80vh;              /* 👈 cap modal height */
    padding: 18px 18px 16px;
    box-shadow: 0 28px 80px rgba(0,0,0,0.8);
  
    display: flex;                 /* 👈 column layout */
    flex-direction: column;
  }
  
  /* Header + footer stay fixed inside the modal */
  .cryader-modal-header,
  .cryader-modal-footer {
    flex: 0 0 auto;
  }
  
  /* Body section is the scrollable area */
  .cryader-modal-body {
        font-size: 16px;
        color: var(--text-dim);
        line-height: 1.5;
        margin-top: 8px;
        padding: 4px 2px 0;
        flex: 1;
        overflow-y: auto;         /* scroll inside, not whole screen */
    }


  
  @media (max-width: 640px) {
    .cryader-modal {
      width: 80vw;        /* 👈 80% of viewport width */
      max-width: 80vw;
      max-height: 70vh;   /* 👈 80% of viewport height */
      padding: 14px 14px 12px;
    }
  
    .cryader-modal-title {
      font-size: 15px;
    }
  
    .cryader-modal-body {
      font-size: 13px;
    }
  }
  

/* ===== Auth overlay ===== */

.cryader-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 9995;
    display: flex;
    align-items: stretch;
    justify-content: center;
    pointer-events: auto;
  }
  
  .cryader-auth-overlay.hidden {
    display: none;
  }
  
  .cryader-auth-backdrop {
    flex: 1;
    background: radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(2,6,23,0.97));
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
  }
  
  .cryader-auth-modal {
    background: #020617;
    border-radius: 22px;
    border: 1px solid rgba(148,163,184,0.5);
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
    max-width: 420px;
    width: 100%;
    padding: 20px 20px 16px;
    color: var(--text-main);
  }
  
  /* Header */
  
  .auth-header {
    margin-bottom: 12px;
  }
  
  .auth-title-block {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .auth-logo-dot {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #38bdf8, #22c55e);
    box-shadow: 0 0 22px rgba(56,189,248,0.6);
  }
  
  .auth-title {
    font-size: 19px;
    font-weight: 700;
  }
  
  .auth-subtitle {
    font-size: 12px;
    color: var(--text-muted);
  }
  
  /* Tabs */
  
  .auth-tabs {
    display: inline-flex;
    margin: 6px 0 14px;
    padding: 3px;
    border-radius: 999px;
    background: #020617;
    border: 1px solid var(--border-subtle);
  }
  
  .auth-tab {
    border: none;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-dim);
    background: transparent;
    transition: all 0.2s ease-out;
  }
  
  .auth-tab-active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
  }
  
  /* Form fields */
  
  .auth-form {
    margin-top: 4px;
  }
  
  .auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
  }
  
  .auth-field label {
    font-size: 11px;
    color: var(--text-muted);
  }
  
  .auth-field input {
    background: #020617;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
  }
  
  .auth-field input:focus {
    border-color: rgba(56,189,248,0.7);
    box-shadow: 0 0 0 1px rgba(56,189,248,0.4);
  }
  
  .auth-field--register {
    display: none; /* shown only in register mode */
  }
  
  /* Buttons (reuse style from other controls) */
  
  .cryader-btn-primary,
  .cryader-btn-secondary {
    border-radius: 999px;
    border: none;
    padding: 9px 18px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.15s ease-out;
  }
  
  .cryader-btn-primary {
    background: linear-gradient(135deg, #22c55e, #22c55e);
    color: #022c22;
    box-shadow: 0 6px 20px rgba(34,197,94,0.55);
  }
  
  .cryader-btn-primary:active {
    transform: scale(0.97);
  }
  
  .cryader-btn-secondary {
    background: #0b1120;
    color: var(--text-dim);
    border: 1px solid rgba(148,163,184,0.4);
    box-shadow: 0 6px 16px rgba(15,23,42,0.85);
  }

  .cryader-btn-donate {
    background: #ffc439;
    color: #000;
    font-size: 20px;
  }
  
  .cryader-btn-secondary:active {
    transform: scale(0.97);
  }
  
  /* Actions + message */
  
  .auth-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  
  .auth-message {
    min-height: 18px;
    font-size: 11px;
    margin-top: 4px;
    color: var(--text-muted);
  }
  
  .auth-message--error {
    color: #f97373;
  }
  
  .auth-message--success {
    color: #4ade80;
  }
  
  .auth-footer-note {
    margin-top: 10px;
    font-size: 10px;
    color: var(--text-muted);
  }
  
  /* Mobile: modal fits nicely */
  
  @media (max-width: 600px) {
    .cryader-auth-backdrop {
      padding: 12px;
    }
    .cryader-auth-modal {
      max-width: 100%;
      padding: 16px 14px 12px;
    }
  }
  

body.cryader-auth-blocked {
    overflow: hidden;
}

#swipeIndex{
    text-align: center;
    margin-bottom: 10px;
}

#swipeFilterLabel {
    display: none;
}

.cryader-card-inner.pattern-mismatch .chip[data-role="pattern-chip"],
.cryader-card-inner.pattern-mismatch .stat-pill--pattern {
    box-shadow: 0 0 0 1px rgba(248, 181, 0, 0.6); /* amber outline */
}

.cryader-card-inner.pattern-agree .chip[data-role="pattern-chip"],
.cryader-card-inner.pattern-agree .stat-pill--pattern {
    box-shadow: none;
}

/* ================================
   WATCHLIST PANEL (INSIDE MODAL)
   ================================ */

/* Panel itself lives inside .cryader-modal-body */
#watchlist-panel.signal-panel--watchlist {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  /* Empty text at the top */
  #watchlist-panel .js-watchlist-empty {
    font-size: 0.8rem;
    opacity: 0.75;
    padding: 4px 0 2px;
  }
  
  /* Scrollable list of watch cards */
  #watchlist-panel .js-watchlist-list {
    flex: 1;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;        /* ✅ scroll here */
    padding-right: 4px;
  }
  
  /* Optional: style the cards to match other signal cards */
  #watchlist-panel .signal-card--watch {
    background: linear-gradient(145deg, var(--bg-card-soft), var(--bg-card));
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    font-size: 16px;
  }
  
  /* Compact title row */
  #watchlist-panel .signal-card__title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
  }
  
  #watchlist-panel .signal-card__symbol {
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  
  #watchlist-panel .pill--watching {
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(56,189,248,0.16);
    border: 1px solid rgba(56,189,248,0.45);
    color: var(--accent);
  }
  
  /* Sub-row (market + since text) */
  #watchlist-panel .signal-card__sub {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  /* Metrics column */
  #watchlist-panel .signal-card__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    font-size: 14px;
  }
  
  #watchlist-panel .metric__label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  
  #watchlist-panel .metric__value {
    font-variant-numeric: tabular-nums;
  }
  
  #watchlist-panel .metric__value--lg {
    font-size: 13px;
    font-weight: 600;
  }
  
  #watchlist-panel .metric__hint {
    font-size: 12px;
    color: var(--text-muted);
  }
  
  /* Side range bar + unwatch button */
  #watchlist-panel .signal-card__side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
  }
  
  /* Thin progress bar */
  #watchlist-panel .progress-bar.progress-bar--thin {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    overflow: hidden;
  }
  
  #watchlist-panel .progress-bar__fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: linear-gradient(90deg, #ef4444, #facc15, #22c55e);
    transition: width 0.18s ease-out;
  }
  
  #watchlist-panel .progress-bar__marker {
    position: absolute;
    top: -2px;
    width: 2px;
    bottom: -2px;
    background: #e5e7eb;
  }
  
  #watchlist-panel .signal-card__side-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
    gap: 6px;
  }
  
  /* Tiny unwatch button like a ghost pill */
  #watchlist-panel .btn.btn--ghost.btn--xs {
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    padding: 4px 8px;
    font-size: 14px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
  }
  
  #watchlist-panel .btn.btn--ghost.btn--xs:hover {
    background: rgba(148,163,184,0.14);
  }
  
  /* Positive / negative values */
  #watchlist-panel .value-positive {
    color: var(--success);
  }
  #watchlist-panel .value-negative {
    color: var(--danger);
  }
  
  /* Mobile tweaks */
  @media (max-width: 640px) {
    #watchlist-panel .signal-card--watch {
      grid-template-columns: 1.7fr 2fr;
      grid-template-rows: auto auto;
    }
  
    #watchlist-panel .signal-card__side {
      grid-column: 1 / -1;
      flex-direction: row;
      align-items: center;
    }
  
    #watchlist-panel .signal-card__side-footer {
      justify-content: space-between;
      flex: 1;
      flex-direction: column;
      align-items: flex-end;

    }

        /* Metrics column */
    #watchlist-panel .signal-card__metrics {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        font-size: 14px;
    }

    
    /* ===== Watchlist cards in modal ===== */

    #watchlist-panel .signal-card--watch {
        display: grid;
        grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.7fr) auto;
        grid-template-rows: auto auto;
        grid-template-areas:
        "main metrics side"
        "main metrics side";
        column-gap: 10px;
        row-gap: 6px;
        align-items: stretch;
    }
    
    /* map the three blocks to the grid areas */
    #watchlist-panel .signal-card__main {
        grid-area: main;
        min-width: 0;
    }
    
    #watchlist-panel .signal-card__metrics {
        grid-area: metrics;
        min-width: 0;
    }
    
    #watchlist-panel .signal-card__side {
        grid-area: side;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-end;
    }
    
    /* Mobile – side column drops below a bit wider */

    #watchlist-panel .signal-card--watch {
      grid-template-columns: minmax(0, 1.7fr) minmax(0, 2fr);
      grid-template-rows: auto auto;
      grid-template-areas:
        "main main"
        "metrics side";
    }
  

  }

  /* Watch / unwatch pill */
.stat-pill--watch {
    cursor: pointer;
    border-style: dashed;
    opacity: 0.9;
    transition: background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
    font-size: 14px;
  }
  
  .stat-pill--watch .stat-icon {
    font-size: 0.9rem;
  }
  
  /* Active (symbol is in watchlist) */
  .stat-pill--watch.is-watched {
    border-style: solid;
    border-color: var(--accent);
    background: rgba(56,189,248,0.12);
    opacity: 1;
  }
  
  /* Optional: subtle hover */
  .stat-pill--watch:hover {
    opacity: 1;
  }

.swipe-watch{
    cursor: pointer;
}

/* Backdrop hidden by default */
#watchlist-modal {
    display: none;
  }
  
  /* When openWatchlistModal adds this class, it appears */
  #watchlist-modal.is-open {
    display: flex;              /* or block, but flex matches other modal */
  }
  

  .signal-panel--watchlist {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* more breathing room around the list */
.signal-panel--watchlist .signal-panel__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 6px 0 10px;
}

/* Empty state stays small */
.signal-panel--watchlist .signal-panel__empty {
    margin-top: 4px;
    font-size: 14px;
    opacity: 0.7;
    padding: 6px 0 4px;
}

/* Scrollable list of cards — more gap */
.signal-panel--watchlist .signal-panel__list {
    flex: 1;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;          /* was 8px */
    overflow-y: auto;
    padding: 0 4px 8px 0;
}

/* Thicker cards in the watchlist only */
.signal-panel--watchlist .signal-card--watch {
    padding: 16px 20px;
    border-radius: 16px;
}

/* Base watch pill (on main card) */
.stat-pill--watch {
    margin-left: auto;
    cursor: pointer;
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--accent);
    background: rgba(15, 23, 42, 0.95);
}

/* Active (Watching) look – same vibe as modal */
.stat-pill--watch.pill--watching,
.pill.pill--small.pill--watching {
    background: rgba(56, 189, 248, 0.20);
    border-color: rgba(56, 189, 248, 0.85);
    color: var(--accent);
}

/* Hover states */
.stat-pill--watch:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.70);
}

.stat-pill--watch.pill--watching:hover,
.pill.pill--small.pill--watching:hover {
    background: rgba(56, 189, 248, 0.28);
    border-color: rgba(56, 189, 248, 0.95);
}

/* ------------------------------------------------
   CARD TYPE THEMES
   These apply to `.cryader-card--XYZ` classes
   added dynamically in SignalCard.render()
--------------------------------------------------*/

/* Base card override */
.cryader-card {
    transition: background 0.25s ease, border-color 0.25s ease;
}

/* -----------------------------------
   Bullish (GREEN THEME)
------------------------------------*/
.cryader-card--bullish {
    border-color: rgba(34, 197, 94, 0.45); /* green-500 */
    background: linear-gradient(
        145deg,
        rgba(34, 197, 94, 0.10),
        rgba(34, 197, 94, 0.04)
    );
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.18);
}

/* -----------------------------------
   Bearish (RED THEME)
------------------------------------*/
.cryader-card--bearish {
    border-color: rgba(239, 68, 68, 0.45); /* red-500 */
    background: linear-gradient(
        145deg,
        rgba(239, 68, 68, 0.10),
        rgba(239, 68, 68, 0.04)
    );
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.18);
}

/* -----------------------------------
   Sideways (YELLOW/NEUTRAL)
------------------------------------*/
.cryader-card--sideways {
    border-color: rgba(234, 179, 8, 0.45); /* amber-500 */
    background: linear-gradient(
        145deg,
        rgba(234, 179, 8, 0.10),
        rgba(234, 179, 8, 0.04)
    );
    box-shadow: 0 0 18px rgba(234, 179, 8, 0.18);
}

.signal-symbol-main a:hover span[data-role="symbol"],
.signal-card__title-row a:hover span {
    color: var(--accent);
    text-shadow: 0 0 6px rgba(56,189,248,0.6);
    cursor: pointer;
}

/* ===== Top bar: search + mode toggle ===== */

.cryader-topbar {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 10px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  
  /* On small screens, stack vertically */
  @media (max-width: 600px) {
    .cryader-topbar {
      flex-direction: column;
      align-items: stretch;
    }
  
    .cryader-topbar .cryader-mode-toggle {
      margin: 0; /* override previous margin auto */
      align-self: center;
    }
  }
  
  /* ===== Symbol search input ===== */
  
  .cryader-symbol-search {
    position: relative;
    /*min-width: 200px;
    max-width: 260px;*/
    top: 9px;
  }
  
  .cryader-symbol-search-input {
    width: 100%;
    border-radius: var(--radius-pill);
    border: none;
    background: #020617;
    color: var(--text-main);
    padding: 7px 12px;
    font-size: 0.8em;
    outline: none;
    transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out;
  }

  .cryader-symbol-search-input::placeholder {
    color: var(--text-muted);
  }
  
  .cryader-symbol-search-input:focus {
    border:none;
  }
  
  .cryader-symbol-search-input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.4);
  }
  
  /* Error text under input */
  .cryader-search-error {
    min-height: 14px;
    margin-top: 3px;
    font-size: 11px;
    color: var(--danger);
  }
  
  /* ===== Typeahead dropdown ===== */
  
  .cryader-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 40;
    background: #020617;
    border-radius: 14px;
    border: 1px solid rgba(31, 41, 55, 0.9);
    box-shadow: 0 12px 30px rgba(0,0,0,0.7);
    max-height: 220px;
    overflow-y: auto;
    display: none;
  }
  
  .cryader-search-results.visible {
    display: block;
  }
  
  .cryader-search-result-item {
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .cryader-search-result-item span.base {
    font-weight: 600;
  }
  
  .cryader-search-result-item span.quote {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  
  .cryader-search-result-item:hover,
  .cryader-search-result-item.is-active {
    background: rgba(56,189,248,0.12);
  }
  
  @media (max-width: 600px) {
    .cryader-symbol-search {
      max-width: 100%;
      top: 0;

    }

    .cryader-search-error{
      display: none;
    }
    
    #swipeCardSlot{
        margin-top: 10px;
    }

    
    .cryader-loading-overlay-inner {
        max-width: 80%;

    }
    
  }
  
  /* multi-column gains row */
.signal-card .gains-row,
.cryader-card-inner .gains-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.mode-expert .cryader-card-inner  .gains-row .expert-only{
    display: grid !important;
}

.gain-box {
  background: rgba(15, 23, 42, 0.85);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1.2;
}

.gain-label {
  opacity: 0.65;
  /* text-transform: uppercase; */
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.gain-value {
  font-weight: 600;
}
.gain-value.gain-pos  { color: #22c55e; }
.gain-value.gain-neg  { color: #ef4444; }
.gain-value.gain-flat { color: #e5e7eb; }

/* heatmap strip: one row, multiple columns */
.heatmap-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.heatmap-col {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.8em;
  line-height: 1.2;
  margin-bottom: 4px
}

.heatmap-label {
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.heatmap-value {
  font-weight: 600;
  white-space: nowrap;
}

.expert-heading{
    padding-top: 25px;
}

.heatmap-col {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 11px;
    line-height: 1.2;
    display: grid;

    /* NEW LAYOUT */
    grid-template-columns: 1fr auto;
    column-gap: 6px;
}

.heatmap-col .label {
    justify-self: start;     /* left align text */
}

.heatmap-col .value {
    justify-self: end;       /* right align numbers */
    text-align: right;
    font-weight: 600;
}

/* === Loading overlay on top of the active swipe card === */

.cryader-loading-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
  
    /* NEW: blur the background under the overlay */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  
    /* Optional: a slight transparent tint */
    background: rgba(0, 0, 0, 0.15);
  
    pointer-events: none;
    z-index: 3;
  }
  
  
  .cryader-loading-overlay-inner {
    max-width: 350px;
    width: 100%;
    margin: 0 16px;
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, var(--bg-card-soft), var(--bg-card));
    border: 1px dashed rgba(148, 163, 184, 0.6);
    box-shadow: var(--shadow-soft);
    padding: 20px 18px;
    text-align: center;
  }
  
  .cryader-loading-spinner {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, 0.25);
    border-top-color: var(--accent);
    animation: cryader-spin 0.8s linear infinite;
    margin: 0 auto 10px auto;
  }
  
  .cryader-loading-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  
  .cryader-loading-message {
    font-size: 13px;
    color: var(--text-muted);
    min-height: 1.2em;
  }
  
  .cryader-loading-hint {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 8px;
    opacity: 0.8;
  }
  
  /* reuse the same spinner animation if not already defined */
  @keyframes cryader-spin {
    to { transform: rotate(360deg); }
  }
  

/* Aggregated panel – expert-only */
.cryader-card-inner .agg-panel {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.9); /* similar to other expert rows */
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    font-size: 0.8em;
  }
  
  .cryader-card-inner .agg-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .cryader-card-inner .agg-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: #e5e7eb;
  }
  
  .cryader-card-inner .agg-title {
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    /* font-size: 10px; */
    color: #9ca3af;
  }
  
  .cryader-card-inner .agg-sub {
    font-size: 10px;
    color: #6b7280;
  }
  
  /* Price range row */
  .cryader-card-inner .agg-range-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 6px;
  }
  
  .cryader-card-inner .agg-side-label {
    /* font-size: 10px; */
    color: #6b7280;
  }
  
  /* The bar itself */
  .cryader-card-inner .agg-range-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.95);
    overflow: hidden;
  }
  
  .cryader-card-inner .agg-range-fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
    opacity: 0.55;
  }
  
  /* marker for current price */
  .cryader-card-inner .agg-range-marker {
    position: absolute;
    top: 50%;
    width: 2px;
    height: 12px;
    border-radius: 999px;
    background: #f9fafb;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(248, 250, 252, 0.9);
  }
  
  /* labels under the bar */
  .cryader-card-inner .agg-range-values {
    margin-top: 2px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* font-size: 10px; */
    color: #9ca3af;
  }
  
  .cryader-card-inner .agg-range-values span {
    white-space: nowrap;
  }
  
  .cryader-card-inner .agg-range-values span:nth-child(1) {
    text-align: left;
  }
  
  .cryader-card-inner .agg-range-values span:nth-child(2) {
    text-align: center;
  }
  
  .cryader-card-inner .agg-range-values span:nth-child(3) {
    text-align: right;
  }
  
  .cryader-card-inner .agg-current {
    font-weight: 600;
    color: #e5e7eb;
  }
  
  /* Volume bar */
  .cryader-card-inner .agg-volume-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.95);
    overflow: hidden;
  }
  
  .cryader-card-inner .agg-volume-fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: radial-gradient(circle at 0% 50%, #22c55e, #22c55e, transparent);
    opacity: 0.7;
  }
  
  .cryader-card-inner .agg-volume-values {
    margin-top: 2px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #9ca3af;
  }
  
  .cryader-card-inner .agg-volume-values span:last-child {
    font-weight: 600;
    color: #e5e7eb;
  }
  
  /* Optional: subtle state colors for panel based on trend */
  .cryader-card.pattern-agree .agg-panel {
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
  }
  
  .cryader-card.pattern-mismatch .agg-panel {
    box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.18);
  }

  
  .cryader-card-inner .agg-sub--pos {
    color: #22c55e;   /* green */
  }
  
  .cryader-card-inner .agg-sub--neg {
    color: #ef4444;   /* red */
  }
  

  .agg-tf-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
    font-size: 10px;
  }
  
  .agg-tf-btn {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 2px 8px;
    cursor: pointer;
    color: #e5e7eb;
  }
  
  .agg-tf-btn.is-active {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
  }

  
/* Stack everything in one column */
.agg-panel {
    display: flex;
    flex-direction: column;   /* vertical instead of side-by-side */
    gap: 8px;                 /* space between rows */
  }
  
  /* Each section takes full width */
  .agg-panel .agg-section {
    width: 100%;
  }

  /* Range header row: title + +X% from low */
.agg-section--price .agg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
  }
  
  /* Range bar row */
  .agg-range-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
  }
  
  /* Low / current / high row */
  .agg-range-values {
    display: flex;
    justify-content: space-between;
    /* font-size: 10px; */
    margin-bottom: 6px;
  }
  
  /* Volume section in its own row */
  .agg-section--volume .agg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
  }
  
  .agg-volume-bar {
    margin-bottom: 4px;
  }
  

.agg-classifier {
    margin-bottom: 6px;
    font-size: 14px;
    padding-bottom: 10px;
    /* font-weight: 500; */
    opacity: 0.9;
}

/* tone colors */
.agg-classifier[data-tone="bullish"] { color: #35d69f; }
.agg-classifier[data-tone="bearish"] { color: #ff6b81; }
.agg-classifier[data-tone="mixed"]   { color: #ffc857; }
.agg-classifier[data-tone="neutral"] { color: #9fa8c3; }
  
/* Base gains pill uses existing .stat-pill look */

/* Tone classes driven by classifyGains().tone */
.stat-pill--gains-bullish .stat-text,
.stat-pill--gains-bullish .stat-icon {
  color: #4ade80; /* green-ish */
}

.stat-pill--gains-bearish .stat-text,
.stat-pill--gains-bearish .stat-icon {
  color: #f97373; /* red-ish */
}

.stat-pill--gains-neutral .stat-text,
.stat-pill--gains-neutral .stat-icon {
  color: #e5e7eb;
}

.stat-pill--gains-mixed .stat-text,
.stat-pill--gains-mixed .stat-icon {
  color: #fde68a; /* yellow-ish */
}

/* Base pill already styled via .stat-pill */

/* Spread < 2% → green */
.stat-pill--spread-good .stat-value {
    color: #4ade80; /* green */
}

/* Spread < 4% → yellow */
.stat-pill--spread-medium .stat-value {
    color: #facc15; /* yellow */
}

/* Spread ≥ 4% → red */
.stat-pill--spread-bad .stat-value {
    color: #f87171; /* red */
}

/* Loader tips block */
.cryader-loader-tip-shell {
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(31, 41, 55, 0.85);
    max-width: 420px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
  
  .cryader-loader-tip-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 4px;
  }
  
  .cryader-loader-tip-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-dim);
    min-height: 1.4em; /* avoid jump when changing */
  }
  
  /* Slide-up + fade animation */
  @keyframes loaderTipSlideUp {
    0% {
      opacity: 0;
      transform: translateY(8px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .cryader-loader-tip-text.is-animating {
    animation: loaderTipSlideUp 0.4s ease-out;
  }

  .pattern-panel {
    margin-top: 8px;
    padding: 6px 8px;
    background: rgba(10, 17, 30, 0.95);
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.15);
  }
  
  .pattern-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
  }
  
  .pattern-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(226, 232, 240, 0.8);
  }
  
  .pattern-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .pattern-row {
    padding: 6px;
    border-radius: 6px;
    background: radial-gradient(circle at top left,
                rgba(56, 189, 248, 0.12),
                rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(30, 64, 175, 0.45);
  
    display: grid;
    grid-template-columns: 1fr; /* LEFT expands, RIGHT fits */
    align-items: start;
    gap: 6px;
    font-size: 10px;
  }
  
  
  .pattern-tf {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.9);
  }
  
  .pattern-bar {
    display: flex;
    gap: 2px;
  }
  
  .pattern-step {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    padding-top: 5px;
    padding-bottom: 5px;
  }
  
  /* step colors */
  .pattern-step--bull {
    background: #22c55e;   /* green */
  }
  .pattern-step--bear {
    background: #ef4444;   /* red */
  }
  .pattern-step--flat {
    background: #64748b;   /* slate */
  }
  
  .pattern-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }
  
  .pattern-current {
    color: rgba(226, 232, 240, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pattern-trend-pill {
    justify-self: end;  /* forces right alignment */
  }
  
  .pattern-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  
  .pattern-next {
    color: #a5b4fc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pattern-current,
    .pattern-next {
    white-space: normal;         /* allow wrapping */
    overflow: visible;
    text-overflow: unset;        /* no truncation */
    line-height: 1.28;
  }

  
  /* tiny trend pill on the right */
  .pattern-trend-pill {
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 9px;
    white-space: nowrap;
    border: 1px solid rgba(148, 163, 184, 0.4);
  }
  
  .pattern-trend-pill--bull {
    border-color: rgba(34, 197, 94, 0.6);
    color: #4ade80;
  }
  .pattern-trend-pill--bear {
    border-color: rgba(248, 113, 113, 0.6);
    color: #fca5a5;
  }
  .pattern-trend-pill--flat {
    border-color: rgba(148, 163, 184, 0.6);
    color: #cbd5f5;
  }
  
  /* reuse your existing stat-pill styling for consensus */
  .stat-pill--pattern-consensus {
    font-size: 10px;
    padding: 2px 6px;
  }
  

  .pattern-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pattern-row {
    background: rgba(9, 18, 35, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(60, 90, 130, 0.35);
    overflow: hidden;
}

/* header row */
.pattern-row-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #f5f7ff;
    font-family: inherit;
}

.pattern-row-toggle:focus {
    outline: 1px solid rgba(120, 180, 255, 0.8);
    outline-offset: 0;
    border-radius: 10px;
}

/* left: TF */
.pattern-tf-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(200, 210, 240, 0.85);
    min-width: 32px;
}

/* middle: pattern name */
.pattern-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px;
    color: rgba(210, 220, 245, 0.95);
    line-height: 1.3;
    text-align: left;
    word-break: break-word;     /* allow wrapping, don’t truncate */
}

/* right: pill */
.pattern-trend-pill {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(120, 140, 180, 0.7);
    background: rgba(15, 25, 50, 0.95);
}

/* colour variants (if you already add these classes in JS) */
.pattern-trend-pill.bullish {
    border-color: #1fe29a;
    color: #1fe29a;
}
.pattern-trend-pill.bearish {
    border-color: #ff4d6a;
    color: #ff4d6a;
}
.pattern-trend-pill.neutral {
    border-color: #c7cbe5;
    color: #c7cbe5;
}

/* accordion body */
.pattern-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 10px;
    border-top: 1px solid rgba(40, 55, 90, 0.6);
    transition:
        max-height 0.22s ease,
        opacity 0.18s ease,
        padding-top 0.18s ease,
        padding-bottom 0.18s ease;
}

.pattern-row.open .pattern-details {
    max-height: inherit;          /* enough for 2 lines */
    opacity: 1;
    padding-top: 6px;
    padding-bottom: 8px;
}

.pattern-row.open .pattern-details .pattern-next{
    color: #3d89eb;
}

.pattern-line {
    display: flex;
    gap: 6px;
    margin-bottom: 3px;
    font-size: 11px;
}

.pattern-details-label {
    min-width: 48px;
    color: rgba(165, 175, 210, 0.9);
}

.pattern-details-value {
    flex: 1 1 auto;
    color: #f4f6ff;
    line-height: 1.3;
}

.cryader-deltas{
    display:flex;
    gap:8px;
    margin-top:6px;
    flex-wrap:wrap;
  }
  
  .cryader-delta-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:4px 8px;
    border-radius:999px;
    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.10);
    font-size:11px;
    line-height:1;
  }
  
  .cryader-delta-label{
    opacity:0.75;
    letter-spacing:0.02em;
  }
  
  .cryader-delta-value{
    font-weight:700;
  }
  
  .cryader-delta-value.is-pos{ color:#2ecc71; }
  .cryader-delta-value.is-neg{ color:#e74c3c; }
  .cryader-delta-value.is-flat{ color:rgba(255,255,255,0.65); }
  
/* simple “blink” flash */
.price-flash-up {
    animation: priceFlashUp 420ms ease;
  }
  .price-flash-down {
    animation: priceFlashDown 420ms ease;
  }
  
  @keyframes priceFlashUp {
    0%   { filter: brightness(1); }
    20%  { color: #2ecc71; filter: brightness(1.25); }
    100% { filter: brightness(1); }
  }
  
  @keyframes priceFlashDown {
    0%   { filter: brightness(1); }
    20%  { color: #e74c3c; filter: brightness(1.25); }
    100% { filter: brightness(1); }
  }


  .inline-icon {
    display:inline-flex;
    align-items:center;
    margin-right:4px;
    margin-left:4px;
    line-height:1;
    user-select:none;
  }
  
  /* Optional animations */
  .inline-icon.bounce {
    animation: iconBounce 700ms ease infinite;
  }
  
  .inline-icon.pulse {
    animation: iconPulse 550ms ease infinite;
  }
  

@keyframes iconPulse {
    0%   { transform: scale(1); opacity:1; }
    50%  { transform: scale(1.15); opacity:0.85; }
    100% { transform: scale(1); opacity:1; }
}


/* wrapper (applied to the inline-icon span) */
.inline-icon.mv-wrap { margin-left: 6px; }

/* basic direction colors */
.mv--up   .mv__live { color: #2ecc71; }
.mv--down .mv__live { color: #e74c3c; }
.mv--flat .mv__live { color: rgba(255,255,255,0.55); }

/* tier emphasis */
.mv-tier--strong .mv__live { filter: drop-shadow(0 0 3px rgba(46,204,113,0.25)); }
.mv-tier--super  .mv__live { filter: drop-shadow(0 0 6px rgba(46,204,113,0.40)); }

/* super strong = flash/bounce */
.inline-icon.mvW-super {
  animation: mvPulse 650ms ease;
}
@keyframes mvPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* special “pullback but still above HM” cue */
.mv-state--up_pullback .mv__live { opacity: 0.90; }
.mv-state--up_pullback .mv__hm { color: #2ecc71; opacity: 0.85; } /* still above baseline */


/* heatmap context glyph default */
.mv__hm {
  margin-left: 3px;
  opacity: 0.85;
}

/* color it by HM direction */
.mv-hm--up   .mv__hm { color: #2ecc71; }  /* green */
.mv-hm--down .mv__hm { color: #e74c3c; }  /* red */
.mv-hm--flat .mv__hm { color: rgba(255,255,255,0.55); }

/* if you want HM to glow on super too */
.mv-tier--super .mv__hm { filter: drop-shadow(0 0 5px rgba(46,204,113,0.35)); }

/* bounce animation class */
.inline-icon.bounce {
  animation: iconBounce 450ms ease infinite;
}

@keyframes iconBounce {
  0% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
  60% { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

/* ticker super: emphasize live direction more than HM */
.inline-icon.mvW-ticker_super {
    animation: mvPulse 650ms ease;
  }
  
  .mv-tier--ticker_super .mv__live {
    filter: drop-shadow(0 0 8px rgba(46,204,113,0.45));
  }
  
/* optional: keep HM glow minimal in ticker super */
.mv-tier--ticker_super .mv__hm {
    opacity: 0.7;
}
  
.signal-card__title-actions{
  display:flex;
  gap:8px;
  align-items:center;
}

.confidence-block { display: grid; gap: 8px;  }
.confidence-row { display: grid; grid-template-columns: 2fr 3fr 0.7fr; align-items: center; gap: 10px; }
.progress-track { height: 10px; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; transform-origin: left center; transform: scaleX(0); }

.conf-side{
  display:flex;
  justify-content:center;
  /*margin:6px 0 10px;*/
}

.conf-pill{
  font-size:12px;
  line-height:1;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.06);
  letter-spacing:.2px;
  user-select:none;
}

.conf-pill--positive{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.14);
}

.conf-pill--negative{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.14);
}

.conf-pill--neutral{
  border-color: rgba(148,163,184,.35);
  background: rgba(148,163,184,.12);
}

.conf-pill--unknown{
  opacity:.7;
}

.confidence-row-label{
  display: flex;
  gap: 10px;
}

.confidence-label{
  align-self: anchor-center;
}

.rrr-map{
  margin-top:10px;
  margin-bottom: 30px;
  padding:12px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}

.rrr-map__top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.rrr-map__title{font-weight:700;opacity:.95;}

.rrr-bias{
  font-size:12px;padding:5px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,.15); background:rgba(255,255,255,.06);
}
.rrr-bias--reward{ border-color:rgba(34,197,94,.35); background:rgba(34,197,94,.14); }
.rrr-bias--balanced{ border-color:rgba(148,163,184,.35); background:rgba(148,163,184,.12); }
.rrr-bias--risk{ border-color:rgba(239,68,68,.35); background:rgba(239,68,68,.14); }
.rrr-bias--unknown{opacity:.75;}

.rrr-map__bars{display:flex;flex-direction:column;gap:10px;}

.rrr-bar{display:grid;grid-template-columns:64px 1fr 64px;gap:10px;align-items:center;}
.rrr-bar__label{font-size:12px;opacity:.8;}
.rrr-bar__value{font-size:12px;text-align:right;opacity:.85;}

.rrr-bar__track{
  position:relative;height:12px;border-radius:999px;overflow:hidden;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
}

.rrr-bar__fill{height:100%;width:0%;transform-origin:left;transition:width .25s ease;}
.rrr-bar__fill--reward{background:rgba(34,197,94,.35);}
.rrr-bar__fill--risk{background:rgba(239,68,68,.35);}

.rrr-trail{
  position:absolute;top:50%;transform:translate(-50%,-50%);
  width:8px;height:8px;border-radius:50%;
  background:rgba(255,255,255,.92);
  box-shadow:0 0 0 3px rgba(0,0,0,.25);
  display:none; /* show only if we have trailingStopPrice */
}

.rrr-map__foot{justify-content:space-between;margin-top:10px;gap:10px;}
.rrr-ratio{font-weight:700;font-size:12px;}
.rrr-prices{font-size:12px;opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

.rrr-card{padding:14px 16px;border-radius:14px;background:rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.08)}
.rrr-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.rrr-title{font-weight:700;letter-spacing:.5px;opacity:.95}
.rrr-pill{padding:4px 10px;border-radius:999px;font-size:12px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06)}

.rrr-bars{display:grid;gap:10px;margin-bottom:12px}
.rrr-bar-row{display:grid;grid-template-columns:70px 1fr 48px;gap:10px;align-items:center}
.rrr-bar-label{font-size:12px;opacity:.8}
.rrr-track{height:10px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.08)}
.rrr-fill{height:100%;width:0%;border-radius:999px;transition:width .25s ease}
.rrr-bar-val{font-size:12px;text-align:right;opacity:.85}

.rrr-meta{border-top:1px solid rgba(255,255,255,.08);padding-top:10px}
.rrr-line{display:flex;gap:10px;align-items:baseline;margin-bottom:10px}
.rrr-strong{font-weight:700}
.rrr-side{font-size:12px;opacity:.85}

.rrr-grid{display:grid;margin-top:5px;grid-template-columns:1fr 1fr;/*row-gap:6px;*/column-gap:10px}
.rrr-grid .k{font-size:12px;opacity:.7}
.rrr-grid .v{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;font-size:12px}


.cryader-help-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.cryader-help-overlay.hidden{
  display: none;
}

.help-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,0.75);
  backdrop-filter: blur(6px);
}

.help-panel{
  position: absolute;
  inset: 10%;
  background: #020617;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.25);
  box-shadow: 0 40px 120px rgba(0,0,0,0.65);
  display: flex;
  flex-direction: column;
}

.help-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148,163,184,0.2);
  font-weight: 800;
}

.help-header button{
  background: none;
  border: none;
  color: #e5e7eb;
  font-size: 18px;
  cursor: pointer;
}

.help-frame{
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 0 0 18px 18px;
}

.cryader-card--refresh {
  cursor: pointer;
  border: 1px dashed rgba(255,255,255,.25);
  opacity: .95;
}

.refresh-card { padding: 16px; }
.refresh-title { font-weight: 700; font-size: 16px; }
.refresh-sub { opacity: .75; margin-top: 6px; }
.refresh-btn { margin-top: 12px; }


/* IMPORTANT NOTICE CARD */
.donate-important {
  position: relative;
  animation:
    donatePulse 1.6s ease-out 1,
    donateGlow 3s ease-in-out 2;
}

/* Soft scale pulse (runs once) */
@keyframes donatePulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.015); }
  100% { transform: scale(1); }
}

/* Breathing glow (runs twice then stops) */
@keyframes donateGlow {
  0% {
    box-shadow: 0 0 0 rgba(255, 193, 7, 0);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 193, 7, 0.45);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 193, 7, 0);
  }
}

.donate-important::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background:
    linear-gradient(
      120deg,
      transparent,
      rgba(255,193,7,.6),
      transparent
    );
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: borderSweep 2.5s ease-out 1;
}

@keyframes borderSweep {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

.billingAddress p{ color: #fff important; }