/* ============================================================
   ENF Quiz — tasarım sistemi (mobil öncelikli, koyu, premium)
   ============================================================ */

:root {
  --bg: #0a1120;
  --bg-2: #0d1526;
  --panel: #121b30;
  --panel-2: #17223b;
  --border: #22304d;
  --border-soft: #1b2740;

  --text: #e9eefb;
  --muted: #93a3bd;
  --muted-2: #6d7f9d;

  --accent: #38e1c2;
  --accent-2: #17b7a4;
  --accent-ink: #06141d;
  --accent-soft: rgba(56, 225, 194, 0.13);

  --correct: #34d399;
  --correct-soft: rgba(52, 211, 153, 0.14);
  --wrong: #f87171;
  --wrong-soft: rgba(248, 113, 113, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.13);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.13);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;

  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.28);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

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

/* [hidden] her koşulda kazansın — sınıf tabanlı display kuralları gizlemeyi ezmesin */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 85% -8%, rgba(56, 225, 194, 0.09), transparent 60%),
    radial-gradient(760px 420px at -10% 8%, rgba(96, 165, 250, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { -webkit-appearance: none; appearance: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--accent-soft); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2a3a5c; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- uygulama kabuğu ---------------- */

#app { height: 100dvh; height: 100vh; }

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  opacity: 0;
}
.screen.is-active {
  display: flex;
  animation: screen-in 0.28s ease forwards;
}
@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.screen--center { align-items: center; justify-content: center; padding: var(--sp-4); }

.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--sp-6) + var(--sab));
}
.scroll--quiz { padding-bottom: calc(180px + var(--sab)); }

.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: var(--sp-4); }
.wrap--narrow { max-width: 640px; }

.mark {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.5rem;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), #0d9488);
  box-shadow: 0 10px 26px rgba(56, 225, 194, 0.3);
}
.mark--sm { width: 32px; height: 32px; font-size: 1rem; border-radius: 10px; box-shadow: none; }

/* ---------------- üst bar ---------------- */

.appbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: calc(var(--sp-3) + var(--sat)) var(--sp-4) var(--sp-3);
  background: rgba(10, 17, 32, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.appbar--sub { gap: var(--sp-2); }
.appbar__brand { display: flex; align-items: center; gap: var(--sp-2); }
.appbar__title { font-weight: 700; font-size: 1.02rem; letter-spacing: 0.1px; }
.appbar__spacer { flex: 1; }
.appbar__nav { display: flex; gap: var(--sp-1); margin-left: auto; }

.navbtn {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease;
}
.navbtn:hover { color: var(--text); background: var(--panel); }
.navbtn.is-active { color: var(--accent-ink); background: var(--accent); }

.iconbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease;
}
.iconbtn:hover { background: var(--panel); color: var(--text); }
.iconbtn svg { width: 20px; height: 20px; }

/* ---------------- giriş ---------------- */

.gate {
  width: 100%; max-width: 400px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow);
  animation: gate-in 0.4s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes gate-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.gate__brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.gate__title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.gate__sub { color: var(--muted); font-size: 0.82rem; }
.gate__form { display: flex; flex-direction: column; gap: var(--sp-3); }
.gate__foot { margin-top: var(--sp-4); text-align: center; color: var(--muted); font-size: 0.78rem; }
.gate__form.is-shake { animation: shake 0.4s ease; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 0.78rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.field__error { color: var(--wrong); font-size: 0.82rem; font-weight: 600; }
.field input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  font-size: 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.passwrap { position: relative; display: block; }
.passwrap input { padding-right: 48px; }
.passwrap__eye {
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--muted);
  border-radius: 10px;
}
.passwrap__eye:hover { color: var(--text); background: var(--panel); }
.passwrap__eye svg { width: 20px; height: 20px; }

/* ---------------- butonlar ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 13px;
  font-weight: 700; font-size: 0.95rem;
  transition: transform 0.12s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s;
}
.btn:active { transform: scale(0.975); }
.btn--block { width: 100%; }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 8px 22px rgba(56, 225, 194, 0.25);
}
.btn--primary:hover { box-shadow: 0 10px 26px rgba(56, 225, 194, 0.35); }
.btn--ghost {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--danger { background: var(--wrong-soft); color: var(--wrong); border: 1px solid rgba(248, 113, 113, 0.3); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btnrow { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.btnrow .btn { flex: 1; min-width: 130px; }
.actionstack { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-5); }

/* ---------------- istatistik kartları ---------------- */

.statgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
}
.statcard {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-3);
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.statcard__label { font-size: 0.7rem; font-weight: 600; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.statcard__value {
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.statcard--points { border-color: rgba(251, 191, 36, 0.3); background: linear-gradient(180deg, var(--amber-soft), var(--panel)); }
.statcard--points .statcard__value { color: var(--amber); }
.statgrid--result { margin-top: var(--sp-4); }

/* ---------------- kaldığın yer ---------------- */

.resume {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-top: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r);
  background: linear-gradient(120deg, rgba(56, 225, 194, 0.14), rgba(96, 165, 250, 0.08));
  border: 1px solid rgba(56, 225, 194, 0.32);
}
.resume__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.resume__label { font-size: 0.7rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.resume__title {
  font-size: 0.98rem; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.resume__detail { font-size: 0.8rem; color: var(--muted); }
.resume .btn { flex-shrink: 0; }

/* ---------------- arama & filtre ---------------- */

.toolbar { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }

.search { position: relative; display: flex; align-items: center; }
.search__icon {
  position: absolute; left: 14px;
  width: 18px; height: 18px;
  color: var(--muted-2);
  pointer-events: none;
}
.search input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 13px 14px 13px 42px;
  font-size: 0.95rem;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input::placeholder { color: var(--muted-2); }

.chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem; font-weight: 600;
  white-space: nowrap;
  transition: all 0.16s ease;
}
.chip:hover { color: var(--text); border-color: var(--muted-2); }
.chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.chips--meta { margin-bottom: var(--sp-3); }
.chips--meta .chip { cursor: default; }
.chip--warn { background: var(--amber-soft); border-color: rgba(251, 191, 36, 0.4); color: var(--amber); }
.chip--info { background: var(--blue-soft); border-color: rgba(96, 165, 250, 0.35); color: var(--blue); }

/* ---------------- bölüm listesi ---------------- */

.chapterlist { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }

.chapter-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  text-align: left;
  transition: border-color 0.16s ease, transform 0.12s ease, background 0.16s ease;
}
.chapter-row:hover { border-color: var(--accent); background: var(--panel-2); }
.chapter-row:active { transform: scale(0.99); }
.chapter-row__idx {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 0.78rem; font-weight: 700;
  color: var(--muted);
}
.chapter-row__body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.chapter-row__title {
  font-size: 0.92rem; font-weight: 650;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.chapter-row__meta { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.74rem; color: var(--muted); }
.chapter-row__track {
  height: 6px; border-radius: 99px;
  background: #1e2c48;
  overflow: hidden;
}
.chapter-row__fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s ease; }
.chapter-row__fill--done { background: linear-gradient(90deg, var(--correct), #059669); }
.chapter-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chapter-row__badge {
  font-size: 0.68rem; font-weight: 700;
  padding: 3px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
}
.chapter-row__badge--done { background: var(--correct-soft); color: var(--correct); }
.chapter-row__badge--warn { background: var(--wrong-soft); color: var(--wrong); }
.chapter-row__count { font-size: 0.74rem; color: var(--muted-2); }

.skeleton-row {
  height: 76px; border-radius: var(--r);
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.emptybox {
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--r);
}

/* ---------------- bölüm detayı ---------------- */

.chapterhead {
  padding-top: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.chapterhead__sub { font-size: 0.76rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.07em; }
.chapterhead__title { font-size: clamp(1.25rem, 5.5vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.chapterhead__progress { color: var(--muted); font-size: 0.85rem; }

.progress {
  height: 9px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 99px;
  overflow: hidden;
  margin-top: var(--sp-2);
}
.progress__fill {
  display: block; height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pillrow { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 0.78rem; font-weight: 600;
  color: var(--muted);
}
.pill b { color: var(--text); }
.pill--correct b { color: var(--correct); }
.pill--wrong b { color: var(--wrong); }
.pill--points b { color: var(--amber); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-4);
  margin-top: var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.card__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.card__title { font-size: 0.95rem; font-weight: 700; }
.card__text { font-size: 0.83rem; color: var(--muted); }
.badge {
  font-size: 0.75rem; font-weight: 700;
  padding: 5px 11px; border-radius: 99px;
  background: var(--blue-soft); color: var(--blue);
  white-space: nowrap;
}
.badge--ok { background: var(--correct-soft); color: var(--correct); }
.badge--warn { background: var(--amber-soft); color: var(--amber); }
.badge--err { background: var(--wrong-soft); color: var(--wrong); }

/* ---------------- quiz ---------------- */

.screen--quiz { background: var(--bg); }

.quizbar {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: calc(var(--sp-3) + var(--sat)) var(--sp-3) var(--sp-3);
  background: rgba(10, 17, 32, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.quizbar__meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.quizbar__chapter {
  font-size: 0.78rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.quizbar__count { font-size: 0.9rem; font-weight: 700; }
.quizbar__spacer { width: 40px; flex-shrink: 0; }

.quizprogress {
  height: 4px;
  background: var(--bg-2);
  overflow: hidden;
}
.quizprogress__fill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stem {
  font-size: clamp(1.05rem, 4.6vw, 1.3rem);
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-5);
}

.options { display: flex; flex-direction: column; gap: var(--sp-3); }

.option {
  width: 100%;
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: 15px var(--sp-4);
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  text-align: left;
  font-size: 0.97rem;
  line-height: 1.5;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.1s ease;
}
.option:hover:not(:disabled) { border-color: var(--accent); background: var(--panel-2); }
.option:active:not(:disabled) { transform: scale(0.99); }
.option__key {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 800;
  color: var(--muted);
  transition: all 0.16s ease;
}
.option__text { flex: 1; min-width: 0; }

.option.is-correct {
  border-color: var(--correct);
  background: var(--correct-soft);
}
.option.is-correct .option__key { background: var(--correct); border-color: var(--correct); color: #052e22; }
.option.is-wrong {
  border-color: var(--wrong);
  background: var(--wrong-soft);
  animation: shake 0.4s ease;
}
.option.is-wrong .option__key { background: var(--wrong); border-color: var(--wrong); color: #3d0b0b; }
.option.is-dim { opacity: 0.58; }
.option:disabled { cursor: default; }

/* flashcard */
.flashcard { display: flex; flex-direction: column; gap: var(--sp-4); }
.answerbox { display: flex; flex-direction: column; gap: var(--sp-4); animation: screen-in 0.3s ease both; }
.answer-card {
  background: linear-gradient(140deg, rgba(56, 225, 194, 0.1), rgba(96, 165, 250, 0.06));
  border: 1px solid rgba(56, 225, 194, 0.35);
  border-radius: var(--r);
  padding: var(--sp-4);
}
.answer-card__text { font-size: 1rem; line-height: 1.6; font-weight: 550; }
.selfrow { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.self-btn {
  min-height: 52px;
  border-radius: var(--r);
  font-weight: 700; font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform 0.12s ease, filter 0.16s ease;
}
.self-btn:active { transform: scale(0.97); }
.self-btn--know { background: var(--correct-soft); border-color: var(--correct); color: var(--correct); }
.self-btn--forget { background: var(--wrong-soft); border-color: var(--wrong); color: var(--wrong); }

/* geri bildirim paneli */
.feedback {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-top: 1px solid var(--border);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.5);
  padding-bottom: calc(var(--sp-4) + var(--sab));
  animation: sheet-up 0.32s cubic-bezier(0.2, 0.8, 0.25, 1) both;
  max-height: 72%;
  max-width: 640px;
  margin: 0 auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow-y: auto;
  z-index: 6;
}
@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: none; }
}
.feedback__inner { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-4); }
.feedback__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.feedback__title { font-size: 1.12rem; font-weight: 800; }
.feedback__title.is-correct { color: var(--correct); }
.feedback__title.is-wrong { color: var(--wrong); }
.feedback__points { font-weight: 800; color: var(--amber); font-size: 0.95rem; }
.feedback__text {
  font-size: 0.92rem; color: #cdd8ec; line-height: 1.62;
  max-height: 38vh; overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(#000 92%, rgba(0, 0, 0, 0.35));
  mask-image: linear-gradient(#000 92%, rgba(0, 0, 0, 0.35));
}
.feedback__text::-webkit-scrollbar { width: 6px; }
.feedback__pearl {
  font-size: 0.86rem; line-height: 1.6;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--r-sm);
  padding: 11px 13px;
}

/* ---------------- sonuç ---------------- */

.result { text-align: center; padding-top: var(--sp-5); }
.result__badge {
  width: 76px; height: 76px;
  margin: 0 auto var(--sp-4);
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: var(--amber);
  animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.result__badge svg { width: 38px; height: 38px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.result__title { font-size: 1.3rem; font-weight: 800; }
.result__score { font-size: clamp(2rem, 9vw, 2.8rem); font-weight: 800; color: var(--amber); letter-spacing: -0.03em; margin-top: var(--sp-1); }
.result .actionstack { text-align: left; }

.wrongbox { margin-top: var(--sp-5); text-align: left; }
.wrongbox__title { font-size: 0.82rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--sp-2); }
.wrongbox__list { display: flex; flex-direction: column; gap: var(--sp-2); }
.wrongitem {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--wrong);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  font-size: 0.86rem;
}
.wrongitem span { color: var(--muted); font-size: 0.76rem; display: block; margin-bottom: 3px; }

/* ---------------- boş durum ---------------- */

.emptystate {
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
}
.emptystate__icon {
  width: 68px; height: 68px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--correct-soft);
  color: var(--correct);
  font-size: 1.8rem; font-weight: 800;
}
.emptystate__title { font-size: 1.1rem; font-weight: 800; }
.emptystate__text { color: var(--muted); font-size: 0.88rem; max-width: 380px; }

/* ---------------- profil ---------------- */

.statspanel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.statspanel .statcard__value { font-size: 1.25rem; }

/* ---------------- toast ---------------- */

.toast {
  position: fixed;
  left: 50%; bottom: calc(24px + var(--sab));
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.86rem; font-weight: 600;
  box-shadow: var(--shadow-soft);
  z-index: 50;
  animation: screen-in 0.25s ease both;
  max-width: calc(100% - 32px);
  text-align: center;
}

/* ---------------- responsive ---------------- */

@media (max-width: 400px) {
  .statgrid { grid-template-columns: repeat(2, 1fr); }
  .chapter-row { padding: var(--sp-3); }
}

@media (min-width: 720px) {
  body { font-size: 15.5px; }
  .wrap { padding: var(--sp-5) var(--sp-4); }
  .statgrid { gap: var(--sp-3); }
  .statcard { padding: var(--sp-4); }
  .chapter-row:hover { transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
