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

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

body {
    background: #000000;
    color: #00ff00;
    font-family: 'Courier Prime', 'Courier New', monospace;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

.dashboard-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000000;
}

/* Matrix Background */
#matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.1;
}

/* Dashboard Grid */
.dashboard-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 8px;
    padding: 8px;
    height: 100vh;
    width: 100vw;
}

/* Terminal Windows */
.terminal-window {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #00ff00;
    border-radius: 3px;
    box-shadow: 
        0 0 10px rgba(0, 255, 0, 0.3),
        inset 0 0 30px rgba(0, 255, 0, 0.05);
    overflow: hidden;
    position: relative;
    animation: terminalGlow 2s ease-in-out infinite alternate;
}

@keyframes terminalGlow {
    0% { box-shadow: 0 0 10px rgba(0, 255, 0, 0.3), inset 0 0 30px rgba(0, 255, 0, 0.05); }
    100% { box-shadow: 0 0 15px rgba(0, 255, 0, 0.5), inset 0 0 30px rgba(0, 255, 0, 0.1); }
}

.terminal-header {
    background: rgba(0, 255, 0, 0.1);
    border-bottom: 1px solid #00ff00;
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    height: 24px;
}

.terminal-title {
    color: #00ff00;
    font-weight: bold;
    text-transform: uppercase;
}

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

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

.terminal-content {
    padding: 8px;
    height: calc(100% - 24px);
    overflow-y: auto;
    font-size: 9px;
    line-height: 1.2;
    font-family: 'Courier Prime', 'Courier New', monospace;
}

.terminal-line, .log-line, .code-line {
    margin-bottom: 2px;
    white-space: nowrap;
    color: #00ff00;
}

/* Specific Terminal Styles */
.network-monitor {
    grid-column: 1 / 3;
    grid-row: 1;
}

.world-map {
    grid-column: 3 / 5;
    grid-row: 1;
}

.system-monitor {
    grid-column: 1;
    grid-row: 2;
}

.command-terminal:nth-of-type(4) {
    grid-column: 2;
    grid-row: 2;
}

.network-topology {
    grid-column: 3;
    grid-row: 2;
}

.code-window {
    grid-column: 4;
    grid-row: 2;
}

.command-terminal:nth-of-type(7) {
    grid-column: 1;
    grid-row: 3;
}

.video-feed {
    grid-column: 2;
    grid-row: 3;
}

.log-monitor {
    grid-column: 3 / 5;
    grid-row: 3;
}

/* World Map Styles */
.map-container {
    position: relative;
    height: calc(100% - 24px);
    background: radial-gradient(circle at center, rgba(0, 255, 0, 0.1) 0%, transparent 70%);
}

.world-svg {
    width: 100%;
    height: 100%;
}

.connection-points {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.connection-point {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.data-flow {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ff00, transparent);
    animation: dataFlow 3s linear infinite;
}

@keyframes dataFlow {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* System Monitor Styles */
.resource-graph {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-label {
    width: 80px;
    font-size: 8px;
    color: #00ff00;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #ffff00, #ff0000);
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressScan 2s linear infinite;
}

@keyframes progressScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.resource-value {
    width: 30px;
    text-align: right;
    font-size: 8px;
    color: #ffff00;
}

/* Network Topology */
.topology-container {
    height: calc(100% - 24px);
    position: relative;
}

.topology-svg {
    width: 100%;
    height: 100%;
}

.topology-svg circle {
    animation: nodeGlow 3s ease-in-out infinite alternate;
}

@keyframes nodeGlow {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.topology-svg line {
    animation: connectionPulse 2s ease-in-out infinite;
}

@keyframes connectionPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Video Feed */
.video-container {
    position: relative;
    height: calc(100% - 24px);
    background: #000;
    overflow: hidden;
}

.video-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.03) 2px,
            rgba(0, 255, 0, 0.03) 4px
        );
    animation: staticNoise 0.1s linear infinite;
}

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

.video-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #00ff00;
    font-size: 8px;
    z-index: 3;
}

.timestamp {
    font-family: 'Courier Prime', monospace;
    color: #ffff00;
}

.video-info {
    margin-top: 4px;
    color: #00ff00;
}

/* CRT Effects */
.crt-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
    z-index: 10;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.02) 2px,
            rgba(0, 255, 0, 0.02) 4px
        );
    pointer-events: none;
    z-index: 9;
    animation: scanlineMove 0.1s linear infinite;
}

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

.screen-flicker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 0, 0.02);
    pointer-events: none;
    z-index: 8;
    animation: flicker 0.15s linear infinite alternate;
}

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

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.7);
}

/* Special Effects */
.terminal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00ff00, #008800);
}

/* Text Effects */
.terminal-line:hover,
.log-line:hover,
.code-line:hover {
    background: rgba(0, 255, 0, 0.1);
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(5, 1fr);
    }
    
    .network-monitor {
        grid-column: 1 / 3;
        grid-row: 1;
    }
    
    .world-map {
        grid-column: 1 / 3;
        grid-row: 2;
    }
    
    .system-monitor {
        grid-column: 1;
        grid-row: 3;
    }
    
    .command-terminal:nth-of-type(4) {
        grid-column: 2;
        grid-row: 3;
    }
    
    .network-topology {
        grid-column: 1;
        grid-row: 4;
    }
    
    .code-window {
        grid-column: 2;
        grid-row: 4;
    }
    
    .command-terminal:nth-of-type(7) {
        grid-column: 1;
        grid-row: 5;
    }
    
    .video-feed {
        grid-column: 2;
        grid-row: 5;
    }
    
    .log-monitor {
        grid-column: 1 / 3;
        grid-row: 6;
    }
}

/* Animation Delays for Staggered Effect */
.terminal-window:nth-child(1) { animation-delay: 0s; }
.terminal-window:nth-child(2) { animation-delay: 0.2s; }
.terminal-window:nth-child(3) { animation-delay: 0.4s; }
.terminal-window:nth-child(4) { animation-delay: 0.6s; }
.terminal-window:nth-child(5) { animation-delay: 0.8s; }
.terminal-window:nth-child(6) { animation-delay: 1s; }
.terminal-window:nth-child(7) { animation-delay: 1.2s; }
.terminal-window:nth-child(8) { animation-delay: 1.4s; }
.terminal-window:nth-child(9) { animation-delay: 1.6s; }
