/* Загрузочный экран */
.loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #151022;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loader-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-screen.fade-out {
    animation: fadeOut 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.loader-logo {
    width: 300px;
    height: 113px;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

.loader-logo img,
.loader-logo .loader-logo-gif {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.loader-progress-container {
    margin-top: 12px;
    width: 400px;
    max-width: 90%;
}

.loader-phrase {
    margin-top: 14px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loader-phrase.visible {
    opacity: 1;
}

.loader-progress-bar {
    width: 100%;
    height: 6px;
    background-color: #0F0A1A;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to bottom, rgba(167, 89, 255, 0.9) 0%, #9359fd 100%);
    border-radius: 3px;
    transition: width 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.loader-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .loader-logo {
        width: 360px;
        height: 135px;
        margin-bottom: 10px;
    }
    
    .loader-progress-container {
        margin-top: 0;
        width: 300px;
    }
    
    .loader-phrase {
        margin-top: 10px;
        font-size: 13px;
    }
    
    .loader-progress-bar {
        height: 5px;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        width: 210px;
        height: 78px;
        margin-bottom: 16px;
    }
    
    .loader-progress-container {
        margin-top: 8px;
        width: 250px;
    }
    
    .loader-phrase {
        margin-top: 8px;
        font-size: 12px;
    }
}
