/* =============================================
   İzmir Nöbetçi Vale - Preloader Styles
   ============================================= */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a1a0f 0%, #1a3a2a 50%, #0d2818 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #00E676;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(0, 230, 118, 0.4);
    animation: logoPulse 2s ease-in-out infinite;
}

.preloader-logo span {
    color: #ffffff;
    font-weight: 300;
}

/* Araç Animasyonu */
.car-animation {
    position: relative;
    width: 200px;
    height: 60px;
    margin-bottom: 2rem;
}

.car-body {
    width: 80px;
    height: 30px;
    background: linear-gradient(135deg, #00E676, #00C853);
    border-radius: 10px 20px 5px 5px;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    animation: carBounce 1.5s ease-in-out infinite;
    box-shadow: 0 5px 20px rgba(0, 230, 118, 0.3);
}

.car-body::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 15px;
    width: 45px;
    height: 18px;
    background: linear-gradient(135deg, #00C853, #00A86B);
    border-radius: 10px 10px 0 0;
}

.car-body::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 20px;
    width: 15px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px 5px 0 0;
}

.wheel {
    width: 16px;
    height: 16px;
    background: #333;
    border-radius: 50%;
    position: absolute;
    bottom: 8px;
    border: 3px solid #555;
    animation: wheelSpin 0.5s linear infinite;
}

.wheel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #777;
    border-radius: 50%;
}

.wheel-left {
    left: calc(50% - 35px);
}

.wheel-right {
    left: calc(50% + 20px);
}

/* Loading Bar */
.loading-bar-container {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00E676, #69F0AE, #00E676);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: loadingProgress 2s ease-in-out infinite, shimmer 1.5s ease-in-out infinite;
}

.loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: textFade 1.5s ease-in-out infinite;
}

/* Arka Plan Parçacıkları */
.preloader-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 230, 118, 0.3);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
}

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

/* Keyframes */
@keyframes logoPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

@keyframes carBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

@keyframes wheelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes textFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-20px) scale(1.5); opacity: 0.8; }
}
