/* ============================================================
   KOSAKATA ENGLISH - Design System
   White + Light Blue, Duolingo Texture
   Font: Poppins | No shadow | Minimal borders
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue-50: #EFF8FF;
  --blue-100: #DBEEFE;
  --blue-200: #BFE0FE;
  --blue-300: #93CCFD;
  --blue-400: #60B0FA;
  --blue-500: #3B93F5;
  --blue-600: #1F6FEA;
  --blue-700: #1A5CD7;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --green-500: #22C55E;
  --green-100: #DCFCE7;
  --red-500: #EF4444;
  --red-100: #FEE2E2;
  --orange-500: #F59E0B;
  --orange-100: #FEF3C7;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

html, body {
  font-family: 'Poppins', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  position: relative;
  padding-bottom: 72px;
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
}

.header-sub {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

.header-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  color: var(--gray-600);
  font-size: 18px;
}

.header-back:active {
  background: var(--gray-50);
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  padding: 4px 10px;
  background: var(--gray-50);
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
}

.stat-badge .stat-icon {
  width: 16px;
  height: 16px;
}

.stat-xp {
  color: var(--blue-600);
  background: var(--blue-50);
  border-color: var(--blue-200);
}

.stat-streak {
  color: var(--orange-500);
  background: var(--orange-100);
  border-color: #FDE68A;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 11px;
  font-weight: 500;
  gap: 3px;
  transition: color 0.15s;
  text-decoration: none;
}

.nav-item.active {
  color: var(--blue-500);
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

/* ============================================================
   HOME SCREEN
   ============================================================ */

.screen {
  display: none;
  animation: fadeIn 0.2s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-hero {
  padding: 28px 20px 20px;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--gray-200);
}

.home-greeting {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 4px;
}

.home-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.home-progress-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.home-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.home-progress-label span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.home-progress-label span:last-child {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--blue-400);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* DAY CARDS */

.day-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-card {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  gap: 14px;
}

.day-card:active {
  background: var(--gray-50);
}

.day-card.locked {
  opacity: 0.5;
  pointer-events: none;
}

.day-card.completed .day-num {
  background: var(--green-100);
  color: var(--green-500);
  border-color: var(--green-500);
}

.day-num {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-500);
  background: var(--blue-50);
  border: 2px solid var(--blue-300);
  flex-shrink: 0;
}

.day-info {
  flex: 1;
  min-width: 0;
}

.day-info-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-info-sub {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 400;
}

.day-progress-mini {
  width: 48px;
  height: 6px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
}

.day-progress-mini .fill {
  height: 100%;
  background: var(--blue-400);
  border-radius: var(--radius-full);
}

.day-arrow {
  color: var(--gray-300);
  flex-shrink: 0;
  font-size: 16px;
}

/* ============================================================
   DAY DETAIL SCREEN
   ============================================================ */

.day-detail-header {
  padding: 24px 20px;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--gray-200);
  text-align: center;
}

.day-detail-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.day-detail-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.day-detail-sub {
  font-size: 12px;
  color: var(--gray-400);
}

.mode-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode-card {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  gap: 14px;
}

.mode-card:active {
  background: var(--gray-50);
}

.mode-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.mode-icon.blue {
  background: var(--blue-50);
  color: var(--blue-500);
  border: 1px solid var(--blue-200);
}

.mode-icon.green {
  background: var(--green-100);
  color: var(--green-500);
  border: 1px solid #86EFAC;
}

.mode-icon.orange {
  background: var(--orange-100);
  color: var(--orange-500);
  border: 1px solid #FDE68A;
}

.mode-icon.purple {
  background: #F3E8FF;
  color: #8B5CF6;
  border: 1px solid #C4B5FD;
}

.mode-info {
  flex: 1;
}

.mode-info-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.mode-info-sub {
  font-size: 12px;
  color: var(--gray-400);
}

/* ============================================================
   QUIZ SCREEN
   ============================================================ */

.quiz-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.quiz-progress {
  flex: 1;
  height: 10px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quiz-progress .fill {
  height: 100%;
  background: var(--blue-400);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.quiz-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  color: var(--gray-500);
  font-size: 16px;
  flex-shrink: 0;
}

.quiz-lives {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.quiz-lives .heart {
  width: 18px;
  height: 18px;
  color: var(--red-500);
}

.quiz-lives .heart.empty {
  color: var(--gray-200);
}

.quiz-body {
  padding: 28px 20px;
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
}

.quiz-question-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-500);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quiz-question {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.3;
}

.quiz-question-pron {
  font-size: 14px;
  color: var(--gray-400);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 32px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.quiz-option {
  padding: 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-700);
  background: var(--white);
  transition: all 0.15s;
  text-align: left;
  position: relative;
}

.quiz-option:active {
  background: var(--gray-50);
}

.quiz-option.selected {
  border-color: var(--blue-400);
  background: var(--blue-50);
  color: var(--blue-600);
}

.quiz-option.correct {
  border-color: var(--green-500);
  background: var(--green-100);
  color: #16A34A;
}

.quiz-option.wrong {
  border-color: var(--red-500);
  background: var(--red-100);
  color: var(--red-500);
}

.quiz-option.disabled {
  pointer-events: none;
}

/* SENTENCE BUILDER */

.sentence-display {
  min-height: 80px;
  padding: 16px;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  align-content: flex-start;
  background: var(--gray-50);
}

.sentence-display.has-content {
  border-style: solid;
  border-color: var(--blue-200);
  background: var(--blue-50);
}

.sentence-display.correct-border {
  border-color: var(--green-500);
  background: var(--green-100);
}

.sentence-display.wrong-border {
  border-color: var(--red-500);
  background: var(--red-100);
}

.word-chip {
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.word-chip:active {
  transform: scale(0.95);
}

.word-chip.used {
  opacity: 0.3;
  pointer-events: none;
}

.word-chip.in-sentence {
  background: var(--blue-50);
  border-color: var(--blue-200);
  color: var(--blue-600);
}

.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* MATCHING MODE */

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.match-card {
  padding: 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-card.selected {
  border-color: var(--blue-400);
  background: var(--blue-50);
  color: var(--blue-600);
}

.match-card.matched {
  border-color: var(--green-500);
  background: var(--green-100);
  color: #16A34A;
  pointer-events: none;
}

.match-card.wrong-flash {
  border-color: var(--red-500);
  background: var(--red-100);
}

/* FILL IN BLANK */

.fill-sentence {
  font-size: 18px;
  font-weight: 500;
  color: var(--gray-800);
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-md);
}

.fill-blank {
  display: inline-block;
  min-width: 100px;
  border-bottom: 2px solid var(--blue-400);
  padding: 0 4px;
  margin: 0 4px;
  font-weight: 600;
  color: var(--blue-600);
}

/* ============================================================
   QUIZ FOOTER / CHECK BUTTON
   ============================================================ */

.quiz-footer {
  padding: 16px 20px;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  z-index: 100;
}

.btn-check {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--blue-400);
  color: var(--white);
}

.btn-check:active {
  transform: scale(0.98);
}

.btn-check:disabled {
  background: var(--gray-200);
  color: var(--gray-400);
  cursor: default;
}

.btn-check:disabled:active {
  transform: none;
}

.btn-check.correct {
  background: var(--green-500);
}

.btn-check.wrong {
  background: var(--red-500);
}

/* FEEDBACK BAR */

.feedback-bar {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}

.feedback-bar.show {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUp 0.2s ease;
}

.feedback-bar.correct {
  background: var(--green-100);
  color: #16A34A;
  border: 1px solid #86EFAC;
}

.feedback-bar.wrong {
  background: var(--red-100);
  color: var(--red-500);
  border: 1px solid #FCA5A5;
}

.feedback-bar .correct-answer {
  font-weight: 400;
  color: var(--gray-600);
  margin-left: 4px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESULT SCREEN
   ============================================================ */

.result-screen {
  padding: 40px 20px;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
  font-weight: 700;
}

.result-icon.great {
  background: var(--green-100);
  color: var(--green-500);
  border: 2px solid #86EFAC;
}

.result-icon.ok {
  background: var(--orange-100);
  color: var(--orange-500);
  border: 2px solid #FDE68A;
}

.result-icon.bad {
  background: var(--red-100);
  color: var(--red-500);
  border: 2px solid #FCA5A5;
}

.result-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.result-sub {
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 32px;
}

.result-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  width: 100%;
  max-width: 300px;
}

.result-stat {
  flex: 1;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
}

.result-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-800);
}

.result-stat-label {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
}

.btn-primary {
  padding: 16px 32px;
  background: var(--blue-400);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  margin-bottom: 10px;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  padding: 16px 32px;
  background: var(--white);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
}

/* ============================================================
   FLASHCARD / REVIEW MODE
   ============================================================ */

.flashcard-container {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 120px);
}

.flashcard {
  width: 100%;
  min-height: 240px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  cursor: pointer;
  background: var(--white);
  transition: transform 0.3s;
  perspective: 1000px;
  margin-bottom: 20px;
  text-align: center;
}

.flashcard:active {
  transform: scale(0.98);
}

.flashcard-word {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.flashcard-pron {
  font-size: 16px;
  color: var(--gray-400);
  font-style: italic;
  margin-bottom: 16px;
}

.flashcard-meaning {
  font-size: 18px;
  color: var(--blue-500);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
}

.flashcard.flipped .flashcard-meaning {
  opacity: 1;
}

.flashcard-hint {
  font-size: 12px;
  color: var(--gray-300);
  font-weight: 400;
  margin-top: 12px;
}

.flashcard.flipped .flashcard-hint {
  display: none;
}

.flashcard-nav {
  display: flex;
  gap: 12px;
  width: 100%;
}

.flashcard-nav button {
  flex: 1;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-600);
}

.flashcard-nav button:active {
  background: var(--gray-50);
}

.flashcard-counter {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
  margin-bottom: 16px;
}

/* ============================================================
   PROFILE SCREEN
   ============================================================ */

.profile-section {
  padding: 24px 20px;
}

.profile-card {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--blue-500);
  margin: 0 auto 12px;
  border: 2px solid var(--blue-300);
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.profile-level {
  font-size: 13px;
  color: var(--gray-400);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.profile-stat-card {
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
}

.profile-stat-card .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
}

.profile-stat-card .label {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

.btn-reset {
  width: 100%;
  padding: 14px;
  background: var(--white);
  color: var(--red-500);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
  padding: 16px 20px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* SHAKE ANIMATION */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.shake {
  animation: shake 0.4s ease;
}

/* BOUNCE */
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.bounce {
  animation: bounce 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 0;
}

/* Responsive adjustments */
@media (max-width: 380px) {
  .quiz-question {
    font-size: 20px;
  }
  .word-chip {
    padding: 6px 10px;
    font-size: 13px;
  }
}


/* ============================================================
   MATERI SCREEN - FREEMIUM 40 VOCABULARY TABLE & CTA
   Clean White + Light Blue Duolingo Aesthetic
   Minimal Border (border-gray-200), No Drop Shadows
   Font: Poppins | Zero Emoji
   ============================================================ */

.materi-page {
  padding: 16px 20px 30px;
}

.materi-header-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
}

.materi-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--blue-200);
  margin-bottom: 10px;
}

.materi-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.materi-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* Quick Search Bar */
.materi-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.materi-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  pointer-events: none;
}

.materi-search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.2s;
}

.materi-search-input:focus {
  border-color: var(--blue-500);
}

.materi-search-input::placeholder {
  color: var(--gray-400);
}

/* Table Container */
.materi-table-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.materi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.materi-table thead {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.materi-table th {
  padding: 12px 10px;
  font-weight: 600;
  color: var(--gray-600);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.materi-table th:first-child {
  padding-left: 14px;
  width: 36px;
  text-align: center;
}

.materi-table th:last-child {
  text-align: center;
  width: 44px;
  padding-right: 14px;
}

.materi-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
}

.materi-table tbody tr:last-child {
  border-bottom: none;
}

.materi-table tbody tr:hover {
  background: var(--blue-50);
}

.materi-table td {
  padding: 12px 10px;
  vertical-align: middle;
}

.materi-table td:first-child {
  padding-left: 14px;
  text-align: center;
  color: var(--gray-400);
  font-size: 11px;
  font-weight: 600;
}

.materi-table td:last-child {
  padding-right: 14px;
  text-align: center;
}

.table-word-en {
  font-weight: 700;
  color: var(--blue-600);
  font-size: 14px;
}

.table-word-pron {
  font-size: 11px;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: inline-block;
  font-family: monospace;
}

.table-word-id {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.3;
}

.table-audio-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--blue-200);
  background: var(--blue-50);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.table-audio-btn:hover {
  background: var(--blue-500);
  color: var(--white);
  border-color: var(--blue-500);
}

.table-audio-btn:active {
  transform: scale(0.92);
}

.table-audio-btn svg {
  width: 14px;
  height: 14px;
}

/* Locked / Preview Indicator */
.materi-limit-bar {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.materi-limit-bar svg {
  width: 16px;
  height: 16px;
  color: var(--gray-400);
}

/* ============================================================
   CTA PROMO CARD (ALA DUOLINGO)
   White + Light Blue, Border-2px, Zero Emoji
   ============================================================ */

.cta-promo-card {
  background: var(--white);
  border: 2px solid var(--blue-500);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 24px;
}

.cta-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-500);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.cta-promo-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.35;
  margin-bottom: 8px;
}

.cta-promo-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 16px;
}

.cta-features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.cta-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.4;
}

.cta-check-icon {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.cta-check-icon svg {
  width: 11px;
  height: 11px;
}

.cta-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--blue-500);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: 0 4px 0 var(--blue-700);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.cta-action-btn:hover {
  background: var(--blue-600);
}

.cta-action-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--blue-700);
}

.cta-action-btn svg {
  width: 18px;
  height: 18px;
}

.cta-link-manage {
  margin-top: 14px;
  text-align: center;
}

.cta-edit-btn {
  background: none;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  color: var(--gray-400);
  cursor: pointer;
  text-decoration: underline;
}

.cta-edit-btn:hover {
  color: var(--blue-600);
}

/* CTA Home Highlight Banner */
.home-materi-banner {
  background: var(--white);
  border: 1px solid var(--blue-300);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s;
}

.home-materi-banner:hover {
  border-color: var(--blue-500);
  background: var(--blue-50);
}

.home-materi-banner:active {
  transform: scale(0.99);
}

.home-materi-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-materi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-materi-icon svg {
  width: 22px;
  height: 22px;
}

.home-materi-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.home-materi-sub {
  font-size: 12px;
  color: var(--gray-500);
}

.home-materi-arrow {
  color: var(--blue-500);
  display: flex;
  align-items: center;
}

.home-materi-arrow svg {
  width: 20px;
  height: 20px;
}


/* App Toast (Double Back To Exit) */
.app-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1F2937;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 1000;
  white-space: nowrap;
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
