/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Контейнер видео — заполняет весь экран */
.video-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Видео по умолчанию занимает всю ширину, высота подстраивается */
.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* обрезает края для сохранения пропорций */
    display: block;
    background: #000;
}

/* ===== Прогресс-бар загрузки ===== */
#loading-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0b0b0b;
    color: #fff;
    transition: opacity 0.6s ease;
    pointer-events: none;  /* чтобы не мешал кликам, если нужно */
}

#loading-bar-container.hidden {
    opacity: 0;
    pointer-events: none;
}

#loading-bar-track {
    width: min(80%, 400px);
    height: 6px;
    background: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

#loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f7b731, #f5a623);
    border-radius: 10px;
    transition: width 0.2s linear;
}

#loading-text {
    font-size: 1.1rem;
    letter-spacing: 1px;
    font-weight: 300;
    opacity: 0.8;
}

#loading-percent {
    font-weight: 600;
    color: #f7b731;
}

/* Небольшой логотип или оверлей (декорация) — опционально */
.brand {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.9rem;
    letter-spacing: 2px;
    z-index: 10;
    pointer-events: none;
    text-transform: uppercase;
    font-weight: 300;
    text-shadow: 0 0 10px rgba(0,0,0,0.7);
}

/* ===== ИКОНКИ МЕССЕНДЖЕРОВ (внизу по центру) ===== */
.social-icons {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 50;
    padding: 0 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-icons a:hover {
    transform: translateY(-5px) scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* Цвета иконок при наведении */
.social-icons a:hover .fa-telegram {
    color: #0088cc;
}

.social-icons a:hover .fa-whatsapp {
    color: #25d366;
}

.social-icons a:hover .fa-viber {
    color: #665cac;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .social-icons {
        bottom: 20px;
        gap: 15px;
    }

    .social-icons a {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .social-icons {
        bottom: 15px;
        gap: 12px;
    }

    .social-icons a {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ===== Адаптив для мобильных (вертикальная ориентация) ===== */
/* При вертикальной ориентации на мобильных ширина видео = 100%,
    а высота будет обрезана (object-fit: cover) — это уже работает.
    Дополнительно можно усилить для очень узких экранов */
@media (max-aspect-ratio: 16/9) {
    .video-wrapper video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Для очень широких экранов (например, ультраширокие мониторы) 
    видео будет растягиваться по высоте, а края обрезаться по бокам */
@media (min-aspect-ratio: 16/9) {
    .video-wrapper video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Дополнительная страховка: если видео не загрузилось */
.fallback-msg {
    display: none;
    color: #aaa;
    padding: 20px;
    text-align: center;
}