/* --- Page Loader & Transitions --- */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- Spark / Logo Animation --- */
.loader-content {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-logo {
    width: 80px;
    height: auto;
    z-index: 2;
    animation: logoReveal 1.5s ease-out forwards;
    opacity: 0;
    transform: scale(0.8);
}

.spark-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 
        0 0 0 0 rgba(255, 165, 0, 0.7),
        0 0 0 0 rgba(255, 69, 0, 0.7);
    animation: sparkExplosion 1.2s ease-out forwards;
    z-index: 1;
}

@keyframes sparkExplosion {
    0% {
        width: 0;
        height: 0;
        box-shadow: 
            0 0 10px 5px rgba(255, 215, 0, 0.8),
            0 0 20px 10px rgba(255, 69, 0, 0.6);
        opacity: 1;
    }
    40% {
        width: 100px;
        height: 100px;
        box-shadow: 
            0 0 0 20px rgba(255, 215, 0, 0),
            0 0 0 40px rgba(255, 69, 0, 0);
        opacity: 0.8;
    }
    100% {
        width: 200px;
        height: 200px;
        box-shadow: 
            0 0 0 50px rgba(255, 215, 0, 0),
            0 0 0 80px rgba(255, 69, 0, 0);
        opacity: 0;
    }
}

@keyframes logoReveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
        filter: blur(10px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Owl Transition Animation --- */
#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a2a3a; /* Gece mavisi / Kurumsal koyu renk */
    z-index: 10000;
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

#transition-overlay.active {
    transform: translateX(0);
}

.owl-container {
    position: absolute;
    top: 50%;
    left: -150px; /* Başlangıç pozisyonu ekran dışı */
    transform: translateY(-50%);
    width: 100px;
    height: 100px;
    z-index: 10001;
    opacity: 0;
}

/* Baykuş uçuş animasyonu */
.fly-animation {
    animation: owlFly 1.5s linear forwards;
}

@keyframes owlFly {
    0% {
        left: -150px;
        opacity: 1;
        transform: translateY(-50%) scale(0.8) rotate(15deg);
    }
    20% {
        transform: translateY(-70%) scale(0.9) rotate(0deg);
    }
    50% {
        left: 50%;
        transform: translateY(-30%) scale(1.2) rotate(-10deg);
    }
    80% {
        transform: translateY(-60%) scale(0.9) rotate(5deg);
    }
    100% {
        left: 110%; /* Ekranın diğer ucundan çıkış */
        opacity: 1;
        transform: translateY(-50%) scale(0.8) rotate(0deg);
    }
}

/* Basit SVG Baykuş Stili */
.owl-svg {
    width: 100%;
    height: 100%;
    fill: #fff;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}
