/* ===========================
   Three.js Loader
   =========================== */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

#loaderCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loader-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.loader-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 72px;
    font-weight: 800;
    letter-spacing: 15px;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.loader-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 5px;
    color: rgba(255, 255, 255, 0.7);
    animation: fadeInOut 2s ease-in-out infinite;
}

.loader-progress {
    width: 300px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
    width: 100%;
    animation: loading 1.5s ease-in-out infinite;
}

.loader-percentage {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #ffffff;
    margin-top: 15px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .loader-logo {
        font-size: 48px;
        letter-spacing: 10px;
    }

    .loader-text {
        font-size: 12px;
        letter-spacing: 3px;
    }

    .loader-progress {
        width: 200px;
    }

    .loader-percentage {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        font-size: 36px;
        letter-spacing: 8px;
    }

    .loader-text {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .loader-progress {
        width: 150px;
    }
}
