/* Page Loader Styles */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    color: #ffffff;
}

/* Road Container */
.road-container {
    position: relative;
    width: 300px;
    height: 120px;
    margin: 0 auto 30px;
    background: #2c3e50;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Road Lines Animation */
.road-line {
    position: absolute;
    width: 4px;
    height: 40px;
    background: #f39c12;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    box-shadow: 0 40px 0 #f39c12, 0 80px 0 #f39c12;
    animation: roadMove 1s linear infinite;
}

.road-line:nth-child(2) {
    left: 30%;
    animation-delay: 0.2s;
}

.road-line:nth-child(3) {
    left: 70%;
    animation-delay: 0.4s;
}

@keyframes roadMove {
    0% {
        transform: translateX(-50%) translateY(-40px);
    }
    100% {
        transform: translateX(-50%) translateY(120px);
    }
}

/* Car Container */
.car-container {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    animation: carMove 2s ease-in-out infinite;
}

.car-icon {
    font-size: 48px;
    color: #3498db;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    animation: carBounce 0.6s ease-in-out infinite;
    transform-origin: center;
}

@keyframes carMove {
    0% {
        transform: translateX(-50px);
    }
    50% {
        transform: translateX(250px);
    }
    100% {
        transform: translateX(-50px);
    }
}

@keyframes carBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(-2deg);
    }
    75% {
        transform: translateY(-3px) rotate(2deg);
    }
}

/* Loader Text */
.loader-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    animation: textPulse 1.5s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes textPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .road-container {
        width: 250px;
        height: 100px;
    }
    
    .car-icon {
        font-size: 36px;
    }
    
    .loader-text {
        font-size: 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .page-loader {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .road-container {
        background: #0f1419;
    }
    
    .road-line {
        background: #f39c12;
        box-shadow: 0 40px 0 #f39c12, 0 80px 0 #f39c12;
    }
}

