@media (max-width: 768px)
{
body {
    width: 100%;
    height: auto; 
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.9em;
    color: white;
    line-height: 135%;
    background-color: #1E201E;
    margin: 0 auto; 
}

/*основное тело*/
.body {
    width: 100%; 
    height: auto; 
    margin-top: 10px; 
    background-color: #3C3D37;
    border-radius: 20px;
    padding-bottom: 80px; 
    position: relative;
}

/*стили кнопки ? в нижнем меню*/
#about-us-button-bottom
{
    width: 47px; 
    font-size: 20px; 
    height: 47px; 
    border-radius: 15px;
    border: none;
    color: white;
}
#newsMobile {
    width: 80px;
    height: 45px;
    text-align: center;
    background-color: #4CAF50;
    font-size: 17px;
    color: white;
    border-radius: 10px;
    border: none;
}

#saveDataMobile {
    width: 80px;
    height: 45px;
    text-align: center;
    background-color: #4CAF50;
    font-size: 16px;
    color: white;
    border-radius: 10px;
    border: none;
}

/* ================= ИСПРАВЛЕНА НИЖНЯЯ ПАНЕЛЬ ================= */
.bottom-nav {
    position: fixed;
    bottom: 7px; /* Приподнимаем от самого низа экрана */
    left: 10px;   /* Отступ слева */
    right: 10px;  /* Отступ справа */
    width: auto;  /* Ширина рассчитывается автоматически от left/right */
    border: 1px solid #697565;
    border-radius: 20px; /* Полное закругление со всех сторон (как iOS) */
    background-color: #3C3D37;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-sizing: border-box;
    z-index: 100; /* Чтобы панель была поверх контента */
}

/*стили кнопок нижнего меню*/
.bottom-nav a, .bottom-nav button {
    display: block;
    width: 47px; 
    height: 47px;
    margin: 0;
}
.iconDeveloper {
    width: 47px;
    height: 47px;
    border-radius: 25px;
}

.feedbackTelegram
{
    width: 47px;
    height: 47px;
}
.feedbackMail
{
    width: 47px;
    height: 47px;
}
.bottom-nav-pc {
    display: none;
}


.scrollable-block {
    width: 95%; 
    height: auto; 
    display: flex;
    flex-direction: column; 
    overflow-y: auto;
    margin-top: 10px; 
    margin-left: auto;
    margin-right: auto;
    border-radius: 15px;
    padding: 10px;
    gap: 20px;
    box-sizing: border-box;
}

.game {
    text-align: center;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #1E201E;
    padding: 10px;
    width: 95%; 
    height: auto; 
    border-radius: 15px;
    background-color: #697565;
    display: flex; 
    flex-direction: column; 
    box-sizing: border-box;
}

.game-content {
    flex-grow: 1; 
}

.icon {
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    max-width: 100%; 
    height: auto;
}

.title {
    font-style: italic;
    font-weight: bold;
    color: white;
    font-size: 20px; 
    background-color: #697565;
    width: 100%; 
    height: auto; 
    border-radius: 10px;
    text-align: center;
    resize: none; 
    overflow: auto; 
    border: none; 
    padding: 5px; 
    font-family: inherit; 
    line-height: inherit; 
    box-sizing: border-box; 
}
.description {
    font-style: italic;
    font-weight: bold;
    color: white;
    background-color: #697565;
    width: 100%; 
    height: 75px; 
    border-radius: 10px;
    text-align: center;
    resize: none; 
    overflow: auto; 
    border: none; 
    padding: 5px; 
    font-family: inherit; 
    font-size: 16px; 
    line-height: inherit; 
    box-sizing: border-box;
}

.game-buttons {
    margin-bottom: auto; 
    margin-top: 10px;
}

/* ================= ИСПРАВЛЕНА КНОПКА "ПОДРОБНЕЕ" ================= */
.open-game-btn {
    background-color: #5fb85f;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
    font-family: inherit;
    margin-top: 5px;
}
.open-game-btn:active {
    background-color: #4ea34e;
}
.download-button, .upcoming-button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 8px 16px; 
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px; 
    margin: 5px 0; 
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}


/* Отступ для кнопок "Официальные релизы" и "Не официальные релизы" */
.release-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 20px; 
    padding-top: 10px; 
}

.oficialGames, .noOficialGames, .news {
    width: 40%; 
    height: 40px; 
    border-radius: 10px;
    border: 0;
    font-size: 12px; 
    box-sizing: border-box;
}

/* ================= ИСПРАВЛЕНЫ МОДАЛЬНЫЕ ОКНА ================= */
.modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%; /* Меняем 100vh на 100% - это убирает скролл всей страницы */
    background-color: rgba(0,0,0,0.6); 
    align-items: center;
    justify-content: center;
}

/* Сами кнопки в модалке */
.modal-game-buttons .download-button, 
.modal-game-buttons .upcoming-button {
    display: block; /* Меняем inline-block на block, чтобы width работал жестко */
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    padding: 10px 0;
    border-radius: 8px;
    background-color: #5fb85f;
    color: white;
    text-align: center;
    font-size: 16px;
}

.modal-game-buttons .download-button:hover {
    background-color: #4ea34e;
}

.modal-game-buttons .upcoming-button {
    background-color: #D98C00;
}

/* Общие стили всех модальных окон на телефоне */
.modal-content,
.game-modal-content,
.about-modal-content {
    background-color: #3C3D37;
    border-radius: 10px;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    margin: 0;
    padding: 20px;
    border: 1px solid #888;
    width: 90%; 
    max-width: 450px; 
    max-height: 90vh; 
    overflow-y: auto; /* Скролл только ВНУТРИ окна */
    position: relative; 
    box-sizing: border-box;
    color: white;
}

/* Контейнер для кнопок в модальном окне */
.modal-game-buttons {
    display: flex;
    flex-direction: column; /* Строго друг под другом */
    align-items: center;
    width: 100%;
    gap: 10px; /* Расстояние между кнопками/плашками */
    margin-top: 10px;
}

.modal-game-buttons .coming-soon-button {
            display: inline-block;
            background-color: #888;
            color: white;
            padding: 10px 20px;
            border-radius: 10px;
            text-decoration: none;
            width: 100%;
            box-sizing: border-box;
        }

/* Специфично для окна с игрой, чтобы элементы не растягивались хаотично */
.game-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.game-modal-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0; /* Важно для корректной работы scroll внутри flex-контейнера */
}

.modal-game-icon {
            width: 120px;
            height: 120px;
            border-radius: 15px;
            margin-bottom: 15px;
            object-fit: cover;
        }

/* Для модалки "Информация :)" сделаем чуть шире */
.about-modal-content {
    max-width: 600px;
}

/* Кнопка закрытия (крестик) */
.close, .close-game {
    color: #aaa;
    position: absolute; 
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus,
.close-game:hover,
.close-game:focus {
    color: #4CAF50;
    text-decoration: none;
    cursor: pointer;
}

#about-us-button
{
    display: none;
}
}