/**
 * Red Rabbit Club - Preloader Styles
 * 
 * Animierter Preloader mit Fade-Effekten und Logo-Animation
 */

/* Preloader Container */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Logo Container */
.preloader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Animation */
.preloader-logo {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 15px rgba(230, 0, 0, 0.7));
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(230, 0, 0, 0.7));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 25px rgba(230, 0, 0, 0.9));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(230, 0, 0, 0.7));
    }
}

/* Ladetext */
.preloader-text {
    color: var(--light);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.preloader-text span {
    color: var(--primary);
    animation: flashText 1.5s infinite;
}

@keyframes flashText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Ladebalken */
.loader {
    width: 200px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 1px), calc(100% - 1px) 100%, 0 100%, 0 0);
}

.loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    animation: loadingAnimation 2s ease-in-out infinite;
}

@keyframes loadingAnimation {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; left: 100%; }
}

/* Beim Seitenwechsel */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Responsives Design */
@media (max-width: 576px) {
    .preloader-logo {
        width: 150px;
    }
    
    .preloader-text {
        font-size: 16px;
        letter-spacing: 2px;
    }
    
    .loader {
        width: 160px;
    }
}