/* ===== АНГЛИЙСКИЙ С ИИ: карточки упражнений [[eng:ID]]. Переменные из base.css как в games.css ===== */

.eng-host { display: block; margin: 2px 0; }
.eng-card {
    box-sizing: border-box;
    max-width: min(400px, 94vw);   /* shire: 5 urovnevyh chipov (A1..C1) s podpisyami vlezayut */
    background: var(--bubble-other, #fff);
    border: 1px solid var(--border, rgba(0,56,65,.1));
    border-radius: 18px;
    padding: 13px 14px 14px;
    color: var(--text, #1A1D21);
    box-shadow: 0 1px 2px rgba(0,56,65,.05), 0 8px 24px rgba(0,56,65,.08);
}
.eng-loading { color: var(--text-secondary, #65676B); font-size: 15px; text-align: center; padding: 18px 8px; min-height: 60px; }

/* --- шапка прогресса: уровень + XP-бар + серия --- */
.eng-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.eng-lvl {
    flex: 0 0 auto; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: #fff;
    background: linear-gradient(135deg, var(--brand, #005f6d), var(--brand-dark, #0a7c88));
    border-radius: 8px; padding: 3px 7px;
}
.eng-xpwrap { flex: 1 1 auto; height: 7px; border-radius: 4px; background: var(--soft, rgba(0,56,65,.08)); overflow: hidden; }
.eng-xpbar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent, #ff8c42), #ffb26b); transition: width .35s ease; }
.eng-xp { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--text-secondary, #65676B); }
.eng-streak { flex: 0 0 auto; font-size: 12px; font-weight: 700; }

.eng-topic-badge { font-size: 11px; font-weight: 700; color: var(--text-secondary, #65676B); margin: -3px 0 7px; }
.eng-q { font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 10px; white-space: pre-wrap; }

/* --- меню: уровни-чипы + сетка тем --- */
.eng-lvl-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.eng-lvl-chip {
    flex: 1 1 calc(20% - 6px); min-width: 44px; max-width: 100%; overflow: hidden; border: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    background: var(--soft, rgba(0,56,65,.06)); color: var(--text, #1A1D21);
    border-radius: 10px; padding: 6px 4px; font-size: 13px; font-weight: 800;
    box-shadow: inset 0 0 0 1px var(--border, rgba(0,56,65,.08));
    transition: background .15s, transform .12s;
}
.eng-lvl-chip small { font-size: 8.5px; font-weight: 600; color: var(--text-secondary, #65676B); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.eng-lvl-chip.active { background: linear-gradient(135deg, var(--brand, #005f6d), var(--brand-dark, #0a7c88)); color: #fff; box-shadow: none; }
.eng-lvl-chip.active small { color: rgba(255,255,255,.85); }
.eng-lvl-chip:active { transform: scale(.95); }

.eng-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.eng-topic-btn {
    display: flex; align-items: center; gap: 7px; border: none; cursor: pointer;
    background: var(--soft, rgba(0,56,65,.05)); color: var(--text, #1A1D21);
    border-radius: 12px; padding: 9px 10px; font-size: 12.5px; font-weight: 600; text-align: left;
    box-shadow: inset 0 0 0 1px var(--border, rgba(0,56,65,.08));
    transition: background .15s, transform .12s;
}
.eng-topic-btn .eng-topic-ic { font-size: 17px; line-height: 1; }
.eng-topic-btn:active { transform: scale(.96); }
.eng-topic-btn.active { box-shadow: inset 0 0 0 2px var(--accent, #ff8c42); }

/* --- варианты ответа --- */
.eng-opts { display: flex; flex-direction: column; gap: 7px; }
.eng-opt {
    border: none; cursor: pointer; text-align: left;
    background: var(--soft, rgba(0,56,65,.05)); color: var(--text, #1A1D21);
    border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; line-height: 1.3;
    box-shadow: inset 0 0 0 1px var(--border, rgba(0,56,65,.1));
    transition: background .15s, transform .12s;
}
.eng-opt:not(:disabled):active { transform: scale(.97); }
.eng-opt.good { background: rgba(46,160,90,.16); box-shadow: inset 0 0 0 2px #2ea05a; color: inherit; }
.eng-opt.bad { background: rgba(220,60,60,.13); box-shadow: inset 0 0 0 2px var(--aya-danger, #dc3c3c); }
.eng-opt.dim { opacity: .55; }
.eng-opt:disabled { cursor: default; }

/* --- впиши слово / слушай и пиши --- */
.eng-type-row { display: flex; gap: 7px; align-items: center; }
.eng-input {
    flex: 1 1 auto; min-width: 0; box-sizing: border-box;
    border: 1px solid var(--border, rgba(0,56,65,.15)); border-radius: 12px;
    background: var(--bg, #fff); color: var(--text, #1A1D21);
    padding: 10px 12px; font-size: 15px; outline: none;
}
.eng-input:focus { border-color: var(--brand, #005f6d); }
.eng-send {
    flex: 0 0 auto; border: none; cursor: pointer; width: 42px; height: 42px;
    border-radius: 12px; font-size: 17px; color: #fff;
    background: linear-gradient(135deg, var(--brand, #005f6d), var(--brand-dark, #0a7c88));
    box-shadow: 0 3px 10px rgba(0,95,109,.25); transition: transform .12s;
}
.eng-send:active { transform: scale(.93); }
.eng-send.wide { width: auto; height: auto; padding: 9px 16px; font-size: 13px; font-weight: 700; }
.eng-say-row { margin-bottom: 9px; }
.eng-say {
    border: none; cursor: pointer; border-radius: 12px; padding: 9px 14px;
    font-size: 14px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--accent, #ff8c42), #ff9f5e);
    box-shadow: 0 3px 10px rgba(255,140,66,.3); transition: transform .12s;
}
.eng-say:active { transform: scale(.95); }

/* --- сопоставь пары --- */
.eng-match { display: flex; gap: 8px; }
.eng-mcol { flex: 1 1 50%; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eng-mword {
    border: none; cursor: pointer; border-radius: 10px; padding: 8px 9px;
    font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: center;
    background: var(--soft, rgba(0,56,65,.05)); color: var(--text, #1A1D21);
    box-shadow: inset 0 0 0 1px var(--border, rgba(0,56,65,.1));
    overflow-wrap: anywhere; transition: background .15s, transform .12s;
}
.eng-mword:active { transform: scale(.96); }
.eng-mword.sel { box-shadow: inset 0 0 0 2px var(--accent, #ff8c42); }
.eng-mword.paired { background: rgba(46,160,90,.13); box-shadow: inset 0 0 0 1px #2ea05a; }
.eng-match-tools { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.eng-mhint { font-size: 11px; color: var(--text-secondary, #65676B); }
.eng-pairs-done { display: flex; flex-direction: column; gap: 5px; }
.eng-pair-done { font-size: 13px; padding: 6px 9px; border-radius: 9px; background: var(--soft, rgba(0,56,65,.05)); }

/* --- фидбек / подсказка / низ --- */
.eng-verdict { margin-top: 10px; font-size: 14px; font-weight: 800; }
.eng-verdict.good { color: #2ea05a; }
.eng-verdict.bad { color: var(--aya-danger, #dc3c3c); }
.eng-explain { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--text-secondary, #65676B); white-space: pre-wrap; }
.eng-hintbox {
    margin-top: 9px; font-size: 13px; line-height: 1.35;
    background: rgba(255,140,66,.1); border: 1px solid rgba(255,140,66,.3);
    border-radius: 10px; padding: 7px 10px;
}
.eng-done-ans { font-size: 14px; margin-top: 2px; }
.eng-tr { font-size: 12.5px; color: var(--text-secondary, #65676B); margin-top: 3px; }
.eng-user-ans { font-size: 12.5px; color: var(--aya-danger, #dc3c3c); margin-top: 3px; }
.eng-foot { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.eng-mini {
    border: none; cursor: pointer; border-radius: 10px; padding: 7px 11px;
    font-size: 12px; font-weight: 700;
    background: var(--soft, rgba(0,56,65,.06)); color: var(--text, #1A1D21);
    box-shadow: inset 0 0 0 1px var(--border, rgba(0,56,65,.08)); transition: transform .12s;
}
.eng-mini:active { transform: scale(.95); }

/* --- тёмная тема --- */
body.dark-theme .eng-input { background: #1c242d; border-color: rgba(255,255,255,.14); }
body.dark-theme .eng-opt.good { background: rgba(46,160,90,.22); }
body.dark-theme .eng-opt.bad { background: rgba(220,60,60,.2); }
body.dark-theme .eng-hintbox { background: rgba(255,140,66,.14); }
