
/*
   .-.
  (o o)  < beware
   |=|
  __|__
 //.=|=.\\
 \\(_=_)//
  (:| |:)
   || ||
   () ()
   || ||
   || ||
  ==' '==
*/








:root {
    --bg: #020503;
    --bg-soft: #050a08;
    --line: #1a3a2f;
    --green: #00ff9c;
    --green-glow: rgba(0, 255, 156, 0.4);
    --green-bright: #64ffda;
    --red: #ff3860;
    --text: #a0f0d0;
    --dim-green: #1e4d3d; /* Ny dämpad färg för etiketter */
    --mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { height: 100vh; background: var(--bg); color: var(--text); font-family: var(--mono); overflow: hidden; position: relative; }


body::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.15) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    z-index: 10; background-size: 100% 2px, 3px 100%; pointer-events: none;
}

.terminal { display: flex; flex-direction: column; height: 100vh; padding: 12px; position: relative; z-index: 1; }
.topbar { display: flex; justify-content: space-between; padding: 10px 15px; border: 1px solid var(--line); background: var(--bg-soft); margin-bottom: 10px; font-size: 11px; color: var(--green); }

.grid { display: grid; grid-template-columns: 1fr 340px; gap: 10px; flex: 1; min-height: 0; }
.console { border: 1px solid var(--line); padding: 25px; background: rgba(0,0,0,0.8); overflow-y: auto; position: relative; }

.term { display: none; }
.term.show { display: block; }

.term-input-line { display: flex; align-items: center; width: 100%; }
.ps1 { color: var(--green); font-weight: bold; margin-right: 8px; white-space: nowrap; text-shadow: 0 0 5px var(--green-glow); }
.input-wrapper { position: relative; display: flex; flex: 1; align-items: center; }

#cmdline {
    background: transparent; border: none; color: var(--green-bright); font-family: var(--mono);
    font-size: 16px; width: 100%; outline: none; caret-color: transparent; z-index: 2;
    text-shadow: 0 0 8px var(--green-glow);
}

.cursor {
    position: absolute; left: 0; width: 9px; height: 18px; background: var(--green);
    box-shadow: 0 0 8px var(--green); animation: blink 1s step-end infinite; z-index: 1;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.rec-blink { color: var(--red); font-weight: bold; animation: rec-fade 1s infinite; margin-right: 5px; }
@keyframes rec-fade { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* HELA SKÄRMEN BLINKAR RÖTT */
.screen-alarm {
    animation: screenFlash 0.25s infinite alternate;
}

@keyframes screenFlash {
    from { background-color: rgba(120, 0, 0, 0.2); }
    to   { background-color: rgba(255, 0, 0, 0.35); }
}
	


/* RÖD BLINK + GLITCH FÖR VIDEON */
.video-alert {
    position: relative;
    animation: videoFlash 0.25s infinite alternate;
    filter: contrast(1.4) saturate(2);
}

@keyframes videoFlash {
    from { filter: hue-rotate(0deg) brightness(0.7) saturate(2); }
    to   { filter: hue-rotate(-40deg) brightness(1.4) saturate(3); }
}

/* GLITCH OVERLAY */
.video-glitch::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        rgba(255,0,0,0.15) 0px,
        rgba(255,0,0,0.15) 2px,
        rgba(0,0,0,0) 3px
    );
    mix-blend-mode: screen;
    animation: glitchMove 0.15s infinite;
    pointer-events: none;
}

@keyframes glitchMove {
    0%   { transform: translateY(0px); opacity: 0.4; }
    50%  { transform: translateY(-3px); opacity: 0.7; }
    100% { transform: translateY(2px); opacity: 0.4; }
}






/* Röd blink */
.alarm {
    animation: alarmFlash 0.2s infinite alternate;
}

@keyframes alarmFlash {
    from { background-color: #300; }
    to   { background-color: #600; }
}

/* Skakning */
.shake {
    animation: shakeAnim 0.15s infinite;
}

@keyframes shakeAnim {
    0%   { transform: translate(0px, 0px); }
    25%  { transform: translate(2px, -2px); }
    50%  { transform: translate(-2px, 2px); }
    75%  { transform: translate(2px, 2px); }
    100% { transform: translate(0px, 0px); }
}


video {
    width: 100%; height: 100%; object-fit: cover;
    filter: sepia(1) hue-rotate(90deg) brightness(1.1) contrast(1.3);
    mix-blend-mode: screen;
}

.side { border: 1px solid var(--line); padding: 15px; background: var(--bg-soft); }
.feed-window { border: 1px solid var(--line); aspect-ratio: 4/3; overflow: hidden; background: #000; margin-bottom: 15px; }


.telemetry dt { color: var(--dim-green); font-size: 9px; text-transform: uppercase; margin-top: 12px; letter-spacing: 1px; }
.telemetry dd { color: var(--green-bright); font-size: 13px; text-shadow: 0 0 5px var(--green-glow); }

.mini-bar { height: 4px; background: rgba(0,255,156,0.05); border: 1px solid #143028; flex: 1; margin: 0 10px; }
.bar-fill { height: 100%; background: var(--green); transition: width 0.4s; }
.stats-grid { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 5px; }

.ok { color: var(--green); }
.warn { color: #ffb000; }
.err { color:  #ffb0000; }
.dim { color: #3a6b5a; }	
.auth { color: #FF0000; }	
.firewall { color: #B600F7; }   
.alert { color: #ff0000; }   
.sys { color: var(--green-bright); font-weight: bold; }

.statusbar { display: flex; padding: 8px 15px; border: 1px solid var(--line); font-size: 10px; color: #2a4b3f; }

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .side { order: -1; display: flex; flex-direction: row; gap: 15px; align-items: center; }
    .feed-window { width: 100px; margin-bottom: 0; }
    .telemetry { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
    .console { padding-bottom: 100px; }
}