@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: #FFFFFF;
    background: #000000;
}

#bg-video, #bg-video-mobile {
    position: fixed;
    top: 50%; /* Центрируем по вертикали */
    left: 50%; /* Центрируем по горизонтали */
    width: 120%;
    height: 120%;
    object-fit: cover;
    z-index: -2;
    transition: transform 0.5s ease-out;
    transform: translate(-50%, -50%); /* Центрируем точно по середине */
}

#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.nav-links {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.nav-link {
    position: absolute;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 24px;
    pointer-events: all;
    transition: color 0.3s, text-shadow 0.3s;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-link:hover {
    color: #F2E8C9;
    text-shadow: 0 0 10px #F2E8C9;
    text-decoration: underline;
}

.top-left { top: 20px; left: 20px; }
.top-right { top: 20px; right: 20px; }
.bottom-left { bottom: 20px; left: 20px; }
.bottom-right { bottom: 20px; right: 20px; }

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.show {
    display: flex;
    opacity: 1;
}

.overlay-content {
    position: relative;
    max-width: 80%;
    padding: 40px;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 40px;
    cursor: pointer;
}

#overlay-text {
    text-align: center;
}

#overlay-text h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

#overlay-text ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

#overlay-text ul li {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.overlay-logo {
    display: block;
    margin: 20px auto 0 auto;
    max-width: 80px;
}

/* Logo at the very top */
.top-logo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
}

.top-logo img {
    max-width: 200px;
}

/* Media Queries */
@media (max-width: 1199px) and (min-width: 768px) {
    .nav-link { font-size: 20px; }
    #overlay-text h1 { font-size: 42px; }
}

@media (max-width: 767px) {
    .nav-link { font-size: 18px; }
    #overlay-text h1 { font-size: 32px; }
    #overlay-text ul li { font-size: 16px; }
    .top-logo img { max-width: 150px; }
    .overlay-content { padding: 20px; max-width: 90%; }
    #bg-video { display: none; }
    #bg-video-mobile { display: block; }
    /* Отключаем параллакс на мобильных */
    #bg-video, #bg-video-mobile {
        width: 100%;
        height: 100%;
        transform: translate(-50%, -50%) !important; /* Сохраняем центрирование */
    }
}

#overlay-text p {
    font-size: 18px;
    line-height: 2;
}

#overlay-text a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

#overlay-text a:hover {
    color: #F2E8C9;
    text-shadow: 0 0 8px #F2E8C9;
}

.nav-link:focus,
button:focus {
    outline: none;
}

a:focus,
button:focus {
    outline: none;
    box-shadow: none;
}

/* Accessibility */
a:focus, button:focus { outline: 2px solid #F2E8C9; }