/* Obsidian Terminal - Tactical OS Stylesheet */

:root {
    --void-black: #080808;
    --kinetic-cyan: #00F0FF;
    --impact-red: #FF3131;
    --hud-border: rgba(255, 255, 255, 0.1);
    --hud-border-bright: rgba(255, 255, 255, 0.2);
    --mono-font: 'JetBrains Mono', 'IBM Plex Mono', monospace;
}

body {
    background-color: var(--void-black);
    color: #ffffff;
    font-family: var(--mono-font);
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Global lock */
}

html {
    overflow: hidden;
}

/* Binary Flash Border */
.hud-container {
    height: 100vh;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    display: flex;
    flex-direction: row;
    /* Restore sidebar to the left */
    overflow: hidden;
}

.hud-flash-cyan {
    animation: flash-cyan 1s infinite alternate;
}

.hud-flash-red {
    animation: flash-red 1s infinite alternate;
}

@keyframes flash-cyan {
    from {
        border-color: rgba(0, 240, 255, 0.1);
    }

    to {
        border-color: var(--kinetic-cyan);
        box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.2);
    }
}

@keyframes flash-red {
    from {
        border-color: rgba(255, 49, 49, 0.1);
    }

    to {
        border-color: var(--impact-red);
        box-shadow: inset 0 0 20px rgba(255, 49, 49, 0.2);
    }
}

/* Raw Grid System */
.hud-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 0;
    border: 1px solid var(--hud-border);
    flex: 1;
    overflow: hidden;
}

.hud-module {
    border: 1px solid var(--hud-border);
    padding: 12px;
    background: transparent;
    overflow: hidden;
    min-width: 0;
    /* Prevent content from forcing width */
}

.hud-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    display: block;
    font-weight: 600;
}

/* History Strip */
.history-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 20px;
    /* Increased horizontal padding for edge clearance */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-items: center;
    /* Center all badges vertically */
    scrollbar-width: thin;
    scrollbar-color: var(--kinetic-cyan) rgba(255, 255, 255, 0.05);
    /* Sharper edges for better readability */
    mask-image: linear-gradient(90deg, transparent 0%, black 2%, black 98%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 2%, black 98%, transparent 100%);
}

.history-strip::-webkit-scrollbar {
    height: 4px;
}

.history-badge {
    padding: 3px 8px;
    font-family: var(--mono-font);
    font-size: 10px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 2px;
}

.badge-latest {
    border: 2px solid var(--kinetic-cyan) !important;
    padding: 2px 8px !important;
    /* Offset by 1px to match height of 1px bordered items */
    background: rgba(0, 240, 255, 0.1) !important;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.badge-cyan {
    color: var(--kinetic-cyan);
    border-color: rgba(0, 240, 255, 0.3);
}

.badge-red {
    color: var(--impact-red);
    border-color: rgba(255, 49, 49, 0.3);
}

.hud-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

/* Typography Overrides */
.mono {
    font-family: var(--mono-font) !important;
}

.cyan {
    color: var(--kinetic-cyan) !important;
}

.red {
    color: var(--impact-red) !important;
}

/* SIDEBAR STYLING - PREMIUM GLASS */
.sidebar {
    width: 250px;
    height: 100vh;
    background: rgba(8, 8, 8, 0.95);
    border-right: 1px solid var(--hud-border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
    /* Force flex participation */
    flex-shrink: 0;
    /* Prevent shrinking */
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@media (max-width: 1200px) {
    .sidebar {
        position: absolute;
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 10px 0 50px rgba(0, 0, 0, 0.8);
    }
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    font-family: var(--mono-font);
    font-size: 12px;
    letter-spacing: 1px;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-link.active,
.nav-link:active {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1), transparent);
    color: var(--kinetic-cyan);
    border-left: 2px solid var(--kinetic-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Ticker Styles */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--hud-border);
    padding: 4px 0;
}

.ticker {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* --- MIGRATED GLASS UI CLASSES --- */

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px) scale(1.01);
}

.consensus-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 8px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.signal-card {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.02) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.signal-bet {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.15);
}

.signal-skip {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.03) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.15);
}

.signal-wait {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.03) 100%);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.15);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-text {
    text-shadow: 0 0 20px currentColor;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.chart-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 10px;
}

.badge-win {
    background: linear-gradient(135deg, #10b981, #059669);
}

.badge-loss {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.badge-neutral {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.regime-hot {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.regime-cold {
    color: #3b82f6;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.regime-neutral {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}