/**
 * Immobilien Bewertung - COOL FEATURES STYLES
 * Progress Bar, Confetti & Magnetic Buttons
 * Version: 1.0.0
 */

/* ============================================
   FEATURE 1: SCROLL PROGRESS BAR
   ============================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 999999;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.scroll-progress-inner {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4158D0, #C850C0);
    transition: width 0.1s ease;
    position: relative;
    box-shadow: 0 0 20px rgba(65, 88, 208, 0.5);
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.scroll-progress-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   FEATURE 2: CONFETTI ANIMATIONEN
   ============================================ */

.confetti-particle {
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    will-change: transform, opacity;
}

/* Spezial: Konfetti-Explosion */
@keyframes confettiExplosion {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg) translateY(100vh);
        opacity: 0;
    }
}

/* Herz-Konfetti Animation */
@keyframes heartFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Confetti-Welle */
@keyframes confettiWave {
    0% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(50px) rotate(90deg);
    }
    50% {
        transform: translateX(0) rotate(180deg);
    }
    75% {
        transform: translateX(-50px) rotate(270deg);
    }
    100% {
        transform: translateX(0) rotate(360deg);
    }
}

/* ============================================
   FEATURE 3: MAGNETIC BUTTONS
   ============================================ */

.magnetic-button {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease;
    will-change: transform;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 500px;
}

.magnetic-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                rgba(255, 255, 255, 0.3), 
                transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.magnetic-button:hover::before {
    opacity: 1;
}

/* 3D Hover Effekt für Cards */
.option-card.magnetic-button {
    transform-style: preserve-3d;
}

.option-card.magnetic-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.2), 
                transparent 50%,
                rgba(0, 0, 0, 0.1));
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option-card.magnetic-button:hover::after {
    opacity: 1;
}

/* Magnetic Button mit Glow */
.magnetic-button.glow-effect {
    box-shadow: 0 5px 20px rgba(65, 88, 208, 0.2);
}

.magnetic-button.glow-effect:hover {
    box-shadow: 0 15px 40px rgba(65, 88, 208, 0.4);
}

/* Klick-Effekt für Magnetic Buttons */
.magnetic-button:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease !important;
}

/* ============================================
   SPEZIAL: CONFETTI BUTTON (für Admins)
   ============================================ */

.confetti-test-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4158D0, #C850C0, #FFCC70);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 99999;
    box-shadow: 0 10px 30px rgba(65, 88, 208, 0.3);
    animation: buttonFloat 3s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes buttonFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.confetti-test-btn:hover {
    animation: none;
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(65, 88, 208, 0.4);
}

.confetti-test-btn:active {
    transform: scale(0.95);
}

/* ============================================
   LOADING ANIMATION FÜR PROGRESS
   ============================================ */

.progress-loading {
    position: fixed;
    top: 6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.5), 
        transparent
    );
    animation: loadingPulse 2s ease-in-out infinite;
    z-index: 999999;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ============================================
   RESPONSIVE ANPASSUNGEN
   ============================================ */

@media (max-width: 768px) {
    .scroll-progress {
        height: 4px;
    }
    
    .confetti-test-btn {
        bottom: 80px;
        right: 20px;
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .confetti-test-btn {
        bottom: 70px;
        right: 15px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .scroll-progress,
    .confetti-test-btn,
    .confetti-particle {
        display: none !important;
    }
}