.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    animation: contentFadeIn 1.2s ease-out;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Логотип */
.preloader-logo {
    margin-bottom: 25px;
    animation: logoFloat 4s ease-in-out infinite;
}

.preloader-logo img{
    width:250px!important;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 5px 15px rgba(192, 0, 0, 0.5));
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
        filter: drop-shadow(0 15px 25px rgba(192, 0, 0, 0.8));
    }
}

.preloader-logo img {
    width: 140px;
    height: auto;
    filter: brightness(1.2) drop-shadow(0 0 20px rgba(192, 0, 0, 0.7));
}

/* Текст - КРАСИВЫЙ СТИЛЬ КОТОРЫЙ ТЕБЕ ПОНРАВИЛСЯ */
.preloader-text h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(192, 0, 0, 0.8),
        0 0 30px rgba(192, 0, 0, 0.6);
    background: linear-gradient(45deg, #fff, #ffcccc, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        background-position: 0% 50%;
        text-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.8),
            0 0 20px rgba(192, 0, 0, 0.8),
            0 0 30px rgba(192, 0, 0, 0.6);
    }
    50% {
        background-position: 100% 50%;
        text-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.8),
            0 0 25px rgba(192, 0, 0, 1),
            0 0 40px rgba(192, 0, 0, 0.8);
    }
}

.preloader-text p {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    color: var(--secondary-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(192, 0, 0, 0.6);
    font-weight: 300;
}

/* ==================== */
/* АДАПТИВНОСТЬ */
/* ==================== */

/* Мобильные (до 767px) */
@media (max-width: 767px) {
    .preloader-logo img {
        width: 100px;
    }
    
    .preloader-text h1 {
        font-size: 1.6rem;
        letter-spacing: 1.5px;
    }
    
    .preloader-text p {
        font-size: 0.9rem;
        letter-spacing: 2px;
        margin-bottom: 25px;
    }
    
    /* Для ландшафтной ориентации */
    @media (orientation: landscape) and (max-height: 500px) {
        .preloader-content {
            transform: scale(0.8);
            margin-top: -30px;
        }
        
        .preloader-logo img {
            width: 80px;
        }
        
        .preloader-text h1 {
            font-size: 1.4rem;
            margin-bottom: 5px;
        }
        
        .preloader-text p {
            font-size: 0.8rem;
            margin-bottom: 15px;
        }
    }
}

/* Планшеты (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .preloader-logo img {
        width: 120px;
    }
    
    .preloader-text h1 {
        font-size: 1.9rem;
    }
    
    .preloader-text p {
        font-size: 1rem;
    }
}

/* Десктоп (1024px и больше) */
@media (min-width: 1024px) {
    .preloader-logo img {
        width: 140px;
    }
    
    .preloader-text h1 {
        font-size: 2.2rem;
    }
    
    .preloader-text p {
        font-size: 1.1rem;
    }
}

/* Большие экраны (1440px и больше) */
@media (min-width: 1440px) {
    .preloader-logo img {
        width: 160px;
    }
    
    .preloader-text h1 {
        font-size: 2.5rem;
    }
    
    .preloader-text p {
        font-size: 1.2rem;
        letter-spacing: 4px;
    }
}

/* Анимации для медленных устройств */
@media (prefers-reduced-motion: reduce) {
    .preloader-content,
    .preloader-logo,
    .preloader-text h1 {
        animation: none !important;
    }
    
    .preloader-text h1 {
        background: var(--light-color);
        -webkit-text-fill-color: var(--light-color);
        text-shadow: 0 0 10px rgba(192, 0, 0, 0.7);
    }
    
    .preloader-text p {
        color: var(--secondary-color);
        text-shadow: 0 0 5px rgba(192, 0, 0, 0.5);
    }
}

/* Оптимизация для Retina дисплеев */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .preloader-logo img {
        filter: brightness(1.2) drop-shadow(0 0 30px rgba(192, 0, 0, 0.8));
    }
}