#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-container {
    position: relative;
    text-align: center;
    z-index: 10;
    padding: 20px;
    max-width: 90%;
}

.logo-text {
    font-size: 4rem;
    font-weight: 800;
    color: #002244;
    letter-spacing: 0.3rem;
    margin-bottom: 1rem;
    animation: slideDown 1s ease-out;
}

.logo-text span {
    display: inline-block;
    animation: bounce 1.5s ease-in-out infinite;
}

.logo-text span:nth-child(1) { animation-delay: 0s; }
.logo-text span:nth-child(2) { animation-delay: 0.1s; }
.logo-text span:nth-child(3) { animation-delay: 0.2s; }
.logo-text span:nth-child(4) { animation-delay: 0.3s; }
.logo-text span:nth-child(5) { animation-delay: 0.4s; }
.logo-text span:nth-child(6) { animation-delay: 0.5s; }
.logo-text span:nth-child(7) { animation-delay: 0.6s; }
.logo-text span:nth-child(8) { animation-delay: 0.7s; }
.logo-text span:nth-child(9) { animation-delay: 0.8s; }
.logo-text span:nth-child(10) { animation-delay: 0.9s; }
.logo-text span:nth-child(11) { animation-delay: 1s; }
.logo-text span:nth-child(12) { animation-delay: 1.1s; }
.logo-text span:nth-child(13) { animation-delay: 1.2s; }

.slogan {
    font-size: 1.2rem;
    color: #002244;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 1s ease-in 0.5s forwards;
    font-weight: 300;
}

.loading-bar-container {
    width: 300px;
    height: 4px;
    background: rgba(0, 34, 68, 0.2);
    margin: 2rem auto;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #002244, #e0272a, #002244);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: loadingProgress 2s ease-in-out infinite;
}

.bubble {
    position: absolute;
    bottom: -50px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(224, 39, 42, 0.8), rgba(224, 39, 42, 0.4));
    animation: floatUp linear infinite;
    box-shadow: 0 0 15px rgba(224, 39, 42, 0.3);
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loadingProgress {
    0% {
        width: 0%;
        background-position: 0% 50%;
    }
    50% {
        width: 70%;
        background-position: 100% 50%;
    }
    100% {
        width: 100%;
        background-position: 0% 50%;
    }
}

@keyframes floatUp {
    0% {
        bottom: -50px;
        opacity: 0;
        transform: translateX(0) scale(1);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        bottom: 110vh;
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }
}

.percentage {
    color: #002244;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Tablet devices */
@media (max-width: 1024px) {
    .logo-text {
        font-size: 3rem;
        letter-spacing: 0.25rem;
    }
    .slogan {
        font-size: 1rem;
    }
    .loading-bar-container {
        width: 280px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .logo-text {
        font-size: 2.5rem;
        letter-spacing: 0.2rem;
    }
    .slogan {
        font-size: 0.9rem;
        letter-spacing: 0.15rem;
    }
    .loading-bar-container {
        width: 250px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .logo-text {
        font-size: 2rem;
        letter-spacing: 0.15rem;
    }
    .slogan {
        font-size: 0.8rem;
        letter-spacing: 0.1rem;
    }
    .loading-bar-container {
        width: 200px;
    }
    .percentage {
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .logo-text {
        font-size: 1.5rem;
        letter-spacing: 0.1rem;
    }
    .slogan {
        font-size: 0.7rem;
    }
    .loading-bar-container {
        width: 180px;
    }
}