@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Fira Code', monospace;
    background: #000;
    color: #00ff00;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 98%,
        rgba(0, 255, 0, 0.03) 100%
    ),
    linear-gradient(
        180deg,
        transparent 98%,
        rgba(0, 255, 0, 0.03) 100%
    );
    background-size: 3px 3px;
    pointer-events: none;
    z-index: 1;
}

.terminal-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000;
    position: relative;
    z-index: 2;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(90deg, #001100, #002200);
    border-bottom: 1px solid #00ff00;
    font-size: 12px;
    font-weight: 500;
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-symbol {
    color: #00ff00;
    animation: blink 1s infinite;
}

.terminal-status {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 10px;
}

.terminal-controls {
    display: flex;
    gap: 16px;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
}

.progress-bar {
    width: 40px;
    height: 8px;
    background: #001100;
    border: 1px solid #00ff00;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #00aa00);
    transition: width 0.3s ease;
    animation: progress-glow 2s infinite;
}

@keyframes progress-glow {
    0%, 100% { box-shadow: 0 0 5px #00ff00; }
    50% { box-shadow: 0 0 15px #00ff00; }
}

.terminal-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000;
    position: relative;
    overflow: hidden;
}

.terminal-output {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: #001100;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(0, 255, 0, 0.05);
    border-top: 1px solid #00ff00;
    font-size: 14px;
}

.terminal-prompt {
    color: #00ff00;
    margin-right: 8px;
    font-weight: 600;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    outline: none;
    caret-color: transparent;
}

.terminal-cursor {
    animation: blink 1s infinite;
    color: #00ff00;
}

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

.system-info {
    position: fixed;
    top: 60px;
    right: 16px;
    width: 250px;
    z-index: 10;
}

.info-panel {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #00ff00;
    margin-bottom: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.info-title {
    background: linear-gradient(90deg, #001100, #002200);
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-content {
    padding: 8px 12px;
    font-size: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.connection-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 11px;
}

.connection-status {
    color: #00ff00;
    animation: pulse 2s infinite;
}

.connection-ping {
    color: #666;
    margin-left: auto;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.network-map {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 300px;
    height: 200px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #00ff00;
    border-radius: 4px;
    overflow: hidden;
}

.map-title {
    background: linear-gradient(90deg, #001100, #002200);
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.map-content {
    padding: 16px;
    height: calc(100% - 32px);
    position: relative;
}

.network-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.network-node:hover {
    transform: scale(1.1);
}

.node-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 50%;
    font-size: 12px;
    animation: node-pulse 3s infinite;
}

.node-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes node-pulse {
    0%, 100% { 
        box-shadow: 0 0 5px #00ff00;
        border-color: #00ff00;
    }
    50% { 
        box-shadow: 0 0 15px #00ff00;
        border-color: #00aa00;
    }
}

.command-output {
    margin-bottom: 8px;
}

.command-line {
    color: #00ff00;
    margin-bottom: 4px;
}

.command-result {
    color: #888;
    margin-left: 16px;
}

.error {
    color: #ff4444;
}

.warning {
    color: #ffaa00;
}

.success {
    color: #00ff00;
}

.highlight {
    color: #00ffff;
}

.progress-animation {
    display: inline-block;
    width: 200px;
    height: 4px;
    background: #001100;
    border: 1px solid #00ff00;
    margin: 8px 0;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #00aa00);
    width: 0%;
    transition: width 0.1s ease;
}

.ascii-art {
    font-size: 10px;
    line-height: 1;
    color: #006600;
    margin: 8px 0;
}

.scan-line {
    position: relative;
    overflow: hidden;
}

.scan-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.3), transparent);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.glitch {
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px); }
    20% { transform: translateX(2px); }
    30% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    50% { transform: translateX(-2px); }
    60% { transform: translateX(2px); }
    70% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
    90% { transform: translateX(-2px); }
}

.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.1;
}

.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 0.5s steps(40, end);
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Responsive design */
@media (max-width: 768px) {
    .system-info {
        position: relative;
        width: 100%;
        margin: 8px 0;
    }
    
    .network-map {
        position: relative;
        width: 100%;
        margin: 8px 0;
    }
    
    .terminal-container {
        flex-direction: column;
    }
    
    .terminal-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .terminal-controls {
        width: 100%;
        justify-content: space-between;
    }
}