:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --border-color: #1a1a1a;
    --accent-color: #888888;
}

#brand-logo {
    height: 32px;
    width: auto;
    border-radius: 4px;
    margin-right: 2px;
    object-fit: contain;
    display: block;
    filter: none !important;
    background-color: transparent !important;
    color: initial !important;
    border: none !important;
}

.tool-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    position: relative;
}

.tool-btn:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.tool-btn.active {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100dvh; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
    position: relative; 
    z-index: 1000;
    background-color: var(--bg-color);
}

.custom-dropdown {
    position: relative;
    cursor: pointer;
    user-select: none;
    width: max-content;
}

.dropdown-selected {
    border: 1px solid var(--border-color);
    padding: 5px 15px;
    background: var(--bg-color);
    white-space: nowrap;
    font-size: 12px;
}

.dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    width: max-content;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    list-style: none;
    z-index: 2000;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-options::-webkit-scrollbar { width: 6px; }
.dropdown-options::-webkit-scrollbar-track { background: var(--bg-color); }
.dropdown-options::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.dropdown-options::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }

.custom-dropdown.active .dropdown-options { display: block; }

.dropdown-options li {
    padding: 8px 15px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    font-size: 12px;
}

.dropdown-options li:hover { background: var(--text-color); color: var(--bg-color); }

.api-status { font-size: 11px; color: #00b894; font-weight: bold; }

.chart-container {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

canvas {
    display: block;
    position: absolute; 
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.spinner-container {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-color);
    display: flex; justify-content: center; align-items: center;
    z-index: 50;
}

.spinner-container.hidden { display: none; }

.spinner {
    width: 35px; height: 35px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--text-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notification-trigger-wrapper { position: relative; margin-right: auto; }

.badge {
    position: absolute; top: -4px; right: -4px;
    background: #d63031; color: #ffffff;
    font-size: 9px; font-weight: bold;
    padding: 2px 5px; border-radius: 50%;
    border: 1px solid var(--bg-color);
}

.badge.hidden { display: none; }

.notif-widget {
    position: absolute; top: 60px; left: 15px;
    width: 320px; max-height: 450px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex; flex-direction: column;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
}

#notification-widget {
    font-family: 'Courier New', monospace; /* Institutional terminal look */
    border: 1px solid #333;
    background: #0a0a0a;
}

.notif-widget.hidden { display: none; }

.notif-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-bottom: 1px solid var(--border-color);
}

.notif-header h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #888888; }

#notif-clear-all {
    background: transparent; border: none; color: #666666;
    font-size: 10px; cursor: pointer;
}

#notif-clear-all:hover { color: var(--text-color); }

.notif-feed { overflow-y: auto; flex: 1; padding: 5px 0; }

.notif-empty-state { padding: 20px; text-align: center; color: #444444; font-size: 11px; }

.notif-item {
    padding: 10px 14px;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notif-meta {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    color: #666;
    letter-spacing: 0.5px;
}

.notif-source { font-weight: bold; text-transform: uppercase; }

.notif-time { color: #555555; }

.teleport-hint {
    font-size: 7px;
    color: #333;
    text-transform: uppercase;
}

.notif-msg {
    font-size: 11px;
    color: #e0e0e0;
}

.notif-item.high .notif-source { color: #d63031; }
.notif-item.medium .notif-source { color: #fdcb6e; }
.notif-item.low .notif-source { color: #00b894; }

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

/* Phase 4: Signal Detection Alerts */
.notif-item.signal-gold {
    border-left: 3px solid #ffcc00;
    background: rgba(255, 204, 0, 0.05);
}

.notif-item.signal-gold .notif-source {
    color: #ffd700;
    font-weight: bold;
}

.notif-item.signal-gold .notif-msg {
    color: #fffacd; /* Lighter yellow for readability */
}
