@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Courier+Prime:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background: #000;
    color: #00ff41;
    overflow: hidden;
    cursor: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjMDBmZjQxIi8+CjxyZWN0IHg9IjIiIHk9IjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0iIzAwMDAwMCIvPgo8cmVjdCB4PSI0IiB5PSI0IiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IiMwMGZmNDEiLz4KPC9zdmc+'), auto;
    user-select: none;
}

/* Custom retro cursor */
.terminal-area {
    cursor: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSIjMDBmZjQxIi8+CjxyZWN0IHg9IjIiIHk9IjIiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0iIzAwMDAwMCIvPgo8L3N2Zz4K'), crosshair;
}

/* Matrix Rain Background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00ff41;
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* CRT Monitor Frame */
.crt-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.1) 100%),
        linear-gradient(0deg, transparent 50%, rgba(0,255,65,0.02) 50%);
    background-size: 100% 100%, 100% 4px;
    z-index: 1000;
    pointer-events: none;
}

/* Screen curvature effect */
.crt-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 70%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

/* Phosphor glow */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    box-shadow: 
        inset 0 0 100px rgba(0,255,65,0.1),
        0 0 50px rgba(0,255,65,0.2);
    animation: flicker 0.15s infinite linear alternate;
}

@keyframes flicker {
    0% { opacity: 1; }
    98% { opacity: 1; }
    99% { opacity: 0.98; }
    100% { opacity: 1; }
}

/* Boot Sequence */
.boot-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #00ff41;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    padding: 20px;
    z-index: 9999;
    overflow-y: auto;
    display: none;
}

.boot-sequence.active {
    display: block;
}

.boot-line {
    margin-bottom: 5px;
    opacity: 0;
    animation: bootLine 0.5s forwards;
}

@keyframes bootLine {
    to { opacity: 1; }
}

/* System Messages */
.system-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 400px;
    max-width: 90%;
    z-index: 500;
    pointer-events: none;
}

.system-message {
    background: rgba(0,0,0,0.9);
    border: 1px solid #00ff41;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 10px;
    color: #00ff41;
    font-size: 12px;
    animation: slideIn 0.5s ease-out, fadeOut 0.5s ease-out 4s forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ASCII Art Display */
.ascii-art {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00ff41;
    font-family: 'Share Tech Mono', monospace;
    font-size: 8px;
    line-height: 1;
    text-align: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    white-space: pre;
}

.ascii-art.show {
    opacity: 0.3;
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Terminal Container */
.terminal {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    padding: 20px;
    padding-bottom: 60px; /* Account for status bar */
    background: rgba(0,0,0,0.95);
    border: 2px solid #00ff41;
    border-radius: 5px;
    box-shadow: 
        0 0 20px rgba(0,255,65,0.5),
        inset 0 0 20px rgba(0,255,65,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

/* Terminal Header */
.terminal-header {
    color: #00ff41;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px #00ff41;
    border-bottom: 1px solid #00ff41;
    padding-bottom: 10px;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}



/* Content Area */
.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #00ff41 #000;
    min-height: 0; /* Allow flex shrinking */
    scroll-behavior: smooth;
    height: 0; /* Force flex item to shrink */
}

.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: #000;
}

.content::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 4px;
}

/* Terminal History */
.terminal-history {
    font-size: 14px;
    line-height: 1.4;
    color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
    padding-bottom: 10px;
}

.file-section {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #00aa33;
    background: rgba(0,255,65,0.05);
}

.section-title {
    color: #ffff00;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #ffff00;
    border-bottom: 1px solid #ffff00;
    padding-bottom: 5px;
}

.data-line {
    margin: 5px 0;
    padding-left: 20px;
}

.highlight {
    color: #ffff00;
    text-shadow: 0 0 5px #ffff00;
}

.warning {
    color: #ff6600;
    text-shadow: 0 0 5px #ff6600;
}

/* Terminal Input */
.terminal-input-container {
    margin-top: 15px;
    border-top: 1px solid #00ff41;
    padding-top: 15px;
    flex-shrink: 0; /* Prevent shrinking */
    background: rgba(0,0,0,0.95); /* Match terminal background */
}

.terminal-prompt {
    color: #00ff41;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #00ff41;
}

.terminal-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #00ff41;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    outline: none;
    caret-color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
    padding: 5px 0;
}

.terminal-input::placeholder {
    color: #006622;
}

.terminal-response {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0,255,65,0.1);
    border-left: 3px solid #00ff41;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Share Tech Mono', monospace;
    line-height: 1.4;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid #00ff41;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Status Bar */
.status-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #003300;
    color: #00ff41;
    padding: 5px 15px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #00ff41;
}

.typing-indicator {
    display: none;
    color: #ffff00;
}

.typing-indicator.active {
    display: inline;
}

/* Navigation */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #00ff41;
}

.nav-tab {
    padding: 5px 15px;
    border: 1px solid #00ff41;
    background: transparent;
    color: #00ff41;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    transition: all 0.3s;
}

.nav-tab:hover {
    background: #00ff41;
    color: #000;
    text-shadow: none;
}

.nav-tab:active {
    background: #006622;
    color: #00ff41;
    text-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 15px;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .nav-tab {
        padding: 5px 10px;
        font-size: 11px;
    }

    .system-messages {
        width: 300px;
    }
}

/* Glitch Effect */
.glitch {
    animation: glitch-animation 0.5s infinite;
}

@keyframes glitch-animation {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Startup loading bar */
.startup-loading {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 20px;
    border: 2px solid #00ff41;
    background: #000;
    z-index: 10001;
    display: none;
}

.startup-loading.active {
    display: block;
}

.startup-bar {
    height: 100%;
    background: #00ff41;
    width: 0%;
    transition: width 0.3s ease;
}

/* Hidden elements until loaded */
.hidden-until-loaded {
    display: none;
}

.loaded .hidden-until-loaded {
    display: block;
}

/* Force terminal to always be visible as fallback */
.terminal.hidden-until-loaded {
    display: flex !important;
}

.status-bar.hidden-until-loaded {
    display: flex !important;
}

/* Classified button styling */
.classified-btn {
    background: linear-gradient(45deg, #ff0000, #cc0000) !important;
    color: #fff !important;
    border: 1px solid #ff0000 !important;
    text-shadow: 0 0 5px #ff0000 !important;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3) !important;
    animation: classified-pulse 2s infinite !important;
}

.classified-btn:hover {
    background: linear-gradient(45deg, #ff3333, #ff0000) !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5) !important;
}

@keyframes classified-pulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
        transform: scale(1.02);
    }
}

/* Advanced CRT effects */
.terminal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.03) 2px,
            rgba(0, 255, 65, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1001;
    animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0px); }
    100% { transform: translateY(4px); }
}

/* Security alert overlay */
.security-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0.1);
    z-index: 9998;
    pointer-events: none;
    animation: security-flash 0.5s ease-out;
}

@keyframes security-flash {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Enhanced terminal responses */
.terminal-response.classified {
    background: rgba(255, 0, 0, 0.1) !important;
    border-left: 3px solid #ff0000 !important;
    color: #ff6666 !important;
    animation: classified-flicker 0.3s ease-in;
}

.terminal-response.biometric {
    background: rgba(0, 255, 255, 0.1) !important;
    border-left: 3px solid #00ffff !important;
    color: #66ffff !important;
}

.terminal-response.quantum {
    background: rgba(128, 0, 255, 0.1) !important;
    border-left: 3px solid #8000ff !important;
    color: #bb66ff !important;
}

@keyframes classified-flicker {
    0%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.7; }
    50% { opacity: 0.9; }
}

/* Network monitoring indicators */
.network-status {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00ff41;
    padding: 5px 10px;
    font-size: 10px;
    color: #00ff41;
    z-index: 500;
    font-family: 'Share Tech Mono', monospace;
}

.network-status.active {
    animation: network-blink 1s infinite;
}

@keyframes network-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* Agent status indicator */
.agent-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00ff41;
    padding: 5px 10px;
    font-size: 10px;
    color: #00ff41;
    z-index: 500;
    font-family: 'Share Tech Mono', monospace;
}

/* Declassification effect */
.declassifying {
    animation: declassify 2s ease-out forwards;
}

@keyframes declassify {
    0% {
        background: #000;
        color: transparent;
        text-shadow: 0 0 10px #00ff41;
    }
    50% {
        background: rgba(0, 255, 65, 0.1);
        color: rgba(0, 255, 65, 0.5);
        text-shadow: 0 0 20px #00ff41;
    }
    100% {
        background: rgba(0, 255, 65, 0.1);
        color: #00ff41;
        text-shadow: 0 0 5px #00ff41;
    }
} 