@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Exo:400,700|Orbitron:400,700');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#section1, .section-container, .controls-container, .home-section {
    margin: 0 !important;
    padding: 0 !important;
}

/* Основные стили для body и html */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.header, .top-section, .home-section {
    background-color: transparent;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    z-index: -1;
}

/* Фон для секций */
body.bg1::before {
    background-image: url('../images/fon1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
body.bg2::before {
    background-image: url('../images/fon2.webp');
}
body.bg3::before {
    background-image: url('../images/fon3.webp');
}
body.bg4::before {
    background: linear-gradient(to bottom, #ffffff, #808080);
}

/* По умолчанию меню скрыто на мобильных */
.menu-container {
    position: fixed;
    padding: 20px;
    align-items: center;
    box-sizing: border-box;
    top: 0;
    right: 0;
    width: auto;
    min-width: auto;
    max-width: none;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.menu-container.menu-open {
    transform: translateX(0);
}

/* Стиль для полей ввода */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 25px;
    background-color: #f8f8f8;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus, input[type="password"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
    outline: none;
}

/* Кнопка "Войти" */
button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #404440;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}
button[type="submit"]:hover {
    background-color: #363a36;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Изображения */
.clickable-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}
.clickable-image:hover {
    transform: scale(1.05);
}

body {
    font-family: 'Exo', sans-serif;
    overflow: hidden;
}

.fake-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
}

#section1 {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* Видео-фон для десктопа */
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Видео-фон для мобильных устройств */
.video-bg-mobile {
    display: none; /* Изначально скрыто на десктопах */
}

.demo-button {
    display: inline-block;
    padding: 15px 30px;
    margin-top: 20px;
    background-color: rgba(50, 50, 50, 0.7);
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    z-index: 10;
    position: relative;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.demo-button:hover {
    background-color: rgba(50, 50, 50, 0.9);
    transform: translateY(-5px);
}

.button-container {
    position: relative;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.button-container:hover .overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Форма логина */
.top-form {
    margin-bottom: 20px;
}
.top-form form {
    display: flex;
    flex-direction: column;
}
.top-form form input {
    margin-bottom: 10px;
    padding: 8px;
    box-sizing: border-box;
}
.top-form form button {
    padding: 8px;
    background: #4e54c8;
    color: #fff;
    border: none;
    cursor: pointer;
}

.sections {
    display: flex;
    flex-direction: column;
}

.sections .section {
    display: block;
    padding: 15px 30px;
    margin: 10px 0;
    background-color: rgba(50, 50, 50, 0.7);
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.sections .section:hover {
    background-color: rgba(50, 50, 50, 0.9);
    transform: translateY(-5px);
}

/* Гамбургер меню */
.menu-button {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 30px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 100000;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .video-bg {
        display: none; /* Скрываем десктопное видео */
    }
    .video-bg-mobile {
        display: block; /* Показываем мобильное видео */
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: -1;
    }

    .menu-button {
        display: block;
    }

    .menu-container {
        width: 100vw;
        min-width: 100vw;
    }
}

/* Десктопная адаптация */
@media (min-width: 769px) {
    .menu-button {
        display: none;
    }
    /* На десктопе меню сразу показано */
    .menu-container {
        transform: translateX(0);
    }
}
