/* Общие стили */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #000000; /* Черный фон */
    color: #fff; /* Белый текст */
    overflow: auto; /* Восстанавливаем прокрутку */
    height: 100vh; /* Высота равна высоте экрана */
    display: flex;
    flex-direction: column;
}

.container {
    width: 90%;
    margin: 0 auto;
    text-align: center;
}

/* Большая надпись */
.header-text {
    width: 100%;
    height: 60vh; /* Увеличиваем высоту для акцента на тексте */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #000;
    position: relative;
    z-index: 1;
}

.header-text .text-line {
    font-size: 10vw; /* Адаптивный размер текста */
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    color: #fff;
}

/* Основной контент (пустой, чтобы опустить кнопки ниже) */
main {
    flex-grow: 1; /* Занимает оставшееся пространство */
}

/* Контейнер для кнопок */
.buttons-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px; /* Отступ между кнопками */
    padding: 20px 0;
    background-color: transparent; /* Прозрачный фон */
    position: relative;
    z-index: 2;
}

/* Кнопки */
.project-button {
    display: inline-block;
    width: 100px; /* Ширина кнопок (квадратные) */
    height: 100px; /* Высота кнопок (квадратные) */
    background-color: transparent; /* Прозрачный фон */
    color: #fff;
    text-align: center;
    line-height: 100px; /* Центрируем текст по вертикали */
    text-decoration: none;
    font-size: 1em;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.5); /* Полупрозрачная белая рамка */
    transition: border-color 0.3s ease;
}

.project-button:hover {
    border-color: rgba(255, 255, 255, 0.8); /* Более яркая рамка при наведении */
}

/* Подвал */
footer {
    background-color: rgba(51, 51, 51, 0.8);
    color: #fff;
    padding: 10px 0;
    text-align: center;
    position: relative;
    z-index: 2;
    height: 10vh; /* Уменьшаем высоту футера */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto; /* Прижимаем футер к нижней части экрана */
}

/* Снежинки */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.snowflake {
    position: absolute;
    color: #fff;
    font-size: 20px;
    user-select: none;
    animation: fall linear infinite;
    top: -10%;
    cursor: pointer;
}

/* Красная снежинка */
.snowflake.red {
    color: red !important; /* Красный цвет */
    pointer-events: auto; /* Разрешаем клики */
}

@keyframes fall {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(110vh);
    }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #000;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #555;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
}

.close {
    color: #fff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ccc;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form input, form textarea {
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #222;
    color: #fff;
}

form button {
    padding: 10px;
    background-color: #000;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
}

form button:hover {
    background-color: #222;
}

/* Стили для страницы projects.html */
.content {
    padding: 20px 0;
}

.image-windows {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Отступ между окнами */
    justify-content: center;
    margin-bottom: 40px;
}

.image-window {
    background-color: #222; /* Темный фон */
    border: 1px solid #555; /* Рамка */
    border-radius: 10px; /* Скругленные углы */
    overflow: hidden; /* Обрезаем содержимое, чтобы не выходило за рамки */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none; /* Убираем подчеркивание у ссылок */
    color: inherit; /* Наследуем цвет текста */
    display: inline-block; /* Размер окна зависит от содержимого */
}

.image-window:hover {
    transform: scale(1.05); /* Увеличение при наведении */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3); /* Тень при наведении */
}

.image-window img {
    max-width: 100%; /* Изображение не превышает ширину окна */
    height: auto; /* Сохраняем пропорции изображения */
    display: block; /* Убираем лишние отступы */
}

.image-window p {
    padding: 10px;
    color: #fff;
    font-size: 1em;
    margin: 0;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    color: #fff;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

.back-button:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

/* Адаптивность для мобильных устройств 9:16 */
@media (max-width: 480px) and (max-aspect-ratio: 9/16) {
    .header-text {
        height: 50vh; /* Уменьшаем высоту для мобильных */
    }

    .header-text .text-line {
        font-size: 15vw; /* Увеличиваем размер текста */
    }

    .buttons-wrapper {
        flex-wrap: wrap; /* Кнопки переносятся на новую строку, если не помещаются */
        gap: 10px; /* Уменьшаем отступы */
    }

    .project-button {
        width: 80px; /* Уменьшаем ширину для мобильных */
        height: 80px; /* Уменьшаем высоту для мобильных */
        line-height: 80px; /* Центрируем текст по вертикали */
        font-size: 0.9em;
    }

    footer {
        height: 8vh; /* Ещё меньше высота футера для мобильных */
    }

    /* Явное указание цвета для красной снежинки на мобильных устройствах */
    .snowflake.red {
        color: red !important;
    }

    /* Адаптивность для окон с изображениями */
    .image-window {
        width: 100%; /* На мобильных окна занимают всю ширину */
    }
}