/* =========================================================
   SIGNAL TERMINAL LAYOUT
   ========================================================= */
body {
    padding-bottom: 90px;
    /* Seamless clearance for bottom navigation */
}

.main-container {
    max-width: 600px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
}

/* =========================================================
   SYSTEM CLOCK MODULE
   ========================================================= */
.clock-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.clock-label {
    font-size: 0.65rem;
    letter-spacing: 0.12rem;
    color: var(--text-muted);
    font-weight: 800;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.clock {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.05rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

/* =========================================================
   TERMINAL SYNC STRIP
   ========================================================= */
.system-sync-strip {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid var(--border-color);
    padding: 0.65rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.sync-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 6px var(--red);
    transition: background 0.3s, box-shadow 0.3s;
}

.sync-dot.online {
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

/* =========================================================
   STALENESS HIDING transitions
   ========================================================= */
.state-monitor-node {
    transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
    max-height: 800px;
    opacity: 1;
}

.stale-hidden {
    opacity: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* =========================================================
   DYNAMIC SIGNAL PANELS & GRADIENTS
   ========================================================= */
.signal-panel {
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.signal-title {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.15rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    text-align: center;
}

/* Incoming Panel Style */
.state-incoming {
    background: radial-gradient(100% 100% at 0% 0%, rgba(168, 85, 247, 0.12) 0%, transparent 100%), var(--bg-card);
    border-color: rgba(168, 85, 247, 0.35);
}

.state-incoming .signal-title {
    color: var(--purple);
}

/* Bet Now Panel Style */
.state-betnow {
    background: radial-gradient(100% 100% at 0% 0%, rgba(239, 68, 68, 0.12) 0%, transparent 100%), var(--bg-card);
    border-color: rgba(239, 68, 68, 0.35);
    animation: heartbeat 1.5s infinite alternate ease-in-out;
}

.state-betnow .signal-title {
    color: var(--red);
}

@keyframes heartbeat {
    from {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }

    to {
        box-shadow: 0 10px 35px rgba(239, 68, 68, 0.15);
    }
}

/* Won State */
.state-won {
    background: radial-gradient(100% 100% at 0% 0%, rgba(16, 185, 129, 0.15) 0%, transparent 100%), var(--bg-card);
    border-color: rgba(16, 185, 129, 0.4);
}

.state-won .signal-title {
    color: var(--green);
}

/* Lost State */
.state-lost {
    background: radial-gradient(100% 100% at 0% 0%, rgba(239, 68, 68, 0.15) 0%, transparent 100%), var(--bg-card);
    border-color: rgba(239, 68, 68, 0.4);
}

.state-lost .signal-title {
    color: var(--red);
}

/* Skipped State */
.state-skipped {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.state-skipped .signal-title {
    color: var(--text-muted);
}

/* =========================================================
   SIGNAL PANEL CONTENT STYLING
   ========================================================= */
.bet-line,
.balance-line,
.target-line {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 0.5rem;
}

.bet-line {
    color: var(--text-primary);
}

.balance-line,
.balance-final {
    color: var(--text-secondary);
}

.balance-line span,
.balance-final span {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.target-line {
    font-size: 1.15rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    padding-top: 0.75rem;
}

.target-value {
    color: var(--red);
    font-weight: 900;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* Countdown Wrapper */
.countdown-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.85rem;
    margin-top: 1rem;
    text-align: center;
}

.countdown-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.countdown-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--purple);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.countdown-go {
    color: var(--green);
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

/* Completed Outputs */
.result-multiplier {
    font-size: 3.2rem;
    font-weight: 900;
    text-align: center;
    margin: 0.5rem 0;
    font-variant-numeric: tabular-nums;
}

.mul-blue {
    color: var(--blue);
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}

.mul-purple {
    color: var(--purple);
    text-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
}

.mul-red {
    color: var(--red);
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}

.result-pnl {
    font-size: 1.3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    font-variant-numeric: tabular-nums;
}

.pnl-win {
    color: var(--green);
}

.pnl-lost {
    color: var(--red);
}



.balance-final {
    font-size: 0.85rem;
    text-align: center;
    font-weight: 600;
    margin-top: 0.5rem;
}


.skipped-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem 0;
    font-weight: 600;
}