/* ════════════════════════════════════════════════════════════════
   ENGLISH LEVEL TEST — test.css v1.0
   Academic blue/cobalt theme
   ════════════════════════════════════════════════════════════════ */

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

#elt-wrap, #elt-wrap * { box-sizing: border-box; }

#elt-wrap {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  max-width: 600px;
  margin: 40px auto;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

.inside-article, .entry-content, .page-content { padding: 0 !important; margin: 0 !important; }
.site-main, .site-main > .inside-article, #primary, .content-area > .site-main { padding-top: 0 !important; margin-top: 0 !important; }

.elt-screen { display: none; }
.elt-screen.active { display: block; }

/* ══ WELCOME ══ */
#elt-screen-welcome {
  background: linear-gradient(160deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 28px;
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(37,99,235,.12);
}

.elt-intro-emoji {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
  animation: elt-float 3s ease-in-out infinite;
}
@keyframes elt-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

#elt-screen-welcome h1 {
  font-size: 26px;
  font-weight: 900;
  color: #1e3a8a;
  margin-bottom: 10px;
}

.elt-intro-sub {
  font-size: 15px;
  color: #2563eb;
  line-height: 1.65;
  margin-bottom: 22px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  opacity: .85;
}

.elt-info-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.elt-info-pill {
  background: rgba(255,255,255,.8);
  border: 1.5px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  color: #1e40af;
}

/* Setup */
#elt-setup {
  background: rgba(255,255,255,.7);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 22px;
}
.elt-setup-row { display: flex; gap: 10px; }
.elt-setup-row > div { flex: 1; }
#elt-setup label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: #2563eb;
  margin-bottom: 6px;
}
#elt-setup input, #elt-setup select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 2px solid #bfdbfe;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1e293b;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s;
}
#elt-setup input:focus, #elt-setup select:focus { border-color: #2563eb; }

#elt-start-btn {
  width: 100%;
  padding: 15px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 20px rgba(37,99,235,.35);
}
#elt-start-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37,99,235,.45); }

/* ══ TEST SCREEN ══ */
#elt-screen-test {
  background: linear-gradient(160deg, #eff6ff 0%, #fff 60%);
  border-radius: 28px;
  padding: 28px 24px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

.elt-test-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid #e2e8f0;
}
.elt-test-header-emoji { font-size: 18px; }
.elt-test-header-title { font-size: 14px; font-weight: 800; color: #1e3a8a; letter-spacing: -.2px; }

.elt-test-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
#elt-q-counter {
  font-size: 12px;
  font-weight: 800;
  color: #2563eb;
}
#elt-q-type {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  padding: 4px 12px;
  border-radius: 20px;
}

#elt-progress-wrap {
  height: 8px;
  background: #dbeafe;
  border-radius: 10px;
  margin-bottom: 22px;
  overflow: hidden;
}
#elt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
  border-radius: 10px;
  width: 0%;
  transition: width .5s ease;
}

#elt-question-prompt {
  font-size: 19px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.45;
  margin-bottom: 18px;
  min-height: 50px;
}

/* Audio box */
#elt-audio-box {
  display: none;
  align-items: center;
  gap: 12px;
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
#elt-play-audio-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
#elt-play-audio-btn:hover { transform: scale(1.08); }
.elt-audio-hint { font-size: 13px; color: #1e40af; font-weight: 700; }

/* Options */
#elt-options { display: flex; flex-direction: column; gap: 10px; }

.elt-option {
  background: #fff !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  cursor: pointer !important;
  font-family: inherit !important;
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  transition: all .15s !important;
}
#elt-wrap .elt-option:hover:not(:disabled),
#elt-wrap .elt-option:focus:not(:disabled) {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  color: #1e3a8a !important;
  transform: translateX(4px) !important;
}
#elt-wrap .elt-option:hover:not(:disabled) span,
#elt-wrap .elt-option:focus:not(:disabled) span,
#elt-wrap .elt-option:hover:not(:disabled) .elt-opt-emoji-big {
  color: #1e3a8a !important;
}
#elt-wrap .elt-option:hover:not(:disabled) .elt-option-letter {
  color: #2563eb !important;
  background: #dbeafe !important;
}
.elt-option:disabled { cursor: default !important; opacity: 1 !important; }
.elt-option-letter {
  width: 28px; height: 28px;
  background: #f1f5f9 !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #64748b !important;
  flex-shrink: 0;
}

.elt-correct { border-color: #16a34a !important; background: rgba(22,163,74,.08) !important; }
.elt-correct .elt-option-letter { background: #16a34a; color: #fff; }
.elt-wrong { border-color: #dc2626 !important; background: rgba(220,38,38,.08) !important; animation: elt-shake .4s ease; }
.elt-wrong .elt-option-letter { background: #dc2626; color: #fff; }
@keyframes elt-shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-6px); }
  75%     { transform: translateX(6px); }
}

/* Image type options */
.elt-option-emoji {
  justify-content: center;
  padding: 22px 10px;
}
.elt-opt-emoji-big { font-size: 36px; }

/* ══ RESULT ══ */
#elt-screen-result {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  background: #fff;
}

.elt-result-hero {
  text-align: center;
  padding: 40px 24px 24px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}
#elt-result-level {
  font-size: 56px;
  font-weight: 900;
  color: #1e3a8a;
  line-height: 1;
  display: block;
}
#elt-result-title {
  font-size: 16px;
  font-weight: 800;
  color: #2563eb;
  margin-top: 8px;
}

/* CEFR scale visual */
.elt-scale {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 16px 24px 0;
}
.elt-scale-pip {
  flex: 1;
  max-width: 44px;
  text-align: center;
  padding: 8px 3px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  transition: all .2s;
}
.elt-scale-active {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: #2563eb;
  color: #fff;
  transform: scale(1.1);
}

#elt-result-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.7;
  padding: 18px 32px 4px;
  text-align: center;
}

.elt-reco-box {
  margin: 16px 32px;
  padding: 14px 18px;
  background: #f8fafc;
  border-left: 3px solid #2563eb;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
}
.elt-reco-box strong { color: #1e3a8a; display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }

/* Score + XP row */
.elt-score-row {
  display: flex;
  gap: 10px;
  margin: 0 32px 20px;
}
.elt-score-box {
  flex: 1;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}
.elt-score-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #94a3b8; margin-bottom: 4px; }
.elt-score-value { font-size: 18px; font-weight: 900; color: #1e293b; }
#elt-result-xp { color: #2563eb; }

/* Category breakdown */
#elt-category-breakdown { padding: 0 32px 20px; }
.elt-cat-row { margin-bottom: 12px; }
.elt-cat-header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #475569; margin-bottom: 5px; }
.elt-cat-track { height: 8px; background: #f1f5f9; border-radius: 10px; overflow: hidden; }
.elt-cat-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #4f46e5); border-radius: 10px; transition: width 1s ease; }

#elt-result-rank {
  margin: 0 32px 20px;
  padding: 12px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: #1e3a8a;
}

#elt-retry-btn {
  display: block;
  width: calc(100% - 64px);
  margin: 0 32px 14px;
  padding: 14px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
}
#elt-retry-btn:hover { transform: translateY(-2px); }

/* Answer Summary */
#elt-summary-section { padding: 0 32px 14px; }
#elt-summary-toggle-btn {
  width: 100%;
  padding: 12px;
  border-radius: 50px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
#elt-summary-toggle-btn:hover { background: #f1f5f9; }
#elt-answer-summary { display: none; margin-top: 12px; max-height: 360px; overflow-y: auto; }
#elt-answer-summary.elt-summary-open { display: block; }
.elt-summary-row {
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
}
.elt-summary-ok { border-color: #bbf7d0; background: #f0fdf4; }
.elt-summary-bad { border-color: #fecaca; background: #fef2f2; }
.elt-summary-q { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 4px; line-height: 1.4; }
.elt-summary-a { font-size: 12px; color: #64748b; padding-left: 20px; }
.elt-summary-answer { font-weight: 800; }
.elt-summary-wrong-text { color: #dc2626; text-decoration: line-through; }
.elt-summary-correct-text { color: #16a34a; }

/* Leaderboard */
#elt-lb-section { padding: 0 32px 28px; }
#elt-lb-btn {
  width: 100%;
  padding: 12px;
  border-radius: 50px;
  border: 2px solid #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
#elt-lb-btn:hover { background: #dbeafe; }
#elt-lb-panel { display: none; margin-top: 12px; }
#elt-lb-panel.elt-lb-open { display: block; }
.elt-lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 6px;
}
.elt-lb-rank { font-size: 1.1rem; min-width: 26px; }
.elt-lb-name { flex: 1; font-size: 13px; font-weight: 700; color: #1e293b; }
.elt-lb-name small { color: #94a3b8; font-weight: 600; margin-left: 4px; }
.elt-lb-level {
  font-size: 11px; font-weight: 900; color: #2563eb;
  background: #eff6ff; border-radius: 8px; padding: 2px 8px;
}
.elt-lb-xp { font-weight: 900; color: #1e3a8a; font-size: 13px; }
.elt-lb-loading { color: #94a3b8; text-align: center; padding: 16px; font-size: 13px; }

/* Responsive */
@media (max-width: 540px) {
  #elt-screen-welcome { padding: 32px 20px; }
  #elt-screen-test { padding: 22px 16px 26px; }
  .elt-setup-row { flex-direction: column; }
  #elt-result-desc, .elt-reco-box, .elt-score-row,
  #elt-category-breakdown, #elt-result-rank, #elt-lb-section { padding-left: 18px; padding-right: 18px; }
  .elt-reco-box { margin-left: 18px; margin-right: 18px; }
  .elt-score-row { margin-left: 18px; margin-right: 18px; }
  #elt-result-rank { margin-left: 18px; margin-right: 18px; }
  #elt-retry-btn { width: calc(100% - 36px); margin-left: 18px; margin-right: 18px; }
  #elt-result-level { font-size: 44px; }
  .elt-scale { gap: 3px; padding-left: 12px; padding-right: 12px; }
  .elt-scale-pip { font-size: 9px; padding: 6px 1px; max-width: 40px; }
}
