/* Matrix Background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0f0f;
    z-index: -1;
}

.matrix-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,255,0,0.1) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0,255,0,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: matrix 20s linear infinite;
}

@keyframes matrix {
    0% { background-position: 0 0; }
    100% { background-position: 0 30px; }
}

/* Terminal Styling */
.terminal {
    max-width: 1200px;
    margin: 20px auto;
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 25px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 30px rgba(0,255,0,0.2);
    backdrop-filter: blur(5px);
}

/* Header */
.header {
    border-bottom: 1px solid #0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.ascii {
    color: #0f0;
    font-size: 12px;
    line-height: 1.2;
    text-shadow: 0 0 5px #0f0;
    white-space: pre;
    overflow-x: auto;
}

.status {
    text-align: right;
    color: #0a0;
    font-size: 14px;
}

.glitch {
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 100% { text-shadow: 0 0 2px #0f0; }
    95% { text-shadow: 2px 0 2px #f00, -2px 0 2px #00f; }
}

/* Navigation */
.toolbar {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #0f0;
    border-radius: 5px;
}

.toolbar a {
    color: #0f0;
    text-decoration: none;
    padding: 5px 15px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.toolbar a:hover, .toolbar a.active {
    border-color: #0f0;
    background: rgba(0,255,0,0.1);
}

/* System Stats */
.system-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #111;
    border: 1px solid #0f0;
    border-radius: 5px;
    font-size: 14px;
}

.online {
    color: #0f0;
    animation: pulse 2s infinite;
}

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

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: #111;
    border: 1px solid #0f0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,255,0,0.3);
    border-color: #0f0;
}

.card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.card h2 {
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px dotted #0f0;
    padding-bottom: 8px;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    font-size: 12px;
}

.features span {
    background: #1a1a1a;
    padding: 3px 8px;
    border: 1px solid #0f0;
    border-radius: 3px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #1a1a1a;
    border: 1px solid #0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar div {
    height: 100%;
    background: #0f0;
    color: #000;
    font-size: 12px;
    text-align: center;
    line-height: 20px;
    transition: width 0.3s;
}

/* Log Panel */
.log-panel {
    background: #0a0a0a;
    border: 1px solid #0f0;
    border-radius: 5px;
    padding: 15px;
    margin-top: 25px;
}

.log-header {
    color: #0f0;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px dashed #0f0;
    padding-bottom: 5px;
}

#logOutput {
    font-size: 13px;
    line-height: 1.8;
    max-height: 100px;
    overflow-y: auto;
}

/* Blink Animation */
.blink {
    animation: blink 1s step-end infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .ascii {
        font-size: 8px;
    }
    
    .toolbar {
        flex-direction: column;
    }
    
    .system-stats {
        grid-template-columns: 1fr;
    }
}