﻿/* style.css */

/* ==========================================================================
   BASE SYSTEM & HEADER
   ========================================================================== */

body {
    /* Deep terminal-style background */
    background-color: #12151c;
    /* Default text color */
    color: #e2e8f0;
    /* The industry-standard terminal font stack */
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 20px;
    /* Keeps the layout centered and full-screen */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-box {
    display: flex; 
    align-items: center; 
    gap: 50px; 
    border: 2px solid #ec4899;
    padding: 6px 16px;
    background-color: rgba(22, 22, 26, 0.3);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.3); 
}

.logo-text {
    color: #00f0ff;
    font-size: 1.6rem;
    letter-spacing: 1px;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.logo-bracket {
    color: #ff007f;
    font-weight: bold;
    text-shadow: 0 0 12px rgba(255, 0, 127, 0.4);
}

.logo-mascot {
    font-family: 'Courier New', Courier, monospace;
    color: #ff007f;
    font-size: 1.6rem;
    opacity: 0.8;
    text-shadow: 0 0 12px rgba(255, 0, 127, 0.4);
    margin-left: 25px;
}

.terminal-signature {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    letter-spacing: 1px;
    margin: 20px 0;
    opacity: 0.85;
}

.terminal-title {
    color: #00f0ff;
    font-size: 1.5rem;
    margin-top: 0px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.4); 
}

/* ==========================================================================
   MAIN TERMINAL 3-COLUMN GRID
   ========================================================================== */

#main-terminal-area {
    display: grid;
    /* Keeps your 320px / 800px / 320px structure */
    grid-template-columns: 320px 800px 320px; 
    justify-content: center;
    
    /* PUSHES THE PANELS FURTHER AWAY: Increased from 20px to 60px */
    gap: 60px; 
    
    width: 100%;
    margin: 0 auto;
    align-items: start;
    
    /* STOPS THE SHRINKING: Prevents the site from squishing on small screens */
    min-width: 1480px; 
}

/* ==========================================================================
   CENTER CONSOLE: LOADER & TERMINAL STREAM
   ========================================================================== */

.loading-container {
    width: 800px;
    max-width: 900px; 
    margin: 0px auto; 
    padding: 15px 20px;
    background-color: rgba(22, 22, 26, 0.5);
    border-left: 4px solid #00FF66; 
    box-shadow: 2px 0 10px rgba(0, 255, 102, 0.1); 
}

.loading-text {
    color: #00f0ff;
    font-size: 0.8rem;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.progress-bar-bg {
    flex-shrink: 0;
    width: 200px; 
    height: 12px;
    background-color: rgba(22, 22, 26, 0.8);
    border: 1px solid #00FF66;
    border-radius: 4px; 
    overflow: hidden; 
    margin-right: 15px;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
}

.progress-bar-fill {
    height: 100%;
    width: 0%; 
    background-color: #00FF66;
    box-shadow: 0 0 10px #00FF66; 
    border-radius: 2px; 
}

.progress-bar-fill.running {
    width: 100%;
}

.percentage-text {
    color: #00FF66;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 0.8rem;
    min-width: 45px; 
    text-align: right;
    text-shadow: 0 0 8px #00FF66;
}

.progress-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    width: 100%;
    white-space: nowrap; 
}

/* --- SYSTEM INFO DISPLAY CONTROL --- */
.system-info {
    display: none; 
}

.system-info.visible {
    display: block; 
}

.system-info p {
    font-size: 0.8rem;
    margin: 4px 0;
    color: #e2e8f0;
    text-shadow: 0 0 12px rgba(226, 232, 240, 0.4);
}

.system-info p:first-child {
    color: #00FF66;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.8px;
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.5);
}

.sys-label { 
    color: #ff007f;
    font-weight: bold;
    text-shadow: 0 0 12px rgba(255, 0, 127, 0.4);
}

.sys-value {
    color: #e2e8f0;
    text-shadow: 0 0 12px rgba(226, 232, 240, 0.4);
}

/* --- RETRO YELLOW TERMINAL CURSOR --- */
.system-info p.typing::after {
    content: "█"; 
    color: #fcee0a; 
    margin-left: 4px;
    display: inline-block;
    vertical-align: bottom;
    text-shadow: 0 0 4px #fcee0a, 
                 0 0 12px rgba(252, 238, 10, 0.8), 
                 0 0 25px rgba(252, 238, 10, 0.4); 
}

.system-info p.typing.idle::after {
    animation: cursorBlink 0.6s steps(2, start) infinite;
}

@keyframes cursorBlink {
    to { opacity: 0; }
}

/* --- TERMINAL INPUT CONSOLE --- */
.command-line {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 5px;
    width: 100%;
    position: relative;
}

.system-info.input-ready .command-line {
    display: flex;
}

.command-line .prompt {
    color: #ec4899;
    font-weight: bold;
    font-size: 0.8rem;
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(255, 0, 127, 0.4);
}

.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: #e2e8f0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    flex-grow: 1;
    padding: 0;
    margin: 0;
    caret-color: transparent; 
    text-shadow: 0 0 12px rgba(226, 232, 240, 0.4);
}

.command-line::after {
    content: "█";
    color: #fcee0a;
    font-size: 0.85rem;
    position: absolute;
    left: var(--caret-left, 165px);
    pointer-events: none;
    text-shadow: 0 0 4px #fcee0a,
                 0 0 12px rgba(252, 238, 10, 0.8),
                 0 0 20px rgba(252, 238, 10, 0.5);
}

.command-line.idle::after {
    animation: terminalCaretBlink 1.0s infinite;
}

@keyframes terminalCaretBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ==========================================================================
   SIDE PANEL DECK & HARDWARE POP-UP ENGINE
   ========================================================================== */

/* This forces both sides to be 320px and identical */
.left-cyan-frame, .right-cyan-frame {
    width: 320px;
    height: 180px;
    background-color: rgba(6, 182, 212, 0.03); 
    border: 2px solid #00f0ff; 
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25),
                inset 0 0 8px rgba(0, 240, 255, 0.1);
    box-sizing: border-box;
    position: relative;
}

/* Ensure both container decks match the frame width */
.lower-interface-deck, .right-interface-deck {
    display: none; 
    width: 320px;
    box-sizing: border-box;
}

/* Activation for the left scan panel */
.lower-interface-deck.active {
    display: block;
    animation: slideInLeft 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ACTIVATION FOR RIGHT PANEL (Added) */
.right-interface-deck.active {
    display: block;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-40px) scale(0.9); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* ==========================================================================
   CYAN FRAME PHASE 1: RADAR SWEEP
   ========================================================================== */

.scan-matrix-output {
    padding: 14px;
    font-family: 'Courier New', Courier, monospace;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.scan-status-text {
    margin: 0;
    font-size: 0.70rem;
    color: #00f0ff;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
    letter-spacing: 1px;
    animation: textPulse 1.5s infinite ease-in-out;
}

.scan-ping-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent);
    margin-top: 8px;
    box-shadow: 0 0 8px #00f0ff;
    position: relative;
    animation: radarSweep 1.5s infinite linear;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes radarSweep {
    0% { transform: translateY(0px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(130px); opacity: 0; }
}

/* ==========================================================================
   CYAN FRAME PHASE 2: TELEMETRY UI ENGINE
   ========================================================================== */

.scan-results-ui {
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
    display: none; 
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.scan-results-ui.online {
    display: flex;
    opacity: 1;
}

.target-reticle {
    width: 65px;
    height: 65px;
    position: relative;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reticle-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px dashed #00f0ff;
    border-radius: 50%;
    animation: spinRing 6s linear infinite;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.reticle-crosshair {
    width: 70%;
    height: 70%;
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 50%;
    position: relative;
    animation: pulseReticle 2s infinite alternate;
}

.reticle-crosshair::before, .reticle-crosshair::after {
    content: "";
    position: absolute;
    background: #00f0ff;
    box-shadow: 0 0 5px #00f0ff;
}
.reticle-crosshair::before { width: 100%; height: 1px; top: 50%; left: 0; transform: translateY(-50%); }
.reticle-crosshair::after { height: 100%; width: 1px; left: 50%; top: 0; transform: translateX(-50%); }

.telemetry-data {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.data-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    color: #00f0ff;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
}

.data-row .bar-bg {
    flex-grow: 1;
    height: 6px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    position: relative;
}

.data-row .bar-fill {
    height: 100%;
    background: #00f0ff;
    box-shadow: 0 0 6px #00f0ff;
    width: 0%; 
}

.scan-results-ui.online .sys-bar { animation: loadBar 1s ease-out forwards; width: 85%; }
.scan-results-ui.online .net-bar { animation: loadBar 1.5s ease-out forwards; width: 62%; }
.scan-results-ui.online .mem-bar { animation: loadBar 0.8s ease-out forwards; width: 94%; }

.hex-stream {
    margin: 4px 0 0 0;
    font-size: 0.75rem;
    color: #fcee0a; 
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(252, 238, 10, 0.6);
}

@keyframes spinRing { 100% { transform: rotate(360deg); } }
@keyframes pulseReticle { 100% { transform: scale(0.85); opacity: 0.7; } }
@keyframes loadBar { 0% { width: 0%; } }


/* --- WARNING STATE ENGINE --- */
.left-cyan-frame.warning {
    border-color: #ff003c;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.4),
                inset 0 0 10px rgba(255, 0, 60, 0.2);
}

.left-cyan-frame.warning .reticle-ring {
    border-color: #ff003c;
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

.left-cyan-frame.warning .reticle-crosshair {
    border-color: #ff003c;
    animation: blinkWarning 0.2s infinite alternate;
}

.left-cyan-frame.warning .reticle-crosshair::before, 
.left-cyan-frame.warning .reticle-crosshair::after {
    background: #ff003c;
    box-shadow: 0 0 8px #ff003c;
}

/* Blink animation for the error state */
@keyframes blinkWarning {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* --- RED PULSE ERROR ANIMATION --- */
.left-cyan-frame.error-pulse {
    animation: glitch-red-pulse 0.5s ease-in-out 4; /* 4 iterations x 0.5s = exactly 2s */
}

@keyframes glitch-red-pulse {
    0%, 100% { 
        border-color: #00f0ff; 
        box-shadow: 0 0 12px rgba(0, 240, 255, 0.25), inset 0 0 8px rgba(0, 240, 255, 0.1); 
    }
    50% { 
        border-color: #ff003c; /* Hostile Red */
        box-shadow: 0 0 20px rgba(255, 0, 60, 0.8), inset 0 0 15px rgba(255, 0, 60, 0.5);
    }
}

/* Force the internal reticle to turn red during the pulse */
.left-cyan-frame.error-pulse .reticle-ring,
.left-cyan-frame.error-pulse .reticle-crosshair {
    animation-play-state: paused; /* Pause normal spin to emphasize the glitch */
    border-color: #ff003c !important;
}

/* --- NEW: COMMAND LIST STYLING --- */
#data-display-area { padding: 15px; color: #00f0ff; font-size: 0.75rem; height: 100%; }
.command-row { display: flex; align-items: center; margin: 4px 0; }
.cmd-name { color: #00f0ff; width: 80px; font-weight: bold; font-size: 0.85rem; }
.cmd-desc { color: #e2e8f0; font-size: 0.85rem; }

/* ==========================================================================
   MONITOR FRAME
   ========================================================================== */

/* Update: Hide monitor by default */
.monitor-container {
    width: 900px;  /* Force it to match the width of your center console */
    max-width: 90%; /* On smaller screens, keep it responsive */
    margin: 20px auto;
    position: relative;
    display: none; 
}

/* Reveal monitor when active */
.monitor-container.active {
    display: block;
    animation: fadeIn 0.5s forwards;
}

.monitor-frame {
    width: 100%;
    height: 450px;
    background-color: rgba(6, 182, 212, 0.05);
    border: 4px solid #00f0ff;
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.2);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.monitor-content {
    /* KEEP LAYOUT PROPERTIES HERE */
    padding: 30px;
    flex: 1; 
    overflow-y: auto; 
    scrollbar-width: thin;
}

.monitor-placeholder {
    opacity: 0.5;
    text-align: center;
    margin-top: 100px;
}

/* --- CUSTOM CYBERPUNK SCROLLBAR --- */

/* Target the scrolling content directly */
#main-monitor .monitor-content::-webkit-scrollbar {
    width: 10px;
}

#main-monitor .monitor-content::-webkit-scrollbar-track {
    background: rgba(6, 182, 212, 0.05);
    border-left: 1px solid rgba(0, 240, 255, 0.1);
}

#main-monitor .monitor-content::-webkit-scrollbar-thumb {
    background: #00f0ff;
    /* Box shadows on scrollbars can be finicky in some browsers, but this keeps your glow */
    box-shadow: 0 0 10px #00f0ff, 0 0 5px #00f0ff;
    border: 1px solid #12151c;
    border-radius: 2px;
}

#main-monitor .monitor-content::-webkit-scrollbar-thumb:hover {
    background: #ffffff;
    box-shadow: 0 0 15px #ffffff, 0 0 10px #00f0ff;
}

/* For Firefox compatibility (Firefox doesn't use webkit-scrollbar) */
#main-monitor .monitor-content {
    scrollbar-color: #00f0ff rgba(6, 182, 212, 0.05);
    scrollbar-width: thin;
}

/* ==========================================================================
   TIMER
   ========================================================================== */

/* --- STATUS BAR (The dock for your timer) --- */
.system-status-bar {
    flex: 0 0 auto; 
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 2px solid #00f0ff;
    color: #ec4899;
    text-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-align: right;
}

/* ==========================================================================
   MONITOR FRAME: SINGLE SOURCE OF TRUTH
   ========================================================================== */

#main-monitor .monitor-content {
    padding: 30px;
    color: #e2e8f0 !important; /* Off-white base */
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;


/* --- THE NEW GLOW --- */
    /* This uses the RGB equivalent of your #e2e8f0 color */
    text-shadow: 0 0 12px rgba(226, 232, 240, 0.4) !important;
}

#main-monitor .monitor-content strong {
    color: #ff007f !important; /* Neon Pink headers */
    font-weight: bold !important;
    display: block;
    margin-bottom: 0px;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 0, 127, 0.5) !important;
}

#main-monitor .monitor-content li {
    border-left: 2px solid #00f0ff !important;
    padding-left: 10px;
    color: #e2e8f0 !important;
}

/* --- MONITOR CARET --- */
.monitor-caret {
    /* !important forces it to stay yellow even when typing inside pink headers */
    color: #fcee0a !important; 
    margin-left: 2px;
    font-size: 0.9rem;
    display: inline-block;
    vertical-align: bottom;
    text-shadow: 0 0 4px #fcee0a, 
                 0 0 12px rgba(252, 238, 10, 0.8), 
                 0 0 20px rgba(252, 238, 10, 0.5) !important;
    animation: terminalCaretBlink 1s infinite; 
}
