/* Matrix Digital Rain Animation */
.ai-visual-container {
    background-color: #000;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.2);
}

.matrix-col {
    position: absolute;
    top: -100%;
    width: 1.5em;
    /* Column width */
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: #0F0;
    text-shadow: 0 0 5px #0F0, 0 0 10px rgba(0, 255, 0, 0.5);
    writing-mode: vertical-rl;
    text-orientation: upright;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
    opacity: 0.8;

    /* Fade out the tail */
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    /* Animation */
    animation-name: matrix-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Individual character style */
.matrix-char {
    display: inline-block;
    /* Allows transforms/opacity */
    animation: flicker 2s infinite alternate;
    /* Default duration, randomized in JS */
}

/* Bright head of the column (optional enhancement) */
.matrix-col span:last-child {
    color: #FFF;
    text-shadow: 0 0 10px #FFF, 0 0 20px #0F0;
}

@keyframes matrix-fall {
    0% {
        top: -100%;
    }

    100% {
        top: 100%;
    }
}

@keyframes flicker {
    0% {
        opacity: 0.6;
        text-shadow: 0 0 5px rgba(0, 255, 0, 0.6);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(0, 255, 0, 1), 0 0 15px rgba(200, 255, 200, 0.8);
    }

    100% {
        opacity: 0.7;
        text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
    }
}