/* ==========================================
   ZEKİ BEYGİR - KOŞAN AT PRELOADER
   ==========================================
*/

/* Preloader Container */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: White;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    overflow: hidden;
}

/* Zemin çizgisi */
#preloader::before {
    content: '';
    position: absolute;
    bottom: 35%;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4a9f4a, #8bc34a, #4a9f4a, transparent);
    box-shadow: 0 0 20px rgba(139, 195, 74, 0.5);
}

/* Çim efekti */
#preloader::after {
    content: '';
    position: absolute;
    bottom: calc(35% - 15px);
    left: 0;
    width: 100%;
    height: 30px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        rgba(76, 175, 80, 0.3) 10px,
        rgba(76, 175, 80, 0.3) 12px
    );
}

/* At Container */
.horse-loader {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
}

/* At Resmi */
.horse-loader img {
    width: 150px;
    height: auto;
    animation: horseRun 0.8s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

/* Koşma Animasyonu */
@keyframes horseRun {
    0% { transform: translateY(0) translateX(-5px) rotate(-2deg); }
    25% { transform: translateY(-15px) translateX(0) rotate(0deg); }
    50% { transform: translateY(0) translateX(5px) rotate(2deg); }
    75% { transform: translateY(-10px) translateX(0) rotate(0deg); }
    100% { transform: translateY(0) translateX(-5px) rotate(-2deg); }
}

/* Toz Bulutu Efekti */
.dust-cloud {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dust {
    width: 12px;
    height: 12px;
    background: rgba(210, 180, 140, 0.6);
    border-radius: 50%;
    animation: dustFloat 0.6s ease-out infinite;
}

.dust:nth-child(1) { animation-delay: 0s; }
.dust:nth-child(2) { animation-delay: 0.1s; width: 8px; height: 8px; }
.dust:nth-child(3) { animation-delay: 0.2s; width: 10px; height: 10px; }
.dust:nth-child(4) { animation-delay: 0.3s; width: 6px; height: 6px; }
.dust:nth-child(5) { animation-delay: 0.4s; width: 9px; height: 9px; }

@keyframes dustFloat {
    0% { opacity: 0.8; transform: translateY(0) translateX(0) scale(1); }
    100% { opacity: 0; transform: translateY(-20px) translateX(-30px) scale(0.3); }
}

/* Yükleniyor Yazısı */
.loader-subtext {
    color: #2e461b;
    font-size: 14px;
    margin-top: 10px;
    letter-spacing: 2px;
}

/* İlerleme Çubuğu */
.progress-bar-container {
    width: 250px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 25px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e63946, #f4a261, #e9c46a);
    border-radius: 2px;
    animation: progressLoad 2s ease-in-out infinite;
}

@keyframes progressLoad {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Arka Plan Parçacıkları */
.particles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 3s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 0.5s; }
.particle:nth-child(3) { left: 30%; animation-delay: 1s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1.5s; }
.particle:nth-child(5) { left: 50%; animation-delay: 2s; }
.particle:nth-child(6) { left: 60%; animation-delay: 0.3s; }
.particle:nth-child(7) { left: 70%; animation-delay: 0.8s; }
.particle:nth-child(8) { left: 80%; animation-delay: 1.3s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1.8s; }

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Preloader Çıkış Animasyonu */
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease-out;
}
