:root {
    --bg-dark: #070a12;
    --panel-bg: #0d1322;
    --panel-border: #1a2640;
    --neon-cyan: #00ffcc;
    --neon-green: #10b981;
    --neon-yellow: #ffb800;
    --neon-red: #ff3366;
    --neon-purple: #a855f7;
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
}

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

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

.hud-container {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* HEADER HUD */
.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

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

.pulse-orb {
    width: 20px;
    height: 20px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--neon-cyan);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-text h1 span {
    color: var(--neon-cyan);
    font-size: 14px;
    background: rgba(0, 255, 204, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--neon-cyan);
}

.logo-text p {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

.hud-stats {
    display: flex;
    gap: 16px;
}

.stat-card {
    background: #050811;
    border: 1px solid var(--panel-border);
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

.stat-val {
    font-size: 14px;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
}

.neon-green { color: var(--neon-green); text-shadow: 0 0 8px rgba(16,185,129,0.4); }
.neon-cyan { color: var(--neon-cyan); text-shadow: 0 0 8px rgba(0,255,204,0.4); }
.neon-yellow { color: var(--neon-yellow); text-shadow: 0 0 8px rgba(255,184,0,0.4); }
.neon-purple { color: var(--neon-purple); text-shadow: 0 0 8px rgba(168,85,247,0.4); }

/* GRID LAYOUT */
.hud-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 20px;
}

.hud-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(255,255,255,0.02);
}

.panel-header h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-live {
    font-size: 11px;
    color: var(--neon-green);
    font-family: 'Fira Code', monospace;
    font-weight: 700;
}

.panel-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* INPUT & CONTROLS */
.input-group label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.input-group textarea {
    width: 100%;
    background: #050811;
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.input-group textarea:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0,255,204,0.2);
}

.btn-neon-primary {
    width: 100%;
    margin-top: 10px;
    background: var(--neon-cyan);
    color: #000;
    font-weight: 700;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn-neon-primary:hover {
    box-shadow: 0 0 15px var(--neon-cyan);
    transform: translateY(-1px);
}

.quick-actions h3, .live-telegram-preview h3 {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-family: 'Fira Code', monospace;
}

.btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-hud {
    background: #050811;
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-hud:hover {
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
}

.telegram-box {
    background: #111827;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 14px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #93c5fd;
}

/* LIVE DAG CANVAS */
.dag-graph {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #050811;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 20px 16px;
}

.dag-node {
    background: #0d1322;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    width: 140px;
    transition: all 0.3s;
}

.dag-node.running {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 15px rgba(255,184,0,0.3);
    animation: nodePulse 1.5s infinite;
}

.dag-node.completed {
    border-color: var(--neon-green);
    background: rgba(16,185,129,0.05);
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.node-icon { font-size: 24px; margin-bottom: 6px; }
.node-title { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.node-status { font-size: 10px; font-family: 'Fira Code', monospace; color: var(--text-muted); }

.dag-arrow {
    color: var(--panel-border);
    font-size: 18px;
}

/* TERMINAL STREAM */
.terminal-container {
    background: #050811;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 320px;
}

.terminal-bar {
    display: flex;
    justify-content: space-between;
    background: #0a0f1d;
    padding: 8px 14px;
    border-bottom: 1px solid var(--panel-border);
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

.terminal-content {
    padding: 14px;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.6;
}

.log-entry { margin-bottom: 4px; }
.log-time { color: var(--text-muted); }
.log-event { color: var(--neon-cyan); font-weight: 600; }
.log-data { color: var(--text-primary); }

/* TAB BAR */
.tab-bar {
    display: flex;
    gap: 4px;
}
.tab-btn {
    background: #050811;
    border: 1px solid var(--panel-border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.tab-btn.active {
    background: rgba(0, 255, 204, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    font-weight: 700;
}

/* DAG PANEL SECTION */
.dag-panel-section {
    flex-direction: column;
    gap: 16px;
    flex: 1;
}
.terminal-full {
    flex: 1;
    height: 100%;
}

/* LOG COLOR CODING */
.log-error { color: var(--neon-red); font-weight: 600; }
.log-warn { color: var(--neon-yellow); }
.log-info { color: var(--neon-cyan); }

/* TG PLACEHOLDER */
.tg-placeholder { color: var(--text-muted); font-style: italic; }
