/* =========================================================================
   1. ALGEMENE RESET & CRT OMGEVING (Gedeeld)
   ========================================================================= */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000000;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Globale CRT scanline- & flikkereffecten overlay */
.crt-overlay::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05));
    z-index: 10;
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
}

/* =========================================================================
   2. HOOFDTERMINAL EMBEDDING & VENSTERS
   ========================================================================= */

/* Basis layout voor elk type terminal-venster */
.terminal-window {
    background-color: rgba(32, 32, 32, 0.95); 
    border: 2px solid #55ff55;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(85, 255, 85, 0.4);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    cursor: text;
}

/* CRT Monitor Scanline & Glow Pseudo-element per venster */
.terminal-window::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 5;
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
}

/* Specifieke afmeting voor de Gateway (index.html) */
.gateway-window {
    width: 80%;
    height: 80%;
    padding: 20px;
}

/* Gedeelde tekst-output container van de terminals */
.terminal-content {
    color: #55ff55;
    font-size: 14px;
    line-height: 1.4;
    height: 100%;
    white-space: pre-wrap;
    text-shadow: 0 0 5px rgba(85, 255, 85, 0.7);
    box-sizing: border-box;
    overflow-y: auto; 
    display: flex;
    flex-direction: column;
    scrollbar-width: none;            /* Firefox */
    -ms-overflow-style: none;         /* IE/Edge */
}

/* Webkit scrollbar verberging (Chrome, Safari, Opera) */
.terminal-content::-webkit-scrollbar {
    display: none;
    width: 0px;
    background: transparent;
}

/* =========================================================================
   3. MATRIX GRAPHICS & DASHBOARD HUB LAYOUT (solslair.html)
   ========================================================================= */

/* Het Matrix Regen Canvas op de achtergrond */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Hoofdcontainer die over de matrix-regen heen zweeft */
.hub-container {
    position: relative;
    z-index: 5;
    width: 85%;
    height: 85%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Modificatie: Als een terminal-venster IN de hub-container staat (glass-morphism) */
.hub-container .terminal-window {
    flex-grow: 1;
    background-color: rgba(70, 70, 70, 0.45); 
    box-shadow: 0 0 40px rgba(85, 255, 85, 0.3);
    padding: 25px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px); 
}

/* Modificatie: Regelafstand voor de content-balk specifiek in het dashboard */
.hub-container .terminal-content {
    line-height: 1.5;
    flex-grow: 1;
    text-shadow: 0 0 5px rgba(85, 255, 85, 0.6);
}

/* Het Zwevende Titelvenster bovenaan het dashboard */
.title-window {
    background-color: rgba(32, 32, 32, 0.95);
    border: 2px solid #55ff55;
    border-radius: 6px;
    padding: 15px 25px;
    box-shadow: 0 0 30px rgba(85, 255, 85, 0.3);
    backdrop-filter: blur(4px);
}

.title-window h1 {
    margin: 0;
    color: #55ff55;
    font-size: 22px;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(85, 255, 85, 0.8);
    white-space: nowrap;
}

/* =========================================================================
   4. INTERACTIEVE INVOERREGELS (Gedeeld)
   ========================================================================= */
.input-line {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

.prompt {
    color: #55ff55;
    white-space: nowrap;
    font-weight: bold;
}

#cmd-input, #core-input {
    background: transparent;
    border: none;
    color: #55ff55;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(85, 255, 85, 0.7);
    outline: none;
    flex-grow: 1;
    padding: 0;
    margin-left: 8px;
    caret-color: #55ff55;
}

#core-input {
    text-shadow: 0 0 5px rgba(85, 255, 85, 0.6);
}

/* =========================================================================
   5. STATUSMELDINGEN & SYSTEEMANIMATIES
   ========================================================================= */
.text-error, .text-alert {
    color: #ff3333;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.7);
}

.text-success {
    color: #55ff55;
    font-weight: bold;
}

/* CSS Klasse voor het AI Core-bypass flitseffect */
.terminal-glitch-red {
    animation: redFlash 0.4s ease-in-out 3;
}

@keyframes redFlash {
    0% { background-color: rgba(32, 32, 32, 0.95); box-shadow: 0 0 40px rgba(85, 255, 85, 0.4); }
    50% { background-color: #440000; box-shadow: 0 0 50px rgba(255, 0, 0, 0.8); border-color: #ff3333; }
    100% { background-color: rgba(32, 32, 32, 0.95); box-shadow: 0 0 40px rgba(85, 255, 85, 0.4); }
}
/* ====================================================================
   SOLSLAIR GHOST LIGHTNING GLITCH MATRIX
   ==================================================================== */

.terminal-glitch-burst {
    animation: ghostBurst 0.25s infinite alternate !important;
    position: relative;
}

/* Voegt een extra spookachtige scanline verschuiving toe tijdens zware data-syncs */
.terminal-glitch-burst::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 999;
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
}

@keyframes ghostBurst {
    0% {
        opacity: 0.95;
        transform: skewX(-0.5deg) scaleY(1);
        filter: brightness(1) contrast(1.1) sepia(0.2) hue-rotate(0deg);
        box-shadow: inset 0 0 20px rgba(255, 176, 0, 0.2);
    }
    30% {
        opacity: 1;
        transform: skewX(0.8deg) scaleY(1.01);
        filter: brightness(1.4) contrast(1.3) saturate(1.5) hue-rotate(5deg);
    }
    60% {
        opacity: 0.85;
        transform: skewX(-1.2deg) scaleY(0.99);
        filter: brightness(0.8) contrast(1) sepia(0.5) hue-rotate(-5deg);
        box-shadow: inset 0 0 40px rgba(255, 51, 51, 0.4); /* Roept het compromised rood op */
    }
    90% {
        opacity: 1;
        transform: skewX(0.3deg) scaleY(1);
        filter: brightness(1.6) contrast(1.5) saturate(1.1);
    }
    100% {
        opacity: 0.92;
        transform: skewX(-0.2deg) scaleY(1.02);
        filter: brightness(1.2) contrast(1.2);
        box-shadow: inset 0 0 15px rgba(255, 176, 0, 0.3);
    }
}

/* ====================================================================
 * GHOST ASCII KOP COLOR MORPH ENGINE
 * ==================================================================== */
.ghost-ascii-row.pulse-active {
    animation: ghostBreath 4s ease-in-out infinite;
}

@keyframes ghostBreath {
    0% {
        color: #ff3333; /* Je vertrouwde sfeervolle rood */
        text-shadow: 0 0 6px rgba(255, 51, 51, 0.6);
    }
    25% {
        color: #400c0c; /* Diep, duister wegzakkend rood */
        text-shadow: 0 0 2px rgba(64, 12, 12, 0.2);
    }
    50% {
        color: #ff3333; /* Weer terug naar rood */
        text-shadow: 0 0 6px rgba(255, 51, 51, 0.6);
    }
    75% {
        color: #ffb000; /* Magisch transformerend naar Amber! */
        text-shadow: 0 0 8px rgba(255, 176, 0, 0.7);
    }
    100% {
        color: #ff3333; /* Rustig herstellend naar de rode basislook */
        text-shadow: 0 0 6px rgba(255, 51, 51, 0.6);
    }
}