/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Main gradient background */
.loading-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, 
        #0f172a 0%,     /* Dark navy */
        #1e3a8a 25%,    /* Deep blue */
        #1d4ed8 50%,    /* Bright blue */
        #2563eb 75%,    /* Medium blue */
        #1e40af 100%    /* Royal blue */
    );
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Loading content container */
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    z-index: 10;
    position: relative;
}

/* Animated logo section */
.logo-section {
    position: relative;
}

.animated-logo {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: rotateRing 3s linear infinite;
}

.ring-1 {
    width: 120px;
    height: 120px;
    border-top: 2px solid #3b82f6;
    border-right: 2px solid rgba(59, 130, 246, 0.3);
    animation-duration: 2s;
}

.ring-2 {
    width: 90px;
    height: 90px;
    border-top: 2px solid #1d4ed8;
    border-left: 2px solid rgba(29, 78, 216, 0.3);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.ring-3 {
    width: 60px;
    height: 60px;
    border-top: 2px solid #60a5fa;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
    animation-duration: 1s;
}

.center-dot {
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

@keyframes rotateRing {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

/* Text section */
.text-section {
    text-align: center;
    color: white;
}

.loading-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8, #60a5fa);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 3s ease-in-out infinite;
    letter-spacing: 0.1em;
}

@keyframes textGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out;
}

.dot-1 {
    animation-delay: -0.32s;
}

.dot-2 {
    animation-delay: -0.16s;
}

.dot-3 {
    animation-delay: 0s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Progress section */
.progress-section {
    width: 300px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8, #60a5fa);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: progressFill 3s ease-out forwards, progressGradient 2s linear infinite;
    width: 0%;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

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

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

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    animation: fadeInOut 2s ease-in-out infinite;
}

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

/* Floating particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(59, 130, 246, 0.6);
    border-radius: 50%;
    animation: floatParticle 6s linear infinite;
}

.particle-1 {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle-2 {
    left: 20%;
    animation-delay: -1s;
    animation-duration: 6s;
    background: rgba(29, 78, 216, 0.6);
}

.particle-3 {
    left: 80%;
    animation-delay: -2s;
    animation-duration: 7s;
    background: rgba(96, 165, 250, 0.6);
}

.particle-4 {
    left: 70%;
    animation-delay: -3s;
    animation-duration: 9s;
}

.particle-5 {
    left: 40%;
    animation-delay: -4s;
    animation-duration: 5s;
    background: rgba(29, 78, 216, 0.4);
}

.particle-6 {
    left: 90%;
    animation-delay: -5s;
    animation-duration: 8s;
    background: rgba(96, 165, 250, 0.4);
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0px) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) translateX(10px) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(10vh) translateX(-10px) scale(1);
    }
    100% {
        transform: translateY(-10vh) translateX(0px) scale(0);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .loading-title {
        font-size: 2rem;
    }
    
    .animated-logo {
        width: 100px;
        height: 100px;
    }
    
    .ring-1 {
        width: 100px;
        height: 100px;
    }
    
    .ring-2 {
        width: 75px;
        height: 75px;
    }
    
    .ring-3 {
        width: 50px;
        height: 50px;
    }
    
    .progress-section {
        width: 250px;
    }
    
    .loading-content {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .loading-title {
        font-size: 1.5rem;
    }
    
    .progress-section {
        width: 200px;
    }
    
    .loading-content {
        gap: 1.5rem;
    }
}

/* Fade out animation for redirect */
.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}