/**
 * u.productions Loading Animation Styles
 * Three.js cinematic loader with gold accents
 */

/* Loader Container */
.three-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.three-loader.loader-visible {
    opacity: 1;
    visibility: visible;
}

.three-loader.loader-fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* Loader Content */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Loader Rings */
.loader-rings {
    position: relative;
    width: 120px;
    height: 120px;
}

.loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid transparent;
    animation: ringRotate 3s linear infinite;
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-top-color: #cc9933;
    border-right-color: #e6b347;
    animation-duration: 2s;
}

.ring-2 {
    width: 80%;
    height: 80%;
    border-bottom-color: #e6b347;
    border-left-color: #997226;
    animation-duration: 2.5s;
    animation-direction: reverse;
}

.ring-3 {
    width: 60%;
    height: 60%;
    border-top-color: #ffd700;
    border-right-color: #ffa500;
    animation-duration: 1.5s;
}

@keyframes ringRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Loader Center */
.loader-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
}

.loader-glow {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204, 153, 51, 0.8) 0%, rgba(204, 153, 51, 0) 70%);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Loader Text */
.loader-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader-brand {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #cc9933;
    text-transform: uppercase;
}

/* Progress Bar */
.loader-progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 200px;
}

.loader-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #997226, #cc9933, #e6b347);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.loader-percent {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #cc9933;
    min-width: 35px;
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
    .loader-rings {
        width: 100px;
        height: 100px;
    }

    .loader-brand {
        font-size: 0.875rem;
    }

    .loader-progress-container {
        width: 160px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .loader-ring {
        animation: none;
        border-color: rgba(204, 153, 51, 0.5);
    }

    .loader-glow {
        animation: none;
        opacity: 0.8;
        transform: scale(1);
    }
}
