@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

:root {
    --neon-cyan: #00f0ff;
    --neon-pink: #ff0055;
    --matrix-green: #00ff66;
    --obsidian-dark: #03060b;
    --panel-glow: rgba(0, 240, 255, 0.03);
    --panel-solid: rgba(5, 10, 20, 0.85);
    --border-laser: rgba(0, 240, 255, 0.25);
    
    --font-cyber: 'Orbitron', sans-serif;
    --font-terminal: 'Share Tech Mono', monospace;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--obsidian-dark);
    color: #e2e8f0;
    font-family: var(--font-terminal);
    overflow: hidden;
}

/* REAL-TIME ENGINE GRAPHICS ACCELERATION BACKGROUND */
#webgpu-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* HIGH-TECH HOLOGRAM OVERLAY GRID LINES */
.hologram-scanline {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%), 
                linear-gradient(90deg, rgba(0, 240, 255, 0.03), rgba(255, 0, 85, 0.01), rgba(0, 240, 255, 0.03));
    background-size: 100% 4px, 6px 100%;
    z-index: 10;
    pointer-events: none;
}

#hud-workspace {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
    display: grid;
    grid-template-columns: 460px 320px 1fr;
    gap: 20px;
}

/* CORE HUD CONTAINER PATTERNS */
.hud-node {
    background: var(--panel-solid);
    border: 1px solid var(--border-laser);
    box-shadow: 0 0 25px var(--panel-glow), inset 0 0 15px rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.hud-node::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink), transparent);
}

/* CHOPPED GLITCH TYPOGRAPHY HEADERS */
.node-glitch-header {
    font-family: var(--font-cyber);
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.system-status-pill {
    align-self: flex-start;
    font-size: 0.7rem;
    background: rgba(0, 255, 102, 0.08);
    border: 1px solid var(--matrix-green);
    color: var(--matrix-green);
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* HIGH-TECH SELECTION CHIPS MATRIX */
.matrix-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.matrix-chip {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 12px;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.matrix-chip:hover {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 85, 0.03);
}

.matrix-chip.active {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2), inset 0 0 8px rgba(0, 240, 255, 0.1);
}

.matrix-tag {
    font-family: var(--font-cyber);
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1px;
}

.matrix-chip.active .matrix-tag {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.matrix-status-bar {
    display: flex;
    gap: 3px;
}

.matrix-status-bar .block {
    width: 6px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.matrix-status-bar .block.active {
    background: var(--neon-cyan);
    box-shadow: 0 0 4px var(--neon-cyan);
}

.matrix-chip.active .matrix-status-bar .block:first-child {
    background: var(--neon-pink);
    box-shadow: 0 0 4px var(--neon-pink);
}

/* SECURE TERMINAL TEXTAREA ACCELERATOR */
.terminal-input-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9);
    margin-bottom: 16px;
}

textarea {
    width: 100%;
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-terminal);
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 16px;
    box-sizing: border-box;
    resize: none;
}

.terminal-footer-tray {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(0, 240, 255, 0.03);
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    font-size: 0.7rem;
    color: #64748b;
}

/* HIGH-INTENSITY NEON GLOW EXECUTION TRIGGER */
.quantum-execute-btn {
    position: relative;
    background: transparent;
    border: 1px solid var(--neon-pink);
    padding: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.quantum-execute-btn:hover {
    background: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.6);
}

.btn-text-layer {
    font-family: var(--font-cyber);
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

/* MIDDLE STREAM PANELS */
.live-stream-container {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.1);
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-row {
    font-size: 0.75rem;
    line-height: 1.4;
    word-break: break-all;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 6px;
}

.log-row.sys-msg { color: #64748b; }
.log-row.asset-ready { color: var(--neon-cyan); }
.log-row.agent-dispatch { color: var(--neon-pink); }
.log-row.veritas-pass { color: var(--matrix-green); }

/* MODULE 03 DISPLAY CANVASES */
.matrix-tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.matrix-tab {
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    font-family: var(--font-cyber);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 10px 16px;
    cursor: pointer;
    flex-grow: 1;
    text-align: center;
}

.matrix-tab.active {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.25);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.matrix-content-viewport {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 240, 255, 0.1);
    padding: 24px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.matrix-pane { display: none; }
.matrix-pane.pane-active { display: block; }

.static-prompt-msg {
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 40px;
}

/* COMPILED REAL-TIME STRUCTURAL CARDS */
.sintesis-output-block h3 {
    font-family: var(--font-cyber);
    font-size: 1.1rem;
    color: #ffffff;
    margin: 0 0 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
}

.sintesis-output-block p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.forensic-audit-card {
    border: 1px dashed rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.01);
    padding: 20px;
}

.audit-meta-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    margin-bottom: 14px;
}

.raw-citation-trace {
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.5;
    background: rgba(0,0,0,0.5);
    padding: 12px;
    border-left: 2px solid var(--neon-pink);
    margin-bottom: 16px;
}

.crypto-seal-signature {
    font-size: 0.7rem;
    color: var(--matrix-green);
    word-break: break-all;
    background: rgba(0, 255, 102, 0.05);
    padding: 8px;
    border: 1px solid rgba(0, 255, 102, 0.2);
}

/* HARD GATED HUMAN INTERCEPT TRIGGER */
.hitl-signature-gate {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gate-status-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: #64748b;
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    background: #64748b;
    border-radius: 50%;
}

.gate-trigger-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    padding: 10px 16px;
    font-family: var(--font-cyber);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: not-allowed;
}

/* UNLOCKED SYSTEM STATE CHANGES */
.hitl-signature-gate.passed {
    border-color: var(--matrix-green);
    background: rgba(0, 255, 102, 0.02);
}

.hitl-signature-gate.passed .pulse-indicator {
    background: var(--matrix-green);
    box-shadow: 0 0 8px var(--matrix-green);
    animation: beaconPulse 1s infinite alternate;
}

@keyframes beaconPulse {
    from { transform: scale(1); opacity: 0.5; }
    to { transform: scale(1.4); opacity: 1; }
}

.hitl-signature-gate.passed .gate-status-container {
    color: var(--matrix-green);
}

.hitl-signature-gate.passed .gate-trigger-btn {
    background: var(--matrix-green);
    border-color: var(--matrix-green);
    color: var(--obsidian-dark);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
}