/* ===== Page Loader Styles ===== */

/* Loader Container */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fce7f3 0%, #f3e8ff 50%, #fce7f3 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Brand Logo/Text */
.loader-brand {
    margin-bottom: 2rem;
    text-align: center;
}

.loader-logo {
    font-family: 'Mitr', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #ec4899;
    text-shadow: 0 2px 4px rgba(236, 72, 153, 0.3);
    margin-bottom: 0.5rem;
    animation: logoFloat 2s ease-in-out infinite;
}

/* Animated Logo Styles */
.animated-logo {
    position: relative;
    display: inline-block;
    animation: logoFloat 2s ease-in-out infinite;
}

.animated-logo img {
    transition: opacity 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(236, 72, 153, 0.3));
}

.animated-logo img:hover {
    filter: drop-shadow(0 6px 12px rgba(236, 72, 153, 0.4));
}

.loader-tagline {
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    color: #be185d;
    opacity: 0.8;
}

/* Spinner Animation */
.loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid #ec4899;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: #f472b6;
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: #fbbf24;
    animation-duration: 1.8s;
}

/* Progress Bar */
.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(236, 72, 153, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #f472b6, #fbbf24);
    border-radius: 2px;
    animation: progressFill 3s ease-in-out infinite;
}

/* Loading Text */
.loader-text {
    font-family: 'Prompt', sans-serif;
    font-size: 1.1rem;
    color: #be185d;
    font-weight: 500;
    animation: textPulse 1.5s ease-in-out infinite;
}

/* Loading Dots */
.loading-dots {
    display: inline-block;
    margin-left: 0.5rem;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

/* Decorative Elements */
.loader-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(236, 72, 153, 0.1);
    animation: float 6s ease-in-out infinite;
}

.decoration-circle:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.decoration-circle:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.decoration-circle:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.6;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .loader-logo {
        font-size: 2rem;
    }
    
    .loader-tagline {
        font-size: 0.9rem;
    }
    
    .loader-spinner {
        width: 60px;
        height: 60px;
    }
    
    .spinner-ring:nth-child(2) {
        width: 45px;
        height: 45px;
        top: 7.5px;
        left: 7.5px;
    }
    
    .spinner-ring:nth-child(3) {
        width: 30px;
        height: 30px;
        top: 15px;
        left: 15px;
    }
    
    .loader-progress {
        width: 150px;
    }
    
    .loader-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        font-size: 1.8rem;
    }
    
    .loader-spinner {
        width: 50px;
        height: 50px;
    }
    
    .spinner-ring:nth-child(2) {
        width: 37px;
        height: 37px;
        top: 6.5px;
        left: 6.5px;
    }
    
    .spinner-ring:nth-child(3) {
        width: 25px;
        height: 25px;
        top: 12.5px;
        left: 12.5px;
    }
    
    .loader-progress {
        width: 120px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #page-loader {
        background: linear-gradient(135deg, #1f1f23 0%, #2d1b69 50%, #1f1f23 100%);
    }
    
    .loader-logo {
        color: #f472b6;
        text-shadow: 0 2px 4px rgba(244, 114, 182, 0.3);
    }
    
    .loader-tagline {
        color: #e879f9;
    }
    
    .loader-text {
        color: #e879f9;
    }
    
    .decoration-circle {
        background: rgba(244, 114, 182, 0.1);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .loader-spinner,
    .spinner-ring,
    .progress-fill,
    .loader-logo,
    .loader-text,
    .loading-dots::after,
    .decoration-circle {
        animation: none;
    }
    
    .progress-fill {
        width: 100%;
    }
    
    .loading-dots::after {
        content: '...';
    }
}

/* Print Styles */
@media print {
    #page-loader {
        display: none !important;
    }
}