/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== THEME VARIABLES ===== */
:root[data-theme="dark"] {
  --bg:       #0f172a;
  --bg2:      #1e293b;
  --bg3:      #334155;
  --accent:   #6366f1;
  --accent2:  #818cf8;
  --success:  #22c55e;
  --danger:   #ef4444;
  --warning:  #f59e0b;
  --text:     #f1f5f9;
  --text2:    #94a3b8;
  --radius:   14px;
  --shadow:   0 4px 24px rgba(0,0,0,.4);
  --flashcard-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

:root[data-theme="light"] {
  --bg:       #f1f5f9;
  --bg2:      #ffffff;
  --bg3:      #e2e8f0;
  --accent:   #4f46e5;
  --accent2:  #6366f1;
  --success:  #16a34a;
  --danger:   #dc2626;
  --warning:  #d97706;
  --text:     #0f172a;
  --text2:    #64748b;
  --radius:   14px;
  --shadow:   0 4px 24px rgba(0,0,0,.08);
  --flashcard-bg: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

html { font-size: 16px; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
}

/* ===== HEADER ===== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bg3);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  transition: background .3s;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: -.5px;
}

nav { display: flex; gap: .5rem; }

.header-controls {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* ===== LANG SWITCH ===== */
.lang-switch {
  display: flex;
  gap: 2px;
  background: var(--bg3);
  border-radius: 10px;
  padding: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text2);
  padding: .35rem .75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.lang-btn.active { background: var(--accent); color: #fff; }
.lang-btn:not(.active):hover { background: var(--bg2); color: var(--text); }

/* ===== THEME TOGGLE ===== */
.theme-btn {
  background: var(--bg3);
  border: none;
  font-size: 1.2rem;
  padding: .35rem .55rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, transform .2s;
  line-height: 1;
}
.theme-btn:hover { background: #475569; transform: scale(1.1); }

/* ===== NAV BUTTONS ===== */
.nav-btn {
  background: transparent;
  border: none;
  color: var(--text2);
  padding: .5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
}
.nav-btn:hover { background: var(--bg3); color: var(--text); }
.nav-btn.active { background: var(--accent); color: #fff; }

/* ===== MAIN ===== */
main { max-width: 860px; margin: 0 auto; padding: 2rem 1rem; }

.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .75rem;
}
.view-header h2 { font-size: 1.5rem; font-weight: 700; }

/* ===== CARD ===== */
.card {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: background .3s, border-color .3s;
}
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text2); }

/* ===== BUTTONS ===== */
button { cursor: pointer; font-family: inherit; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .6rem 1.4rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  transition: background .2s, transform .1s;
}
.btn-primary:hover { background: var(--accent2); }
.btn-primary:active { transform: scale(.97); }

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: none;
  padding: .6rem 1.2rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s;
  display: inline-block;
  text-align: center;
}
.btn-secondary:hover { background: #475569; }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: .6rem 1.2rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s;
}
.btn-danger:hover { background: rgba(239,68,68,.1); }

.btn-toggle {
  background: var(--bg3);
  border: 2px solid transparent;
  color: var(--text2);
  padding: .4rem .9rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
}
.btn-toggle:hover { border-color: var(--accent); color: var(--text); }
.btn-toggle.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.btn-icon {
  background: var(--accent);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--accent2); }

/* ===== PROGRESS BAR ===== */
.progress-bar-wrap {
  background: var(--bg3);
  border-radius: 99px;
  height: 6px;
  margin-bottom: .75rem;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width .4s ease;
  width: 0%;
}

.counter { text-align: center; color: var(--text2); font-size: .85rem; margin-bottom: 1.5rem; }

/* ===== CARD LABEL ===== */
.card-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent2);
  font-weight: 600;
}

/* ===== FLASHCARD ===== */
.flashcard-simple {
  background: var(--flashcard-bg);
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.flashcard-simple p {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

/* ===== AUDIO BUTTON ===== */
.btn-speak, .btn-speak-sm {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform .15s;
  padding: .2rem;
  border-radius: 6px;
}
.btn-speak:hover, .btn-speak-sm:hover { transform: scale(1.2); }
.btn-speak-sm { font-size: 1rem; }

/* ===== LEARN INPUT ===== */
.learn-input-area {
  display: flex;
  gap: .75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
#learn-answer-input {
  flex: 1;
  min-width: 200px;
  background: var(--bg3);
  border: 2px solid #475569;
  color: var(--text);
  padding: .7rem 1rem;
  border-radius: 10px;
  font-size: 1.1rem;
  outline: none;
  transition: border-color .2s, background .2s;
}
#learn-answer-input:focus { border-color: var(--accent); }
#learn-answer-input.input-correct { border-color: var(--success); background: rgba(34,197,94,.1); }
#learn-answer-input.input-wrong   { border-color: var(--danger);  background: rgba(239,68,68,.1); }
#learn-answer-input.input-typo    { border-color: var(--warning); background: rgba(245,158,11,.1); }

/* ===== LEARN FEEDBACK ===== */
.learn-feedback {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.learn-feedback.fb-correct { background: rgba(34,197,94,.12); border: 1px solid var(--success); }
.learn-feedback.fb-wrong   { background: rgba(239,68,68,.12); border: 1px solid var(--danger); }
.learn-feedback.fb-typo    { background: rgba(245,158,11,.12); border: 1px solid var(--warning); }
#learn-feedback-text { font-size: 1.1rem; font-weight: 700; }
.learn-feedback.fb-correct #learn-feedback-text { color: var(--success); }
.learn-feedback.fb-wrong   #learn-feedback-text { color: var(--danger); }
.learn-feedback.fb-typo    #learn-feedback-text { color: var(--warning); }
.feedback-correct-answer { font-size: .95rem; color: var(--text2); }

/* ===== SKIP BUTTON ===== */
.btn-skip {
  border: none;
  padding: .7rem 1.4rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  transition: all .2s;
  background: var(--bg3);
  color: var(--text2);
}
.btn-skip:hover { background: #475569; }

/* ===== SESSION DONE ===== */
.session-done {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--bg3);
}
.done-icon { font-size: 3rem; margin-bottom: 1rem; }
.session-done h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.session-done p { color: var(--text2); margin-bottom: 1.5rem; font-size: 1.05rem; }
.session-done button { margin: .3rem; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text2);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { margin-bottom: 1.5rem; font-size: 1.05rem; }

/* ===== DECK SELECTOR ===== */
.deck-selector {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}
.deck-selector select {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  color: var(--text);
  padding: .4rem .8rem;
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
  cursor: pointer;
}

/* ===== QUIZ ===== */
.quiz-card {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.quiz-question-label { font-size: .85rem; color: var(--text2); margin-bottom: .75rem; }
.quiz-word-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.quiz-word { font-size: 2.2rem; font-weight: 700; color: var(--text); }
.quiz-hint { font-size: .78rem; color: var(--text2); margin-bottom: 1.5rem; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.quiz-option {
  background: var(--bg3);
  border: 1px solid #475569;
  color: var(--text);
  padding: 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  transition: all .15s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.quiz-keycap {
  min-width: 1.45rem;
  height: 1.45rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  background: rgba(99,102,241,.25);
  border: 1px solid rgba(99,102,241,.45);
}
.quiz-option:hover:not(:disabled) { background: #475569; border-color: var(--accent2); }
.quiz-option.correct { background: rgba(34,197,94,.2); border-color: var(--success); color: var(--success); }
.quiz-option.wrong   { background: rgba(239,68,68,.2);  border-color: var(--danger);  color: var(--danger); }
.quiz-option:disabled { cursor: default; }
.quiz-feedback {
  margin-top: 1rem;
  padding: .75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
}
.quiz-feedback.ok  { background: rgba(34,197,94,.15);  color: var(--success); border: 1px solid var(--success); }
.quiz-feedback.err { background: rgba(239,68,68,.15);  color: var(--danger);  border: 1px solid var(--danger); }

/* ===== MANAGE ===== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group label { font-size: .8rem; color: var(--text2); font-weight: 500; }
.form-group input, .form-group select {
  background: var(--bg3);
  border: 1px solid #475569;
  color: var(--text);
  padding: .55rem .8rem;
  border-radius: 8px;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }

.input-with-btn {
  display: flex;
  gap: .4rem;
  align-items: stretch;
}
.input-with-btn input { flex: 1; }

/* Dictionary suggestions */
.dict-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .3rem;
}
.dict-suggestion {
  background: rgba(99,102,241,.15);
  color: var(--accent2);
  border: 1px solid rgba(99,102,241,.35);
  padding: .25rem .65rem;
  border-radius: 99px;
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s;
}
.dict-suggestion:hover { background: rgba(99,102,241,.3); }
.dict-none { font-size: .82rem; color: var(--text2); padding: .25rem 0; }

.tool-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.file-label { cursor: pointer; user-select: none; }
.file-label input[type="file"] { display: none; }

.list-header {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
#search-input {
  background: var(--bg3);
  border: 1px solid #475569;
  color: var(--text);
  padding: .5rem .9rem;
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
  flex: 1;
  min-width: 150px;
}
#search-input:focus { border-color: var(--accent); }
#filter-category {
  background: var(--bg3);
  border: 1px solid #475569;
  color: var(--text);
  padding: .5rem .8rem;
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
}
.vocab-count { font-size: .8rem; color: var(--text2); white-space: nowrap; }

/* Vocab list items */
.vocab-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--bg3);
  flex-wrap: wrap;
}
.vocab-item:last-child { border-bottom: none; }
.vocab-word  { font-weight: 600; flex: 1; min-width: 80px; }
.vocab-trans { color: var(--text2); flex: 1; min-width: 80px; }
.vocab-cat {
  font-size: .75rem;
  background: rgba(99,102,241,.2);
  color: var(--accent2);
  padding: .2rem .6rem;
  border-radius: 99px;
  white-space: nowrap;
}
.vocab-box {
  font-size: .7rem;
  background: rgba(34,197,94,.15);
  color: var(--success);
  padding: .15rem .5rem;
  border-radius: 99px;
  white-space: nowrap;
}
.vocab-stars { font-size: .8rem; color: var(--warning); white-space: nowrap; }
.vocab-edit, .vocab-del {
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: 1rem;
  padding: .2rem .4rem;
  border-radius: 6px;
  transition: color .15s;
}
.vocab-edit:hover { color: var(--accent2); }
.vocab-del:hover  { color: var(--danger); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  padding: 2rem;
  width: 90%;
  max-width: 460px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.modal h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--text); }
.modal .form-group { margin-bottom: .75rem; }
.modal-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: background .3s;
}
.stat-value { font-size: 2.5rem; font-weight: 700; color: var(--accent2); line-height: 1; margin-bottom: .4rem; }
.stat-label { font-size: .8rem; color: var(--text2); }

/* XP Bar */
.xp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .5rem;
}
.xp-level { font-size: 1.2rem; font-weight: 700; color: var(--accent2); }
.xp-amount { font-size: .9rem; color: var(--text2); }
.xp-bar-wrap {
  background: var(--bg3);
  border-radius: 99px;
  height: 10px;
  overflow: hidden;
  margin-bottom: .35rem;
}
.xp-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 99px;
  transition: width .5s ease;
}
.xp-next { font-size: .78rem; color: var(--text2); }
.xp-rules {
  margin-top: .8rem;
  font-size: .85rem;
  color: var(--text2);
}
.xp-rules ul { margin: .35rem 0 .35rem 1rem; }
.xp-rules li { margin: .15rem 0; }

/* Badge Grid */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .75rem;
}
.badge-card {
  text-align: center;
  padding: .75rem .5rem;
  border-radius: 10px;
  border: 1px solid var(--bg3);
  transition: transform .15s;
}
.badge-card.earned {
  background: rgba(99,102,241,.1);
  border-color: rgba(99,102,241,.3);
}
.badge-card.locked { opacity: .45; }
.badge-card:hover { transform: scale(1.03); }
.badge-icon { font-size: 1.8rem; display: block; margin-bottom: .3rem; }
.badge-name { font-size: .72rem; font-weight: 600; color: var(--text2); }
.badge-meta { display: block; margin-top: .2rem; font-size: .66rem; color: var(--text2); }

/* Badge Toast */
.badge-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  gap: .75rem;
  z-index: 300;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
}
.badge-toast.show { transform: translateY(0); opacity: 1; }
.badge-toast-icon { font-size: 2rem; }

/* Chart */
.stats-chart { overflow-x: auto; padding: .5rem 0; }
.chart-svg { width: 100%; max-width: 600px; height: auto; }
.chart-line { stroke: var(--accent2); stroke-width: 2; }
.chart-dot { fill: var(--accent2); }
.chart-grid { stroke: var(--bg3); stroke-width: 1; }
.chart-label { fill: var(--text2); font-size: 10px; }

/* Vocab performance list */
.stats-vocab-list { max-height: 400px; overflow-y: auto; }
.stats-vocab-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--bg3);
}
.stats-vocab-item:last-child { border-bottom: none; }
.svl-word  { flex: 1; font-weight: 500; min-width: 80px; }
.svl-trans { flex: 1; color: var(--text2); font-size: .9rem; min-width: 80px; }
.svl-box {
  font-size: .7rem;
  background: rgba(34,197,94,.15);
  color: var(--success);
  padding: .15rem .5rem;
  border-radius: 99px;
  white-space: nowrap;
}
.svl-bar-wrap { width: 100px; background: var(--bg3); border-radius: 99px; height: 6px; overflow: hidden; }
.svl-bar { height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.svl-score { font-size: .8rem; color: var(--text2); white-space: nowrap; width: 60px; text-align: right; }

/* ===== LESSONS ===== */
.lesson-list { display: flex; flex-direction: column; gap: .5rem; }
.lesson-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .5rem;
  border-radius: 8px;
  transition: background .15s;
}
.lesson-item:hover { background: rgba(99,102,241,.05); }
.lesson-item.locked { opacity: .5; }
.lesson-icon { font-size: 1.1rem; flex-shrink: 0; }
.lesson-name { flex: 1; font-weight: 500; font-size: .92rem; }
.lesson-bar-wrap {
  width: 100px;
  background: var(--bg3);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.lesson-bar { height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.lesson-bar-done { height: 100%; background: var(--success); border-radius: 99px; width: 100%; }
.lesson-pct { font-size: .78rem; color: var(--text2); width: 36px; text-align: right; }

/* ===== CONJUGATION ===== */
.conj-card { padding: 1.75rem; }
.conj-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.conj-infinitive { font-size: 1.7rem; font-weight: 700; margin-right: .5rem; }
.conj-translation { font-size: 1rem; color: var(--text2); }
.conj-tense-badge {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent2);
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.35);
  padding: .25rem .75rem;
  border-radius: 99px;
  white-space: nowrap;
}
.conj-table {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-bottom: 1.25rem;
}
.conj-row {
  display: grid;
  grid-template-columns: 90px 1fr auto 28px auto;
  align-items: center;
  gap: .5rem;
}
.conj-pronoun { font-size: .9rem; color: var(--text2); font-style: italic; text-align: right; }
.conj-input {
  background: var(--bg3);
  border: 1.5px solid #475569;
  color: var(--text);
  padding: .45rem .75rem;
  border-radius: 8px;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.conj-input:focus   { border-color: var(--accent); }
.conj-input:disabled { opacity: .85; cursor: default; }
.conj-input.conj-correct { border-color: var(--success); background: rgba(34,197,94,.1); }
.conj-input.conj-wrong   { border-color: var(--danger);  background: rgba(239,68,68,.1); }
.conj-result-icon { font-size: 1rem; text-align: center; }
.conj-correct-form { font-size: .82rem; color: var(--success); font-style: italic; white-space: nowrap; }
.conj-card-feedback {
  margin-bottom: 1rem;
  padding: .65rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
}
.conj-card-feedback.ok      { background: rgba(34,197,94,.15);  color: var(--success); border: 1px solid var(--success); }
.conj-card-feedback.partial { background: rgba(245,158,11,.15); color: var(--warning); border: 1px solid var(--warning); }
.conj-card-feedback.err     { background: rgba(239,68,68,.15);  color: var(--danger);  border: 1px solid var(--danger); }
.conj-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.conj-add-forms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .6rem;
  margin-bottom: 1rem;
}
.conj-verb-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--bg3);
  flex-wrap: wrap;
}
.conj-verb-item:last-child { border-bottom: none; }
.conj-verb-inf   { font-weight: 600; flex: 1; min-width: 100px; }
.conj-verb-trans { color: var(--text2); font-size: .9rem; flex: 1; min-width: 80px; }
.conj-verb-tenses { display: flex; gap: .35rem; flex-wrap: wrap; }
.conj-tense-chip {
  font-size: .72rem;
  background: rgba(99,102,241,.15);
  color: var(--accent2);
  padding: .15rem .5rem;
  border-radius: 99px;
}
.conj-verb-del {
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: 1.1rem;
  padding: .2rem .5rem;
  border-radius: 6px;
  transition: color .15s;
  cursor: pointer;
}
.conj-verb-del:hover { color: var(--danger); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  header { padding: 0 .75rem; gap: .5rem; flex-wrap: wrap; height: auto; min-height: 56px; padding-top: .5rem; padding-bottom: .5rem; }
  .logo  { font-size: 1rem; }
  nav { order: 3; width: 100%; overflow-x: auto; }
  .nav-btn { padding: .4rem .7rem; font-size: .8rem; white-space: nowrap; }
  .form-row { grid-template-columns: 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .conj-row { grid-template-columns: 70px 1fr auto 24px auto; }
  .badge-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .vocab-item { font-size: .9rem; }
}
