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

:root {
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-soft: #eff6ff;

  --color-bg: #f8fafc;
  --color-surface: #ffffff;

  --color-text: #0f172a;
  --color-text-soft: #64748b;
  --color-border: #e2e8f0;

  --color-success: #16a34a;
  --color-danger: #dc2626;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-card:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 30px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--color-primary);
}

/* ---------- Genel sayfa ---------- */

.app-page {
  min-height: 100vh;
  padding: 24px 16px;
}

.app-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------- Giriş ekranı ---------- */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.auth-shell {
  width: 100%;
  max-width: 420px;
}

.auth-brand {
  margin-bottom: 28px;
  text-align: center;
}

.auth-logo {
  margin: 0;
  font-size: clamp(2.2rem, 10vw, 3rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--color-primary);
}

.auth-subtitle {
  margin: 12px 0 0;
  color: var(--color-text-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.auth-card {
  padding: 28px 22px;
}

.auth-title {
  margin: 0 0 24px;
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* ---------- Form ---------- */

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0 15px;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);

  background: #fff;
  color: var(--color-text);

  font-size: 16px;
  outline: none;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---------- Butonlar ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 52px;
  padding: 0 20px;

  border: 0;
  border-radius: var(--radius-sm);

  font-weight: 700;
  text-decoration: none;
  cursor: pointer;

  transition:
    background-color 0.15s ease,
    transform 0.08s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-block {
  width: 100%;
}

/* ---------- Desktop ---------- */

@media (min-width: 640px) {
  .auth-page {
    padding: 40px 24px;
  }

  .auth-card {
    padding: 34px;
  }
}

/* ---------- Hareket azaltma tercihi ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* =========================================================
   S2 - ÖĞRENCİ ANA SAYFASI
   ========================================================= */

.student-page {
  min-height: 100vh;
  padding: 20px 16px 32px;
}

.student-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.student-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.student-brand {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.logout-button {
  min-height: 42px;
  padding: 0 14px;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);

  background: var(--color-surface);
  color: var(--color-text-soft);

  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.welcome {
  margin-bottom: 28px;
}

.welcome-label {
  margin: 0 0 4px;
  color: var(--color-text-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.welcome-name {
  margin: 0;
  font-size: clamp(1.7rem, 8vw, 2.3rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.home-card {
  display: block;
  padding: 24px;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);

  background: var(--color-surface);
  box-shadow: var(--shadow-card);

  color: var(--color-text);
  text-decoration: none;

  transition:
    border-color 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.15s ease;
}

.home-card:active {
  transform: scale(0.99);
}

.home-card-kicker {
  display: block;
  margin-bottom: 8px;

  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-card-title {
  display: block;
  margin-bottom: 7px;

  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.home-card-description {
  display: block;

  color: var(--color-text-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.home-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 22px;

  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .student-page {
    padding: 32px 24px 48px;
  }

  .home-card {
    padding: 30px;
  }
}

@media (hover: hover) {
  .home-card:hover {
    border-color: #bfdbfe;
    transform: translateY(-2px);
    box-shadow:
      0 2px 4px rgba(15, 23, 42, 0.04),
      0 14px 34px rgba(15, 23, 42, 0.08);
  }
}

/* =========================================================
   S2 - ANA SAYFA REVIZYON
   ========================================================= */

.student-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.student-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;

  width: 58px;
  height: 58px;

  border: 2px solid #dbeafe;
  border-radius: 18px;

  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.student-avatar svg {
  width: 28px;
  height: 28px;
}

.student-profile-text {
  min-width: 0;
}

.student-welcome {
  margin: 0 0 2px;
  color: var(--color-text-soft);
  font-size: 0.82rem;
  font-weight: 500;
}

.student-nickname {
  margin: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--color-text);
  font-size: 1.65rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.student-role {
  margin: 3px 0 0;
  color: var(--color-text-soft);
  font-size: 0.78rem;
  font-weight: 500;
}


/* ---------- Bölüm kartı ---------- */

.section-card {
  padding: 20px;

  border: 1px solid var(--color-border);
  border-radius: 20px;

  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.section-card-top {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.section-icon {
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  width: 52px;
  height: 52px;

  border-radius: 15px;

  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.section-icon svg {
  width: 26px;
  height: 26px;
}

.section-content {
  min-width: 0;
}

.section-kicker {
  display: block;

  margin: 1px 0 4px;

  color: var(--color-primary);

  font-size: 0.72rem;
  line-height: 1.2;
  font-weight: 800;

  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;

  color: var(--color-text);

  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 800;

  letter-spacing: -0.035em;
}

.section-description {
  margin: 7px 0 0;

  color: var(--color-text-soft);

  font-size: 0.9rem;
  line-height: 1.5;
}


/* ---------- Büyük bölüm butonu ---------- */

.section-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  width: 100%;
  min-height: 56px;

  margin-top: 20px;
  padding: 0 20px;

  border-radius: 13px;

  background: var(--color-primary);
  color: #fff;

  font-size: 0.95rem;
  font-weight: 700;

  text-decoration: none;

  transition:
    background-color 0.15s ease,
    transform 0.08s ease;
}

.section-action svg {
  width: 18px;
  height: 18px;
}

.section-action:active {
  transform: scale(0.985);
}

@media (hover: hover) {
  .section-action:hover {
    background: var(--color-primary-hover);
  }
}

@media (min-width: 640px) {
  .student-profile {
    margin-bottom: 36px;
  }

  .student-avatar {
    width: 64px;
    height: 64px;
  }

  .section-card {
    padding: 26px;
  }
}

/* =========================================================
   S2 - WORDS KART INCE AYAR
   ========================================================= */

/* Geçici küçük Words ikonunu kaldır */
.section-card .section-icon {
  display: none;
}

/* Görsel gelene kadar metin alanı tam genişlik */
.section-card-top {
  display: block;
}

/* Başla butonu: daha kompakt ama daha belirgin */
.section-action {
  width: auto;
  min-width: 150px;
  min-height: 48px;

  margin-top: 20px;
  padding: 0 24px;

  justify-self: start;

  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.section-action svg {
  width: 19px;
  height: 19px;
}

/* Mobilde de gereksiz yere tam genişlik olmasın */
@media (max-width: 639px) {
  .section-action {
    display: inline-flex;
  }
}

/* =========================================================
   S4 - LEARN PAKETLERI
   ========================================================= */

.learn-page {
  min-height: 100vh;
  padding: 20px 16px 40px;
}

.learn-shell {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.back-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;

  width: 44px;
  height: 44px;

  border: 1px solid var(--color-border);
  border-radius: 12px;

  background: var(--color-surface);
  color: var(--color-text);

  text-decoration: none;
}

.back-button svg {
  width: 20px;
  height: 20px;
}

.page-heading {
  min-width: 0;
}

.page-title {
  margin: 0;

  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.page-subtitle {
  margin: 4px 0 0;

  color: var(--color-text-soft);
  font-size: 0.86rem;
}

.learn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.learn-set-card {
  padding: 20px;

  border: 1px solid var(--color-border);
  border-radius: 18px;

  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.learn-set-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 36px;
  height: 28px;
  padding: 0 10px;

  margin-bottom: 14px;

  border-radius: 999px;

  background: var(--color-primary-soft);
  color: var(--color-primary);

  font-size: 0.75rem;
  font-weight: 800;
}

.learn-set-title {
  margin: 0;

  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.learn-set-description {
  min-height: 22px;
  margin: 6px 0 18px;

  color: var(--color-text-soft);
  font-size: 0.87rem;
  line-height: 1.45;
}

.learn-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 8px;

  font-size: 0.82rem;
}

.learn-progress-label {
  color: var(--color-text-soft);
  font-weight: 500;
}

.learn-progress-count {
  color: var(--color-text);
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 8px;

  overflow: hidden;

  border-radius: 999px;
  background: #e2e8f0;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
}

.learn-set-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 48px;
  margin-top: 20px;
  padding: 0 20px;

  border-radius: 12px;

  background: var(--color-primary);
  color: #fff;

  font-size: 0.98rem;
  font-weight: 800;

  text-decoration: none;
}

.learn-set-action svg {
  width: 18px;
  height: 18px;
}

.empty-state {
  padding: 30px 20px;

  border: 1px solid var(--color-border);
  border-radius: 18px;

  background: var(--color-surface);

  color: var(--color-text-soft);
  text-align: center;
}

@media (min-width: 640px) {
  .learn-page {
    padding: 32px 24px 48px;
  }

  .learn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learn-set-card {
    padding: 24px;
  }
}

/* =========================================================
   S4 - LEARN KELIME KARTI
   ========================================================= */

.word-page {
  min-height: 100vh;
  padding: 20px 16px 32px;
}

.word-shell {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.word-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.word-top-info {
  flex: 1;
  min-width: 0;
}

.word-set-name {
  margin: 0;
  overflow: hidden;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-position {
  margin: 3px 0 0;
  color: var(--color-text-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.word-progress {
  height: 7px;
  margin: 16px 0 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.word-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
}

.word-card {
  padding: 28px 20px 24px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.word-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  margin-bottom: 22px;
}

.word-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.word-english {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2.5rem, 12vw, 4.4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
}

.word-turkish {
  margin: 13px 0 0;
  color: var(--color-text);
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 600;
}

.word-type {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
}

.audio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 20px;
  padding: 0 18px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.audio-button svg {
  width: 19px;
  height: 19px;
}

.word-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.word-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.word-nav-button.primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.word-nav-button.disabled {
  visibility: hidden;
  pointer-events: none;
}

.word-nav-button svg {
  width: 18px;
  height: 18px;
}

@media (min-width: 640px) {
  .word-page {
    padding: 32px 24px 48px;
  }

  .word-card {
    padding: 38px 34px 32px;
  }

  .word-image-wrap {
    min-height: 190px;
  }
}

/* Learn - eksik medya durumlari */

.word-image-placeholder {
  width: 100%;
  min-height: 190px;
  border: 2px dashed var(--color-border);
  border-radius: 16px;
  background: var(--color-bg);
  color: var(--color-text-soft);
}

.word-image-placeholder span {
  font-size: 0.82rem;
  font-weight: 600;
}

.word-audio {
  display: flex;
  justify-content: center;
}

.audio-button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* =========================================================
   LEARN - SABIT GORSEL ALANI
   Görsel olsa da olmasa da kart yerleşimi değişmez.
   ========================================================= */

.word-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 200px;
  min-height: 200px;

  margin-bottom: 22px;

  border: 0;
  background: transparent;
}

.word-image {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 190px;

  object-fit: contain;
}

.word-image-placeholder {
  border: 0;
  background: transparent;
}

.word-image-placeholder span {
  display: none;
}

@media (min-width: 640px) {
  .word-image-wrap {
    height: 220px;
    min-height: 220px;
  }

  .word-image {
    max-height: 210px;
  }
}

/* Learn - Türkçe anlam vurgusu */

.word-turkish {
  margin: 14px 0 0;
  color: var(--color-primary);
  font-size: 1.4rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Learn - Türkçe anlam rengi */
.word-turkish {
  color: #7c3aed;
}

/* ========================================================
   LEARN TEST
   ======================================================== */

.test-page,
.result-page {
  min-height: 100vh;
  background: #f8fafc;
  padding: 20px 16px 40px;
}

.test-shell,
.result-shell {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.test-top-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 18px;
  color: #64748b;
  font-weight: 600;
  text-decoration: none;
}

.test-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.test-eyebrow {
  margin-bottom: 5px;
  color: #2563eb;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.test-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 800;
}

.test-pass {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
}

.test-question {
  padding: 24px 18px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.test-question[hidden] {
  display: none;
}

.test-question-count {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.test-question-progress {
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.test-question-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.test-word {
  margin-top: 36px;
  color: #0f172a;
  font-size: clamp(2.6rem, 13vw, 4.5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-align: center;
}

.test-instruction {
  margin: 14px 0 24px;
  color: #64748b;
  font-size: 0.95rem;
  text-align: center;
}

.test-choices {
  display: grid;
  gap: 10px;
}

.test-choice {
  display: block;
  cursor: pointer;
}

.test-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.test-choice span {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.test-choice input:checked + span {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.test-choice input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

.test-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.test-actions button {
  min-height: 50px;
  padding: 0 16px;
  border-radius: 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.test-back-button {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
}

.test-next-button,
.test-finish-button {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.test-next-button:disabled,
.test-finish-button:disabled {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #94a3b8;
  cursor: default;
}


/* ========================================================
   LEARN TEST RESULT
   ======================================================== */

.result-card {
  padding: 28px 20px 22px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  text-align: center;
}

.result-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  font-size: 1.7rem;
  font-weight: 800;
}

.result-status.passed {
  background: #f0fdf4;
  color: #16a34a;
}

.result-status.retry {
  background: #fff7ed;
  color: #b45309;
}

.result-card h1 {
  margin: 6px 0 22px;
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 800;
}

.result-score strong {
  display: block;
  color: #0f172a;
  font-size: 3.4rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.result-score span {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.result-stats div {
  padding: 12px 6px;
  border-radius: 13px;
  background: #f8fafc;
}

.result-stats strong,
.result-stats span {
  display: block;
}

.result-stats strong {
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 800;
}

.result-stats span {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.result-review {
  margin-top: 26px;
  text-align: left;
}

.result-review h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.result-word-list {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.result-word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.result-word-row:last-child {
  border-bottom: 0;
}

.result-word-row strong {
  color: #0f172a;
  font-weight: 800;
}

.result-word-row span {
  color: #7c3aed;
  font-weight: 700;
  text-align: right;
}

.result-perfect {
  margin-top: 24px;
  padding: 14px;
  border-radius: 14px;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 700;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.result-primary-button,
.result-secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 800;
  text-decoration: none;
}

.result-primary-button {
  background: #2563eb;
  color: #ffffff;
}

.result-secondary-button {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
}

.result-text-link {
  display: inline-block;
  padding: 8px;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.result-attempt {
  margin-top: 14px;
  color: #94a3b8;
  font-size: 0.72rem;
}

@media (min-width: 640px) {
  .test-question {
    padding: 28px 28px 24px;
  }

  .result-card {
    padding: 34px 30px 26px;
  }
}

/* ========================================================
   LEARN - PACKAGE COMPLETE
   ======================================================== */

.complete-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #f8fafc;
  padding: 24px 16px;
}

.complete-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.complete-card {
  padding: 30px 20px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  text-align: center;
}

.complete-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 1.8rem;
  font-weight: 800;
}

.complete-card h1 {
  margin: 7px 0 8px;
  color: #0f172a;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.complete-intro {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
}

.complete-test-box {
  margin-top: 26px;
  padding: 20px 16px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff;
}

.complete-test-box h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 800;
}

.complete-test-box p {
  max-width: 400px;
  margin: 9px auto 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.55;
}

.complete-test-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.complete-test-info div {
  padding: 12px 8px;
  border-radius: 13px;
  background: #ffffff;
}

.complete-test-info strong,
.complete-test-info span {
  display: block;
}

.complete-test-info strong {
  color: #2563eb;
  font-size: 1.35rem;
  font-weight: 800;
}

.complete-test-info span {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

.complete-actions {
  display: grid;
  gap: 11px;
  margin-top: 22px;
}

.complete-start-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 14px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.complete-review-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 640px) {
  .complete-card {
    padding: 36px 30px 28px;
  }
}

/* ========================================================
   LEARN - COMPACT PACKAGE LIST
   ======================================================== */

.learn-package-list {
  display: grid;
  gap: 10px;
}

.learn-package-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

.learn-package-main {
  flex: 1 1 auto;
  min-width: 0;
}

.learn-package-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
}

.learn-package-number {
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
}

.learn-package-title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 800;
}

.learn-package-description {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

.learn-package-progress {
  width: 100%;
  height: 5px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.learn-package-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.learn-package-side {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.learn-package-count {
  min-width: 50px;
  text-align: center;
}

.learn-package-count strong,
.learn-package-count span {
  display: block;
}

.learn-package-count strong {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.learn-package-count span {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 600;
}

.learn-package-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.learn-package-action svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 430px) {
  .learn-package-row {
    gap: 10px;
    padding: 14px 12px;
  }

  .learn-package-side {
    gap: 8px;
  }

  .learn-package-description {
    font-size: 0.76rem;
  }

  .learn-package-action {
    padding: 0 9px;
  }
}

/* ========================================================
   LEARN - PACKAGE STATUS
   ======================================================== */

.learn-package-row.learning {
  border-color: #fde68a;
  background: #fffbeb;
}

.learn-package-row.completed {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.learn-package-row.review {
  border-color: #fcd34d;
  background: #fffbeb;
}

.learn-package-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}

.learn-package-status.learning {
  background: #fef3c7;
  color: #92400e;
}

.learn-package-status.completed {
  background: #dcfce7;
  color: #15803d;
}

.learn-package-status.review {
  background: #fef3c7;
  color: #b45309;
}

.learn-package-row.completed .learn-package-progress span {
  background: #16a34a;
}

.learn-package-row.review .learn-package-progress span,
.learn-package-row.learning .learn-package-progress span {
  background: #2563eb;
}

.learn-package-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.learn-package-test {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #bfdbfe;
  border-radius: 11px;
  background: #ffffff;
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 430px) {
  .learn-package-side {
    align-items: flex-end;
  }

  .learn-package-buttons {
    gap: 5px;
  }

  .learn-package-test {
    padding: 0 9px;
  }
}

/* ========================================================
   LEARN TEST - SUCCESS CONFETTI
   ======================================================== */

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  pointer-events: none;
}

.confetti-layer i {
  position: absolute;
  top: -18px;
  left: var(--x);
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: #2563eb;
  opacity: 0;
  animation: learn-confetti 1.8s ease-out var(--delay) forwards;
}

.confetti-layer i:nth-child(3n) {
  background: #16a34a;
}

.confetti-layer i:nth-child(3n + 1) {
  background: #f59e0b;
}

.confetti-layer i:nth-child(4n) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

@keyframes learn-confetti {
  0% {
    opacity: 1;
    transform: translate3d(0, -10px, 0) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform:
      translate3d(var(--drift), 105vh, 0)
      rotate(var(--spin));
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti-layer {
    display: none;
  }
}

/* ========================================================
   LEARN - LOCKED PACKAGE
   ======================================================== */

.learn-package-row.locked {
  border-color: #e2e8f0;
  background: #f8fafc;
  opacity: 0.72;
}

.learn-package-row.locked .learn-package-number,
.learn-package-row.locked .learn-package-title {
  color: #64748b;
}

.learn-package-row.locked .learn-package-progress span {
  background: #cbd5e1;
}

.learn-package-status.locked {
  background: #e2e8f0;
  color: #64748b;
}

.learn-package-locked-text {
  min-width: 92px;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
}

/* =========================================================
   S5 - QUIZ SEVIYE SECIMI
   ========================================================= */

.quiz-page {
  min-height: 100vh;
  background: #f8fafc;
  padding: 24px 16px 48px;
}

.quiz-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.quiz-header {
  margin-bottom: 24px;
}

.quiz-back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.quiz-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.quiz-intro {
  margin: 7px 0 0;
  color: #64748b;
  line-height: 1.5;
}

.quiz-level-list {
  display: grid;
  gap: 12px;
}

.quiz-level-card {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

.quiz-level-card.locked {
  background: #f8fafc;
  opacity: 0.72;
}

.quiz-level-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.quiz-level-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.quiz-level-number {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.95rem;
  font-weight: 800;
}

.quiz-level-card.locked .quiz-level-number {
  background: #e2e8f0;
  color: #64748b;
}

.quiz-level-title {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.quiz-level-description {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.quiz-level-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.quiz-level-status.ready {
  background: #dcfce7;
  color: #15803d;
}

.quiz-level-status.locked {
  background: #e2e8f0;
  color: #64748b;
}

.quiz-level-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.quiz-level-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.quiz-level-action:hover {
  background: #1d4ed8;
}

.quiz-level-locked {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .quiz-page {
    padding-top: 38px;
  }

  .quiz-level-card {
    padding: 20px;
  }
}

/* =========================================================
   S6 - Quiz Question
   ========================================================= */

.quiz-question-page {
  min-height: 100vh;
  background: #f8fafc;
  padding: 24px 16px 48px;
}

.quiz-question-shell {
  width: min(100%, 640px);
  margin: 0 auto;
}

.quiz-question-header {
  margin-bottom: 20px;
}

.quiz-question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
}

.quiz-question-meta strong {
  color: #0f172a;
}

.quiz-question-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.quiz-question-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 180ms ease;
}

.quiz-question-card {
  padding: 28px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
}

.quiz-question-type {
  margin: 0 0 28px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.quiz-word-prompt {
  margin: 12px 0 34px;
  color: #0f172a;
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: anywhere;
}

.quiz-audio-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0 32px;
}

.quiz-audio-button {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  cursor: pointer;
}

.quiz-audio-button:hover {
  background: #dbeafe;
}

.quiz-audio-button:active {
  transform: scale(.97);
}

.quiz-audio-button svg {
  width: 38px;
  height: 38px;
}

.quiz-audio-help {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

.quiz-answer-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-answer-label {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.quiz-answer-input {
  width: 100%;
  min-height: 56px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 16px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 16px;
  outline: none;
}

.quiz-answer-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px #dbeafe;
}

.quiz-answer-submit {
  min-height: 56px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.quiz-answer-submit:hover {
  background: #1d4ed8;
}


/* =========================================================
   S7 - Quiz Result
   ========================================================= */

.quiz-result-page {
  min-height: 100vh;
  background: #f8fafc;
  padding: 28px 16px 56px;
}

.quiz-result-shell {
  width: min(100%, 680px);
  margin: 0 auto;
}

.quiz-result-header {
  margin-bottom: 20px;
}

.quiz-result-eyebrow {
  margin: 0 0 5px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.quiz-result-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
}

.quiz-result-score-card {
  padding: 26px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
}

.quiz-result-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 24px;
}

.quiz-result-score strong {
  color: #0f172a;
  font-size: 64px;
  line-height: 1;
}

.quiz-result-score span {
  margin-left: 6px;
  color: #64748b;
  font-size: 20px;
  font-weight: 700;
}

.quiz-result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quiz-result-stat {
  padding: 13px 8px;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.quiz-result-stat span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.quiz-result-stat strong {
  color: #0f172a;
  font-size: 21px;
}

.quiz-result-stat.correct strong {
  color: #16a34a;
}

.quiz-result-stat.wrong strong {
  color: #dc2626;
}

.quiz-result-review {
  margin-top: 28px;
}

.quiz-result-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.quiz-result-section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
}

.quiz-result-count {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 14px;
  font-weight: 800;
}

.quiz-result-wrong-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-result-wrong-item {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.quiz-result-wrong-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.quiz-result-wrong-top span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.quiz-result-wrong-top strong {
  color: #0f172a;
  font-size: 17px;
}

.quiz-result-answer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.quiz-result-answer-row span {
  color: #64748b;
  font-size: 13px;
}

.quiz-result-answer-row strong {
  text-align: right;
}

.quiz-result-answer-row.wrong strong {
  color: #dc2626;
}

.quiz-result-answer-row.correct strong {
  color: #16a34a;
}

.quiz-result-perfect {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  background: #f0fdf4;
  text-align: center;
}

.quiz-result-perfect strong,
.quiz-result-perfect span {
  display: block;
}

.quiz-result-perfect strong {
  color: #16a34a;
  font-size: 28px;
}

.quiz-result-perfect span {
  margin-top: 5px;
  color: #166534;
}

.quiz-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.quiz-result-primary,
.quiz-result-secondary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
}

.quiz-result-primary {
  background: #2563eb;
  color: #fff;
}

.quiz-result-primary:hover {
  background: #1d4ed8;
}

.quiz-result-secondary {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
}

@media (max-width: 480px) {
  .quiz-result-actions {
    grid-template-columns: 1fr;
  }

  .quiz-question-card {
    padding: 24px 16px;
  }
}

/* Quiz listening */

.quiz-listening-answers {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-listening-answers > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-listen-remaining {
  margin: 7px 0 0;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.quiz-audio-button:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.quiz-result-listening-part {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.quiz-result-listening-part > span {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

/* Quiz exit */

.quiz-question-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quiz-exit-button {
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.quiz-exit-button:hover {
  border-color: #fecaca;
  color: #dc2626;
}

.quiz-exit-modal[hidden] {
  display: none;
}

.quiz-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quiz-exit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.quiz-exit-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  border-radius: 18px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.quiz-exit-dialog h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 19px;
}

.quiz-exit-dialog p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.quiz-exit-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.quiz-exit-cancel,
.quiz-exit-confirm {
  flex: 1;
  min-height: 46px;
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.quiz-exit-cancel {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
}

.quiz-exit-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dc2626;
  background: #dc2626;
  color: #fff;
  text-decoration: none;
}

.quiz-modal-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .quiz-question-top {
    align-items: flex-start;
  }

  .quiz-exit-button {
    padding: 8px 10px;
    font-size: 12px;
  }

  .quiz-exit-actions {
    flex-direction: column;
  }
}

/* =========================================================
   CHALLENGE - S10 OYUN / S11 SONUC
   ========================================================= */

.challenge-play-page,
.challenge-result-page {
  min-height: 100vh;
  background: #f8fafc;
  padding: 24px 16px 48px;
}

.challenge-play-shell,
.challenge-result-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.challenge-play-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.challenge-timer {
  flex: 0 0 auto;
  min-width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #2563eb;
  border-radius: 50%;
  background: #ffffff;
  color: #2563eb;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.challenge-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.challenge-stats > div {
  padding: 14px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
}

.challenge-stats span,
.challenge-result-stat span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.challenge-stats strong {
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
}

.challenge-question-card {
  padding: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
}

.challenge-question-label {
  display: block;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.challenge-written-prompt {
  margin: 12px 0 28px;
  color: #0f172a;
  font-size: clamp(30px, 7vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.challenge-audio-area {
  display: flex;
  justify-content: center;
  margin: 14px 0 28px;
}

.challenge-audio-button {
  min-height: 56px;
  padding: 0 22px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.challenge-audio-button:hover {
  background: #dbeafe;
}

.challenge-answer-input {
  width: 100%;
  min-height: 56px;
  box-sizing: border-box;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 18px;
  outline: none;
}

.challenge-answer-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.challenge-submit-button {
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: #2563eb;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.challenge-submit-button:hover {
  background: #1d4ed8;
}


/* S11 */

.challenge-result-header {
  margin-bottom: 22px;
}

.challenge-result-intro {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.6;
}

.challenge-score-card {
  padding: 28px;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  background: #eff6ff;
  text-align: center;
}

.challenge-score-label {
  display: block;
  margin-bottom: 6px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
}

.challenge-score-value {
  color: #0f172a;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
}

.challenge-result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0 20px;
}

.challenge-result-stat {
  padding: 16px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
}

.challenge-result-stat strong {
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
}

.challenge-result-actions {
  display: grid;
  gap: 10px;
}

.challenge-result-actions form {
  margin: 0;
}

.challenge-result-actions .quiz-result-primary,
.challenge-result-actions .quiz-result-secondary {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}


/* S8 form button compatibility */

.quiz-level-footer form {
  margin: 0;
}

.quiz-level-footer button.quiz-level-action {
  font: inherit;
  cursor: pointer;
}



/* S11 - Challenge yanlış cevaplar */

.challenge-result-review {
  margin-top: 30px;
}

.challenge-result-review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.challenge-result-review-heading p {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.challenge-result-review-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
}

.challenge-result-wrong-count {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 15px;
  font-weight: 800;
}

.challenge-result-wrong-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.challenge-result-wrong-item {
  overflow: hidden;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #dc2626;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}

.challenge-result-wrong-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.challenge-result-wrong-top > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.challenge-result-wrong-top > div {
  min-width: 0;
  flex: 1;
  text-align: right;
}

.challenge-result-wrong-top small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.challenge-result-wrong-top strong {
  display: block;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.25;
  word-break: break-word;
}

.challenge-result-answer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 14px 0;
  padding: 13px 14px;
  border-radius: 11px;
}

.challenge-result-answer-row:last-child {
  margin-bottom: 14px;
}

.challenge-result-answer-row span {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
}

.challenge-result-answer-row strong {
  min-width: 0;
  text-align: right;
  font-size: 16px;
  font-weight: 800;
  word-break: break-word;
}

.challenge-result-answer-row.wrong {
  border: 1px solid #fecaca;
  background: #fff1f2;
}

.challenge-result-answer-row.wrong span,
.challenge-result-answer-row.wrong strong {
  color: #dc2626;
}

.challenge-result-answer-row.correct {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
}

.challenge-result-answer-row.correct span,
.challenge-result-answer-row.correct strong {
  color: #15803d;
}

@media (max-width: 600px) {
  .challenge-play-page,
  .challenge-result-page {
    padding: 18px 14px 36px;
  }

  .challenge-timer {
    min-width: 62px;
    height: 62px;
    font-size: 23px;
  }

  .challenge-question-card {
    padding: 22px 16px;
  }

  .challenge-result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .challenge-score-value {
    font-size: 48px;
  }
}

/* Challenge timer warning states */
.challenge-timer-warning {
  background: #F59E0B !important;
  color: #ffffff !important;
}

.challenge-timer-danger {
  background: #DC2626 !important;
  color: #ffffff !important;
}

/* Challenge answer feedback */
.challenge-question-card {
  position: relative;
}

.challenge-feedback {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  animation: challengeFeedbackPop .18s ease-out;
}

.challenge-feedback-correct {
  background: #DCFCE7;
  color: #16A34A;
}

.challenge-feedback-wrong {
  background: #FEE2E2;
  color: #DC2626;
}

@keyframes challengeFeedbackPop {
  from {
    transform: scale(.65);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Challenge answer flash */
.challenge-question-card {
  transition:
    border-color .12s ease,
    box-shadow .12s ease,
    background-color .12s ease;
}

.challenge-question-card.challenge-card-correct {
  border-color: #16A34A !important;
  background: #F0FDF4 !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .16) !important;
}

.challenge-question-card.challenge-card-wrong {
  border-color: #DC2626 !important;
  background: #FEF2F2 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .16) !important;
}

/* =========================================================
   LEADERBOARD
   ========================================================= */

.leaderboard-card {
  margin-top: 20px;
}

.leaderboard-list {
  margin-top: 18px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 60px 52px;
  align-items: center;
  gap: 10px;

  min-height: 48px;
  padding: 8px 10px;

  border-bottom: 1px solid var(--color-border);
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.leaderboard-rank {
  color: var(--color-text-soft);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
}

.leaderboard-name {
  min-width: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 700;
}

.leaderboard-class {
  color: var(--color-text-soft);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.leaderboard-score {
  color: var(--color-primary);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: right;
}

.leaderboard-divider {
  height: 1px;
  margin: 14px 0;
  background: var(--color-border);
}

.leaderboard-self-label {
  margin-bottom: 7px;

  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 800;

  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.leaderboard-self {
  border: 1px solid var(--color-primary);
  border-radius: 12px;
  background: var(--color-primary-soft);
}

.leaderboard-empty {
  padding: 18px 10px;

  color: var(--color-text-soft);
  font-size: 0.88rem;
  text-align: center;
}

@media (max-width: 420px) {
  .leaderboard-row {
    grid-template-columns: 32px minmax(0, 1fr) 48px 44px;
    gap: 7px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .leaderboard-name {
    font-size: 0.86rem;
  }

  .leaderboard-class {
    font-size: 0.74rem;
  }
}


/* =========================================================
   LEADERBOARD - HOME + FULL PAGE
   ========================================================= */

.section-kicker-normal {
  text-transform: none;
}

.leaderboard-card-link {
  display: block;

  color: inherit;
  text-decoration: none;
}

.leaderboard-card-link .leaderboard-card {
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.08s ease;
}

@media (hover: hover) {
  .leaderboard-card-link:hover .leaderboard-card {
    border-color: var(--color-primary);
  }
}

.leaderboard-card-link:active .leaderboard-card {
  transform: scale(0.995);
}

.leaderboard-more {
  padding: 5px 0 0;

  color: var(--color-text-soft);
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.15em;
}

.leaderboard-page-card {
  margin-top: 20px;
}

.leaderboard-full-list {
  margin-top: 22px;
}

.leaderboard-back {
  display: inline-block;

  margin-bottom: 6px;

  color: var(--color-text-soft);
  font-size: 0.82rem;
  font-weight: 600;

  text-decoration: none;
}

@media (hover: hover) {
  .leaderboard-back:hover {
    color: var(--color-primary);
  }
}

.leaderboard-page-title {
  margin-top: 0;
}



/* =========================================================
   QUIZ TIMER
   ========================================================= */

.quiz-timer {
  min-width: 72px;
  padding: 7px 10px;

  border: 1px solid var(--color-border);
  border-radius: 10px;

  background: var(--color-surface);
  color: var(--color-text);

  font-size: 1rem;
  line-height: 1;
  font-weight: 800;
  text-align: center;

  font-variant-numeric: tabular-nums;
}

.quiz-timer-warning {
  border-color: #F59E0B;
  background: #FFFBEB;
  color: #B45309;
}

.quiz-timer-danger {
  border-color: #DC2626;
  background: #FEF2F2;
  color: #B91C1C;
}

@media (max-width: 420px) {
  .quiz-timer {
    min-width: 64px;
    padding: 6px 8px;
    font-size: 0.92rem;
  }
}

/* =========================================================
   WORDS PROFILE FRAMES
   ========================================================= */

.student-avatar {
  position: relative;
}

.student-avatar.words-frame-100,
.student-avatar.words-frame-150,
.student-avatar.words-frame-200,
.student-avatar.words-frame-250 {
  border: 3px solid var(--color-primary);
  box-shadow:
    0 0 0 4px var(--color-surface),
    0 0 0 7px var(--color-primary-soft);
}

.student-avatar.words-frame-150 {
  border-width: 4px;
  box-shadow:
    0 0 0 4px var(--color-surface),
    0 0 0 8px var(--color-primary-soft);
}

.student-avatar.words-frame-200 {
  border-width: 5px;
  box-shadow:
    0 0 0 4px var(--color-surface),
    0 0 0 9px var(--color-primary-soft);
}

.student-avatar.words-frame-250 {
  border-width: 6px;
  box-shadow:
    0 0 0 4px var(--color-surface),
    0 0 0 10px var(--color-primary-soft);
}

.student-avatar .words-frame-label {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);

  z-index: 5;

  padding: 2px 7px;

  border: 1px solid var(--color-border);
  border-radius: 999px;

  background: var(--color-surface);
  color: var(--color-primary);

  font-size: 0.55rem;
  line-height: 1.2;
  font-weight: 900;

  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* =========================================================
   LEADERBOARD WORDS FRAMES + TOP 3
   ========================================================= */

.leaderboard-row {
  grid-template-columns: 36px 38px minmax(0, 1fr) 60px 52px;
}

.leaderboard-rank-special {
  font-size: 1rem;
  line-height: 1;
  text-align: center;
}

.leaderboard-profile-mini {
  position: relative;

  display: grid;
  place-items: center;

  width: 32px;
  height: 32px;

  border: 2px solid var(--color-border);
  border-radius: 50%;

  background: var(--color-surface);
}

.leaderboard-profile-mini.words-frame-100 {
  border-width: 2px;
  box-shadow: 0 0 0 2px var(--color-primary-soft);
}

.leaderboard-profile-mini.words-frame-150 {
  border-width: 3px;
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.leaderboard-profile-mini.words-frame-200 {
  border-width: 4px;
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.leaderboard-profile-mini.words-frame-250 {
  border-width: 5px;
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.leaderboard-mini-avatar {
  display: grid;
  place-items: center;

  width: 21px;
  height: 21px;

  color: var(--color-text-soft);
}

.leaderboard-mini-avatar svg {
  width: 19px;
  height: 19px;
}

.leaderboard-profile-mini .words-frame-label {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);

  z-index: 5;

  padding: 1px 4px;

  border: 1px solid var(--color-border);
  border-radius: 999px;

  background: var(--color-surface);
  color: var(--color-primary);

  font-size: 0.42rem;
  line-height: 1.1;
  font-weight: 900;

  white-space: nowrap;
}

@media (max-width: 420px) {
  .leaderboard-row {
    grid-template-columns: 28px 34px minmax(0, 1fr) 48px 44px;
    gap: 6px;
  }
}

/* =========================================================
   WORDS FRAME - GELISTIRILMIS SEVIYE GORUNUMU
   ========================================================= */

/* Ortak */
.student-avatar.words-frame-100,
.student-avatar.words-frame-150,
.student-avatar.words-frame-200,
.student-avatar.words-frame-250 {
  border-radius: 50%;
  background: var(--color-surface);
}

/* 100 WORDS — ilk seviye */
.student-avatar.words-frame-100 {
  border: 3px solid #93c5fd;
  box-shadow:
    0 0 0 3px #eff6ff,
    0 3px 10px rgba(37, 99, 235, 0.12);
}

/* 150 WORDS — ikinci seviye */
.student-avatar.words-frame-150 {
  border: 4px solid #60a5fa;
  box-shadow:
    0 0 0 3px #eff6ff,
    0 0 0 6px #dbeafe,
    0 4px 14px rgba(37, 99, 235, 0.18);
}

/* 200 WORDS — üçüncü seviye */
.student-avatar.words-frame-200 {
  border: 5px solid #3b82f6;
  box-shadow:
    0 0 0 3px #eff6ff,
    0 0 0 7px #bfdbfe,
    0 0 0 10px rgba(37, 99, 235, 0.12),
    0 5px 18px rgba(37, 99, 235, 0.22);
}

/* 250 WORDS — en yüksek seviye */
.student-avatar.words-frame-250 {
  border: 6px solid #2563eb;
  box-shadow:
    0 0 0 3px #eff6ff,
    0 0 0 8px #93c5fd,
    0 0 0 12px rgba(37, 99, 235, 0.14),
    0 6px 22px rgba(37, 99, 235, 0.28);
}

/* WORDS etiketi */
.student-avatar .words-frame-label {
  bottom: -12px;

  padding: 3px 9px;

  border: 1px solid #bfdbfe;
  border-radius: 999px;

  background: #ffffff;
  color: #1d4ed8;

  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.08);

  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* 150+ etiket biraz daha belirgin */
.student-avatar.words-frame-150 .words-frame-label,
.student-avatar.words-frame-200 .words-frame-label,
.student-avatar.words-frame-250 .words-frame-label {
  border-color: #93c5fd;
}

/* Leaderboard küçük çerçeveleri */
.leaderboard-profile-mini.words-frame-100 {
  border: 2px solid #93c5fd;
  box-shadow: 0 0 0 2px #eff6ff;
}

.leaderboard-profile-mini.words-frame-150 {
  border: 3px solid #60a5fa;
  box-shadow:
    0 0 0 2px #eff6ff,
    0 0 0 4px #dbeafe;
}

.leaderboard-profile-mini.words-frame-200 {
  border: 4px solid #3b82f6;
  box-shadow:
    0 0 0 2px #eff6ff,
    0 0 0 5px #bfdbfe;
}

.leaderboard-profile-mini.words-frame-250 {
  border: 5px solid #2563eb;
  box-shadow:
    0 0 0 2px #eff6ff,
    0 0 0 6px #93c5fd;
}
