/**
 * Blockchain Digital Rain CSS
 * Styling for blockchain-themed Matrix rain effect
 */

/* Canvas positioning - matches matrix-rain.css structure */
#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(to bottom, #000510 0%, #000000 100%);
    pointer-events: none;
}

/* Matrix Controls */
#matrix-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.matrix-control-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 20, 40, 0.9);
    border: 1px solid #00ffff;
    border-radius: 8px;
    color: #00ffff;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.matrix-control-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: scale(1.1);
}

.matrix-control-btn:active {
    transform: scale(0.95);
}

/* Blockchain-specific glow effects */
@keyframes blockchain-pulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 10px #00ffff);
    }
}

@keyframes mining-flash {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(2) drop-shadow(0 0 20px #ffd700);
    }
}

@keyframes chain-link-glow {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 5px #00ffff);
    }
}

/* Block formation highlight */
@keyframes block-highlight {
    0% {
        box-shadow: 0 0 0 rgba(157, 78, 221, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(157, 78, 221, 0.8);
    }
    100% {
        box-shadow: 0 0 0 rgba(157, 78, 221, 0);
    }
}

/* Ensure canvas doesn't interfere with interactive elements */
#matrix.interactive-mode {
    pointer-events: none;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    #matrix {
        /* Reduce complexity on mobile by using simpler gradient */
        background: #000510;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #matrix {
        background: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #matrix {
        display: none;
    }
}