/* Premium AI-Oriented Preloader Styles */

.ai-premium-preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 50%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInOverlay 0.6s ease-out forwards;
    backdrop-filter: blur(0px);
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(2px);
    }
}

.ai-preloader-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    animation: slideUp 0.8s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Neural Brain Animation */
.neural-brain-animation {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.neural-network-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 24px rgba(212, 175, 55, 0.2));
}

/* Pulse circle animation */
.pulse-circle {
    animation: circlePulse 2.5s ease-in-out infinite;
}

@keyframes circlePulse {
    0% {
        r: 85px;
        opacity: 0.1;
    }
    50% {
        r: 95px;
        opacity: 0.05;
    }
    100% {
        r: 85px;
        opacity: 0.1;
    }
}

/* Core pulse animation */
.core-pulse {
    animation: corePulse 1.5s ease-in-out infinite;
}

.core-main {
    animation: coreGlow 1.5s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% {
        r: 25px;
        opacity: 0.3;
    }
    50% {
        r: 35px;
        opacity: 0.1;
    }
}

@keyframes coreGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.9));
    }
}

/* Neural nodes animation */
.neural-node {
    animation: nodeFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.4));
}

.node-1 { animation-delay: 0s; }
.node-2 { animation-delay: 0.3s; }
.node-3 { animation-delay: 0.6s; }
.node-4 { animation-delay: 0.9s; }
.node-5 { animation-delay: 1.2s; }
.node-6 { animation-delay: 1.5s; }
.node-7 { animation-delay: 1.8s; }

@keyframes nodeFloat {
    0%, 100% {
        opacity: 0.8;
        filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.4));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 8px 16px rgba(212, 175, 55, 0.7));
    }
}

/* Connection line animations */
.connection-line {
    animation: lineFlow 2.5s ease-in-out infinite;
    stroke-linecap: round;
}

@keyframes lineFlow {
    0% {
        opacity: 0.2;
        stroke-width: 2px;
    }
    50% {
        opacity: 0.6;
        stroke-width: 3px;
    }
    100% {
        opacity: 0.2;
        stroke-width: 2px;
    }
}

/* Preloader Content */
.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preloader-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    font-family: 'Cardo', serif;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.title-word {
    display: inline-block;
    opacity: 0;
    animation: wordFade 0.8s ease-out forwards;
}

.title-word:nth-child(1) { animation-delay: 0.2s; }
.title-word:nth-child(2) { animation-delay: 0.4s; }
.title-word:nth-child(3) { animation-delay: 0.6s; }

@keyframes wordFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status text animation */
.preloader-status-text {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-message {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin: 0;
    animation: fadeInOut 2.5s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeInStatus 0.6s ease-out forwards;
}

@keyframes fadeInStatus {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Bar */
.preloader-progress-wrapper {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.preloader-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.preloader-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        #D4AF37 0%, 
        #e8c547 50%, 
        #D4AF37 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

.progress-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.progress-text {
    font-size: 12px;
    font-weight: 600;
    color: #D4AF37;
    letter-spacing: 1px;
    min-width: 40px;
    text-align: center;
}

/* Loading Dots */
.loading-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    height: 24px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D4AF37;
    opacity: 0.5;
    animation: dotBounce 1.4s infinite ease-in-out;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Tagline */
.preloader-tagline {
    font-size: 12px;
    color: #999;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 0;
    margin-top: 8px;
    text-transform: uppercase;
}

/* Animation for smooth fade out when complete */
@keyframes fadeOutPreloader {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .preloader-title {
        font-size: 24px;
    }

    .neural-brain-animation {
        width: 150px;
        height: 150px;
    }

    .preloader-progress-wrapper {
        width: 240px;
    }

    .status-message {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ai-preloader-container {
        padding: 0 20px;
        gap: 24px;
    }

    .preloader-title {
        font-size: 20px;
        gap: 2px;
    }

    .neural-brain-animation {
        width: 120px;
        height: 120px;
    }

    .preloader-progress-wrapper {
        width: 200px;
    }
}
