:root {
  --green: #1A7FD4;
  --green-dark: #46a302;
  --green-light: #D7FFB8;
  --red: #FF4B4B;
  --red-light: #FFE8E8;
  --yellow: #FFD900;
  --yellow-dark: #CE9F00;
  --blue: #1CB0F6;
  --blue-dark: #0a90d4;
  --purple: #CE82FF;
  --gray: #AFAFAF;
  --gray-light: #E5E5E5;
  --gray-bg: #F7F7F7;
  --text: #3C3C3C;
  --text-light: #777777;
  --white: #FFFFFF;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--gray-bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
}

.screen { display: none; min-height: 100vh; padding: 24px 16px 40px; flex-direction: column; gap: 14px; }
.screen.active { display: flex; }

/* ============================================================ BUTTONS */
.btn-primary {
  width: 100%; padding: 17px;
  background: var(--green); color: white; border: none;
  border-radius: var(--radius); font-family: 'Nunito', sans-serif;
  font-size: 17px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 0 var(--green-dark);
  transition: transform 0.08s, box-shadow 0.08s;
  user-select: none;
}
.btn-primary:active { transform: translateY(4px); box-shadow: none; }

.btn-secondary {
  width: 100%; padding: 14px;
  background: transparent; color: var(--blue);
  border: 2.5px solid var(--blue); border-radius: var(--radius);
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background 0.15s; user-select: none;
}
.btn-secondary:hover { background: rgba(28,176,246,0.07); }

.btn-back {
  background: none; border: none;
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700;
  color: var(--blue); cursor: pointer; padding: 4px 0;
}
.btn-back-sm {
  background: none; border: none;
  font-size: 18px; cursor: pointer; color: var(--text-light);
  padding: 2px 6px; font-weight: 700;
}

/* ============================================================ HOME */
.home-header { text-align: center; padding: 8px 0 4px; }
.home-flag { font-size: 52px; line-height: 1; margin-bottom: 8px; }
.app-title { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1.2; }
.app-subtitle { font-size: 13px; color: var(--text-light); font-weight: 600; margin-top: 4px; line-height: 1.4; }

.streak-card {
  background: var(--white); border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 2px 0 var(--gray-light); border: 2px solid var(--gray-light);
}
.streak-card.streak-zero .streak-icon { filter: grayscale(1); }
.streak-card.streak-zero .streak-number { color: var(--gray); }
.streak-icon { font-size: 42px; line-height: 1; }
.streak-number { font-size: 38px; font-weight: 900; color: var(--yellow); line-height: 1; }
.streak-label { font-size: 13px; color: var(--text-light); font-weight: 700; margin-top: 2px; }

.daily-goal-card {
  background: var(--white); border-radius: var(--radius); padding: 16px 20px;
  box-shadow: 0 2px 0 var(--gray-light); border: 2px solid var(--gray-light);
}
.goal-header { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 10px; font-size: 14px; }
.goal-header span:last-child { color: var(--green-dark); }

.progress-bar-bg { background: var(--gray-light); border-radius: 100px; height: 18px; overflow: hidden; }
.progress-bar-fill {
  background: linear-gradient(90deg, var(--green), #78E000);
  height: 100%; border-radius: 100px; transition: width 0.6s cubic-bezier(.4,0,.2,1); width: 0%;
  position: relative;
}
.progress-bar-fill::after {
  content: ''; position: absolute; top: 2px; left: 6px; right: 6px;
  height: 6px; background: rgba(255,255,255,0.35); border-radius: 100px;
}

.stats-row { display: flex; gap: 10px; }
.stat-item {
  flex: 1; background: var(--white); border-radius: var(--radius);
  padding: 14px 10px; text-align: center;
  box-shadow: 0 2px 0 var(--gray-light); border: 2px solid var(--gray-light);
}
.stat-value { font-size: 22px; font-weight: 900; color: var(--blue); }
.stat-label { font-size: 11px; color: var(--text-light); font-weight: 700; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.4px; }

/* Navigation grid */
.nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nav-btn {
  background: var(--white); border: 2px solid var(--gray-light); border-radius: var(--radius);
  padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: border-color 0.15s, transform 0.08s;
  box-shadow: 0 2px 0 var(--gray-light); font-family: 'Nunito', sans-serif;
}
.nav-btn:hover { border-color: var(--blue); transform: translateY(-2px); }
.nav-btn:active { transform: translateY(0); }
.nav-icon { font-size: 28px; line-height: 1; }
.nav-label { font-size: 13px; font-weight: 800; color: var(--text); }

/* ============================================================ LESSON */
.lesson-header { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.hearts { font-size: 16px; display: flex; gap: 2px; min-width: 64px; }
.heart-icon.dead { filter: grayscale(1); opacity: 0.5; }
.lesson-progress-wrap { flex: 1; }
.lesson-progress-bg { background: var(--gray-light); border-radius: 100px; height: 14px; overflow: hidden; }
.lesson-progress-fill { background: linear-gradient(90deg, var(--green), #78E000); height: 100%; border-radius: 100px; transition: width 0.4s ease; width: 0%; }
.lesson-xp { font-weight: 800; font-size: 15px; color: var(--yellow-dark); min-width: 54px; text-align: right; }

.exercise-container { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.exercise-type-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-light); }
.exercise-question { font-size: 30px; font-weight: 900; color: var(--text); line-height: 1.25; word-break: break-word; }
.exercise-subtitle { font-size: 15px; color: var(--text-light); font-weight: 600; min-height: 22px; }

.options-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.option-btn {
  padding: 17px 18px; background: var(--white); border: 2.5px solid var(--gray-light);
  border-radius: var(--radius); font-family: 'Nunito', sans-serif; font-size: 17px; font-weight: 700;
  color: var(--text); cursor: pointer; text-align: left;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  box-shadow: 0 3px 0 var(--gray-light); user-select: none;
}
.option-btn:hover:not(:disabled) { border-color: var(--blue); background: rgba(28,176,246,0.06); transform: translateY(-2px); box-shadow: 0 5px 0 rgba(28,176,246,0.2); }
.option-btn:disabled { cursor: default; }
.option-btn.correct { border-color: var(--green); background: var(--green-light); color: var(--green-dark); box-shadow: 0 3px 0 var(--green-dark); }
.option-btn.wrong { border-color: var(--red); background: var(--red-light); color: var(--red); box-shadow: 0 3px 0 #cc2222; }

.lesson-footer { display: none; flex-direction: column; gap: 12px; padding-top: 6px; animation: slideUp 0.25s ease; }
.lesson-footer.correct-footer .btn-primary { background: var(--green); box-shadow: 0 4px 0 var(--green-dark); }
.lesson-footer.wrong-footer .btn-primary { background: var(--red); box-shadow: 0 4px 0 #cc2222; }

@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.feedback-message { font-size: 17px; font-weight: 800; min-height: 22px; }
.feedback-message.correct { color: var(--green-dark); }
.feedback-message.wrong { color: var(--red); }

/* ============================================================ COMPLETE */
.complete-content {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; gap: 18px; text-align: center; padding: 24px 16px;
}
.complete-animation { font-size: 80px; line-height: 1; animation: pop 0.4s cubic-bezier(.2,1.5,.5,1); }
@keyframes pop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.complete-content h2 { font-size: 28px; font-weight: 900; }
.complete-stars { font-size: 38px; letter-spacing: 6px; }
.complete-stats { display: flex; gap: 10px; width: 100%; justify-content: center; flex-wrap: wrap; }
.complete-stat {
  background: var(--white); border-radius: var(--radius); padding: 14px 16px;
  border: 2px solid var(--gray-light); flex: 1; min-width: 80px; max-width: 110px;
}
.complete-stat-icon { font-size: 20px; margin-bottom: 4px; }
.complete-stat-value { font-size: 18px; font-weight: 900; color: var(--blue); }
.complete-stat-label { font-size: 11px; color: var(--text-light); font-weight: 700; margin-top: 2px; }
.complete-goal-msg {
  background: linear-gradient(135deg, var(--green), #78E000);
  color: white; border-radius: var(--radius); padding: 12px 20px;
  font-weight: 800; font-size: 16px; width: 100%; text-align: center;
}
.complete-content .btn-primary { width: 100%; max-width: 320px; }
.scenario-complete-msg { font-size: 15px; color: var(--text-light); font-weight: 600; max-width: 300px; line-height: 1.5; }

/* ============================================================ SEARCH */
.search-wrap {
  padding: 8px 0 4px;
  flex-shrink: 0;
}
.search-input {
  width: 100%;
  padding: 11px 16px;
  border-radius: 14px;
  border: 2px solid #e8e8e8;
  font-size: 15px;
  background: #f8f9fa;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.search-input:focus {
  border-color: var(--primary);
  background: #fff;
}
.search-empty {
  text-align: center;
  color: #aaa;
  font-size: 15px;
  padding: 40px 0;
}
.phrase-search-cat {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.vocab-search-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 12px;
}
.vocab-search-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid #f0f0f0;
  border-radius: 14px;
  padding: 12px 14px;
}
.vocab-search-emoji {
  font-size: 26px;
  flex-shrink: 0;
}
.vocab-search-body {
  flex: 1;
  min-width: 0;
}
.vocab-search-greek {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vocab-search-transcription {
  font-size: 12px;
  color: var(--primary);
  margin-top: 1px;
}
.vocab-search-translation {
  font-size: 13px;
  color: #555;
  margin-top: 2px;
}
.vocab-search-cat {
  font-size: 11px;
  color: #aaa;
  text-align: right;
  flex-shrink: 0;
  max-width: 70px;
  line-height: 1.3;
}

/* ============================================================ SUB-SCREENS HEADER */
.sub-header { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.sub-header h2 { font-size: 20px; font-weight: 900; }
.sub-desc { font-size: 14px; color: var(--text-light); font-weight: 600; line-height: 1.5; }
.badge {
  margin-left: auto; font-size: 12px; color: var(--text-light); font-weight: 700;
  background: var(--gray-light); padding: 4px 10px; border-radius: 20px;
}

/* ============================================================ SCENARIOS */
.scenario-card {
  background: var(--white); border-radius: var(--radius); padding: 16px;
  display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--gray-light); box-shadow: 0 2px 0 var(--gray-light);
  cursor: pointer; transition: border-color 0.15s, transform 0.08s; margin-bottom: 10px;
}
.scenario-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.scenario-card.done { border-color: var(--green); background: #F0FFF0; }
.scenario-icon { font-size: 36px; line-height: 1; flex-shrink: 0; }
.scenario-info { flex: 1; }
.scenario-title { font-size: 16px; font-weight: 900; color: var(--text); }
.scenario-desc { font-size: 13px; color: var(--text-light); font-weight: 600; margin-top: 2px; }
.scenario-meta { font-size: 12px; color: var(--blue); font-weight: 700; margin-top: 4px; }
.scenario-arrow { font-size: 18px; color: var(--gray); font-weight: 700; }

/* Scenario detail */
.scenario-title-bar { font-size: 15px; font-weight: 800; color: var(--text-light); text-align: center; margin-top: -4px; }
.scenario-step-counter { font-size: 13px; font-weight: 800; color: var(--text-light); min-width: 36px; text-align: right; }
.scenario-situation {
  font-size: 14px; color: var(--text-light); font-weight: 600;
  background: var(--gray-bg); border-radius: var(--radius-sm, 10px);
  padding: 10px 14px; border-left: 3px solid var(--blue); line-height: 1.5; margin-bottom: 4px;
}
.dialogue-card {
  background: var(--white); border-radius: var(--radius); padding: 16px 18px;
  border: 2px solid var(--gray-light); box-shadow: 0 2px 0 var(--gray-light);
}
.dialogue-speaker { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); margin-bottom: 6px; }
.dialogue-greek { font-size: 20px; font-weight: 900; color: var(--text); line-height: 1.3; margin-bottom: 6px; }
.dialogue-transcription { font-size: 13px; color: var(--blue); font-weight: 700; margin-bottom: 4px; }
.dialogue-translation { font-size: 14px; color: var(--text-light); font-weight: 600; }

.scenario-question { font-size: 16px; font-weight: 800; color: var(--text); margin: 6px 0 2px; }
.scenario-options { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.scenario-option-btn {
  padding: 14px 16px; background: var(--white); border: 2.5px solid var(--gray-light);
  border-radius: var(--radius); font-family: 'Nunito', sans-serif; cursor: pointer;
  text-align: left; transition: border-color 0.12s, background 0.12s, transform 0.08s;
  box-shadow: 0 3px 0 var(--gray-light);
}
.scenario-option-btn:hover:not(:disabled) { border-color: var(--blue); background: rgba(28,176,246,0.05); transform: translateY(-1px); }
.scenario-option-btn:disabled { cursor: default; }
.scenario-option-btn.correct { border-color: var(--green); background: var(--green-light); box-shadow: 0 3px 0 var(--green-dark); }
.scenario-option-btn.wrong { border-color: var(--red); background: var(--red-light); box-shadow: 0 3px 0 #cc2222; }
.opt-greek { font-size: 16px; font-weight: 800; color: var(--text); }
.opt-transcription { font-size: 12px; color: var(--blue); font-weight: 700; margin-top: 2px; }
.opt-translation { font-size: 13px; color: var(--text-light); font-weight: 600; margin-top: 2px; }

.scenario-feedback {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; line-height: 1.5; margin-top: 4px;
  animation: slideUp 0.2s ease;
}
.scenario-feedback.correct { background: var(--green-light); color: var(--green-dark); border: 2px solid var(--green); }
.scenario-feedback.wrong { background: var(--red-light); color: var(--red); border: 2px solid var(--red); }

/* ============================================================ VERB TABLE */
.verb-card {
  background: var(--white); border-radius: var(--radius); padding: 16px;
  border: 2px solid var(--gray-light); box-shadow: 0 2px 0 var(--gray-light);
  margin-bottom: 10px; cursor: pointer;
}
.verb-title { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: 8px; }
.verb-infinitive { font-size: 21px; font-weight: 900; color: var(--text); }
.verb-transcription { font-size: 13px; color: var(--blue); font-weight: 700; }
.verb-translation-badge {
  font-size: 13px; font-weight: 700; color: var(--text-light);
  background: var(--gray-bg); padding: 4px 10px; border-radius: 20px;
  border: 1.5px solid var(--gray-light); text-align: right; flex-shrink: 0;
  max-width: 55%; line-height: 1.4;
}
.verb-note { font-size: 12px; color: var(--purple); font-weight: 700; margin-bottom: 6px; }
.verb-example {
  background: var(--gray-bg); border-radius: 10px; padding: 8px 12px;
  margin-bottom: 10px; border-left: 3px solid var(--green);
}
.example-greek { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.example-ru { display: block; font-size: 12px; color: var(--text-light); font-weight: 600; }
.verb-conjugation { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.conj-row { display: flex; align-items: center; gap: 8px; }
.conj-pronoun { color: var(--text-light); font-weight: 600; font-size: 13px; min-width: 52px; }
.conj-form { font-weight: 800; font-size: 15px; color: var(--green-dark); }

/* ============================================================ 30-DAY PLAN */
.week-block { margin-bottom: 16px; }
.week-header {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--white); border-radius: var(--radius) var(--radius) 0 0;
  border: 2px solid; border-bottom: none; margin-bottom: 0;
}
.week-number { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; }
.week-theme { font-size: 14px; font-weight: 800; color: var(--text); }
.plan-day {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--white); border: 2px solid var(--gray-light); border-top: none;
  transition: background 0.15s;
}
.plan-day:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.plan-day.done { background: #F8FFF8; }
.plan-day.locked { opacity: 0.5; }
.plan-day-num {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; flex-shrink: 0;
  border: 2px solid var(--gray-light);
}
.plan-day-info { flex: 1; }
.plan-day-topic { font-size: 14px; font-weight: 800; color: var(--text); }
.plan-day-focus { font-size: 12px; color: var(--text-light); font-weight: 600; margin-top: 2px; }
.plan-day-status { font-size: 16px; }

/* ============================================================ AUDIT */
.audit-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.audit-stat {
  background: var(--white); border-radius: var(--radius); padding: 14px 10px;
  text-align: center; border: 2px solid var(--gray-light); box-shadow: 0 2px 0 var(--gray-light);
}
.audit-stat-icon { font-size: 22px; margin-bottom: 4px; }
.audit-stat-value { font-size: 20px; font-weight: 900; color: var(--blue); }
.audit-stat-label { font-size: 11px; color: var(--text-light); font-weight: 700; margin-top: 2px; }

.audit-section {
  background: var(--white); border-radius: var(--radius); padding: 16px;
  border: 2px solid var(--gray-light); box-shadow: 0 2px 0 var(--gray-light);
}
.audit-section-title { font-size: 14px; font-weight: 900; color: var(--text); margin-bottom: 10px; }

.level-progress-bar { background: var(--gray-light); border-radius: 100px; height: 14px; overflow: hidden; margin-bottom: 6px; }
.level-progress-fill { background: linear-gradient(90deg, var(--purple), #aa4ff5); height: 100%; border-radius: 100px; transition: width 0.6s ease; }
.level-progress-label { font-size: 13px; color: var(--text-light); font-weight: 700; }

.weak-verbs-list { display: flex; flex-direction: column; gap: 8px; }
.weak-verb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-light); }
.weak-verb-row:last-child { border-bottom: none; }
.wv-infinitive { font-size: 16px; font-weight: 900; color: var(--text); min-width: 100px; }
.wv-translation { font-size: 13px; color: var(--text-light); font-weight: 600; flex: 1; }
.wv-errors { font-size: 12px; color: var(--red); font-weight: 800; background: var(--red-light); padding: 3px 8px; border-radius: 20px; }

.tutor-tip { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.6; }

/* ============================================================ VERB SEARCH */
.verb-search-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23AFAFAF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}
.verb-search-input:focus { border-color: var(--blue); }
.verb-search-input::placeholder { color: var(--gray); }

.no-results {
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
  font-weight: 700;
  padding: 40px 0;
}

/* ============================================================ SPEAK BUTTONS */
.speak-btn {
  float: right;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  padding: 0 0 4px 8px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s, transform 0.1s;
  user-select: none;
}
.speak-btn:hover { opacity: 1; }
.speak-btn:active { transform: scale(0.88); }

.speak-btn-lg {
  background: var(--gray-bg);
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  padding: 6px 10px;
  line-height: 1;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
  user-select: none;
}
.speak-btn-lg:hover { background: var(--gray-light); }
.speak-btn-lg:active { transform: scale(0.9); }

.conj-speakable {
  cursor: pointer;
  transition: color 0.12s;
}
.conj-speakable:hover { color: var(--blue); }

/* ============================================================ DIALOGUE GREEK WRAP */
.dialogue-greek-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.dialogue-greek-wrap .dialogue-greek {
  flex: 1;
  margin-bottom: 0;
}

/* ============================================================ DAILY GOAL SETTINGS */
.goal-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.goal-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.15s, transform 0.2s;
}
.goal-edit-btn:hover { opacity: 1; transform: rotate(20deg); }

/* ============================================================ MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius) var(--radius) 16px 16px;
  padding: 24px 20px;
  width: 100%;
  max-width: 520px;
  animation: slideUp 0.25s ease;
}
.modal-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 16px;
  text-align: center;
}
.goal-options { display: flex; flex-direction: column; gap: 10px; }
.goal-option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  background: var(--gray-bg);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
  width: 100%;
}
.goal-option-btn:hover { border-color: var(--blue); background: rgba(28,176,246,0.06); }
.goal-option-btn.active { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.goal-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-left: auto;
}
.goal-option-btn.active .goal-hint { color: var(--green-dark); }

/* ============================================================ TYPING EXERCISE */
.label-badge {
  display: inline-block;
  font-size: 11px; font-weight: 800;
  background: rgba(206,130,255,0.15); color: var(--purple);
  padding: 2px 8px; border-radius: 20px;
  margin-left: 8px; vertical-align: middle;
}

.typing-wrap { position: relative; }
.typing-input {
  width: 100%;
  padding: 18px 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 24px; font-weight: 900;
  color: var(--text);
  background: var(--white);
  border: 2.5px solid var(--gray-light);
  border-radius: var(--radius);
  outline: none;
  text-align: center;
  transition: border-color 0.15s;
  box-shadow: 0 3px 0 var(--gray-light);
  letter-spacing: 2px;
}
.typing-input:focus { border-color: var(--blue); box-shadow: 0 3px 0 rgba(28,176,246,0.3); }
.typing-input.typing-correct { border-color: var(--green); background: var(--green-light); box-shadow: 0 3px 0 var(--green-dark); }
.typing-input.typing-wrong { border-color: var(--red); background: var(--red-light); box-shadow: 0 3px 0 #cc2222; }
.typing-input.typing-empty { animation: shake 0.35s ease; border-color: var(--red); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.typing-input:disabled { cursor: default; }

/* Greek virtual keyboard */
.greek-keyboard {
  background: var(--gray-bg);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 10px 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.gk-row {
  display: flex; gap: 5px; justify-content: center;
}
.gk-btn {
  flex: 1;
  padding: 10px 4px;
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--text);
  cursor: pointer;
  min-width: 32px;
  max-width: 40px;
  box-shadow: 0 2px 0 var(--gray-light);
  transition: background 0.1s, transform 0.07s;
  user-select: none;
  -webkit-user-select: none;
}
.gk-btn:active { transform: translateY(2px); box-shadow: none; background: var(--gray-light); }
.gk-bottom-row { gap: 8px; margin-top: 2px; }
.gk-space { max-width: 60px; font-size: 12px; color: var(--text-light); }
.gk-backspace {
  max-width: 60px; font-size: 18px;
  background: #FFF0F0; border-color: #FFCCCC; color: var(--red);
}
.gk-submit {
  flex: 2; max-width: 120px; font-size: 20px;
  background: var(--green-light); border-color: var(--green);
  color: var(--green-dark); font-weight: 900;
}
.gk-submit:active { background: var(--green); color: white; }

/* ============================================================ ACHIEVEMENTS */
.nav-btn-achievements { position: relative; }
.ach-nav-count {
  position: absolute; top: 8px; right: 10px;
  font-size: 11px; font-weight: 800; color: var(--purple);
  background: rgba(206,130,255,0.12); padding: 2px 7px; border-radius: 20px;
}

.ach-category { margin-bottom: 16px; }
.ach-category-title {
  font-size: 11px; font-weight: 900; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-light); margin-bottom: 8px; padding: 0 2px;
}
.ach-card {
  background: var(--white); border-radius: var(--radius);
  padding: 14px 16px; border: 2px solid var(--gray-light);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 8px; transition: border-color 0.15s;
}
.ach-card.unlocked { border-color: var(--green); background: #F0FFF0; }
.ach-card.locked { opacity: 0.5; }
.ach-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.ach-info { flex: 1; }
.ach-title { font-size: 15px; font-weight: 900; color: var(--text); }
.ach-desc { font-size: 12px; color: var(--text-light); font-weight: 600; margin-top: 2px; }
.ach-check {
  font-size: 16px; font-weight: 900; color: var(--green);
  background: var(--green-light); border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Achievement Toast */
.achievement-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-120px);
  background: var(--white); border: 2px solid var(--yellow);
  border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  max-width: 360px; width: calc(100% - 32px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 2000;
  transition: transform 0.45s cubic-bezier(.2,1.5,.5,1), opacity 0.45s ease;
  opacity: 0;
}
.achievement-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-icon { font-size: 36px; line-height: 1; flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-label { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--yellow-dark); }
.toast-title { font-size: 16px; font-weight: 900; color: var(--text); margin-top: 2px; }
.toast-desc { font-size: 12px; color: var(--text-light); font-weight: 600; margin-top: 1px; }

/* Weak Lesson Button */
.weak-lesson-btn {
  background: #FFF8E1; border: 2px solid var(--yellow);
  border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; font-family: 'Nunito', sans-serif;
  transition: transform 0.08s, box-shadow 0.08s;
  box-shadow: 0 3px 0 var(--yellow-dark); width: 100%;
}
.weak-lesson-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--yellow-dark); }
.weak-lesson-btn:active { transform: translateY(3px); box-shadow: none; }
.weak-lesson-icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.weak-lesson-text { flex: 1; text-align: left; }
.weak-lesson-title { font-size: 15px; font-weight: 900; color: var(--text); }
.weak-lesson-sub { font-size: 12px; color: var(--yellow-dark); font-weight: 700; margin-top: 2px; }
.weak-lesson-arrow { font-size: 18px; color: var(--yellow-dark); font-weight: 900; }

.srs-review-btn {
  background: #E8F4FF; border: 2px solid #1CB0F6;
  border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; font-family: 'Nunito', sans-serif;
  transition: transform 0.08s, box-shadow 0.08s;
  box-shadow: 0 3px 0 #0e8abf; width: 100%;
}
.srs-review-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #0e8abf; }
.srs-review-btn:active { transform: translateY(3px); box-shadow: none; }
.srs-review-btn .weak-lesson-sub { color: #0e8abf; }
.srs-review-btn .weak-lesson-arrow { color: #0e8abf; }

.srs-stats-grid { display: flex; gap: 10px; margin-top: 4px; }
.srs-stat { flex: 1; text-align: center; padding: 10px 6px; border-radius: 10px; }
.srs-stat.srs-new { background: #f0f0f0; }
.srs-stat.srs-due { background: #FFF3E0; }
.srs-stat.srs-known { background: #E8F5E9; }
.srs-stat-val { display: block; font-size: 22px; font-weight: 900; color: var(--text); }
.srs-stat-lbl { display: block; font-size: 11px; color: #777; font-weight: 700; margin-top: 2px; }

/* ============================================================ PHRASES */
.phrase-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
}
.phrase-cats::-webkit-scrollbar { display: none; }

.phrase-cat-pill {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 2px solid;
  border-radius: 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 800;
  background: var(--white);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.phrase-cat-pill:hover, .phrase-cat-pill.active { opacity: 0.85; }

.phrase-category-block { margin-bottom: 20px; }
.phrase-cat-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 2px solid; border-bottom: none;
}
.phrase-cat-icon { font-size: 18px; line-height: 1; }
.phrase-cat-title { font-size: 14px; font-weight: 900; flex: 1; }
.phrase-cat-count {
  font-size: 11px; font-weight: 800;
  background: var(--gray-light); color: var(--text-light);
  padding: 2px 8px; border-radius: 20px;
}

.phrase-card {
  background: var(--white);
  border: 2px solid var(--gray-light); border-top: none;
  padding: 14px 16px;
  transition: background 0.12s;
}
.phrase-card:last-child { border-radius: 0 0 var(--radius) var(--radius); }

.phrase-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 10px;
  margin-bottom: 4px;
}
.phrase-greek {
  font-size: 20px; font-weight: 900; color: var(--text);
  line-height: 1.3; flex: 1; cursor: pointer;
  transition: color 0.12s;
}
.phrase-greek:hover { color: var(--blue); }
.phrase-transcription {
  font-size: 12px; color: var(--blue); font-weight: 700;
  margin-bottom: 2px;
}
.phrase-translation {
  font-size: 14px; color: var(--text); font-weight: 700;
  line-height: 1.4;
}
.phrase-note {
  font-size: 12px; color: var(--text-light); font-weight: 600;
  line-height: 1.5; margin-top: 6px;
  padding: 6px 10px;
  background: var(--gray-bg); border-radius: 8px;
  border-left: 3px solid var(--gray);
}

/* ============================================================ RESPONSIVE */
@media (max-width: 380px) {
  .exercise-question { font-size: 24px; }
  .option-btn { font-size: 15px; padding: 14px 14px; }
  .audit-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-height: 800px) { .screen { padding-top: 36px; } }

/* ============================================================ NEWS */
.nav-btn-wide { grid-column: 1 / -1; flex-direction: row; gap: 10px; justify-content: center; }

.news-tabs-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; margin: 0 -16px; padding: 0 16px; flex-shrink: 0;
}
.news-tabs-wrap::-webkit-scrollbar { display: none; }
.news-tabs { display: flex; gap: 8px; min-width: max-content; padding-bottom: 4px; }

.news-tab {
  padding: 8px 16px; border-radius: 100px; border: 2px solid var(--gray-light);
  background: var(--white); font-family: 'Nunito', sans-serif; font-size: 13px;
  font-weight: 800; color: var(--text-light); cursor: pointer;
  white-space: nowrap; transition: all 0.15s;
}
.news-tab.active {
  background: var(--blue); border-color: var(--blue);
  color: var(--white); box-shadow: 0 2px 0 var(--blue-dark);
}

.news-card {
  background: var(--white); border-radius: var(--radius);
  border: 2px solid var(--gray-light); box-shadow: 0 2px 0 var(--gray-light);
  overflow: hidden; transition: transform 0.08s, border-color 0.15s;
}
.news-card:hover { border-color: var(--blue); transform: translateY(-2px); }

.news-img { width: 100%; height: 180px; object-fit: cover; display: block; }

.news-content { padding: 14px; }

.news-topic-tag {
  display: inline-block; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--blue);
  background: rgba(28,176,246,0.1); padding: 3px 8px; border-radius: 20px; margin-bottom: 8px;
}

.news-title { font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.5; margin-bottom: 8px; }

.news-word { cursor: pointer; border-radius: 3px; transition: background 0.1s; display: inline; }
.news-word:hover { background: rgba(206,130,255,0.2); }
.news-word.word-active { background: rgba(206,130,255,0.35); }

.news-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.news-source { font-size: 12px; font-weight: 700; color: var(--text-light); }
.news-date { font-size: 12px; color: var(--gray); font-weight: 600; }

.news-translate-btn {
  padding: 8px 16px; border: 2px solid var(--blue); border-radius: 20px;
  background: transparent; color: var(--blue); font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 800; cursor: pointer; transition: all 0.15s;
}
.news-translate-btn:hover { background: rgba(28,176,246,0.08); }
.news-translate-btn.translated { border-color: var(--green); color: var(--green-dark); }
.news-translate-btn:disabled { opacity: 0.6; cursor: default; }

.news-translation {
  margin-top: 10px; padding: 10px 12px; background: var(--green-light);
  border-radius: 10px; border-left: 3px solid var(--green);
  font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.5;
  animation: slideUp 0.2s ease;
}

.news-loading {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 48px 0; color: var(--text-light); font-weight: 700;
}
.news-spinner {
  width: 36px; height: 36px; border: 3px solid var(--gray-light);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.news-error { text-align: center; padding: 32px 16px; color: var(--text-light); font-weight: 700; font-size: 15px; }
.news-empty { text-align: center; padding: 48px 16px; color: var(--text-light); font-size: 15px; font-weight: 700; }

.word-tooltip {
  position: fixed; background: var(--text); color: var(--white);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700;
  max-width: 200px; z-index: 1000; pointer-events: none; display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.word-tooltip.visible { display: block; }
.word-tooltip-original { font-size: 15px; font-weight: 900; color: var(--yellow); margin-bottom: 4px; }
.word-tooltip-translation { font-size: 13px; color: rgba(255,255,255,0.9); }

.news-refresh-badge {
  margin-left: auto; font-size: 16px; cursor: pointer;
  opacity: 0.6; transition: opacity 0.15s, transform 0.3s;
}
.news-refresh-badge:hover { opacity: 1; }
.news-refresh-badge.spinning { animation: spin 1s linear infinite; opacity: 0.8; }

/* ============================================================ VOCAB */
.vocab-categories-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.vocab-category-card {
  background: var(--white); border-radius: var(--radius); padding: 18px 10px;
  border: 2px solid var(--gray-light); box-shadow: 0 2px 0 var(--gray-light);
  cursor: pointer; text-align: center;
  transition: border-color 0.15s, transform 0.08s;
  font-family: 'Nunito', sans-serif;
}
.vocab-category-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.vocab-category-card:active { transform: translateY(0); }
.vocab-cat-icon { font-size: 34px; line-height: 1; margin-bottom: 8px; }
.vocab-cat-title { font-size: 14px; font-weight: 800; color: var(--text); }
.vocab-cat-count { font-size: 11px; color: var(--text-light); font-weight: 700; margin-top: 3px; }
.vocab-cat-done { border-color: #1A7FD4 !important; background: #f6fff0; }
.vocab-cat-progress { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.vocab-cat-progress-bar { width: 100%; height: 5px; background: #eee; border-radius: 99px; overflow: hidden; }
.vocab-cat-progress-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.3s; }
.vocab-cat-progress-label { font-size: 10px; color: var(--text-light); font-weight: 700; }

/* Quiz container */
.vocab-quiz-container {
  flex: 1; display: flex; flex-direction: column; gap: 10px;
}

/* Word display */
.vocab-word-display { text-align: center; padding: 8px 0 4px; }
.vocab-word-mode-label {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-light); margin-bottom: 6px;
}
.vocab-word-instruction {
  font-size: 13px; color: var(--text-light); font-weight: 600; margin-bottom: 10px; line-height: 1.4;
}
.vocab-word-greek {
  font-size: 26px; font-weight: 900; color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 4px; line-height: 1.3;
}
.vocab-tts-btn {
  background: none; border: none; font-size: 22px; cursor: pointer;
  opacity: 0.7; transition: opacity 0.15s, transform 0.1s; padding: 2px; flex-shrink: 0;
}
.vocab-tts-btn:hover { opacity: 1; transform: scale(1.15); }
.vocab-word-transcription { font-size: 14px; color: var(--blue); font-weight: 700; }

/* Image quiz 2x2 grid */
.vocab-image-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px;
}
.vocab-image-card {
  background: var(--white); border-radius: var(--radius); padding: 16px 8px;
  border: 2.5px solid var(--gray-light); box-shadow: 0 3px 0 var(--gray-light);
  cursor: pointer; text-align: center;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  user-select: none; font-family: 'Nunito', sans-serif;
}
.vocab-image-card:hover:not(:disabled) {
  border-color: var(--blue); transform: translateY(-2px);
  background: rgba(28,176,246,0.04);
}
.vocab-image-card:disabled { cursor: default; }
.vocab-image-card.correct { border-color: var(--green); background: var(--green-light); box-shadow: 0 3px 0 var(--green-dark); }
.vocab-image-card.wrong { border-color: var(--red); background: var(--red-light); box-shadow: 0 3px 0 #cc2222; }
.vocab-card-emoji { font-size: 50px; line-height: 1.2; display: block; }
.vocab-card-label { font-size: 14px; font-weight: 800; color: var(--text); margin-top: 6px; }

/* Translation quiz buttons */
.vocab-translation-options {
  display: flex; flex-direction: column; gap: 12px; margin-top: 8px;
}
.vocab-translation-btn {
  padding: 20px 18px; background: var(--white);
  border: 2.5px solid var(--gray-light); border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-size: 18px; font-weight: 800;
  color: var(--text); cursor: pointer; text-align: center;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  box-shadow: 0 3px 0 var(--gray-light); user-select: none;
}
.vocab-translation-btn:hover:not(:disabled) {
  border-color: var(--blue); background: rgba(28,176,246,0.06); transform: translateY(-2px);
}
.vocab-translation-btn:disabled { cursor: default; }
.vocab-translation-btn.correct { border-color: var(--green); background: var(--green-light); color: var(--green-dark); box-shadow: 0 3px 0 var(--green-dark); }
.vocab-translation-btn.wrong { border-color: var(--red); background: var(--red-light); color: var(--red); box-shadow: 0 3px 0 #cc2222; }

/* ============================================================ LOGIN SCREEN */
.login-container {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh; gap: 20px;
  padding: 40px 24px; text-align: center;
}
.login-flag { font-size: 72px; }
.login-subtitle {
  color: var(--text-light); font-size: 16px; font-weight: 600;
  max-width: 280px; line-height: 1.5;
}
.btn-google-login {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 28px; background: white; color: var(--text);
  border: 2px solid var(--gray-light); border-radius: 14px;
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; box-shadow: 0 3px 0 var(--gray-light);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn-google-login:active { transform: translateY(3px); box-shadow: none; }
.google-svg { flex-shrink: 0; }

/* ============================================================ USER AVATAR */
.home-top-row {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
}
.btn-user-info {
  width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--green);
  background: var(--green-light); cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--green-dark);
  flex-shrink: 0;
}
.btn-user-info img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================ USER MENU */
.user-menu {
  flex-direction: column; gap: 6px;
  background: white; border-radius: var(--radius);
  padding: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  border: 1.5px solid var(--gray-light);
  position: relative; z-index: 10;
  margin-top: -8px;
}
.user-menu-name { font-size: 16px; font-weight: 800; color: var(--text); }
.user-menu-email { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.btn-signout {
  padding: 10px; background: var(--red-light); color: var(--red);
  border: 2px solid var(--red); border-radius: 10px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; width: 100%;
}

/* ============================================================ SETTINGS */
.btn-settings-link {
  padding: 10px; background: #f8f9fa; color: #333;
  border: 2px solid #e8e8e8; border-radius: 10px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; width: 100%; margin-bottom: 6px;
}
.settings-user-card {
  display: flex; align-items: center; gap: 14px;
  background: #f8f9fa; border-radius: 16px; padding: 16px;
  margin-bottom: 20px;
}
.settings-avatar {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.settings-initials {
  width: 52px; height: 52px; border-radius: 50%; background: var(--primary);
  color: white; font-size: 22px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.settings-user-info { flex: 1; min-width: 0; }
.settings-user-name { font-size: 16px; font-weight: 800; color: #1a1a2e; }
.settings-user-email { font-size: 13px; color: #888; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.settings-section { margin-bottom: 20px; }
.settings-section-title { font-size: 12px; font-weight: 800; color: #999; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; }

.settings-goal-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings-goal-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 8px; background: #f8f9fa;
  border: 2px solid #e8e8e8; border-radius: 14px;
  cursor: pointer; font-family: 'Nunito', sans-serif; transition: all 0.15s;
}
.settings-goal-btn.active { border-color: var(--primary); background: #fff9f0; }
.goal-emoji { font-size: 22px; }
.goal-label { font-size: 13px; font-weight: 700; color: #333; }
.goal-xp { font-size: 12px; color: #888; font-weight: 600; }

.settings-row {
  display: flex; align-items: center; gap: 12px;
  background: #f8f9fa; border-radius: 14px; padding: 14px;
  cursor: pointer;
}
.settings-row-icon { font-size: 22px; flex-shrink: 0; }
.settings-row-body { flex: 1; }
.settings-row-title { font-size: 15px; font-weight: 700; color: #1a1a2e; }
.settings-row-sub { font-size: 12px; color: #888; margin-top: 2px; }
.settings-toggle {
  width: 44px; height: 24px; background: #ddd; border-radius: 99px;
  position: relative; flex-shrink: 0; transition: background 0.2s;
}
.settings-toggle.on { background: var(--primary); }
.settings-toggle-knob {
  width: 20px; height: 20px; background: white; border-radius: 50%;
  position: absolute; top: 2px; left: 2px; transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.settings-toggle.on .settings-toggle-knob { left: 22px; }

.settings-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings-stat {
  background: #f8f9fa; border-radius: 14px; padding: 14px;
  text-align: center;
}
.settings-stat-value { font-size: 24px; font-weight: 900; color: var(--primary); }
.settings-stat-label { font-size: 12px; color: #888; font-weight: 600; margin-top: 2px; }

.btn-signout-full {
  width: 100%; padding: 14px; background: #fff0f0; color: var(--red);
  border: 2px solid #ffcccc; border-radius: 14px;
  font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer;
}
.settings-version { text-align: center; font-size: 12px; color: #ccc; padding: 16px 0 8px; }

/* ============================================================ AUTH LOADING */
.auth-loading-container {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh; gap: 24px;
}
.auth-loading-flag { font-size: 64px; }
.auth-loading-spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--gray-light);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.auth-loading-text { color: var(--text-light); font-size: 15px; font-weight: 600; }

/* ============================================================ QUIZ */
.quiz-hearts { font-size: 20px; margin-bottom: 4px; }
.quiz-translation {
  font-size: 22px; font-weight: 800; color: var(--text);
  text-align: center; padding: 16px 8px; line-height: 1.4;
}
.quiz-answer-area {
  min-height: 60px; background: white; border-radius: 14px;
  border: 2.5px dashed var(--gray-light); padding: 12px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  transition: border-color 0.2s, background 0.2s;
}
.quiz-answer-area.answer-correct {
  border-color: var(--green); background: var(--green-light);
}
.quiz-answer-area.answer-wrong {
  border-color: var(--red); background: var(--red-light);
}
.quiz-answer-placeholder {
  color: var(--gray); font-size: 14px; font-weight: 600; font-style: italic;
}
.quiz-word-pool {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 16px 4px; justify-content: center;
}
.quiz-word-tile {
  padding: 10px 16px; background: white; border: 2.5px solid var(--gray-light);
  border-radius: 10px; font-family: 'Nunito', sans-serif;
  font-size: 16px; font-weight: 700; cursor: pointer; color: var(--text);
  box-shadow: 0 3px 0 var(--gray-light); transition: transform 0.08s, box-shadow 0.08s;
  user-select: none; touch-action: none;
}
.quiz-word-tile:active { transform: translateY(3px); box-shadow: none; }
.quiz-word-tile.placed {
  background: var(--blue); color: white;
  border-color: var(--blue-dark); box-shadow: 0 3px 0 var(--blue-dark);
}
.quiz-word-tile.dragging { opacity: 0.4; transform: scale(0.95); }
.quiz-check-btn {
  margin-top: 8px; max-width: 100%;
}
.quiz-check-btn:disabled {
  background: var(--gray-light); box-shadow: none;
  color: var(--gray); cursor: not-allowed; transform: none;
}
.quiz-session-container {
  display: flex; flex-direction: column; gap: 14px;
}

/* ============================================================
   ONBOARDING
   ============================================================ */
.onboarding-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 32px;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  justify-content: center;
  gap: 0;
}

.onboarding-logo {
  font-size: 64px;
  margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.onboarding-title {
  font-size: 26px;
  font-weight: 800;
  color: #1a1a2e;
  text-align: center;
  margin: 0 0 8px;
  line-height: 1.2;
}

.onboarding-subtitle {
  font-size: 15px;
  color: #666;
  text-align: center;
  margin: 0 0 32px;
}

.onboarding-features {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.onboarding-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8f9fa;
  border-radius: 14px;
  padding: 14px 16px;
}

.onboarding-feature-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.onboarding-feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.onboarding-feature-text strong {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
}

.onboarding-feature-text span {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.onboarding-tip {
  background: #fff8e6;
  border: 1.5px solid #ffd166;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: #5a4000;
  text-align: center;
  width: 100%;
  margin-bottom: 24px;
  line-height: 1.5;
}

.onboarding-btn {
  width: 100%;
  font-size: 17px;
  padding: 16px;
}

/* ============================================================
   PAYWALL
   ============================================================ */
.paywall-container {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 20px 48px; max-width: 420px; margin: 0 auto; text-align: center;
}
.paywall-icon { font-size: 56px; margin-bottom: 16px; }
.paywall-title { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.paywall-subtitle { font-size: 15px; color: var(--gray); margin-bottom: 32px; line-height: 1.5; }

.paywall-plans { display: flex; flex-direction: column; gap: 16px; width: 100%; margin-bottom: 20px; }

.paywall-plan {
  border: 2px solid var(--gray-light); border-radius: 16px;
  padding: 20px; position: relative;
}
.paywall-plan-popular {
  border-color: var(--primary); background: #f0fff4;
}
.paywall-plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 100px; white-space: nowrap;
}
.paywall-plan-name { font-size: 14px; color: var(--gray); font-weight: 600; margin-bottom: 6px; }
.paywall-plan-price { font-size: 28px; font-weight: 800; color: var(--text); }
.paywall-plan-price span { font-size: 14px; font-weight: 500; color: var(--gray); }
.paywall-plan-billed { font-size: 13px; color: var(--gray); margin-bottom: 16px; }

.paywall-btn-primary {
  display: block; width: 100%; padding: 14px; border-radius: 12px; margin-top: 16px;
  background: var(--primary); color: white; font-size: 15px; font-weight: 700;
  text-decoration: none; text-align: center;
}
.paywall-btn-secondary {
  display: block; width: 100%; padding: 14px; border-radius: 12px; margin-top: 16px;
  background: white; color: var(--text); font-size: 15px; font-weight: 700;
  text-decoration: none; text-align: center; border: 2px solid var(--gray-light);
}
.paywall-note { font-size: 13px; color: var(--gray); margin-bottom: 24px; }
.paywall-signout {
  background: none; border: none; color: var(--gray); font-size: 14px;
  cursor: pointer; text-decoration: underline; padding: 8px;
}

/* ==================== SCROLL TO TOP ==================== */
#scroll-top-btn {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 20px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(88, 204, 2, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 999;
}
#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#scroll-top-btn:active {
  transform: scale(0.9);
}

/* ==================== FEED ==================== */
.feed-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #1A7FD4;
  box-shadow: 0 0 0 2px rgba(88,204,2,0.3);
  animation: pulse-dot 2s infinite;
  margin-left: 8px;
  flex-shrink: 0;
  align-self: center;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(88,204,2,0.3); }
  50%       { box-shadow: 0 0 0 5px rgba(88,204,2,0.1); }
}

.feed-loading {
  text-align: center; color: var(--gray); padding: 40px 16px; font-size: 15px;
}

.feed-empty {
  text-align: center; padding: 60px 24px;
}
.feed-empty-icon { font-size: 48px; margin-bottom: 12px; }
.feed-empty-text { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.feed-empty-sub  { font-size: 14px; color: var(--gray); }

/* Feed card */
.feed-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 16px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  animation: feedCardIn 0.3s ease;
}
@keyframes feedCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.feed-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.feed-avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0;
}
.feed-avatar-initials {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #1A7FD4, #1CB0F6);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 15px; font-weight: 800;
  flex-shrink: 0;
}
.feed-card-meta { flex: 1; min-width: 0; }
.feed-card-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-card-time { font-size: 12px; color: var(--gray); margin-top: 1px; }

.feed-card-body {
  display: flex; align-items: flex-start; gap: 10px;
}
.feed-card-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.feed-card-text { flex: 1; }
.feed-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.feed-card-sub   { font-size: 13px; color: var(--gray); }

.feed-card-chips {
  display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.feed-chip {
  background: var(--gray-bg); border-radius: 99px;
  padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--text-light);
}
.feed-chip.green { background: var(--green-light); color: var(--green-dark); }
.feed-chip.blue  { background: #e3f4fd; color: #0a90d4; }
.feed-chip.yellow{ background: #fff8cc; color: #a88000; }

.feed-card-footer {
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--gray-light);
  display: flex; align-items: center; gap: 8px;
}
.feed-like-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  color: var(--gray); font-size: 13px; font-weight: 600;
  padding: 4px 8px; border-radius: 8px;
  transition: all 0.15s;
}
.feed-like-btn:hover { background: var(--gray-bg); }
.feed-like-btn.liked { color: #FF4B4B; }
.feed-like-btn .like-heart { font-size: 16px; }

/* Nav badge for feed */
.nav-btn-feed { position: relative; }
.feed-nav-badge {
  position: absolute; top: 6px; right: 12px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #FF4B4B;
}

/* ==================== FEED COMPOSER ==================== */
.feed-composer {
  margin: 0 16px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
}
.feed-composer-row {
  display: flex; gap: 10px;
  padding: 14px 14px 12px;
  align-items: flex-start;
}
.feed-composer-textarea {
  flex: 1;
  border: 1.5px solid var(--gray-light);
  border-radius: 12px;
  outline: none; resize: none;
  font-family: 'Nunito', sans-serif;
  font-size: 15px; color: var(--text);
  background: var(--gray-bg);
  min-height: 80px; max-height: 200px;
  line-height: 1.5;
  padding: 10px 12px;
  transition: border-color 0.15s;
}
.feed-composer-textarea:focus {
  border-color: var(--green);
  background: var(--white);
}
.feed-composer-textarea::placeholder { color: var(--gray); }

.composer-image-preview {
  position: relative; margin: 0 14px 10px;
  border-radius: 12px; overflow: hidden;
  max-height: 240px;
}
.composer-image-preview img {
  width: 100%; max-height: 240px;
  object-fit: cover; display: block;
  border-radius: 12px;
}
.composer-remove-img {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: white;
  border: none; cursor: pointer;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.feed-composer-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px 14px;
  flex-wrap: nowrap;
}
.composer-attach-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--gray-bg); border: 1.5px solid var(--gray-light);
  border-radius: 20px; padding: 7px 14px;
  font-size: 13px; font-weight: 700; color: var(--text-light);
  font-family: 'Nunito', sans-serif;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s;
}
.composer-attach-btn:hover { background: var(--gray-light); }
.composer-attach-btn.has-image {
  border-color: var(--green); color: var(--green-dark); background: var(--green-light);
}
.composer-char-count {
  flex: 1; text-align: right;
  font-size: 12px; color: var(--gray); font-weight: 600;
}
.composer-char-count.warn  { color: #FF9600; }
.composer-char-count.limit { color: var(--red); }

.composer-submit-btn {
  width: auto !important;
  padding: 9px 20px !important;
  font-size: 14px !important;
  border-radius: 20px !important;
  box-shadow: 0 3px 0 var(--green-dark) !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.composer-submit-btn:disabled {
  background: var(--gray-light) !important;
  box-shadow: none !important;
  color: var(--gray) !important;
  cursor: default;
  transform: none !important;
}

/* User post text & image */
.feed-user-text {
  padding: 4px 16px 8px;
  font-size: 15px; line-height: 1.55; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.feed-card-image {
  margin: 0 0 4px;
  overflow: hidden;
  border-radius: 0;
}
.feed-card-image img {
  width: 100%; max-height: 320px;
  object-fit: cover; display: block;
  cursor: zoom-in;
}

.feed-delete-btn {
  margin-left: auto;
  background: none; border: none; cursor: pointer;
  color: var(--gray); font-size: 14px; font-weight: 700;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.feed-delete-btn:hover { background: var(--red-light); color: var(--red); }

/* ==================== PROGRESS DASHBOARD ==================== */
.stat-item-btn {
  background: var(--white); border: none; cursor: pointer;
  border-radius: var(--radius); padding: 12px 8px;
  transition: transform 0.1s, box-shadow 0.1s;
  flex: 1;
}
.stat-item-btn:active { transform: scale(0.96); }

/* Tabs */
.progress-tabs {
  display: flex; gap: 8px; padding: 0 16px 16px;
}
.progress-tab {
  flex: 1; padding: 10px 6px; border: 2px solid var(--gray-light);
  border-radius: 12px; background: var(--white); font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700; color: var(--gray); cursor: pointer;
  transition: all 0.15s;
}
.progress-tab.active {
  border-color: var(--green); background: var(--green-light); color: var(--green-dark);
}

/* Panels */
.progress-panel { padding: 0 16px 24px; }

/* Hero */
.progress-hero {
  background: linear-gradient(135deg, #1A7FD4, #1CB0F6);
  border-radius: 20px; padding: 28px 20px;
  text-align: center; color: white; margin-bottom: 16px;
}
.progress-hero-icon { font-size: 40px; margin-bottom: 6px; }
.progress-hero-value { font-size: 52px; font-weight: 900; line-height: 1; }
.progress-hero-label { font-size: 16px; font-weight: 600; opacity: 0.9; margin-top: 4px; }
.progress-hero-sub   { font-size: 13px; opacity: 0.8; margin-top: 6px; }

/* Card */
.progress-card {
  background: var(--white); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.progress-card-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.progress-card-hint  { font-size: 12px; color: var(--gray); margin-top: 6px; text-align: right; }

/* Mini stats grid */
.progress-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;
}
.progress-stat-box {
  background: var(--white); border-radius: var(--radius);
  padding: 14px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.progress-stat-val { font-size: 26px; font-weight: 900; color: var(--green); }
.progress-stat-lbl { font-size: 12px; color: var(--gray); font-weight: 600; margin-top: 2px; }

/* League */
.league-hero {
  background: var(--white); border-radius: 20px;
  padding: 28px 20px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 16px;
}
.league-badge  { font-size: 64px; line-height: 1; margin-bottom: 8px; }
.league-name   { font-size: 22px; font-weight: 900; color: var(--text); margin-bottom: 8px; }
.league-level-row { display: inline-flex; align-items: center; gap: 8px;
  background: var(--gray-bg); border-radius: 99px; padding: 6px 16px; }
.league-level-label { font-size: 13px; color: var(--gray); font-weight: 600; }
.league-level-val   { font-size: 18px; font-weight: 900; color: var(--text); }

.leagues-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.league-row {
  background: var(--white); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  opacity: 0.45;
}
.league-row.current { opacity: 1; border: 2px solid var(--green); }
.league-row.done    { opacity: 1; }
.league-row-icon    { font-size: 28px; flex-shrink: 0; }
.league-row-info    { flex: 1; }
.league-row-name    { font-size: 14px; font-weight: 700; color: var(--text); }
.league-row-range   { font-size: 12px; color: var(--gray); }
.league-row-check   { font-size: 18px; }

/* Milestones */
.lessons-milestones { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.milestone-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.milestone-row.done .milestone-icon { filter: none; }
.milestone-row:not(.done) { opacity: 0.5; }
.milestone-icon  { font-size: 24px; }
.milestone-info  { flex: 1; }
.milestone-title { font-size: 14px; font-weight: 700; color: var(--text); }
.milestone-sub   { font-size: 12px; color: var(--gray); }
.milestone-check { font-size: 18px; }

/* Motivation card */
.progress-motivation {
  text-align: center; padding: 20px;
  background: linear-gradient(135deg, #fff8cc, #fffbe6);
  border: 2px solid #FFD900;
}
.progress-motivation-emoji { font-size: 36px; margin-bottom: 8px; }
.progress-motivation-text  { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.progress-motivation-sub   { font-size: 13px; color: var(--text-light); }

/* ==================== SUPPORT ==================== */
.support-btn {
  display: block; width: calc(100% - 32px); margin: 8px 16px 20px;
  padding: 13px; border-radius: var(--radius);
  background: none; border: 2px solid var(--gray-light);
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--text-light); cursor: pointer; text-align: center;
  transition: border-color 0.15s, color 0.15s;
}
.support-btn:hover { border-color: var(--green); color: var(--green-dark); }

/* PWA Guide Modal */
.pwa-modal-box { max-height: 88vh; overflow-y: auto; }
.pwa-guide-body { padding: 0 20px 20px; }
.pwa-guide-intro { font-size: 15px; color: var(--text); margin-bottom: 20px; line-height: 1.5; }
.pwa-os-block { margin-bottom: 20px; }
.pwa-os-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 16px; color: var(--text); margin-bottom: 10px; }
.pwa-steps { padding-left: 20px; margin: 0; }
.pwa-steps li { font-size: 14px; color: var(--text); line-height: 1.55; margin-bottom: 8px; }
.pwa-icon-hint { font-size: 13px; background: var(--gray-light); border-radius: 4px; padding: 1px 5px; }
.pwa-reason-box { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg, #f0fce8, #e8f9dd); border: 1.5px solid var(--green); border-radius: 12px; padding: 14px 16px; margin-top: 4px; }
.pwa-reason-icon { font-size: 22px; flex-shrink: 0; }
.pwa-reason-text { font-size: 14px; color: var(--text); line-height: 1.5; }

.support-modal-box {
  max-height: 90vh; overflow-y: auto; width: 100%; max-width: 480px;
}
.support-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.support-modal-title { font-size: 18px; font-weight: 800; color: var(--text); }
.modal-close-btn {
  background: none; border: none; font-size: 18px; cursor: pointer;
  color: var(--gray); width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.modal-close-btn:hover { background: var(--gray-bg); }
.support-form-desc { font-size: 13px; color: var(--gray); margin-bottom: 16px; }

.support-field { margin-bottom: 12px; }
.support-label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.support-input {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--gray-light);
  border-radius: 10px; font-family: 'Nunito', sans-serif;
  font-size: 14px; color: var(--text); background: var(--gray-bg);
  outline: none; transition: border-color 0.15s;
  box-sizing: border-box;
}
.support-input:focus { border-color: var(--green); background: var(--white); }
.support-select { appearance: none; cursor: pointer; }
.support-textarea { min-height: 100px; resize: vertical; }
.support-submit-btn { margin-top: 8px; }

.support-success { text-align: center; padding: 24px 0 8px; }
.support-success-icon  { font-size: 48px; margin-bottom: 12px; }
.support-success-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.support-success-sub   { font-size: 14px; color: var(--gray); }

/* ============================================================
   BLOG
   ============================================================ */
.blog-section-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  padding: 20px 16px 8px;
}
.blog-section-purple { color: #7c3aed; }
.blog-section-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 4px;
}
.blog-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: transform .15s, box-shadow .15s;
}
.blog-card:active { transform: scale(.98); }
.blog-card-emoji {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fce8, #d4f5b0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.blog-card-emoji-purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); }
.blog-card-body { flex: 1; min-width: 0; }
.blog-card-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 3px;
}
.blog-card-tag-purple { color: #7c3aed; }
.blog-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  white-space: normal;
}
.blog-card-arrow {
  font-size: 16px;
  color: var(--green);
  font-weight: 800;
  flex-shrink: 0;
}
.blog-card-arrow-purple { color: #7c3aed; }

/* ============================================================
   SPEECH TRAINING
   ============================================================ */
.speech-dark-screen {
  background: var(--gray-bg);
  color: var(--text);
  min-height: 100vh;
}
.speech-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 4px;
}
.speech-back-btn {
  background: var(--gray-light);
  color: var(--text);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
}
.speech-progress-wrap { flex: 1; }
.speech-progress-bg {
  background: var(--gray-light);
  border-radius: 99px;
  height: 10px;
}
.speech-progress-fill {
  background: var(--green);
  height: 10px;
  border-radius: 99px;
  transition: width 0.4s ease;
  width: 0%;
}
.speech-counter {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray);
  min-width: 36px;
  text-align: right;
  font-family: 'Nunito', sans-serif;
}

/* Categories screen */
.speech-cat-title {
  font-size: 18px;
  font-weight: 800;
  flex: 1;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
}
.speech-cat-desc {
  font-size: 14px;
  color: var(--text-light);
  padding: 0 4px 16px;
  font-family: 'Nunito', sans-serif;
}
.speech-categories-list {
  padding: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.speech-cat-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
  font-family: 'Nunito', sans-serif;
}
.speech-cat-btn:active { background: var(--green-light); border-color: var(--green); }
.speech-cat-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-bg);
  border-radius: 12px;
  flex-shrink: 0;
}
.speech-cat-info { flex: 1; }
.speech-cat-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text);
}
.speech-cat-count {
  font-size: 12px;
  color: var(--text-light);
}
.speech-cat-arrow {
  font-size: 20px;
  color: var(--gray);
  font-weight: 700;
}

/* Training screen */
.speech-content {
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.speech-character-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.speech-character {
  font-size: 58px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.speech-character-happy {
  animation: charJump 0.5s ease;
}
.speech-character-thinking {
  animation: charShake 0.4s ease;
}
@keyframes charJump {
  0%,100% { transform: translateY(0) rotate(0deg); }
  40% { transform: translateY(-14px) rotate(6deg); }
}
@keyframes charShake {
  0%,100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}
.speech-bubble-wrap { flex: 1; min-width: 0; }
.speech-bubble-badge {
  background: #FF9600;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 5px 10px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Nunito', sans-serif;
}
.speech-retry-icon { font-size: 13px; }
.speech-bubble {
  background: var(--white);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  border: 2px solid var(--gray-light);
  line-height: 1.4;
  font-family: 'Nunito', sans-serif;
}
.speech-bubble-badge + .speech-bubble {
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: none;
}

.speech-word-area {
  text-align: center;
  padding: 20px 0 130px;
}
.speech-greek-word {
  font-size: 46px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
  transition: color 0.3s;
  line-height: 1.1;
  font-family: 'Nunito', sans-serif;
}
.speech-greek-word.speech-correct { color: var(--green); }
.speech-greek-word.speech-wrong   { color: #FF9600; }
.speech-transcription {
  font-size: 17px;
  color: var(--text-light);
  margin-bottom: 6px;
  font-family: 'Nunito', sans-serif;
}
.speech-translation {
  font-size: 14px;
  color: var(--gray);
  font-style: italic;
  font-family: 'Nunito', sans-serif;
}

/* Footer mic */
.speech-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  padding: 8px 16px 32px;
  background: linear-gradient(to top, var(--gray-bg) 65%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.speech-recognized {
  font-size: 13px;
  color: var(--text-light);
  min-height: 18px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
}
.speech-mic-btn {
  width: 100%;
  max-width: 480px;
  height: 62px;
  border-radius: 16px;
  border: none;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s, box-shadow 0.08s;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
}
.speech-mic-btn:active { transform: translateY(4px); box-shadow: none !important; }
.speech-mic-idle {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 0 var(--green-dark);
}
.speech-mic-recording {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 0 var(--blue-dark);
  animation: micPulse 1.1s ease-in-out infinite;
}
.speech-mic-correct {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 0 var(--green-dark);
}
@keyframes micPulse {
  0%,100% { box-shadow: 0 4px 0 var(--blue-dark), 0 0 0 0 rgba(28,176,246,0.4); }
  50%      { box-shadow: 0 4px 0 var(--blue-dark), 0 0 0 14px rgba(28,176,246,0); }
}
/* Wave bars */
.speech-waves {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
}
.speech-waves span {
  display: block;
  width: 5px;
  border-radius: 99px;
  background: #fff;
  animation: waveBar 0.75s ease-in-out infinite;
}
.speech-waves span:nth-child(1) { animation-delay: 0s; }
.speech-waves span:nth-child(2) { animation-delay: 0.1s; }
.speech-waves span:nth-child(3) { animation-delay: 0.2s; }
.speech-waves span:nth-child(4) { animation-delay: 0.3s; }
.speech-waves span:nth-child(5) { animation-delay: 0.4s; }
@keyframes waveBar {
  0%,100% { height: 6px; }
  50%      { height: 28px; }
}

/* Nav highlight */
.nav-btn-speech { border-color: var(--green) !important; }
.nav-btn-wide {
  grid-column: span 2;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
  padding: 18px;
  font-size: 16px;
}
.nav-btn-wide .nav-icon { font-size: 26px; }
.nav-btn-wide .nav-label { font-size: 15px; font-weight: 800; }
