/* ========================================================================
    NEXUS NEURAL DESIGN SYSTEM v8.5.1
    ========================================================================
    AUTHOR: Nexus Architecture
    PURPOSE: Global Interface Styling
    LINE_COUNT_TARGET: 250+
    ========================================================================
*/

/* [ROOT_VARIABLES_START] */
:root {
    /* Color Palette - Core Neural Dark */
    --bg-black: #030305;
    --bg-darker: #050508;
    --bg-panel: rgba(10, 10, 15, 0.85);
    --bg-glass: rgba(15, 15, 25, 0.7);
    
    /* Accents - System Colors */
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.4);
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-red: #ef4444;
    
    /* Neutral - Typography & Borders */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-dim: #475569;
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-active: rgba(255, 255, 255, 0.15);
    
    /* Functional - Dynamics */
    --glass-blur: blur(25px);
    --transition-standard: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-main: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
/* [ROOT_VARIABLES_END] */

/* [SYSTEM_RESET_START] */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    background-color: var(--bg-black);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
textarea { font-family: inherit; }

.no-select {
    user-select: none;
    -webkit-user-select: none;
}
/* [SYSTEM_RESET_END] */

/* [BACKGROUND_ARCHITECTURE_START] */
.background-engine {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at center, #0a0a14 0%, var(--bg-black) 100%);
    overflow: hidden;
}

.glow-orb-one {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    filter: blur(80px);
    animation: orbFloat 20s infinite alternate;
}

.glow-orb-two {
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    animation: orbFloat 25s infinite alternate-reverse;
}

.dynamic-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--border-glass) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

@keyframes orbFloat {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(5%, 5%) scale(1.1); }
}
/* [BACKGROUND_ARCHITECTURE_END] */

/* [HUD_STYLING_START] */
.interface-hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.hud-group {
    display: flex;
    flex-direction: column;
}

.hud-group.right { align-items: flex-end; }

.hud-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.hud-data {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-blue);
}

.hud-data.pulse {
    animation: textPulse 2s infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px var(--accent-blue-glow); }
    50% { opacity: 0.6; text-shadow: none; }
}
/* [HUD_STYLING_END] */

/* [APP_SHELL_LAYOUT_START] */
.app-shell {
    height: 100vh;
    padding: 60px 40px 40px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.central-module {
    width: 100%;
    max-width: 1550px;
    height: 100%;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    display: flex;
    overflow: hidden;
    box-shadow: var(--shadow-main);
}
/* [APP_SHELL_LAYOUT_END] */

/* [SIDEBAR_STYLING_START] */
.side-panel {
    width: 320px;
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    padding: 40px;
}

.brand-header {
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.brand-info h2 { font-size: 18px; font-weight: 700; color: white; letter-spacing: -0.5px; }
.brand-info span { font-size: 11px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; }

.navigation-stack { flex: 1; }

.stack-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin: 30px 0 15px 0;
    font-weight: 700;
}

.automation-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auto-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 14px;
    border-radius: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-standard);
    font-size: 13px;
    font-weight: 600;
    width: 100%;
}

.auto-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--accent-blue);
    color: white;
    transform: translateX(5px);
}

.resource-block { margin-bottom: 25px; }

.resource-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.resource-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.resource-fill {
    height: 100%;
    background: var(--accent-blue);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-footer {
    padding-top: 30px;
    border-top: 1px solid var(--border-glass);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--accent-emerald);
    font-weight: 700;
    margin-bottom: 10px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald);
}

.node-id, .node-encryption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 4px;
}
/* [SIDEBAR_STYLING_END] */

/* [WORKSPACE_STYLING_START] */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.workspace-top {
    padding: 40px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-content h1 {
    font-size: 24px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.pathway {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--accent-blue);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.session-timer {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid var(--border-glass);
}

.timer-group { display: flex; flex-direction: column; align-items: flex-end; }
.timer-label { font-size: 9px; text-transform: uppercase; color: var(--text-dim); letter-spacing: 1px; font-weight: 700; }
#sessionDuration { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 800; color: white; }

.stream-buffer {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.stream-buffer::-webkit-scrollbar { width: 4px; }
.stream-buffer::-webkit-scrollbar-track { background: transparent; }
.stream-buffer::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 10px; }

.message-node { margin-bottom: 30px; animation: nodeAppear 0.4s var(--transition-smooth); }
.node-content { padding: 25px; border-radius: 20px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-glass); }

@keyframes nodeAppear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.orchestrator-base {
    padding: 40px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-glass);
}

.priority-selection-wrapper { margin-bottom: 30px; }
.priority-label { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; margin-bottom: 12px; }

.priority-toggle-container {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: 100px;
    border: 1px solid var(--border-glass);
    width: fit-content;
    position: relative;
}

.priority-active-glow {
    position: absolute;
    top: 6px;
    left: 6px;
    height: calc(100% - 12px);
    background: var(--accent-blue);
    border-radius: 100px;
    opacity: 0.15;
    box-shadow: 0 0 15px var(--accent-blue-glow);
    transition: var(--transition-smooth);
}

.priority-node {
    padding: 8px 24px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    z-index: 2;
    transition: var(--transition-standard);
}

.priority-node.active { color: white; }

.input-field-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.input-wrapper {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 18px;
    border: 1px solid var(--border-glass);
    padding: 18px 24px;
    transition: var(--transition-standard);
}

.input-wrapper:focus-within { border-color: var(--accent-blue); background: rgba(0, 0, 0, 0.6); }

#mainInput {
    width: 100%;
    background: none;
    border: none;
    color: white;
    font-size: 15px;
    outline: none;
    resize: none;
}

.main-action {
    background: var(--accent-blue);
    border: none;
    padding: 18px 35px;
    border-radius: 18px;
    color: white;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-standard);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

.main-action:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(59, 130, 246, 0.3); }

.footer-meta {
    margin-top: 30px;
    display: flex;
    gap: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-glass);
}

.meta-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-dim);
}
/* [WORKSPACE_STYLING_END] */