body {
    margin: 0;
    font-family: 'Comfortaa', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Modern Loading Screen Styles */
#loading-parent {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    overflow: hidden;
    transition: opacity 0.5s ease-out;
}

.loading-background {
    width: 100%;
    height: 100%;
    background: #023fc4;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(2, 63, 196, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(2, 63, 196, 0.2) 0%, transparent 50%);
    animation: backgroundShift 8s ease-in-out infinite;
}

.loading-container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    max-width: 380px;
    width: 90%;
    animation: containerFloat 6s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* App Icon Styles */
.app-icon-container {
    margin-bottom: 24px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: iconPulse 3s ease-in-out infinite;
    display: block;
    margin: 0 auto;
}

/* App Title Styles */
.app-title {
    margin-bottom: 32px;
    width: 100%;
    text-align: center;
}

#loading-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

#loading-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 400;
    transition: all 0.3s ease;
}

/* Modern Progress Bar */
.progress-container {
    margin-bottom: 32px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-track {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffffff, #e3f2fd);
    border-radius: 4px;
    position: relative;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: progressGlow 2s ease-in-out infinite;
    border-radius: 4px;
}

.progress-percentage {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Loading Dots Animation */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Animated Background Elements */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50px;
    animation: wave-move 8s ease-in-out infinite;
}

.wave-1 {
    animation-delay: 0s;
    opacity: 0.3;
}

.wave-2 {
    animation-delay: -2s;
    opacity: 0.2;
    height: 80px;
}

.wave-3 {
    animation-delay: -4s;
    opacity: 0.1;
    height: 60px;
}

/* Animations */
@keyframes backgroundShift {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-10px) translateY(-10px); }
    50% { transform: translateX(10px) translateY(10px); }
    75% { transform: translateX(-5px) translateY(5px); }
}

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

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes progressGlow {
    0% { transform: translateX(-30px); }
    100% { transform: translateX(400px); }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes wave-move {
    0% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
    50% {
        transform: translateX(-25%) translateY(0px);
        opacity: 1;
    }
    100% {
        transform: translateX(0%) translateY(20px);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .loading-container {
        padding: 32px 24px;
        margin: 20px;
    }

    #app-icon {
        width: 100px;
        height: 100px;
    }

    #loading-title {
        font-size: 24px;
    }

    .wave {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .loading-container {
        padding: 24px 20px;
    }

    #loading-title {
        font-size: 20px;
    }

    #loading-subtitle {
        font-size: 14px;
    }
}
