/* css/language-test.css */

/* ════════════════════════════════════════════════
   SHARED SHELL
   ════════════════════════════════════════════════ */
.lt-page {
  display: flex; flex-direction: column;
  height: 100%; background: var(--dark);
  overflow: hidden;
}

.lt-scroll {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 80px;
}

/* Progress bar (below header) */
.lt-progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.lt-progress-fill {
  height: 100%;
  border-radius: 0 3px 3px 0;
  transition: width 0.4s ease;
}

/* ════════════════════════════════════════════════
   INTRO PAGE
   ════════════════════════════════════════════════ */
.lt-hero { text-align: center; padding: 28px 0 24px; }

.lt-flag-box {
  width: 100px; height: 100px;
  border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  margin: 0 auto 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.lt-hero-title {
  font-family: 'Sora', sans-serif;
  font-size: 22px; font-weight: 900;
  margin-bottom: 8px;
}

.lt-hero-sub { font-size: 14px; color: var(--muted); }

.lt-sections { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.lt-section-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid color-mix(in srgb, var(--bc) 30%, transparent);
  border-radius: 14px;
  padding: 13px 16px;
}

.lt-section-icon {
  width: 44px; height: 44px;
  background: color-mix(in srgb, var(--bc) 15%, transparent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}

.lt-section-name { font-weight: 700; font-size: 14px; }
.lt-section-sub  { font-size: 12px; color: var(--muted); }

.lt-info-note {
  background: rgba(253,186,116,0.08);
  border: 1px solid rgba(253,186,116,0.3);
  border-radius: 13px;
  padding: 13px 16px;
  font-size: 13px; color: #fbbf24;
  line-height: 1.5;
  margin-bottom: 22px;
}

.lt-start-btn {
  width: 100%;
  height: 58px;
  border: none; border-radius: 16px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 17px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: opacity 0.18s, transform 0.15s;
}

.lt-start-btn:hover  { opacity: 0.9; transform: translateY(-2px); }
.lt-start-btn:active { transform: translateY(0); }

/* ════════════════════════════════════════════════
   QUIZ BODY (reading + listening)
   ════════════════════════════════════════════════ */
.lt-quiz-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}

.lt-level-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 13px; font-weight: 700;
  align-self: flex-start;
}

.lt-passage {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  font-size: 15px; line-height: 1.6;
  color: var(--text);
}

.lt-question {
  font-family: 'Sora', sans-serif;
  font-size: 17px; font-weight: 700;
}

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

.lt-option {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.lt-option:hover { filter: brightness(1.1); }

.lt-next-btn {
  width: 100%;
  height: 52px;
  border: none; border-radius: 14px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s;
  margin-top: 4px;
}

.lt-next-btn:hover { opacity: 0.88; }

/* Listening audio card */
.lt-audio-card {
  background: #0F172A;
  border-radius: 16px;
  padding: 16px;
}

.lt-audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.lt-audio-label {
  font-size: 13px; font-weight: 700;
  color: #F4A261;
}

.lt-audio-btn {
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 10px 14px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}

.lt-audio-btn:hover {
  background: rgba(255,255,255,0.15);
}

.lt-audio-script {
  font-size: 15px; color: #fff;
  line-height: 1.6;
}

/* ════════════════════════════════════════════════
   WRITING SECTION
   ════════════════════════════════════════════════ */
.lt-writing-body { overflow-y: auto; }

.lt-writing-prompt {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.lt-writing-prompt-label {
  font-size: 13px; font-weight: 700;
  color: #10B981;
  margin-bottom: 8px;
}

.lt-writing-prompt-text {
  font-size: 15px; line-height: 1.6;
  color: var(--text);
}

.lt-textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  font-size: 15px; line-height: 1.6;
  font-family: 'DM Sans', sans-serif;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}

.lt-textarea:focus { border-color: #10B981; }
.lt-textarea::placeholder { color: rgba(187,184,212,0.5); }
.lt-textarea:disabled { opacity: 0.7; }

.lt-word-count {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--muted); font-weight: 600;
}

.lt-submit-btn {
  width: 100%;
  height: 50px;
  border: none; border-radius: 14px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s;
}

.lt-submit-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.lt-submit-btn:hover:not(:disabled) { opacity: 0.88; }

.lt-feedback {
  padding: 14px;
  border-radius: 13px;
  font-size: 14px; font-weight: 600;
  line-height: 1.4;
}

.lt-fb-good { background: rgba(209,250,229,0.1); color: #6ee7b7; border: 1px solid rgba(110,231,183,0.2); }
.lt-fb-warn { background: rgba(254,243,199,0.08); color: #fcd34d; border: 1px solid rgba(252,211,77,0.2); }

/* ════════════════════════════════════════════════
   SPEAKING SECTION
   ════════════════════════════════════════════════ */
.lt-mic-icon {
  font-size: 60px;
  text-align: center;
  padding: 8px 0;
  filter: drop-shadow(0 0 20px rgba(155,111,239,0.5));
}

.lt-speaking-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.lt-speaking-instruction {
  font-size: 14px; font-weight: 600;
  color: var(--muted); margin-bottom: 10px;
}

.lt-speaking-text {
  font-size: 16px; font-weight: 700;
  line-height: 1.6;
  font-style: italic;
}

.lt-self-rate-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.lt-self-rate-q    { font-family:'Sora',sans-serif; font-size:15px; font-weight:700; margin-bottom:4px; }
.lt-self-rate-hint { font-size:13px; color:var(--muted); margin-bottom:16px; }

.lt-rate-btns {
  display: flex;
  justify-content: space-around;
}

.lt-rate-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: 2px solid transparent;
  border-radius: 14px; padding: 10px 14px;
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'DM Sans', sans-serif;
}

.lt-rate-btn:hover { background: rgba(255,255,255,0.06); }

.lt-rate-selected {
  background: rgba(155,111,239,0.15) !important;
  border-color: #9B6FEF !important;
}

.lt-rate-emoji { font-size: 28px; }
.lt-rate-label { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ════════════════════════════════════════════════
   RESULTS PAGE
   ════════════════════════════════════════════════ */
.lt-result-badge {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 4px solid;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  background: transparent;
}

.lt-result-level {
  font-family: 'Sora', sans-serif;
  font-size: 34px; font-weight: 900;
}

.lt-result-sub   { text-align:center; font-size:14px; color:var(--muted); font-weight:600; margin-bottom:6px; }
.lt-result-score { text-align:center; font-size:42px; font-weight:900; margin-bottom:14px; }

.lt-result-desc {
  border-radius: 16px;
  border-width: 1px; border-style: solid;
  padding: 16px;
  text-align: center;
  font-size: 14px; font-weight: 600;
  line-height: 1.5;
  margin-bottom: 22px;
}

.lt-breakdown-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 22px;
}

.lt-breakdown-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 800;
  margin-bottom: 16px;
}

.lt-score-row { margin-bottom: 14px; }

.lt-score-row-top {
  display: flex; justify-content: space-between;
  margin-bottom: 6px;
}

.lt-score-label { font-size: 14px; font-weight: 600; }
.lt-score-val   { font-size: 14px; font-weight: 700; }

.lt-score-bar-wrap {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.lt-score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s;
}

.lt-cta-card {
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 14px;
  text-align: center;
}

.lt-cta-title { font-family:'Sora',sans-serif; font-size:18px; font-weight:800; color:#fff; margin-bottom:6px; }
.lt-cta-sub   { font-size:14px; color:rgba(255,255,255,0.75); margin-bottom:16px; }

.lt-cta-btn {
  background: #fff;
  border: none; border-radius: 12px;
  padding: 13px 32px;
  font-family: 'Sora', sans-serif;
  font-size: 15px; font-weight: 800;
  cursor: pointer;
  transition: opacity 0.18s;
}

.lt-cta-btn:hover { opacity: 0.85; }

.lt-back-home-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: none;
  border: none;
  font-size: 14px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.18s;
}

.lt-back-home-btn:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 380px) {
  .lt-rate-label { font-size: 10px; }
  .lt-result-score { font-size: 36px; }
  .lt-flag-box { width: 80px; height: 80px; font-size: 42px; }
}