.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); 
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff; 
    margin: auto; 
    padding: 15px; /* Уменьшено */
    border: 1px solid #888;
    width: 90%; 
    max-width: 350px; /* Уменьшено */
    border-radius: 8px; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); 
    position: relative; 
    animation: fadeIn 0.5s; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.close {
    color: #aaa;
    font-size: 40px; /* Уменьшено */
    font-weight: bold;
    position: absolute; 
    right: 15px; /* Уменьшено */
    top: 15px; /* Уменьшено */
}

.close:hover, .close:focus {
    color: red;
    cursor: pointer;
}

.audio-button {
    display: inline-block;
    margin: 8px 4px; /* Уменьшено */
}

/* Стили для языковых кнопок */
.language-modalbuttons {
    background-color: #e0e0e0;
    display: flex;
    width: 180px; /* Уменьшено */
    justify-content: center;
    margin: 2px 0;
    gap: 8px; /* Уменьшено */
    border-radius: 20px;
}

.language-modalbuttons div {
    display: flex;
    align-items: center;
    background-color: #f1f1f1;
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 0px 10px; /* Уменьшено */
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.language-modalbuttons div:hover {
    background-color: #e0e0e0;
    border-color: #888;
}

.language-modalbuttons img {
    width: 18px; /* Уменьшено */
    height: 18px; /* Уменьшено */
    border-radius: 50%; 
    margin-right: 4px; /* Уменьшено */
}

.lang-button.active {
    background-color: #dd9d92; 
    color: white; 
    border: 2px solid #5c3e3e; 
}

.audio-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
}
@media (max-width: 768px) {
    .buttons{
        display: flex;
        flex-wrap: nowrap;
        flex-direction: row;
        width: 200px;
        gap: 10px;
    }
    .modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); 
    }

    .modal-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        background-color: #ffffff; 
        margin: auto; 
        padding: 15px; /* Уменьшено */
        border: 1px solid #888;
        width: 70%; 
        height: 75%;
        max-width: 250px; /* Уменьшено */
        border-radius: 8px; 
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); 
        position: relative; 
        animation: fadeIn 0.5s; 
    }
    .language-modalbuttons {
    width: 130px; /* Уменьшено */
    }
    .language-modalbuttons div {
        font-size: 10px;
    }
    .audio-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        
    }
    .audio-button{
        margin: 0;
    }
    .audio-button button{
        margin: 5px;
        padding: 5px;
    }
    #study-description p{
        font-size: 10px;
    }
    .modal-content p{
    }
}