/* ===========================
   MELISA - English App
   Citrus Fresh × Indigo
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg:        #FAFAF7;
  --surface:   #FFFFFF;
  --surface2:  #F3F5E8;
  --lime:      #D4F000;
  --lime-dark: #B8E600;
  --indigo:    #4F46E5;
  --indigo-lt: #818CF8;
  --dark:      #1A1A2E;
  --text:      #1A1A2E;
  --text-soft: #5A6070;
  --text-xs:   #9AA0AE;
  --border:    #E6EAD8;
  --shadow:    0 4px 24px rgba(26,26,46,0.08);
  --shadow-sm: 0 2px 10px rgba(26,26,46,0.05);
  --r:         18px;
  --r-sm:      10px;
  --ease:      0.22s cubic-bezier(.4,0,.2,1);
}

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

html, body {
  height: 100%;
  font-family: 'Quicksand', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── SCREENS ── */
.screen { display: none; min-height: 100vh; max-width: 480px; margin: 0 auto; padding-bottom: 48px; }
.screen.active { display: block; }

/* ── SPLASH ── */
#screen-splash {
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #F0F0FF 0%, #FAFAF7 55%, #EEFF85 100%);
}
#screen-splash.active { display: flex; }

.splash-inner { text-align: center; padding: 40px 32px; animation: fadeUp 0.6s ease both; }

.splash-icon {
  width: 72px; height: 72px;
  background: var(--indigo);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  animation: splashPop 0.7s cubic-bezier(.4,0,.2,1) both;
  box-shadow: 0 8px 28px rgba(79,70,229,0.30);
}
.splash-icon i { font-size: 30px; color: var(--lime); }

@keyframes splashPop {
  0%   { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  70%  { transform: scale(1.08) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.splash-inner h1 {
  font-family: 'Quicksand', sans-serif;
  font-size: 38px; font-weight: 700;
  color: var(--text); line-height: 1.1; margin-bottom: 12px;
}
.splash-inner h1 .accent {
  color: var(--indigo);
  font-weight: 700;
}
.splash-sub {
  font-family: 'Quicksand', sans-serif;
  color: var(--text-soft); font-size: 15px;
  margin-bottom: 28px; line-height: 1.7;
}

/* ── NAME ENTRY (Splash) ── */
.name-entry {
  margin: 0 auto 28px;
  max-width: 320px;
  animation: fadeUp 0.5s ease both 0.15s;
}
.name-entry-label {
  display: block;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--indigo);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.name-input {
  width: 100%;
  padding: 16px 18px;
  border: 2px solid #E5E7EB;
  border-radius: 16px;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  outline: none;
  box-sizing: border-box;
}
.name-input::placeholder {
  color: #B5B8C2;
  font-weight: 400;
}
.name-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.name-input.shake {
  animation: nameShake 0.45s ease;
  border-color: #F87171;
}
@keyframes nameShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.name-entry-hint {
  margin: 10px 0 0;
  font-family: 'Quicksand', sans-serif;
  font-size: 12.5px;
  color: var(--text-soft);
  text-align: center;
}

/* ── TOP BAR ── */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 12px;
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.app-name {
  font-family: 'Quicksand', sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--indigo-lt) !important;
  letter-spacing: 0.2px;
}
.app-name strong {
  font-family: 'Quicksand', sans-serif !important;
  font-weight: 700 !important;
  color: var(--indigo) !important;
}
.top-bar-right { display: flex; gap: 8px; align-items: center; }

.streak-badge, .xp-badge {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 40px; padding: 5px 12px;
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--text);
  box-shadow: var(--shadow-sm);
}
.streak-badge { border-color: var(--lime-dark); background: #F5FFCC; color: #5A6A00; }
.streak-badge i { color: #8AAB00; }
.xp-badge i { color: var(--indigo); }

/* ── HOME ── */
.home-main { padding: 0 16px; }

.greeting-card {
  background: var(--lime);
  border-radius: var(--r); padding: 20px 22px;
  color: var(--dark); margin-bottom: 16px;
  box-shadow: 0 8px 28px rgba(196,255,77,0.35);
  position: relative; overflow: hidden;
}
.greeting-card::after {
  content: '';
  position: absolute; top: -18px; right: -18px;
  width: 90px; height: 90px;
  background: var(--dark); border-radius: 50%; opacity: 0.10;
}
.greeting-text {
  font-family: 'Quicksand', sans-serif;
  font-size: 17px; font-weight: 700; margin-bottom: 4px;
  color: var(--dark);
}
.progress-summary { font-size: 13px; opacity: 0.78; font-family: 'Quicksand', sans-serif; color: var(--dark); }

.stats-row { display: flex; gap: 10px; margin-bottom: 28px; }
.stat-chip {
  flex: 1; background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 14px 10px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.stat-num {
  display: block; font-family: 'DM Sans', sans-serif;
  font-size: 24px; font-weight: 700; color: var(--indigo); line-height: 1;
}
.stat-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 11px; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: .5px;
  margin-top: 4px; display: block;
}
.section-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-xs); margin-bottom: 12px;
}

/* ── MODE CARDS ── */
.mode-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.mode-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 16px 18px;
  cursor: pointer; transition: var(--ease);
  box-shadow: var(--shadow-sm); text-align: left; width: 100%;
}
.mode-card:hover {
  border-color: var(--lime-dark);
  box-shadow: 0 6px 20px rgba(212,240,0,0.22);
  transform: translateY(-2px);
}
.mode-card:active { transform: translateY(0); }

.mode-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mode-icon i { font-size: 17px; }
.mode-icon--violet { background: #EEF2FF; color: var(--indigo); }
.mode-icon--coral  { background: #EDFFA0; color: #3A5500; }
.mode-icon--mint   { background: #F5FFCC; color: #5A7000; }
.mode-icon--peach  { background: #E8E7FF; color: var(--indigo); }

.mode-info { flex: 1; }
.mode-info strong {
  display: block; font-family: 'Quicksand', sans-serif;
  font-size: 15px; font-weight: 700; color: var(--text);
}
.mode-info span {
  font-family: 'Quicksand', sans-serif;
  font-size: 12px; color: var(--text-soft);
}
.mode-arrow { font-size: 11px; color: var(--text-xs); }

/* ── TOPIC CHIPS ── */
.topic-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.topic-chip {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 40px; padding: 8px 16px;
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--ease);
  display: flex; align-items: center; gap: 6px; color: var(--text);
}
.topic-chip:hover { border-color: var(--indigo-lt); background: #EEF2FF; color: var(--indigo); }
.topic-chip.active {
  background: var(--lime); border-color: var(--lime-dark);
  color: var(--dark); font-weight: 700;
  box-shadow: 0 4px 14px rgba(212,240,0,0.35);
}
.topic-chip .chip-count {
  background: rgba(0,0,0,0.08); border-radius: 20px;
  padding: 1px 6px; font-size: 11px;
}
.topic-chip.active .chip-count { background: rgba(0,0,0,0.12); }

/* ── SCREEN HEADER ── */
.screen-header {
  display: flex; align-items: center;
  padding: 18px 16px 12px; gap: 12px;
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.screen-header h2 {
  flex: 1; font-family: 'Quicksand', sans-serif;
  font-size: 17px; font-weight: 700;
}
.card-counter {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; color: var(--text-soft); font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 40px; padding: 4px 12px;
}

/* ── PROGRESS BAR ── */
.progress-bar-wrap {
  height: 4px; background: var(--border);
  margin: 0 16px 24px; border-radius: 4px; overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--indigo-lt), var(--lime));
  border-radius: 4px; transition: width 0.4s ease; width: 0%;
}

/* ── FLASHCARD ── */
.card-scene { perspective: 1200px; padding: 0 16px; margin-bottom: 24px; }
.flashcard {
  width: 100%; min-height: 320px; position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(.4,0,.2,1);
  cursor: pointer; border-radius: var(--r);
}
.flashcard.flipped { transform: rotateY(180deg); }

.card-front, .card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--r);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 24px; box-shadow: var(--shadow);
}
.card-front { background: var(--surface); border: 2px solid var(--border); }
.card-back {
  background: linear-gradient(145deg, #EEFF85 0%, #F5FFCC 100%);
  border: 2px solid var(--lime-dark); transform: rotateY(180deg);
}

.card-topic-tag {
  position: absolute; top: 16px; left: 16px;
  font-family: 'Quicksand', sans-serif;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--dark); background: var(--lime);
  padding: 3px 10px; border-radius: 20px;
}
.card-emoji { font-size: 52px; margin-bottom: 12px; }
.card-word {
  font-family: 'DM Sans', sans-serif;
  font-size: 34px; font-weight: 700; color: var(--text);
  text-align: center; margin-bottom: 6px;
}
.card-phonetic {
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; color: var(--text-soft); margin-bottom: 16px;
}
.card-hint {
  font-family: 'Quicksand', sans-serif;
  font-size: 12px; color: var(--text-xs); margin-top: 16px;
}
.card-translation {
  font-family: 'DM Sans', sans-serif;
  font-size: 30px; font-weight: 700; color: var(--indigo); margin-bottom: 8px;
}
.card-example-row {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; margin-bottom: 4px;
  padding: 0 4px;
}
.card-example {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 500; color: var(--text);
  text-align: center; font-style: italic; flex: 1;
}
.btn-listen-mini {
  background: var(--surface2); border: 1.5px solid var(--border);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--ease); color: var(--indigo);
  flex-shrink: 0;
}
.btn-listen-mini:hover { background: var(--indigo); color: #fff; border-color: var(--indigo); transform: scale(1.08); }
.btn-listen-mini.playing { background: var(--lime); color: var(--dark); animation: pulse 0.8s ease infinite; }
.card-example-tr {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; color: var(--text-soft);
  text-align: center; margin-bottom: 16px;
}
.btn-listen-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 40px; padding: 8px 20px;
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--ease); color: var(--text);
}
.btn-listen-card:hover { background: var(--lime); color: var(--dark); border-color: var(--lime-dark); }

/* ── PLAN CARDS LIST (Home) ── */
.plan-cards-list {
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px;
}
.plan-card-item {
  width: 100%; position: relative; overflow: hidden;
  border: none; padding: 0; cursor: pointer;
  border-radius: var(--r);
  background: linear-gradient(135deg, #4F46E5 0%, #6D63FF 55%, #818CF8 100%);
  box-shadow: 0 8px 24px rgba(26,26,46,0.18);
  transition: var(--ease); text-align: left;
  font-family: 'Quicksand', sans-serif;
}
.plan-card-item:hover:not(.locked) { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(26,26,46,0.28); }
.plan-card-item:active:not(.locked) { transform: translateY(-1px); }
.plan-card-item.locked { cursor: not-allowed; }
.plan-card-item.locked .plan-card-content { filter: blur(2px) saturate(0.4); opacity: 0.55; }
.plan-card-item.complete { box-shadow: 0 10px 32px rgba(212,240,0,0.35); }

.plan-card-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(212,240,0,0.28) 0%, transparent 42%),
    radial-gradient(circle at 8% 92%, rgba(255,255,255,0.14) 0%, transparent 38%);
  pointer-events: none;
}
.plan-card-content { position: relative; padding: 20px 22px 18px; color: #fff; }
.plan-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.plan-card-emoji {
  font-size: 30px; background: rgba(255,255,255,0.18);
  border-radius: 14px; width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); flex-shrink: 0;
}
.plan-card-title-wrap { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.plan-card-title-wrap strong {
  font-family: 'Quicksand', sans-serif;
  font-size: 17px; font-weight: 700; color: #fff;
}
.plan-card-sub {
  font-family: 'Quicksand', sans-serif;
  font-size: 11.5px; color: var(--lime);
  font-weight: 600; letter-spacing: 0.3px;
}
.plan-card-done {
  background: var(--lime); color: var(--dark);
  font-family: 'Quicksand', sans-serif;
  font-size: 10.5px; font-weight: 700;
  padding: 4px 8px; border-radius: 30px;
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.plan-card-done i { font-size: 9px; }
.plan-card-desc {
  font-family: 'Quicksand', sans-serif;
  font-size: 12.5px; line-height: 1.5; opacity: 0.92;
  margin-bottom: 12px;
}
.plan-card-progress {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.plan-card-bar-wrap {
  flex: 1; height: 7px; background: rgba(255,255,255,0.18);
  border-radius: 20px; overflow: hidden;
}
.plan-card-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--lime), #EEFF85);
  border-radius: 20px; transition: width 0.6s ease;
}
.plan-card-progress-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px; font-weight: 700; color: var(--lime);
  white-space: nowrap;
}
.plan-card-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--lime); color: var(--dark);
  padding: 7px 14px; border-radius: 30px;
  font-family: 'Quicksand', sans-serif;
  font-size: 12.5px; font-weight: 700;
}
.plan-card-cta i { font-size: 10px; }

/* Lock overlay */
.plan-card-item.locked {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  box-shadow: var(--shadow-sm);
}
.plan-lock-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; color: var(--text-soft);
  pointer-events: none; padding: 16px; text-align: center;
}
.plan-lock-overlay i {
  font-size: 24px; color: var(--indigo);
  background: var(--surface2); border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.plan-lock-overlay span {
  font-family: 'Quicksand', sans-serif;
  font-size: 12.5px; font-weight: 600; color: var(--text-soft);
  max-width: 220px; line-height: 1.4;
}

/* ── PLAN SCREEN ── */
.plan-header-emoji { font-size: 22px; }
.plan-main { padding: 0 16px 32px; max-width: 480px; margin: 0 auto; }
.plan-intro {
  background: var(--dark); color: #fff;
  border-radius: var(--r); padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: 0 8px 28px rgba(26,26,46,0.18);
  position: relative; overflow: hidden;
}
.plan-intro::after {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 100px; height: 100px;
  background: var(--lime); border-radius: 50%; opacity: 0.18;
}
.plan-intro-line {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.5px; line-height: 1.6;
  margin-bottom: 16px; position: relative; z-index: 1;
}
.plan-intro-line strong { color: var(--lime); font-weight: 700; }
.plan-stats-row {
  display: flex; gap: 8px; position: relative; z-index: 1;
}
.plan-stat {
  flex: 1; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-sm); padding: 12px 8px;
  text-align: center; backdrop-filter: blur(6px);
}
.plan-stat-num {
  display: block; font-family: 'DM Sans', sans-serif;
  font-size: 22px; font-weight: 700; color: var(--lime); line-height: 1;
}
.plan-stat-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 10.5px; color: rgba(255,255,255,0.78);
  text-transform: uppercase; letter-spacing: .4px;
  margin-top: 4px; display: block;
}
.plan-section-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-xs); margin-bottom: 12px;
}
.plan-days { display: flex; flex-direction: column; gap: 12px; }
.plan-day-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 16px 18px;
  box-shadow: var(--shadow-sm); transition: var(--ease);
  position: relative; overflow: hidden;
}
.plan-day-card:hover { border-color: var(--indigo-lt); transform: translateY(-2px); box-shadow: var(--shadow); }
.plan-day-card.complete { border-color: var(--lime-dark); background: linear-gradient(180deg, #F8FFD9 0%, var(--surface) 100%); }
.plan-day-card.complete::after {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; top: 12px; right: 14px;
  background: var(--lime); color: var(--dark);
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.plan-day-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.plan-day-badge {
  background: var(--indigo); color: #fff;
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.plan-day-card.complete .plan-day-badge { background: var(--lime); color: var(--dark); }
.plan-day-info { flex: 1; }
.plan-day-info strong {
  display: block; font-family: 'Quicksand', sans-serif;
  font-size: 15px; font-weight: 700; color: var(--text);
}
.plan-day-info span {
  font-family: 'Quicksand', sans-serif;
  font-size: 12px; color: var(--text-soft);
}
.plan-day-progress-bar {
  height: 6px; background: var(--surface2);
  border-radius: 20px; overflow: hidden;
  margin: 10px 0 12px;
}
.plan-day-progress-fill {
  height: 100%; background: var(--lime);
  border-radius: 20px; transition: width 0.5s ease;
}
.plan-day-words {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.plan-day-word-chip {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 30px; padding: 4px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px; font-weight: 500; color: var(--text-soft);
}
.plan-day-word-chip.learned { background: var(--lime); color: var(--dark); border-color: var(--lime-dark); font-weight: 600; }
.plan-day-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-day-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm); border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: var(--ease); color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.plan-day-btn:hover:not(:disabled) { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.plan-day-btn.primary {
  background: var(--lime); color: var(--dark); border-color: var(--lime-dark);
}
.plan-day-btn.primary:hover:not(:disabled) { background: var(--lime-dark); color: var(--dark); }
.plan-day-btn.listen {
  background: linear-gradient(135deg, #fff5ec 0%, #ffe4d4 100%);
  border-color: #ffb98a; color: #a04515;
}
.plan-day-btn.listen:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff9866 0%, #ff7a3d 100%);
  color: #fff; border-color: #ff7a3d;
}
.plan-day-btn.convo {
  background: linear-gradient(135deg, #f3ecff 0%, #e4d6ff 100%);
  border-color: #b89aff; color: #5a2ea6;
}
.plan-day-btn.convo:hover:not(:disabled) {
  background: linear-gradient(135deg, #8c5cf2 0%, #6b3ee0 100%);
  color: #fff; border-color: #6b3ee0;
}
.plan-day-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.plan-day-btn i { font-size: 13px; }

.card-actions { display: flex; gap: 12px; padding: 0 16px; }
.btn-nope, .btn-got-it {
  flex: 1; padding: 16px; border-radius: var(--r); border: none;
  font-family: 'Quicksand', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: var(--ease);
}
.btn-nope { background: var(--surface2); color: var(--text-soft); border: 1.5px solid var(--border); }
.btn-nope:hover { background: #EEF2FF; color: var(--indigo); border-color: var(--indigo-lt); }
.btn-got-it {
  background: var(--lime); color: var(--dark);
  box-shadow: 0 4px 16px rgba(212,240,0,0.35);
}
.btn-got-it:hover { transform: scale(1.03); background: var(--lime-dark); }

.card-tap-hint {
  font-family: 'Quicksand', sans-serif;
  text-align: center; font-size: 12px; color: var(--text-xs); padding: 12px;
}

/* ── LISTEN & SPEAK ── */
.listen-scene {
  padding: 0 16px; display: flex;
  flex-direction: column; align-items: center; gap: 20px;
}
.listen-word-box {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r); padding: 32px 28px;
  text-align: center; width: 100%; box-shadow: var(--shadow-sm);
}
.listen-emoji { font-size: 44px; margin-bottom: 10px; line-height: 1; }
.listen-word {
  font-family: 'DM Sans', sans-serif;
  font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.listen-phonetic {
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; color: var(--text-soft); margin-bottom: 8px;
}
.listen-translation {
  font-family: 'Quicksand', sans-serif;
  font-size: 18px; font-weight: 600; color: var(--indigo);
}

.btn-play-word {
  background: var(--lime); color: var(--dark); border: none;
  border-radius: 40px; padding: 14px 32px;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: var(--ease);
  box-shadow: 0 4px 16px rgba(212,240,0,0.35);
  display: flex; align-items: center; gap: 8px;
}
.btn-play-word:hover { transform: scale(1.04); box-shadow: 0 6px 22px rgba(212,240,0,0.5); }
.btn-play-word.playing { background: var(--lime-dark); animation: pulse 0.8s ease infinite; }
.play-icon { font-size: 14px; }

.record-section {
  width: 100%; background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--r); padding: 24px;
  text-align: center; transition: var(--ease);
}
.record-section.recording {
  border-color: var(--indigo-lt); background: #EEF2FF;
  animation: pulse-border 1s ease infinite;
}
@keyframes pulse-border {
  0%,100% { box-shadow: 0 0 0 0 rgba(79,70,229,0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(79,70,229,0); }
}
.record-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; color: var(--text-soft); margin-bottom: 14px;
}
.btn-record {
  background: #EEF2FF; border: 2px solid var(--indigo-lt);
  border-radius: 40px; padding: 13px 28px;
  font-family: 'Quicksand', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer;
  color: var(--indigo); transition: var(--ease);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-record:hover { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.btn-record.active { background: var(--indigo); color: #fff; border-color: var(--indigo); animation: pulse 0.7s ease infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.record-mic-icon { font-size: 14px; }
.record-status {
  font-family: 'Quicksand', sans-serif;
  font-size: 12px; color: var(--text-xs); margin-top: 10px; min-height: 18px;
}
.record-result { margin-top: 16px; }
.btn-playback {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 40px; padding: 8px 20px;
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text); transition: var(--ease); margin-bottom: 12px;
}
.btn-playback:hover { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.similarity-box {
  background: var(--surface2); border-radius: var(--r-sm);
  padding: 12px 16px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.similarity-box.good { background: #EEFF85; color: #3A5500; border: 1.5px solid var(--lime-dark); }
.similarity-box.ok   { background: #EEF2FF; color: var(--indigo); border: 1.5px solid var(--indigo-lt); }
.similarity-box.try  { background: var(--surface2); color: var(--text-soft); border: 1.5px solid var(--border); }

.listen-nav { width: 100%; }

/* ── QUIZ ── */
.quiz-scene { padding: 0 16px; }
.quiz-question-box {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r); padding: 28px 24px;
  text-align: center; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.quiz-instruction {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-xs); font-weight: 700; margin-bottom: 16px;
}
.quiz-word-display {
  font-family: 'DM Sans', sans-serif;
  font-size: 36px; font-weight: 700; color: var(--text); margin-bottom: 8px;
}
.quiz-emoji-display { font-size: 40px; }

.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r-sm); padding: 16px 20px;
  font-family: 'Quicksand', sans-serif;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: var(--ease); text-align: left; color: var(--text);
  display: flex; align-items: center; gap: 12px;
}
.quiz-option:hover { border-color: var(--indigo-lt); background: #EEF2FF; }
.quiz-option .opt-letter {
  width: 28px; height: 28px; background: var(--surface2);
  border-radius: 50%; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); flex-shrink: 0;
}
.quiz-option.correct { background: #EEFF85; border-color: var(--lime-dark); color: #3A5500; }
.quiz-option.correct .opt-letter { background: var(--lime); color: var(--dark); }
.quiz-option.wrong { background: #F5F5F5; border-color: #CCC; color: #999; }
.quiz-option.wrong .opt-letter { background: #CCC; color: #fff; }
.quiz-option:disabled { cursor: not-allowed; }

.quiz-feedback {
  margin-top: 16px; background: var(--surface);
  border-radius: var(--r-sm); padding: 16px 18px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; font-weight: 600;
  text-align: center; border: 1.5px solid var(--border);
}
.quiz-feedback .next-btn {
  display: block; margin-top: 12px;
  background: var(--indigo); color: #fff; border: none;
  border-radius: 40px; padding: 10px 28px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: var(--ease);
}
.quiz-feedback .next-btn:hover { transform: scale(1.04); background: #3730A3; }

/* ── PWA INSTALL BANNER ── */
.pwa-install-banner {
  position: fixed;
  left: 12px; right: 12px; bottom: 16px;
  max-width: 460px; margin: 0 auto;
  background: linear-gradient(135deg, #4F46E5 0%, #6b3ee0 100%);
  color: #fff;
  border-radius: 18px;
  padding: 14px 14px 14px 18px;
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.42);
  display: flex; align-items: center; gap: 12px;
  z-index: 9999;
  animation: pwaSlideUp 0.4s ease;
}
@keyframes pwaSlideUp {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.pwa-banner-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.pwa-banner-text {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  font-family: 'Quicksand', sans-serif;
  min-width: 0;
}
.pwa-banner-text strong { font-size: 14px; font-weight: 700; }
.pwa-banner-text span { font-size: 11.5px; opacity: 0.85; }
.pwa-banner-btn {
  background: var(--lime); color: var(--dark);
  border: none; border-radius: 30px;
  padding: 10px 18px;
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
  transition: var(--ease);
}
.pwa-banner-btn:hover { transform: scale(1.05); }
.pwa-banner-close {
  background: transparent; border: none;
  color: #fff; opacity: 0.7;
  width: 28px; height: 28px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pwa-banner-close:hover { opacity: 1; background: rgba(255,255,255,0.15); }

/* Standalone (yüklenmiş PWA) için iOS safe-area desteği */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ── AUDIO QUIZ (Sesli Quiz) ── */
.aq-scene { padding: 0 16px; }
.aq-question-box {
  background: linear-gradient(135deg, #f3ecff 0%, #e4d6ff 100%);
  border: 2px solid #b89aff;
  border-radius: var(--r); padding: 28px 20px;
  text-align: center; margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(140, 92, 242, 0.18);
}
.aq-instruction {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px; text-transform: uppercase; letter-spacing: .6px;
  color: #5a2ea6; font-weight: 700; margin-bottom: 18px;
}
.aq-listen-btn {
  background: linear-gradient(135deg, #8c5cf2 0%, #6b3ee0 100%);
  color: #fff; border: none;
  border-radius: 50%;
  width: 96px; height: 96px;
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; cursor: pointer;
  box-shadow: 0 10px 28px rgba(107, 62, 224, 0.40);
  transition: var(--ease);
  font-family: 'Quicksand', sans-serif;
}
.aq-listen-btn i { font-size: 28px; }
.aq-listen-btn span { font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.aq-listen-btn:hover { transform: scale(1.06); box-shadow: 0 14px 32px rgba(107, 62, 224, 0.55); }
.aq-listen-btn:active { transform: scale(0.96); }
.aq-hint {
  margin-top: 14px;
  font-family: 'Quicksand', sans-serif;
  font-size: 12px; color: #5a2ea6; opacity: 0.75;
}

.aq-options { display: flex; flex-direction: column; gap: 10px; }
.aq-option {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r-sm); padding: 14px 16px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: var(--ease); text-align: left; color: var(--text);
  display: flex; align-items: center; gap: 12px;
}
.aq-option:hover:not(:disabled) { border-color: #b89aff; background: #f3ecff; }
.aq-option-letter {
  width: 28px; height: 28px; background: var(--surface2);
  border-radius: 50%; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); flex-shrink: 0;
}
.aq-option-text { flex: 1; line-height: 1.4; }
.aq-option.correct { background: #EEFF85; border-color: var(--lime-dark); color: #3A5500; }
.aq-option.correct .aq-option-letter { background: var(--lime); color: var(--dark); }
.aq-option.wrong { background: #FFE5E5; border-color: #FF8888; color: #993333; }
.aq-option.wrong .aq-option-letter { background: #FF8888; color: #fff; }
.aq-option:disabled { cursor: not-allowed; }

.aq-feedback {
  margin-top: 16px;
  border-radius: var(--r-sm); padding: 14px 16px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; font-weight: 600;
  text-align: center;
}
.aq-fb-correct {
  background: #EEFF85; color: #3A5500;
  border: 1.5px solid var(--lime-dark);
  border-radius: var(--r-sm); padding: 12px 14px;
}
.aq-fb-wrong {
  background: #FFE5E5; color: #993333;
  border: 1.5px solid #FF8888;
  border-radius: var(--r-sm); padding: 12px 14px;
}
.aq-fb-tr {
  display: block; margin-top: 6px;
  font-size: 12.5px; font-style: italic; font-weight: 500; opacity: 0.85;
}

.plan-day-btn.audio-quiz {
  background: linear-gradient(135deg, #e6f4ff 0%, #cfe6ff 100%);
  border-color: #7fb8ee; color: #1e4e7a;
}
.plan-day-btn.audio-quiz:hover:not(:disabled) {
  background: linear-gradient(135deg, #4a9fe0 0%, #2e7fc4 100%);
  color: #fff; border-color: #2e7fc4;
}

/* ── CONVO ── */
.convo-scene { padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.convo-topic-box {
  background: linear-gradient(135deg, #EEF2FF 0%, #EEFF85 100%);
  border-radius: var(--r); padding: 18px 20px;
  text-align: center; border: 1.5px solid var(--indigo-lt);
}
.convo-topic-icon {
  width: 52px; height: 52px; background: var(--indigo);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; box-shadow: 0 4px 14px rgba(79,70,229,0.3);
}
.convo-topic-icon i { font-size: 22px; color: var(--lime); }
.convo-topic-box p:first-of-type {
  font-family: 'Quicksand', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--text);
}
.convo-topic-desc { font-family: 'Quicksand', sans-serif; font-size: 13px; color: var(--text-soft); margin-top: 4px; }

.convo-chat {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 200px; max-height: 340px; overflow-y: auto;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 16px;
}
.bubble {
  max-width: 82%; padding: 10px 14px; border-radius: 16px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; line-height: 1.5; animation: fadeUp 0.25s ease;
}
.bubble.app {
  background: var(--indigo); color: #fff;
  border-bottom-left-radius: 4px; align-self: flex-start;
  display: flex; flex-direction: column; gap: 4px;
}
.bubble.app .bubble-text { display: block; }
.bubble.app .bubble-tr-app {
  font-family: 'Quicksand', sans-serif;
  font-size: 11.5px; font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  font-style: italic;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.bubble.user {
  background: var(--lime); color: var(--dark); font-weight: 600;
  border-bottom-right-radius: 4px; align-self: flex-end;
  display: flex; flex-direction: column; gap: 4px;
  position: relative; padding-right: 40px;
}
.bubble.user .bubble-text { display: block; }
.bubble.user .bubble-tr {
  font-family: 'Quicksand', sans-serif;
  font-size: 11.5px; font-weight: 500;
  color: #4A5500; opacity: 0.85; font-style: italic;
}
.bubble-replay {
  position: absolute; top: 8px; right: 8px;
  background: rgba(26,26,46,0.12);
  border: none; width: 26px; height: 26px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark); transition: var(--ease);
  font-size: 11px;
}
.bubble-replay:hover { background: var(--dark); color: var(--lime); transform: scale(1.1); }
.bubble-replay.playing { background: var(--indigo); color: #fff; animation: pulse 0.8s ease infinite; }

.bubble.hint {
  background: #EEF2FF; color: var(--indigo);
  border: 1.5px dashed var(--indigo-lt);
  font-size: 12px; align-self: center;
  border-radius: 10px; max-width: 95%;
}

/* ── CONVO CHOICES (2-seçenek modu) ── */
.convo-choices {
  display: flex; flex-direction: column; gap: 10px;
  animation: fadeUp 0.35s ease;
}
.convo-choice {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  cursor: pointer; transition: var(--ease);
  font-family: 'Quicksand', sans-serif;
  text-align: left; width: 100%;
  box-shadow: var(--shadow-sm);
}
.convo-choice:hover:not(:disabled) {
  border-color: var(--indigo-lt);
  background: #F8F9FF;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79,70,229,0.15);
}
.convo-choice:active:not(:disabled) { transform: translateY(0); }
.convo-choice.selected {
  background: var(--lime); border-color: var(--lime-dark);
  box-shadow: 0 6px 22px rgba(212,240,0,0.45);
}
.convo-choice.selected .choice-letter { background: var(--dark); color: var(--lime); }
.convo-choice.selected .choice-tr { color: #3A5500; }
.convo-choice.dimmed { opacity: 0.45; }
.convo-choice:disabled { cursor: not-allowed; }

.choice-letter {
  background: var(--indigo); color: #fff;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0; transition: var(--ease);
}
.choice-body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.choice-en {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.35;
}
.choice-tr {
  font-family: 'Quicksand', sans-serif;
  font-size: 12px; color: var(--text-soft);
  line-height: 1.35;
}
.choice-speaker {
  color: var(--text-xs); font-size: 13px;
  flex-shrink: 0; transition: var(--ease);
}
.convo-choice:hover:not(:disabled) .choice-speaker { color: var(--indigo); }
.convo-choice.selected .choice-speaker { color: var(--dark); }

.convo-tip {
  font-family: 'Quicksand', sans-serif;
  font-size: 12px; color: var(--text-xs);
  text-align: center; padding: 0 8px; min-height: 18px;
}

/* ── DONE ── */
#screen-done {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #EEF2FF 0%, #FAFAF7 55%, #EEFF85 100%);
}
#screen-done.active { display: flex; }
.done-inner { text-align: center; padding: 40px 28px; animation: fadeUp 0.5s ease; }
.done-anim {
  font-size: 72px; margin-bottom: 16px; display: block;
  animation: bounce 0.6s ease;
}
@keyframes bounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.done-inner h2 {
  font-family: 'Quicksand', sans-serif;
  font-size: 28px; font-weight: 700; margin-bottom: 8px;
}
.done-msg {
  font-family: 'Quicksand', sans-serif;
  font-size: 15px; color: var(--text-soft); margin-bottom: 24px;
}
.done-stats {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 28px; flex-wrap: wrap;
}
.done-stat {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 14px 20px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.done-stat-num {
  display: block; font-family: 'DM Sans', sans-serif;
  font-size: 26px; font-weight: 700; color: var(--indigo); line-height: 1;
}
.done-stat-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 11px; color: var(--text-soft); display: block; margin-top: 4px;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--lime); color: var(--dark); border: none;
  border-radius: var(--r); padding: 16px 36px;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: var(--ease);
  box-shadow: 0 4px 18px rgba(212,240,0,0.4);
  width: 100%; display: block; margin-bottom: 10px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(212,240,0,0.55); }

.btn-secondary {
  background: var(--surface); color: var(--text-soft);
  border: 1.5px solid var(--border); border-radius: var(--r);
  padding: 14px 28px;
  font-family: 'Quicksand', sans-serif;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: var(--ease); width: 100%; display: block;
}
.btn-secondary:hover { border-color: var(--indigo-lt); background: #EEF2FF; color: var(--indigo); }

.btn-back {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 50%; width: 38px; height: 38px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: var(--ease); color: var(--text);
}
.btn-back:hover { background: var(--indigo); color: #fff; border-color: var(--indigo); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--dark); color: #fff;
  border-radius: 40px; padding: 12px 24px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px; font-weight: 600; z-index: 999;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s;
  opacity: 0; white-space: nowrap; max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--lime); color: var(--dark); }
.toast.error   { background: var(--indigo); color: #fff; }
.toast.xp      { background: var(--indigo); color: var(--lime); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
