/* =========================================================
   StrikePulse – Base Styles
   Phase 1: Market Core
========================================================= */

/* -----------------------------
   Root variables
----------------------------- */
:root {
    --sp-bg: #0b1220;
    --sp-panel: #111a2e;
    --sp-border: #1f2a44;
    --sp-text: #e6e9f0;
    --sp-muted: #9aa4bf;

    --sp-green: #16c784;
    --sp-red: #ea3943;
    --sp-yellow: #f0b90b;
    --sp-blue: #3b82f6;

    --sp-font: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Oxygen, Ubuntu, Cantarell,
               "Helvetica Neue", Arial, sans-serif;
}

/* -----------------------------
   Global resets (safe)
----------------------------- */
body {
    background-color: var(--sp-bg);
    color: var(--sp-text);
    font-family: var(--sp-font);
    margin: 0;
    padding: 0;
}

/* -----------------------------
   Header / Status bar
----------------------------- */
.sp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--sp-panel);
    border-bottom: 1px solid var(--sp-border);
}

.sp-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.sp-status {
    font-size: 13px;
    color: var(--sp-muted);
}

/* -----------------------------
   Spot price display
----------------------------- */
#spotPrice {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-left: 8px;
    color: var(--sp-yellow);
}

/* Connection indicator */
#connectionStatus {
    font-size: 12px;
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #1a233a;
    color: var(--sp-muted);
}

/* -----------------------------
   Panels / sections
----------------------------- */
.sp-panel {
    background: var(--sp-panel);
    border: 1px solid var(--sp-border);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

/* -----------------------------
   Tables (future-proof)
----------------------------- */
.sp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sp-table th,
.sp-table td {
    padding: 6px 8px;
    text-align: right;
    border-bottom: 1px solid var(--sp-border);
}

.sp-table th {
    color: var(--sp-muted);
    font-weight: 500;
}

/* -----------------------------
   Utility colors
----------------------------- */
.sp-up {
    color: var(--sp-green);
}

.sp-down {
    color: var(--sp-red);
}

.sp-muted {
    color: var(--sp-muted);
}

/* -----------------------------
   Smooth number updates
----------------------------- */
.sp-flash-up {
    animation: flashUp 0.4s ease;
}

.sp-flash-down {
    animation: flashDown 0.4s ease;
}

@keyframes flashUp {
    from { background-color: rgba(22, 199, 132, 0.25); }
    to   { background-color: transparent; }
}

@keyframes flashDown {
    from { background-color: rgba(234, 57, 67, 0.25); }
    to   { background-color: transparent; }
}