/* ============================================
   AVACONNEX LOADING PAGE STYLES
   Cool animated loading screen with particles,
   gradient background, and smooth animations
   ============================================ */

.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 9999;
}

/* ============================================
   ANIMATED GRADIENT BACKGROUND
   ============================================ */

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 25%, #0F0F0F 50%, #1A1A1A 75%, #2D2D2D 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 1;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ============================================
   FLOATING PARTICLES
   ============================================ */

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(57, 255, 20, 0.6);
    border-radius: 50%;
    animation: float linear infinite;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

.particle:nth-child(1) {
    width: 8px;
    height: 8px;
    left: 10%;
    top: 20%;
    animation-duration: 20s;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    left: 80%;
    top: 30%;
    animation-duration: 25s;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 5px;
    height: 5px;
    left: 50%;
    top: 10%;
    animation-duration: 30s;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 7px;
    height: 7px;
    left: 20%;
    top: 70%;
    animation-duration: 22s;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    width: 6px;
    height: 6px;
    left: 90%;
    top: 80%;
    animation-duration: 28s;
    animation-delay: 3s;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* ============================================
   LOADING CONTENT
   ============================================ */

.loading-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
    color: white;
}

/* ============================================
   ANIMATED LOGO CIRCLE
   ============================================ */

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

.logo-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: rotateIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.logo-icon {
    width: 100%;
    height: 100%;
    color: white;
    filter: drop-shadow(0 0 20px rgba(57, 255, 20, 0.5));
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes rotateIn {
    0% {
        transform: rotate(-180deg) scale(0);
        opacity: 0;
    }

    100% {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(57, 255, 20, 0.5));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(57, 255, 20, 0.8));
    }
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(57, 255, 20, 0.6);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   LOADING TEXT
   ============================================ */

.loading-text-wrapper {
    animation: slideUp 0.8s ease-out 0.2s both;
}

.loading-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 2px;
    color: #B87333;
    text-shadow: 0 4px 15px rgba(184, 115, 51, 0.3);
}

.loading-subtitle {
    font-size: 1rem;
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   ANIMATED LOADING DOTS
   ============================================ */

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #39FF14;
    animation: bounce 1.4s infinite;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-bar-container {
    width: 200px;
    height: 3px;
    background: rgba(57, 255, 20, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(57, 255, 20, 0.3), rgba(57, 255, 20, 0.9), rgba(57, 255, 20, 0.3));
    background-size: 200% 100%;
    animation: progressMove 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

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

    50% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .loading-title {
        font-size: 2rem;
    }

    .loading-subtitle {
        font-size: 0.9rem;
    }

    .logo-circle {
        width: 100px;
        height: 100px;
    }

    .progress-bar-container {
        width: 150px;
    }
}

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

    .loading-subtitle {
        font-size: 0.8rem;
    }

    .logo-circle {
        width: 80px;
        height: 80px;
    }

    .progress-bar-container {
        width: 120px;
    }

    .loading-content {
        gap: 20px;
    }
}