* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    /* Фоновый цвет на случай задержки загрузки видео */
    background-color: #000;
}

#background-video {
    position: absolute;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    will-change: transform; /* Оптимизация рендеринга */
}

/* Стили для невоспроизводимого видео с постером */
#background-video:not([src]), #background-video[poster] {
    object-fit: cover;
    object-position: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный черный фон для лучшей читаемости текста */
}

.main-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    max-width: 80%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.contact-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: white;
    text-align: right;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.contact-info a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #17a2b8;
}

@media (max-width: 768px) {
    .main-title {
        font-size: 1.5rem;
    }
    
    .contact-info {
        font-size: 0.8rem;
    }
}

/* Отключение видео на устройствах с низкой производительностью */
@media (prefers-reduced-motion: reduce) {
    #background-video {
        display: none;
    }
}