/* --- Preloader Intro (Ferrari Style) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--rdf-navy);
    z-index: 9999; /* Über allem anderen */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.7, 0, 0.3, 1); /* Elegantes "Wegziehen" */
}

/* Logo Animation Container */
.intro-logo {
    position: relative;
    margin-bottom: 40px;
    animation: logoFadeIn 1s ease-out forwards;
}

/* Das Logo selbst (Bild) */
.intro-logo img {
    animation: pulseGlow 2s infinite ease-in-out;
}

/* Loading Bar Container */
.loader-track {
    width: 200px; /* Zurück zur ursprünglichen Breite */
    height: 2px; /* Wieder dünn und elegant */
    background-color: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden; /* Wieder aktiv */
    border-radius: 2px;
    margin-top: 20px;
}

/* ... */

/* Animation Keyframes */
@keyframes pulseGlow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(79, 209, 197, 0.3));
    }
    50% {
        transform: scale(1.05); /* Leicht größer */
        filter: drop-shadow(0 0 30px rgba(79, 209, 197, 0.8)); /* Starker Glow */
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(79, 209, 197, 0.3));
    }
}


/* The moving bar */
.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--rdf-teal);
    box-shadow: 0 0 10px var(--rdf-teal);
    animation: loadProgress 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}



/* Status Text */
.loader-text {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--rdf-silver);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    opacity: 0;
    animation: fadeInText 0.5s 0.5s forwards;
}

/* Wenn fertig geladen: Klasse .loaded wird per JS hinzugefügt */
body.loaded #preloader {
    transform: translateY(-100%); /* Nach oben wegziehen */
}

/* Animation Keyframes */
@keyframes logoFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shine {
    to { background-position: 200% center; }
}

@keyframes loadProgress {
    0% { width: 0%; }
    40% { width: 40%; }
    70% { width: 60%; }
    100% { width: 100%; }
}

@keyframes fadeInText {
    to { opacity: 0.7; }
}
