:root {
    --bg-dark: #0a0a0f;
    --sidebar-bg: #0f0f17;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #00ff41;
    --secondary: #ff0055;
    --accent: #7000ff;
    --text-main: #e0e0e0;
    --text-dim: #888899;
    --buy-green: #00ff88;
    --sell-red: #ff3366;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100vh;
}

.delta-meters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.metric-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-box label {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 700;
}

.mtf-meter {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 50%;
    transition: all 0.5s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary));
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.symbol-selector label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.input-group {
    display: flex;
    gap: 8px;
}

input {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
}

button {
    background: var(--primary);
    color: black;
    border: none;
    padding: 0 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}

.stat-card label {
    font-size: 11px;
    color: var(--text-dim);
    display: block;
}

/* Elite Phase 5: Whale Markers */
.imbalance-buy {
    background: rgba(255, 235, 59, 0.4) !important;
    border: 1px solid rgba(255, 235, 59, 1);
}
.imbalance-sell {
    background: rgba(255, 152, 0, 0.4) !important;
    border: 1px solid rgba(255, 152, 0, 1);
}

.vwap-line-label {
    position: absolute;
    right: 55px;
    padding: 2px 5px;
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    font-size: 9px;
    border-radius: 2px;
    pointer-events: none;
}

#vCVD.up, #vVWAP.up { color: var(--buy-green); }
#vCVD.down, #vVWAP.down { color: var(--sell-red); }

/* Delta Chart CVD Line */
.cvd-line {
    color: #2196f3;
}

.stat-card span {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary);
}

.breakout-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.magnitude-section {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.magnitude-section label {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
    font-weight: 700;
}

.magnitude-meter {
    display: flex;
    gap: 4px;
    height: 12px;
}

.mag-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mag-bar.active {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.mag-bar.extreme {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.liquidity-bias {
    margin-top: 0;
}

.magnitude-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.magnitude-row label {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 700;
    letter-spacing: 1px;
}

.stage-badge {
    border-color: rgba(163, 118, 255, 0.3);
}

.stage-badge span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
}

.alerts-container {
    margin-top: 10px;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.empty-alerts {
    font-size: 11px;
    color: var(--text-dim);
    font-style: italic;
    text-align: center;
    padding-top: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.header-stats {
    display: flex;
    gap: 12px;
}

.price-display {
    display: flex;
    flex-direction: column;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 100px;
    transition: all 0.3s ease;
}

/* Stage 4: DISTRIBUTION */
.stage-item.active.stage-4 {
    background: rgba(255, 87, 34, 0.2);
    border-color: #ff5722;
    color: #ff5722;
    animation: pulse-danger 1s infinite alternate;
}

@keyframes pulse-danger {
    from { box-shadow: 0 0 5px rgba(255, 87, 34, 0.2); }
    to { box-shadow: 0 0 20px rgba(255, 87, 34, 0.5); }
}

.volume-badge {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.05);
}

.volume-badge label {
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 1px;
    font-weight: 700;
}

.volume-badge span {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
}

.trail-badge {
    border-color: #ff9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.05);
}

.trail-badge label {
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 1px;
    font-weight: 700;
}

.trail-badge span {
    font-size: 16px;
    font-weight: 700;
    color: #ff9800;
    font-family: 'JetBrains Mono', monospace;
}

#currentPrice {
    font-size: 32px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    transition: color 0.3s ease;
}

#currentPrice.up { color: var(--buy-green); filter: drop-shadow(0 0 8px var(--buy-green)); }
#currentPrice.down { color: var(--sell-red); filter: drop-shadow(0 0 8px var(--sell-red)); }

#whaleDeltaValue.whale { color: var(--accent); font-weight: 700; filter: drop-shadow(0 0 5px var(--accent)); }

.depth-row {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    padding: 6px 0;
    transition: background 0.1s ease;
}

.depth-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.depth-row.header {
    color: var(--text-dim);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 8px;
    font-weight: 600;
}

.depth-list.asks .depth-row { 
    color: var(--sell-red); 
    border-right: 2px solid transparent;
}
.depth-list.asks .depth-row:hover { border-right-color: var(--sell-red); }

.depth-list.bids .depth-row { 
    color: var(--buy-green); 
    border-right: 2px solid transparent;
}
.depth-list.bids .depth-row:hover { border-right-color: var(--buy-green); }

.mid-price-row {
    text-align: center;
    padding: 16px 0;
    font-size: 20px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
    margin: 8px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-main);
}

/* Log Styles */
.log-container {
    height: 100%;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 10px;
}

.log-entry {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-entry.long { border-left: 4px solid var(--buy-green); background: rgba(0, 255, 136, 0.05); }
.log-entry.short { border-left: 4px solid var(--sell-red); background: rgba(255, 51, 102, 0.05); }
.log-entry.system { border-left: 4px solid var(--accent); }
.log-entry.liquidation { border-left: 4px solid #ffaa00; background: rgba(255, 170, 0, 0.1); color: #ffaa00; font-weight: 700; box-shadow: 0 0 10px rgba(255, 170, 0, 0.2); }

/* Breakout Alert Cards */
.alert-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-out;
    position: relative;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.alert-card.breach { border-left: 4px solid var(--buy-green); }
.alert-card.trap { border-left: 4px solid var(--sell-red); }

.alert-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 700;
}

.alert-card.breach .alert-header { color: var(--buy-green); }
.alert-card.trap .alert-header { color: var(--sell-red); }

.alert-details {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.5;
}

.alert-label { color: var(--text-dim); margin-right: 5px; }
.alert-value { color: var(--text-main); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
/* Alt-Mode Toggle */
.alt-mode-toggle {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-label {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
}

.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 16px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(14px); }

body.alt-mode-active {
    border: 1px solid var(--accent);
    box-shadow: inset 0 0 50px rgba(163, 118, 255, 0.05);
}
/* Verdict Panel */
.verdict-panel {
    margin: 20px;
    padding: 20px;
    display: flex;
    flex-direction: row;
    gap: 24px;
    border: 1px solid var(--glass-border);
}

.verdict-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 260px;
    border-right: 1px solid var(--glass-border);
    padding-right: 24px;
}

.verdict-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.verdict-badge {
    display: flex;
    align-items: center;
    gap: 16px;
}

.runner-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.runner-stage-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.runner-stage-mini label {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 700;
}

.runner-stage-value {
    font-size: 14px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.magnitude-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.magnitude-mini label {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 700;
}

.magnitude-meter.mini {
    display: flex;
    gap: 3px;
}

.magnitude-meter.mini .mag-bar {
    width: 20px;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}
/* Runner Panel (Phase 6) */
.runner-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.runner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.runner-stage-label {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 2px;
    font-weight: 700;
}

.runner-stage-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.runner-stage-value.stage-0 { color: var(--text-dim); }
.runner-stage-value.stage-1 { color: #ff9800; }
.runner-stage-value.stage-2 { color: var(--buy-green); filter: drop-shadow(0 0 5px var(--buy-green)); }
.runner-stage-value.stage-3 { color: #00bcd4; filter: drop-shadow(0 0 8px #00bcd4); }

.liquidity-bias label {
    font-size: 11px;
    color: var(--text-dim);
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.bias-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    display: flex;
    overflow: hidden;
    margin-bottom: 8px;
}

.bias-bar-fill.up {
    background: var(--buy-green);
    transition: width 0.3s ease;
}

.bias-bar-fill.down {
    background: var(--sell-red);
    transition: width 0.3s ease;
}

.bias-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
}
.bias-labels .up { color: var(--buy-green); }
.bias-labels .down { color: var(--sell-red); }

.verdict-icon {
    font-size: 32px;
}

.verdict-text {
    text-align: center;
}

.verdict-label {
    display: block;
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 2px;
    font-weight: 700;
}

.verdict-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.verdict-score-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: 'JetBrains Mono', monospace;
}

#verdictScore {
    font-size: 20px;
    font-weight: 700;
}

.verdict-score-ring small {
    font-size: 9px;
    color: var(--text-dim);
}

/* Status Colors for Verdict */
.verdict-panel.real-pump { border-color: var(--buy-green); box-shadow: 0 0 20px rgba(0, 255, 136, 0.1); }
.verdict-panel.real-pump #verdictValue { color: var(--buy-green); }
.verdict-panel.real-pump .verdict-score-ring { border-color: var(--buy-green); box-shadow: 0 0 10px var(--buy-green); }

.verdict-panel.trap { border-color: var(--sell-red); box-shadow: 0 0 20px rgba(255, 51, 102, 0.1); }
.verdict-panel.trap #verdictValue { color: var(--sell-red); }
.verdict-panel.trap .verdict-score-ring { border-color: var(--sell-red); box-shadow: 0 0 10px var(--sell-red); }

/* Layer Bars */
.verdict-layers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.layer-bar {
    display: grid;
    grid-template-columns: 100px 1fr 50px;
    align-items: center;
    gap: 15px;
}

.layer-name {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 600;
}

.bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.layer-score {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-main);
    text-align: right;
}

/* Verdict Stats */
.verdict-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.vstat {
    background: rgba(255, 255, 255, 0.02);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vstat label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
}

.vstat span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
}

#vPumpPct.up { color: var(--buy-green); }
#vPumpPct.down { color: var(--sell-red); }
#vBidWall.up { color: var(--buy-green); }
#vBidWall.down { color: var(--sell-red); }

/* Predator Footprint Section */
.footprint-section {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ohlc-header span {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-dim);
}

.canvas-container {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

#footprintCanvas {
    width: 100%;
    height: 100%;
}

.footprint-legend {
    display: flex;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

.footprint-legend span {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
}

.btn-audio {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-audio.active {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 10px var(--accent);
    border-color: var(--accent);
}

.mtf-metrics {
    display: flex;
    gap: 15px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--glass-border);
}

.mtf-meter {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin: 4px 0;
}

.meter-fill {
    height: 100%;
    width: 50%;
    transform: translateX(0%);
    background: var(--text-dim);
    transition: all 0.3s;
}

.mtf-val {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.meter-fill.up { background: var(--buy-green); }
.meter-fill.down { background: var(--sell-red); }

/* Magnet Glow */
.magnet-band {
    pointer-events: none;
    position: absolute;
    width: 100%;
    height: 1px;
    box-shadow: 0 0 15px 2px rgba(255, 255, 255, 0.2);
    z-index: 5;
}
