* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background: #f1f5f9;
    padding: 16px;
    min-height: 100vh;
}
.app {
    max-width: 750px;
    margin: 0 auto;
}
h1 {
    text-align: center;
    color: #0f172a;
    margin-bottom: 4px;
    font-size: 28px;
}
h1 span {
    color: #3b82f6;
}
.subtitle {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 20px;
}
h3 {
    color: #0f172a;
    font-size: 16px;
    margin-bottom: 6px;
}
.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}
textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: 0.2s;
}
textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
input[type="text"] {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}
input[type="text"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.search-input {
    width: 100%;
    padding: 12px 14px !important;
    font-size: 15px !important;
    margin-bottom: 10px;
}
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn:active {
    transform: scale(0.95);
}
.btn.primary {
    background: #3b82f6;
    color: #fff;
}
.btn.primary:hover {
    background: #2563eb;
}
.btn.success {
    background: #22c55e;
    color: #fff;
}
.btn.success:hover {
    background: #16a34a;
}
.btn.danger {
    background: #ef4444;
    color: #fff;
}
.btn.danger:hover {
    background: #dc2626;
}
.btn.secondary {
    background: #e2e8f0;
    color: #1e293b;
}
.btn.secondary:hover {
    background: #cbd5e1;
}
.btn.purple {
    background: #8b5cf6;
    color: #fff;
}
.btn.purple:hover {
    background: #7c3aed;
}

/* Предложения */
.subtitle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 6px;
    border-left: 3px solid #3b82f6;
    font-size: 14px;
    gap: 12px;
}
.subtitle-item .en {
    color: #0f172a;
    font-weight: 500;
    flex: 1;
}
.subtitle-item .ru {
    color: #64748b;
    flex: 1;
}
.subtitle-item .del {
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    font-size: 16px;
    transition: 0.2s;
    flex-shrink: 0;
}
.subtitle-item .del:hover {
    color: #ef4444;
    transform: scale(1.2);
}

/* Слова */
.word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 6px;
    border-left: 3px solid #8b5cf6;
    font-size: 14px;
    gap: 12px;
}
.word-item .word {
    color: #0f172a;
    font-weight: 600;
    flex: 1;
}
.word-item .trans {
    color: #64748b;
    flex: 1;
}
.word-item .del {
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    font-size: 16px;
    transition: 0.2s;
    flex-shrink: 0;
}
.word-item .del:hover {
    color: #ef4444;
    transform: scale(1.2);
}

/* Тренировка */
.training-word {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    padding: 20px;
}
.training-input {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}
.training-input input {
    width: 220px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
}
.training-input input:focus {
    border-color: #3b82f6;
}
.training-result {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-top: 10px;
}
.training-result.correct {
    color: #22c55e;
}
.training-result.wrong {
    color: #ef4444;
}
.training-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 10px;
    font-size: 14px;
    color: #64748b;
}
.training-stats span {
    font-weight: 700;
    color: #0f172a;
}
.training-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 12px;
    overflow: hidden;
}
.training-progress-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
    transition: width 0.3s;
}

.empty {
    text-align: center;
    color: #94a3b8;
    padding: 20px 0;
    font-size: 14px;
}

@media (max-width: 480px) {
    .subtitle-item {
        flex-wrap: wrap;
    }
    .subtitle-item .ru {
        width: 100%;
        padding-left: 4px;
    }
    .training-input {
        flex-direction: column;
        align-items: center;
    }
    .training-input input {
        width: 100%;
    }
    .btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* Стили для статуса слов */
.word-hard {
    border-left: 4px solid #ef4444 !important;
    background: #fef2f2 !important;
}
.word-known {
    border-left: 4px solid #22c55e !important;
    background: #f0fdf4 !important;
}
.subtitle-known {
    border-left: 4px solid #22c55e !important;
    background: #f0fdf4 !important;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background: #f1f5f9;
    padding: 16px;
    min-height: 100vh;
}
.app {
    max-width: 750px;
    margin: 0 auto;
}
h1 {
    text-align: center;
    color: #0f172a;
    margin-bottom: 4px;
    font-size: 28px;
}
h1 span {
    color: #3b82f6;
}
.subtitle {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 20px;
}
h3 {
    color: #0f172a;
    font-size: 16px;
    margin-bottom: 6px;
}
.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}
textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: 0.2s;
}
textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
input[type="text"] {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}
input[type="text"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.search-input {
    width: 100%;
    padding: 12px 14px !important;
    font-size: 15px !important;
    margin-bottom: 10px;
}
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn:active {
    transform: scale(0.95);
}
.btn.primary {
    background: #3b82f6;
    color: #fff;
}
.btn.primary:hover {
    background: #2563eb;
}
.btn.success {
    background: #22c55e;
    color: #fff;
}
.btn.success:hover {
    background: #16a34a;
}
.btn.danger {
    background: #ef4444;
    color: #fff;
}
.btn.danger:hover {
    background: #dc2626;
}
.btn.secondary {
    background: #e2e8f0;
    color: #1e293b;
}
.btn.secondary:hover {
    background: #cbd5e1;
}
.btn.purple {
    background: #8b5cf6;
    color: #fff;
}
.btn.purple:hover {
    background: #7c3aed;
}

/* Предложения */
.subtitle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 6px;
    border-left: 3px solid #3b82f6;
    font-size: 14px;
    gap: 12px;
}
.subtitle-item .en {
    color: #0f172a;
    font-weight: 500;
    flex: 1;
}
.subtitle-item .ru {
    color: #64748b;
    flex: 1;
}
.subtitle-item .del {
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    font-size: 16px;
    transition: 0.2s;
    flex-shrink: 0;
}
.subtitle-item .del:hover {
    color: #ef4444;
    transform: scale(1.2);
}

/* Слова */
.word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 6px;
    border-left: 3px solid #8b5cf6;
    font-size: 14px;
    gap: 12px;
}
.word-item .word {
    color: #0f172a;
    font-weight: 600;
    flex: 1;
}
.word-item .trans {
    color: #64748b;
    flex: 1;
}
.word-item .del {
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    font-size: 16px;
    transition: 0.2s;
    flex-shrink: 0;
}
.word-item .del:hover {
    color: #ef4444;
    transform: scale(1.2);
}

/* Тренировка */
.training-word {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    padding: 20px;
}
.training-input {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}
.training-input input {
    width: 220px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
}
.training-input input:focus {
    border-color: #3b82f6;
}
.training-result {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-top: 10px;
}
.training-result.correct {
    color: #22c55e;
}
.training-result.wrong {
    color: #ef4444;
}
.training-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 10px;
    font-size: 14px;
    color: #64748b;
}
.training-stats span {
    font-weight: 700;
    color: #0f172a;
}
.training-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 12px;
    overflow: hidden;
}
.training-progress-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
    transition: width 0.3s;
}

.empty {
    text-align: center;
    color: #94a3b8;
    padding: 20px 0;
    font-size: 14px;
}

@media (max-width: 480px) {
    .subtitle-item {
        flex-wrap: wrap;
    }
    .subtitle-item .ru {
        width: 100%;
        padding-left: 4px;
    }
    .training-input {
        flex-direction: column;
        align-items: center;
    }
    .training-input input {
        width: 100%;
    }
    .btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* Стили для статуса слов */
.word-hard {
    border-left: 4px solid #ef4444 !important;
    background: #fef2f2 !important;
}
.word-known {
    border-left: 4px solid #22c55e !important;
    background: #f0fdf4 !important;
}
.subtitle-known {
    border-left: 4px solid #22c55e !important;
    background: #f0fdf4 !important;
}