/* ==================== PRELOADER/LOADING SCREEN ==================== */
#modern-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); */
    background: linear-gradient(135deg, #0a4f70 0%, #0e76a8 50%, #2593c6 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Animated background particles */
#modern-preloader::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Glowing orbs in background */
#modern-preloader::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite, moveOrb 8s ease-in-out infinite;
}

@keyframes moveOrb {
    0%, 100% {
        top: -200px;
        left: -200px;
    }
    25% {
        top: -200px;
        left: calc(100% - 200px);
    }
    50% {
        top: calc(100% - 200px);
        left: calc(100% - 200px);
    }
    75% {
        top: calc(100% - 200px);
        left: -200px;
    }
}

#modern-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 400px;
    padding: 0 20px;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.preloader-logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite, rotate360 8s linear infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
    position: relative;
}

/* Logo glow effect */
.preloader-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

@keyframes rotate360 {
    from {
        filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4)) hue-rotate(0deg);
    }
    to {
        filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4)) hue-rotate(360deg);
    }
}

.preloader-title {
    color: white;
    font-size: 42px;
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    margin-bottom: 25px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

/* Title shimmer effect */
.preloader-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Modern spinner with multiple rings */
.preloader-spinner {
    width: 70px;
    height: 70px;
    position: relative;
    margin: 35px auto 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-spinner::before,
.preloader-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    top: 0;
    left: 0;
}

.preloader-spinner::before {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.preloader-spinner::after {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-bottom-color: rgba(255, 255, 255, 0.8);
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced progress bar */
.preloader-progress {
    width: 280px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 35px auto 0 auto;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    display: block;
}

.preloader-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmerProgress 1.5s linear infinite;
}

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

.preloader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fff, #f0f0f0, #fff);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    animation: progress 2s ease-out forwards, gradientMove 1s linear infinite;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
    position: relative;
}

@keyframes progress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Loading text with modern styling */
.preloader-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    margin-top: 20px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: block;
    width: 100%;
}

/* Enhanced dots animation */
.loading-dots {
    display: inline-block;
    width: 30px;
    text-align: left;
}

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

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .preloader-logo {
        width: 90px;
        height: 90px;
    }
    
    .preloader-title {
        font-size: 32px;
    }
    
    .preloader-spinner {
        width: 60px;
        height: 60px;
    }
    
    .preloader-progress {
        width: 200px;
    }
    
    .preloader-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .preloader-logo {
        width: 70px;
        height: 70px;
    }
    
    .preloader-title {
        font-size: 24px;
    }
    
    .preloader-progress {
        width: 160px;
    }
}

/* ==================== ADDITIONAL PREMIUM EFFECTS ==================== */

/* Floating particles effect */
.preloader-content::before,
.preloader-content::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: floatParticle 4s ease-in-out infinite;
}

.preloader-content::before {
    width: 8px;
    height: 8px;
    top: -50px;
    left: -30px;
    animation-delay: 0s;
}

.preloader-content::after {
    width: 6px;
    height: 6px;
    top: -40px;
    right: -40px;
    animation-delay: 1s;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    75% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0.5);
        opacity: 0;
    emove duplicate spinner position rule */
.preloader-spinner::after {
    animation-delay: 1s;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Success checkmark animation (can be triggered on 100%) */
@keyframes drawCheck {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
/* Ripple effect container */
.preloader-spinner-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 35px auto 0 auto;
}

.preloader-spinner-container::before,
.preloader-spinner-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ripple 2s ease-out infinite;
    transform: translate(-50%, -50%);
}

.preloader-spinner-container::after {
    animation-delay: 1s;
}

        stroke-dashoffset: 0;
    }
}

/* Percentage counter styling */
.preloader-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}        stroke-dashoffset: 0;
    }
}