/* Matrix Digital Rain Theme */
:root {
    --matrix-green: #00ff41;
    --matrix-dark-green: #003311;
    --matrix-bg: #000000;
    --matrix-text: #00ff41;
    --matrix-accent: #008f11;
    --matrix-glow: #00ff41;
    --matrix-shadow: rgba(0, 255, 65, 0.3);
    --matrix-border: #008f11;
    --matrix-gradient: linear-gradient(135deg, #00ff41 0%, #008f11 100%);
    --matrix-gradient-bg: linear-gradient(135deg, #000000 0%, #001100 100%);
}

/* Matrix режим - изменение шрифта */
body.matrix-theme {
    font-family: 'Courier New', 'Monaco', monospace;
    position: relative;
}

/* Эффект цифрового дождя для Matrix режима */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.1;
}

/* Matrix эффекты - только в Matrix режиме */
body.matrix-theme .matrix-text {
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px var(--primary-color);
    letter-spacing: 1px;
}

body.matrix-theme .matrix-flicker {
    animation: matrixFlicker 3s linear infinite;
}

@keyframes matrixFlicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
        opacity: 0.99;
        filter: brightness(1);
    }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
        opacity: 0.4;
        filter: brightness(0.5);
    }
}

.matrix-glow {
    animation: matrixGlow 2s ease-in-out infinite alternate;
}

@keyframes matrixGlow {
    from { 
        box-shadow: 0 0 5px var(--primary-color);
        text-shadow: 0 0 5px var(--primary-color);
    }
    to { 
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
        text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    }
}

/* Matrix сканирующая линия */
.matrix-scan-line {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    z-index: 999;
    animation: matrixScanLine 8s linear infinite;
    pointer-events: none;
}

@keyframes matrixScanLine {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* Matrix эффекты для элементов в Matrix режиме */
body.matrix-theme .time-text {
    text-shadow: 
        0 0 10px var(--primary-color),
        0 0 20px var(--primary-color),
        0 0 40px var(--primary-color);
    animation: matrixPulse 2s ease-in-out infinite alternate;
}

@keyframes matrixPulse {
    from { 
        text-shadow: 
            0 0 10px var(--primary-color),
            0 0 20px var(--primary-color),
            0 0 40px var(--primary-color);
    }
    to { 
        text-shadow: 
            0 0 15px var(--primary-color),
            0 0 30px var(--primary-color),
            0 0 60px var(--primary-color);
    }
}

body.matrix-theme .server-time,
body.matrix-theme .calendar,
body.matrix-theme .footer {
    border: 2px solid var(--primary-color);
    border-radius: 0;
    box-shadow: 
        0 0 20px var(--primary-color),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
}

body.matrix-theme .day-block {
    border: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: 
        0 0 15px var(--primary-color),
        inset 0 0 15px rgba(0, 255, 65, 0.05);
}

body.matrix-theme .event-card {
    border-radius: 0;
    background: rgba(0, 0, 0, 0.4);
    border-left: 4px solid var(--primary-color);
    box-shadow: 
        0 0 10px var(--primary-color),
        inset 0 0 10px rgba(0, 255, 65, 0.05);
}

body.matrix-theme .event-card:hover {
    background: rgba(0, 255, 65, 0.05);
    box-shadow: 
        0 0 20px var(--primary-color),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
}
