/* ============================================================
   EFH Interview Readiness Platform — Styles (POC)
   ============================================================ */

/* ── Layout shell ────────────────────────────────────────── */
.ifv-shell {
  min-height: calc(100vh - 64px);
  background: var(--clr-dark, #090E1A);
  padding-top: 64px; /* navbar height */
}

.ifv-hidden { display: none !important; }

/* ── Page header ─────────────────────────────────────────── */
.ifv-page-header {
  background: linear-gradient(135deg, #0B1829 0%, #0D1F3C 100%);
  border-bottom: 1px solid rgba(0,188,212,0.15);
  padding: 3rem 1rem 2.5rem;
  text-align: center;
}
.ifv-page-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-accent, #00BCD4);
  margin-bottom: .75rem;
}
.ifv-page-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 .75rem;
  line-height: 1.2;
}
.ifv-page-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.55);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Home view ───────────────────────────────────────────── */
#ifv-home { padding: 2.5rem 1rem 4rem; }

.ifv-home-inner {
  max-width: 960px;
  margin: 0 auto;
}

.ifv-section-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clr-accent, #00BCD4);
  margin-bottom: 1rem;
  display: block;
}

/* Topic grid */
.ifv-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .875rem;
  margin-bottom: 2.5rem;
}

.ifv-topic-card {
  background: #0D1F3C;
  border: 1.5px solid rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, transform .15s, background .18s;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  position: relative;
  overflow: hidden;
}
.ifv-topic-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--topic-color, #00BCD4);
  opacity: 0;
  transition: opacity .18s;
}
.ifv-topic-card:hover {
  border-color: rgba(255,255,255,.18);
  transform: translateY(-2px);
}
.ifv-topic-card.selected {
  border-color: var(--topic-color, #00BCD4);
  background: #111d33;
}
.ifv-topic-card.selected::before { opacity: 1; }

.ifv-topic-icon { font-size: 1.5rem; }
.ifv-topic-name { font-size: .9rem; font-weight: 700; color: #e0e0e0; }
.ifv-topic-desc { font-size: .75rem; color: rgba(255,255,255,.38); line-height: 1.4; }

/* Level buttons */
.ifv-level-row {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
  margin-bottom: 2rem;
}

.ifv-level-btn {
  background: #0D1F3C;
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: .75rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: border-color .15s, background .15s;
  color: #e0e0e0;
  flex: 1;
  min-width: 130px;
}
.ifv-level-btn:hover { border-color: rgba(255,255,255,.2); }
.ifv-level-btn.selected {
  border-color: var(--clr-accent, #00BCD4);
  background: rgba(0,188,212,.08);
}
.ifv-level-badge { font-size: 1.1rem; }
.ifv-level-label { font-size: .85rem; font-weight: 700; }
.ifv-level-years { font-size: .72rem; color: rgba(255,255,255,.38); margin-left: auto; }

/* Count row */
.ifv-count-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.ifv-count-row span { font-size: .82rem; color: rgba(255,255,255,.5); margin-right: .25rem; }
.ifv-count-btn {
  background: #0D1F3C;
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: .4rem .85rem;
  font-size: .82rem;
  font-weight: 600;
  color: #b0b8c8;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.ifv-count-btn.selected {
  border-color: var(--clr-accent, #00BCD4);
  color: var(--clr-accent, #00BCD4);
}

/* Start button */
.ifv-start-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--clr-accent, #00BCD4);
  color: #090E1A;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .03em;
  transition: opacity .2s, transform .15s;
  margin-bottom: 2.5rem;
}
.ifv-start-btn:disabled {
  background: #1E3A5F;
  color: rgba(255,255,255,.3);
  cursor: not-allowed;
}
.ifv-start-btn:not(:disabled):hover { opacity: .88; transform: translateY(-1px); }

/* History preview */
.ifv-history-title {
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.ifv-history-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  background: #0D1F3C;
  border-radius: 7px;
  margin-bottom: .4rem;
  flex-wrap: wrap;
  font-size: .8rem;
}
.ifv-history-topic { font-weight: 700; color: #e0e0e0; flex: 1; min-width: 100px; }
.ifv-history-level { color: rgba(255,255,255,.45); }
.ifv-history-score { font-weight: 700; }
.ifv-history-badge { font-size: .75rem; }
.ifv-history-date { color: rgba(255,255,255,.3); margin-left: auto; font-size: .75rem; }
.ifv-history-empty { font-size: .85rem; color: rgba(255,255,255,.3); padding: 1rem 0; }

/* ── Test view ───────────────────────────────────────────── */
#ifv-test {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

.ifv-test-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: .75rem;
  flex-wrap: wrap;
}
.ifv-test-topic-badge {
  font-size: .8rem;
  font-weight: 700;
  color: var(--clr-accent, #00BCD4);
}
.ifv-q-counter {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}
.ifv-timer {
  font-size: .95rem;
  font-weight: 800;
  color: #e0e0e0;
  font-variant-numeric: tabular-nums;
  background: #0D1F3C;
  padding: .3rem .75rem;
  border-radius: 6px;
  border: 1.5px solid rgba(255,255,255,.08);
}
.ifv-timer-warn { color: #EF5350 !important; border-color: rgba(239,83,80,.4) !important; }

/* Progress bar */
.ifv-progress-track {
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.ifv-progress-fill {
  height: 100%;
  background: var(--clr-accent, #00BCD4);
  border-radius: 2px;
  transition: width .3s;
}

/* Question card */
.ifv-q-card {
  background: #0D1F3C;
  border: 1.5px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.ifv-q-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

.ifv-diff-badge {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 4px;
}
.ifv-diff-fresher { background: rgba(76,175,80,.15); color: #81C784; }
.ifv-diff-junior  { background: rgba(255,193,7,.12);  color: #FFD54F; }
.ifv-diff-mid     { background: rgba(255,152,0,.12);  color: #FFB74D; }
.ifv-diff-senior  { background: rgba(239,83,80,.12);  color: #EF9A9A; }

.ifv-q-text {
  font-size: 1rem;
  color: #e8eaf0;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.ifv-q-text code {
  background: rgba(0,188,212,.1);
  color: var(--clr-accent, #00BCD4);
  padding: .1em .35em;
  border-radius: 3px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: .9em;
}

.ifv-q-code {
  margin-bottom: 1.25rem;
}
.ifv-q-code pre {
  background: #060b14;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 0;
}
.ifv-q-code code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: .82rem;
  color: #a8d8ea;
  line-height: 1.6;
}

/* Options */
.ifv-options {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.ifv-option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: #0a1424;
  border: 1.5px solid rgba(255,255,255,.07);
  border-radius: 8px;
  padding: .85rem 1rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color .15s, background .15s;
  color: #c8cdd8;
}
.ifv-option:hover:not(:disabled) {
  border-color: rgba(0,188,212,.5);
  background: rgba(0,188,212,.04);
}
.ifv-option:disabled { cursor: not-allowed; }
.ifv-option.ifv-correct {
  border-color: #4CAF50 !important;
  background: rgba(76,175,80,.1) !important;
  color: #A5D6A7 !important;
}
.ifv-option.ifv-wrong {
  border-color: #EF5350 !important;
  background: rgba(239,83,80,.1) !important;
  color: #EF9A9A !important;
}

.ifv-option-key {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: rgba(255,255,255,.07);
  color: #90A4AE;
  font-size: .75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: .05rem;
}
.ifv-option-text { font-size: .88rem; line-height: 1.55; }
.ifv-option-text code {
  background: rgba(0,188,212,.1);
  color: var(--clr-accent, #00BCD4);
  padding: .1em .3em;
  border-radius: 3px;
  font-family: 'Consolas', monospace;
  font-size: .85em;
}

/* Explanation */
.ifv-explanation {
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}
.ifv-exp-correct { background: rgba(76,175,80,.08); border: 1.5px solid rgba(76,175,80,.25); }
.ifv-exp-wrong   { background: rgba(239,83,80,.07); border: 1.5px solid rgba(239,83,80,.2); }

.ifv-exp-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
}
.ifv-exp-icon { font-size: 1.1rem; }
.ifv-exp-label { font-size: .85rem; font-weight: 800; color: #e0e0e0; }
.ifv-exp-body {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  line-height: 1.65;
}
.ifv-exp-body code {
  background: rgba(255,255,255,.08);
  color: #90CAF9;
  padding: .1em .3em;
  border-radius: 3px;
  font-family: 'Consolas', monospace;
  font-size: .85em;
}
.ifv-exp-body strong { color: rgba(255,255,255,.85); }

.ifv-exp-tags {
  margin-top: .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.ifv-tag {
  font-size: .68rem;
  padding: .18rem .5rem;
  background: rgba(0,188,212,.1);
  color: var(--clr-accent, #00BCD4);
  border-radius: 4px;
  font-weight: 600;
}

/* Next button */
.ifv-next-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: .85rem;
  background: transparent;
  border: 1.5px solid var(--clr-accent, #00BCD4);
  color: var(--clr-accent, #00BCD4);
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ifv-next-btn:hover {
  background: var(--clr-accent, #00BCD4);
  color: #090E1A;
}

/* ── Results view ────────────────────────────────────────── */
#ifv-results {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem 5rem;
}

.ifv-results-hero {
  text-align: center;
  margin-bottom: 2rem;
}

/* Score ring */
.ifv-score-ring {
  --score-color: #00BCD4;
  --score-pct: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    var(--score-color) calc(var(--score-pct) * 1%),
    #1E3A5F calc(var(--score-pct) * 1%)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
}
.ifv-score-ring::before {
  content: '';
  position: absolute;
  inset: 10px;
  background: #0B1829;
  border-radius: 50%;
}
.ifv-score-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.ifv-score-number {
  display: block;
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.ifv-score-fraction {
  font-size: .7rem;
  color: rgba(255,255,255,.45);
  display: block;
  margin-top: .15rem;
}

.ifv-readiness-label {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: .5rem;
}
.ifv-results-topic {
  font-size: .85rem;
  color: rgba(255,255,255,.45);
  margin-bottom: .25rem;
}
.ifv-duration-note {
  font-size: .78rem;
  color: rgba(255,255,255,.3);
}

/* Recommendation box */
.ifv-recommendation-box {
  background: rgba(0,188,212,.07);
  border: 1.5px solid rgba(0,188,212,.2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
}
.ifv-recommendation-box strong {
  color: var(--clr-accent, #00BCD4);
  display: block;
  margin-bottom: .25rem;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Difficulty breakdown */
.ifv-results-card {
  background: #0D1F3C;
  border: 1.5px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.ifv-results-card-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 1rem;
}

.ifv-diff-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
}
.ifv-diff-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,.07);
  border-radius: 3px;
  overflow: hidden;
}
.ifv-diff-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s;
}
.ifv-diff-pct { font-size: .78rem; font-weight: 700; color: #e0e0e0; width: 36px; text-align: right; }

/* Question breakdown */
.ifv-breakdown-row {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: .5rem .6rem;
  border-radius: 6px;
  margin-bottom: .3rem;
  font-size: .8rem;
}
.bd-correct { background: rgba(76,175,80,.06); }
.bd-wrong   { background: rgba(239,83,80,.05); }
.ifv-bd-icon { flex-shrink: 0; }
.ifv-bd-q   { flex: 1; color: rgba(255,255,255,.55); line-height: 1.4; }
.ifv-bd-diff { flex-shrink: 0; }

/* Result action buttons */
.ifv-result-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}
.ifv-btn-outline {
  flex: 1;
  min-width: 140px;
  padding: .8rem 1rem;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.65);
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  text-align: center;
}
.ifv-btn-outline:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.ifv-btn-primary {
  flex: 1;
  min-width: 140px;
  padding: .8rem 1rem;
  background: var(--clr-accent, #00BCD4);
  border: none;
  color: #090E1A;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s;
  text-align: center;
}
.ifv-btn-primary:hover { opacity: .85; }

/* ── Mode toggle ─────────────────────────────────────────── */
.ifv-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 2rem;
}
.ifv-mode-btn {
  background: #0D1F3C;
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  text-align: left;
  transition: border-color .15s, background .15s;
  color: #e0e0e0;
}
.ifv-mode-btn > span:first-child { font-size: 1.4rem; }
.ifv-mode-btn > span:nth-child(2) { font-size: .9rem; font-weight: 700; }
.ifv-mode-btn small { font-size: .72rem; color: rgba(255,255,255,.38); }
.ifv-mode-btn.active {
  border-color: var(--clr-accent, #00BCD4);
  background: rgba(0,188,212,.07);
}
.ifv-mode-btn:not(.active):hover { border-color: rgba(255,255,255,.2); }

/* AI mode info box */
.ifv-ai-info {
  display: flex;
  gap: 1rem;
  background: rgba(0,188,212,.06);
  border: 1.5px solid rgba(0,188,212,.18);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.ifv-ai-info-icon { font-size: 1.75rem; flex-shrink: 0; }
.ifv-ai-info strong { display: block; color: #e0e0e0; font-size: .9rem; margin-bottom: .35rem; }
.ifv-ai-info p { font-size: .82rem; color: rgba(255,255,255,.55); margin: 0 0 .35rem; line-height: 1.55; }
/* API status indicator */
.ifv-api-status {
  display: flex; align-items: center; gap: .4rem;
  font-size: .78rem; margin-top: .4rem;
}
.ifv-api-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #FFA726; flex-shrink: 0;
  animation: api-pulse 1.2s ease-in-out infinite;
}
.ifv-api-dot.ok    { background: #4CAF50; animation: none; }
.ifv-api-dot.error { background: #EF5350; animation: none; }
#ifv-api-status-text { color: rgba(255,255,255,.5); }
@keyframes api-pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── AI Interview view ───────────────────────────────────── */
#ifv-ai {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

.ai-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1.25rem;
  background: #0D1F3C;
  border: 1.5px solid rgba(255,255,255,.07);
  border-radius: 10px;
  margin-bottom: 1rem;
}
.ai-topbar-left { display: flex; align-items: center; gap: .75rem; }
.ai-avatar {
  width: 40px; height: 40px;
  background: rgba(0,188,212,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.ai-interviewer-name { font-size: .9rem; font-weight: 700; color: #e0e0e0; }
.ai-topic-label { font-size: .75rem; color: var(--clr-accent, #00BCD4); }
.ai-turn-badge {
  font-size: .75rem; font-weight: 700;
  color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.05);
  padding: .3rem .7rem; border-radius: 12px;
}

/* Chat window */
.ai-chat-window {
  min-height: 300px;
  max-height: 420px;
  overflow-y: auto;
  padding: .5rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
  scroll-behavior: smooth;
}
.ai-chat-window::-webkit-scrollbar { width: 4px; }
.ai-chat-window::-webkit-scrollbar-track { background: transparent; }
.ai-chat-window::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

/* Chat bubbles */
.ai-bubble-wrap { display: flex; gap: .6rem; align-items: flex-start; }
.ai-bubble-wrap.user-wrap { flex-direction: row-reverse; }

.ai-bubble-avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.ai-bubble-avatar.ai-av  { background: rgba(0,188,212,.15); }
.ai-bubble-avatar.usr-av { background: rgba(13,71,161,.4); }

.ai-bubble {
  max-width: 82%;
  padding: .875rem 1.1rem;
  border-radius: 12px;
  font-size: .875rem;
  line-height: 1.65;
}
.ai-bubble.ai-msg {
  background: #0D1F3C;
  border: 1px solid rgba(255,255,255,.07);
  color: #d8dce8;
  border-bottom-left-radius: 4px;
}
.ai-bubble.user-msg {
  background: rgba(13,71,161,.45);
  border: 1px solid rgba(13,71,161,.6);
  color: #c8d8f0;
  border-bottom-right-radius: 4px;
}
.ai-bubble .ai-ack {
  font-size: .78rem;
  color: rgba(255,255,255,.38);
  margin-bottom: .5rem;
  font-style: italic;
}
.ai-bubble strong { color: #e8eaf0; }
.ai-bubble code {
  background: rgba(0,188,212,.1);
  color: var(--clr-accent, #00BCD4);
  padding: .1em .3em;
  border-radius: 3px;
  font-family: 'Consolas', monospace;
  font-size: .82em;
}
.ai-bubble pre {
  background: #060b14;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 7px;
  padding: .875rem 1rem;
  overflow-x: auto;
  margin: .75rem 0 0;
}
.ai-bubble pre code {
  background: none;
  color: #a8d8ea;
  font-size: .78rem;
  line-height: 1.6;
  padding: 0;
}

/* Typing indicator */
.ai-typing { display: flex; align-items: center; gap: 4px; padding: .6rem .75rem; }
.ai-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clr-accent, #00BCD4); opacity: .6;
  animation: ai-bounce .9s ease-in-out infinite;
}
.ai-typing span:nth-child(2) { animation-delay: .15s; }
.ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Input area */
.ai-input-area {
  background: #0D1F3C;
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 1rem;
  margin-top: .5rem;
}
.ai-textarea {
  width: 100%;
  background: #060b14;
  border: 1.5px solid rgba(255,255,255,.07);
  border-radius: 8px;
  color: #d0d8e8;
  font-size: .875rem;
  line-height: 1.6;
  padding: .75rem 1rem;
  resize: vertical;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.ai-textarea:focus { border-color: rgba(0,188,212,.5); }
.ai-textarea::placeholder { color: rgba(255,255,255,.22); }
.ai-input-actions {
  display: flex; gap: .625rem; margin-top: .75rem; justify-content: flex-end;
}
.ai-end-btn { font-size: .8rem; padding: .6rem .9rem; }
.ai-send-btn { padding: .65rem 1.25rem; font-size: .875rem; display:flex; align-items:center; gap:.5rem; }
.ai-send-btn kbd {
  font-size: .68rem;
  font-family: 'Consolas', monospace;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(0,0,0,.3);
  border-radius: 3px;
  padding: .1rem .4rem;
  color: #090E1A;
  line-height: 1.4;
}

/* Evaluation panel */
.ai-eval-panel {
  background: #0D1F3C;
  border: 1.5px solid rgba(0,188,212,.2);
  border-radius: 14px;
  padding: 1.75rem;
  margin-top: 1rem;
}
.ai-eval-header {
  display: flex; gap: 1.5rem; align-items: center;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.ai-eval-score-ring {
  width: 90px; height: 90px; flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(var(--clr-accent,#00BCD4) var(--ring-pct,0%), #1E3A5F var(--ring-pct,0%));
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.ai-eval-score-ring::before {
  content: '';
  position: absolute; inset: 8px;
  background: #0D1F3C; border-radius: 50%;
}
.ai-eval-score-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  font-size: .75rem; color: rgba(255,255,255,.5);
}
.ai-eval-score-inner span:first-child { font-size: 1.4rem; font-weight: 900; color: #fff; line-height: 1; }
.ai-eval-verdict { font-size: 1.1rem; font-weight: 800; color: var(--clr-accent,#00BCD4); margin-bottom: .35rem; }
.ai-eval-summary { font-size: .85rem; color: rgba(255,255,255,.6); line-height: 1.6; }
.ai-eval-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-bottom: 1.25rem;
}
.ai-eval-col-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
  margin-bottom: .6rem;
}
.ai-eval-col ul { list-style: none; padding: 0; margin: 0; }
.ai-eval-col li {
  font-size: .82rem; color: rgba(255,255,255,.6);
  padding: .3rem 0; border-bottom: 1px solid rgba(255,255,255,.05);
  line-height: 1.45;
}
.ai-eval-col li::before { content: '• '; color: var(--clr-accent,#00BCD4); }
.ai-eval-next {
  font-size: .85rem; color: rgba(255,255,255,.55);
  background: rgba(0,188,212,.06); border-radius: 8px;
  padding: .75rem 1rem; margin-bottom: 1.25rem; line-height: 1.55;
}
.ai-eval-actions { display: flex; gap: .625rem; flex-wrap: wrap; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .ifv-topic-grid { grid-template-columns: 1fr 1fr; }
  .ifv-level-btn { min-width: 100px; }
  .ifv-result-actions { flex-direction: column; }
  .ifv-q-card { padding: 1.25rem; }
  .ifv-mode-toggle { grid-template-columns: 1fr; }
  .ai-eval-grid { grid-template-columns: 1fr; }
  .ai-topbar { flex-wrap: wrap; gap: .5rem; }
  .ai-eval-header { flex-direction: column; }
}
@media (max-width: 400px) {
  .ifv-topic-grid { grid-template-columns: 1fr; }
  .ai-input-actions { flex-direction: column-reverse; }
}
