body {
    font-family: 'Helvetica Neue', sans-serif;
    background-color: #F2F2F2;
    margin: 0;
    padding: 0;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0 auto;
    width: 90%;
    max-width: 600px;
}

h1 {
    font-size: 4rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-top: 50px;
}

.word {
    font-size: 5rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-top: 50px;
}

.input-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    width: 100%;
}

input[type="text"] {
    padding: 15px;
    font-size: 1.5rem;
    border: none;
    border-radius: 5px;
    margin-right: 10px;
    width: 70%;
    max-width: 300px;
    text-align: center;
    background-color: #fff;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
    outline: none;
}

input[type="submit"] {
    padding: 15px;
    font-size: 1.5rem;
    border: none;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
    outline: none;
    flex-shrink: 0;
    margin-left: auto; /* Смещает кнопку вправо */
}

.words {
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.word-item {
    padding: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    border-radius: 5px;
    margin: 5px;
    background-color: #fff;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
}

.restart-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    width: 100%;
}

.restart {
    padding: 15px;
    font-size: 1.5rem;
    border: none;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
    margin-right: 10px;
    outline: none;
    flex-shrink: 0;
}

.instructions {
    margin-top: 50px;
    font-size: 1.2rem;
    color: #999;
    text-align: center;
    width: 100%;
}

/* Медиа-запросы для мобильных устройств (до 600px) */
@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
        margin-top: 20px;
    }
    .word {
        font-size: 3rem;
        margin-top: 20px;
    }
    .input-container {
        width: 90%; /* Уменьшаем ширину контейнера */
    }
    input[type="text"] {
        width: 60%; /* Уменьшаем ширину поля */
        max-width: 200px; /* Ограничиваем максимальную ширину */
        font-size: 1.2rem;
        margin-right: 5px; /* Уменьшаем отступ */
    }
    input[type="submit"] {
        font-size: 1.2rem;
        padding: 10px;
        margin-left: auto; /* Кнопка остаётся справа */
    }
    .words {
        margin-top: 20px;
    }
    .word-item {
        font-size: 1.2rem;
    }
    .restart-container {
        margin-top: 20px;
    }
    .restart {
        font-size: 1.2rem;
        padding: 10px;
    }
    .instructions {
        margin-top: 20px;
        font-size: 1rem;
    }
}
