/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Matrix Rain Effect */
@keyframes matrixRain {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Glow Pulse Animation */
@keyframes glowPulse {
    0% {
        text-shadow: 0 0 5px currentColor;
    }
    50% {
        text-shadow: 0 0 15px currentColor, 0 0 20px currentColor;
    }
    100% {
        text-shadow: 0 0 5px currentColor;
    }
}

/* Matrix-Animationen - von Grün auf Lila umgestellt */

@keyframes typing {
    from {
        width: 0;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px #9370db, 0 0 10px #9370db;
    }
    50% {
        text-shadow: 0 0 20px #9370db, 0 0 30px #9370db, 0 0 40px #b39ddb;
    }
    100% {
        text-shadow: 0 0 5px #9370db, 0 0 10px #9370db;
    }
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #9370db;
    animation:
            typing 3.5s steps(40, end),
            blink .75s step-end infinite;
    width: 100%;
}

.glow {
    animation: glow 1.5s ease-in-out infinite;
    color: #e0e0e0;
}

.matrix-text {
    font-family: 'Courier New', monospace;
    color: #b39ddb;
    margin: 10px 0;
    transition: all 0.3s ease;
}

/* Matrix Fall-Animation - ändere die Farbe der fallenden Zeichen */
.matrix-rain {
    color: #9370db;
    position: absolute;
    font-size: 24px;
    filter: blur(0.5px);
}

/* Video-Overlay Anpassungen */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.video-background video {
    filter: hue-rotate(280deg); /* Ändert Grün zu Lila */
}

/* Fade-In-Animation für Elemente */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#user-info p {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* Countdown-Animation */
#redirect-message {
    animation: fadeIn 1s ease-out forwards;
    font-family: 'Courier New', monospace;
    color: #9370db;
    text-align: center;
    margin-top: 2rem;
    font-weight: bold;
}

#countdown {
    color: #b39ddb;
    font-size: 1.2em;
}

/* Pulsier-Animation für wichtige Elemente */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 1.5s infinite;
}

/* Redirect Message Animation */
#redirect-message {
    animation: fadeIn 1s forwards, glowPulse 1.5s infinite;
}

/* Countdown Animation */
#countdown {
    display: inline-block;
    animation: pulse 1s infinite;
    font-weight: bold;
    font-size: 1.2em;
}

.icon.sun-moon {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    transform: scale(0.7);
}

.dark-mode .icon.sun-moon {
    background: transparent;
    border: 2px solid var(--dark-text);
    transform: scale(0.6);
}

.light-mode .icon.sun-moon {
    background: var(--light-text);
    transform: scale(0.7);
}

.icon.sun-moon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light-text);
    border-radius: 50%;
    transition: transform 0.5s;
}

.dark-mode .icon.sun-moon::before {
    transform: translateX(-100%);
}

.sun-beams {
    position: absolute;
    top: -2px;
    left: -4px;
    right: -4px;
    bottom: -2px;
    opacity: 1;
    transform: rotate(0);
    transition: opacity 0.3s, transform 0.5s;
}

.sun-beams::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 8px;
    border-radius: 1px;
    background: var(--light-text);
    margin-left: -1px;
    margin-top: -4px;
    box-shadow:
            0 -10px 0 var(--light-text),
            0 10px 0 var(--light-text),
            10px 0 0 var(--light-text),
            -10px 0 0 var(--light-text),
            7px 7px 0 var(--light-text),
            -7px 7px 0 var(--light-text),
            7px -7px 0 var(--light-text),
            -7px -7px 0 var(--light-text);
    transform-origin: 50% 50%;
}

.dark-mode .sun-beams {
    opacity: 0;
    transform: rotate(45deg);
}