﻿.loading {
    width: 100%;
    height: 100vh;
    position: fixed;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 1s ease-in-out; 
}

/* Класс для скрытия элемента */
#loading.hidden {
    opacity: 0;
}

    /* Animated background particles */
    .loading::before {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        background-image: radial-gradient(2px 2px at 20% 30%, #41CAC2, transparent), radial-gradient(2px 2px at 60% 70%, #c021c3, transparent), radial-gradient(1px 1px at 50% 50%, #866efb, transparent), radial-gradient(2px 2px at 80% 10%, #41CAC2, transparent), radial-gradient(2px 2px at 10% 90%, #c021c3, transparent);
        background-size: 50vw 50vh;
        animation: backgroundFloat 20s linear infinite;
        opacity: 0.3;
    }

@keyframes backgroundFloat {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

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

/* Logo animation container */
.logo-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rotating rings */
.ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.ring-1 {
    border-top-color: #41CAC2;
    border-right-color: #41CAC2;
    animation: rotate 2s linear infinite;
}

.ring-2 {
    width: 85%;
    height: 85%;
    border-bottom-color: #c021c3;
    border-left-color: #866efb;
    animation: rotate-reverse 1.5s linear infinite;
}

.ring-3 {
    width: 70%;
    height: 70%;
    border-top-color: #866efb;
    border-bottom-color: #41CAC2;
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* Center logo */
.logo-text {
    font-size: 32px;
    font-weight: 900;
    font-style: italic;
    background: linear-gradient(45deg, #41CAC2, #c021c3, #866efb);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

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

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

/* Loading text and progress */
.loading-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-label-page {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 1px;
    animation: pulseLoading 2s ease-in-out infinite;
}

@keyframes pulseLoading {
    0%, 100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Progress bar container */
.progress-container {
    width: 250px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #41CAC2, #c021c3, #866efb);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: progressLoad 2s ease-in-out infinite, gradientMove 3s linear infinite;
}

@keyframes progressLoad {
    0% {
        width: 0%;
    }

    50% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

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

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

/* Floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: float 6s ease-in-out infinite;
}

.orb-1 {
    width: 150px;
    height: 150px;
    background: #41CAC2;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: #c021c3;
    bottom: 10%;
    right: 10%;
    animation-delay: 2s;
}

.orb-3 {
    width: 100px;
    height: 100px;
    background: #866efb;
    top: 50%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Loading dots */
.loading-dots {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #41CAC2;
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

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

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

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

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

/* Responsive design */
@media (max-width: 768px) {
    .logo-container {
        width: 140px;
        height: 140px;
    }

    .logo-text {
        font-size: 24px;
    }

    .loading-label-page {
        font-size: 16px;
    }

    .progress-container {
        width: 200px;
    }
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}
