body {
    font-family: Arial, sans-serif;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 0;
    color: white;
    -webkit-user-select: none; /* Для Safari */
    -moz-user-select: none; /* Для Firefox */
    -ms-user-select: none; /* Для IE/Edge */
    user-select: none; /* Стандартное свойство */
}

.container {
    text-align: center;
    width: 100%;
    max-width: 100%; /* Убираем ограничение по ширине */
    padding: 20px;
}

.ball-container {
    position: relative;
    width: 90%; /* Шар занимает 90% ширины экрана */
    max-width: 400px; /* Максимальная ширина шара */
    margin: 20px auto;
    aspect-ratio: 1 / 1; /* Сохраняем пропорции 1:1 (круг) */
}

.ball {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.ball.shake {
    animation: shake 0.5s ease-in-out; /* Анимация встряхивания */
}

@keyframes shake {
    0% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-10px) rotate(-10deg); }
    50% { transform: translateX(10px) rotate(10deg); }
    75% { transform: translateX(-10px) rotate(-10deg); }
    100% { transform: translateX(0) rotate(0); }
}

.ball-button {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2; /* Кнопка поверх изображения */
    outline: none; /* Убираем outline */
    -webkit-tap-highlight-color: transparent; /* Убираем подсветку на мобильных устройствах */
}

.answer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    text-align: center;
    z-index: 3; /* Ответ поверх кнопки и изображения */
}

.voice-button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #555;
    color: white;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: 5px;
}

.voice-button:hover {
    background-color: #777;
}

@media (max-width: 600px) {
    .ball-container {
        width: 90%; /* На маленьких экранах шар занимает 90% ширины */
        max-width: 300px; /* Максимальная ширина для маленьких экранов */
    }

    .answer {
        font-size: 20px;
    }

    .voice-button {
        width: 90%;
    }
}