:root {
  --green: #58CC02;
  --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; }

/* ============================================================ 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; }

/* 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%;
}

/* ============================================================ 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;
}
