* {
    box-sizing: border-box;
}


body {
    margin: 0;
    min-height: 100vh;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f5f7;
    color: #1d1d1f;

    display: flex;
    justify-content: center;
}


.app {
    width: 100%;
    max-width: 600px;

    padding: 24px;
}


header {
    text-align: center;
    margin-bottom: 30px;
}


header h1 {
    font-size: 36px;
    margin-bottom: 8px;
}


header p {
    color: #6e6e73;
    font-size: 16px;
}



.card {

    background: white;

    border-radius: 24px;

    padding: 24px;

    margin-bottom: 20px;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.08);
}



#word {

    text-align: center;

    font-size: 42px;

    margin: 20px 0 30px;

}



input,
textarea {

    width: 100%;

    border-radius: 16px;

    border: 1px solid #d2d2d7;

    padding: 16px;

    font-size: 18px;

    font-family: inherit;

    outline: none;

}



input:focus,
textarea:focus {

    border-color: #007aff;

}



textarea {

    min-height: 150px;

    resize: vertical;

}



button {

    width: 100%;

    margin-top: 16px;

    padding: 16px;

    border: none;

    border-radius: 16px;

    background: #007aff;

    color: white;

    font-size: 18px;

    font-weight: 600;

    cursor: pointer;

}



button:active {

    transform: scale(0.98);

}



#result {

    text-align: center;

    font-size: 18px;

    min-height: 25px;

    margin-top: 15px;

}



footer {

    text-align: center;

    color: #8e8e93;

    margin-top: 30px;

}



/* iPhone */

@media(max-width:600px){

    .app {

        padding: 16px;

    }


    header h1 {

        font-size: 30px;

    }


    #word {

        font-size: 34px;

    }

}

.word-item {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 12px 0;

    border-bottom:
        1px solid #eee;

}


.word-info {

    display: flex;

    flex-direction: column;

}


.word-info strong {

    font-size: 18px;

}


.word-info span {

    color: #6e6e73;

}



.word-actions button {

    width: auto;

    padding: 8px 12px;

    margin-left: 6px;

    font-size: 14px;

}



.delete-btn {

    background: #ff3b30;

}


.edit-btn {

    background: #34c759;

}

/* =====================
   Окно редактирования
===================== */


.modal {

    display: none;

    position: fixed;

    inset: 0;

    background:
        rgba(0,0,0,0.35);

    align-items: center;

    justify-content: center;

    padding: 20px;

}



.modal-content {

    background: white;

    width: 100%;

    max-width: 400px;

    border-radius: 24px;

    padding: 24px;

    box-shadow:
        0 20px 50px rgba(0,0,0,0.2);

}



.modal-content h3 {

    margin-top: 0;

    text-align: center;

}



.modal-content label {

    display: block;

    margin-top: 15px;

    margin-bottom: 6px;

    color: #6e6e73;

}



.modal-content button {

    margin-top: 15px;

}



.cancel {

    background: #8e8e93;

}

.stats {

    margin-top: 20px;

    background: white;

    padding: 16px;

    border-radius: 18px;

    text-align: center;

    font-size: 18px;

    box-shadow:
        0 5px 20px rgba(0,0,0,0.05);

}


.stats strong {

    display: block;

    font-size: 32px;

    margin-top: 5px;

}

.today-stats {

    margin-top: 15px;

    background: white;

    padding: 20px;

    border-radius: 18px;

}


.today-stats h3 {

    margin-top: 0;

}


.today-stats div {

    margin-top: 10px;

    font-size: 17px;

}

.difficulty-buttons {

    margin-top: 20px;

    text-align: center;

}


.difficulty-buttons button {

    margin: 5px;

    width: auto;

    padding: 12px 18px;

}

.training-mode {

    margin-top: 15px;

    background: white;

    padding: 20px;

    border-radius: 18px;

}


.training-mode label {

    display:block;

    margin-top:15px;

    font-size:18px;

}


.training-mode p {

    margin-top:5px;

    color:#777;

}

.training-buttons {

    margin-top:20px;

    text-align:center;

}


#stopTraining {

    background:#eee;

}
