/* ═══════════════════════════════════════════════════
   JUNIOR LAB – Speak & Practice  |  Full CSS
   Ocean Breeze Theme — Teal #0B7B9A · Cyan #00C9E0
═══════════════════════════════════════════════════ */

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

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

:root {
  --yellow:       #00C9E0;   /* cyan accent */
  --yellow-light: #E0F8FC;
  --orange:       #0B7B9A;   /* teal primary */
  --orange-light: #D6F0F7;
  --purple:       #006E8A;   /* deep teal */
  --purple-mid:   #0092B3;
  --purple-light: #E8F8FF;
  --pink:         #00B4D8;   /* sky blue */
  --pink-light:   #EAF6FF;
  --white:        #FFFFFF;
  --text-dark:    #0B3D52;
  --text-mid:     #2E7A93;
  --text-soft:    #7BBCCC;
  --border:       #B8E8F5;
  --r-xl:         30px;
  --r-lg:         22px;
  --r-md:         14px;
  --r-pill:       999px;
  --shadow-card:  0 8px 36px rgba(11,123,154,.13);
  --shadow-hover: 0 16px 48px rgba(11,123,154,.22);
  --trans:        0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Quicksand', sans-serif;
  background: linear-gradient(155deg,#E8F8FF 0%,#D6F0F7 45%,#EAF6FF 100%);
  min-height: 100vh;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════
   SCREEN SYSTEM
══════════════════════════════════════ */
.screen {
  display: none;
  min-height: 100vh;
  animation: fadeSlideUp .45s ease both;
}
.screen.active { display: block; }


/* ══════════════════════════════════════
   SCREEN 1 – WELCOME
══════════════════════════════════════ */
.welcome-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 60px;
  text-align: center;
}

/* ── JL Logo ── */
.jl-logo {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.jl-logo-inner {
  width: 86px;
  height: 86px;
  border-radius: 28px;
  background: linear-gradient(135deg, #0B7B9A 0%, #00C9E0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 10px 36px rgba(11,123,154,.45);
  position: relative;
  z-index: 2;
}

.jl-j, .jl-l {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -2px;
}
.jl-l { color: #B8EEFF; }

.jl-logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  border: 3px solid rgba(11,123,154,.22);
  animation: ringPulse 2.4s ease-in-out infinite;
}
.jl-logo-ring--2 {
  inset: -8px;
  border-radius: 40px;
  border-color: rgba(0,201,224,.16);
  animation-delay: 0.8s;
}

@keyframes ringPulse {
  0%,100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.06); opacity: 0.5; }
}

.welcome-title {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(130deg, #0B7B9A 10%, #00C9E0 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.welcome-sub {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 38px;
}

/* ── Form ── */
.welcome-form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-mid);
  text-align: left;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 8px;
}

.text-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--white);
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.text-input::placeholder { color: var(--text-soft); font-weight: 500; }
.text-input:focus {
  border-color: #0B7B9A;
  box-shadow: 0 0 0 4px rgba(11,123,154,.14);
}

.input-error {
  font-size: 0.82rem;
  font-weight: 600;
  color: #FF4D4D;
  min-height: 20px;
  text-align: left;
}

.start-btn {
  margin-top: 16px;
  background: linear-gradient(135deg, #0B7B9A, #00C9E0);
  color: var(--white);
  border: none;
  border-radius: var(--r-pill);
  padding: 16px 0;
  width: 100%;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 28px rgba(11,123,154,.40);
  transition: transform var(--trans), box-shadow var(--trans), filter var(--trans);
}
.start-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 36px rgba(11,123,154,.50);
  filter: brightness(1.06);
}
.start-btn:active { transform: scale(.97); }

/* ── Returning Student Card ── */
.returning-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-xl);
  padding: 30px 28px 26px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeSlideUp .45s ease both;
}

.returning-card .returning-greeting {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.4;
  background: linear-gradient(125deg, #0B7B9A 10%, #00C9E0 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.returning-card .start-btn {
  margin-top: 4px;
}

.switch-btn {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-mid);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 24px;
  width: 100%;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: border-color var(--trans), color var(--trans), background var(--trans), transform var(--trans);
}
.switch-btn:hover {
  border-color: #0B7B9A;
  color: #0B7B9A;
  background: #D6F0F7;
  transform: translateY(-1px);
}
.switch-btn:active { transform: scale(.97); }

/* Divider between returning card and new student form */
.welcome-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  margin: 4px 0;
}
.welcome-divider::before,
.welcome-divider::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--border);
  border-radius: 99px;
}
.welcome-divider span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}


/* ══════════════════════════════════════
   SCORE HEADER  (screens 2-4)
══════════════════════════════════════ */
.score-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(120deg, #0B4F66 0%, #0B7B9A 55%, #00C9E0 100%);
  padding: 12px 20px 18px;
  box-shadow: 0 4px 24px rgba(11,79,102,.40);
}

.score-bar-wrap { max-width: 900px; margin: 0 auto; }

.score-label-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.back-btn {
  background: linear-gradient(135deg, #7C3AED, #A855F7);
  border: none;
  border-radius: var(--r-pill);
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(124,58,237,.45);
}
.back-btn:hover {
  background: linear-gradient(135deg, #6D28D9, #9333EA);
  box-shadow: 0 5px 16px rgba(124,58,237,.6);
  transform: translateY(-1px);
}
.back-btn:active { transform: scale(.96); }

.brand-small {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.04em;
}

.jl-badge {
  background: linear-gradient(135deg, #00C9E0, #0B7B9A);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 8px;
  letter-spacing: 0.06em;
}

.total-pts {
  font-size: 0.9rem;
  font-weight: 700;
  color: #B8EEFF;
  background: rgba(255,255,255,.16);
  padding: 4px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(255,255,255,.22);
  white-space: nowrap;
}

/* Bar */
.bar-track {
  position: relative;
  height: 18px;
  background: rgba(255,255,255,.22);
  border-radius: var(--r-pill);
  overflow: visible;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00C9E0, #0B7B9A);
  border-radius: var(--r-pill);
  transition: width .9s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  box-shadow: 0 0 14px rgba(0,201,224,.5);
}

.bar-fill::after {
  content: '';
  position: absolute;
  right: -3px; top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  background: var(--white);
  border: 3px solid #00C9E0;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0,201,224,.9);
  opacity: 0;
  transition: opacity .4s;
}
.bar-fill.has-progress::after { opacity: 1; }

/* Milestones */
.milestone {
  position: absolute;
  top: 50%;
  transform: translate(-50%,-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 5;
}

.m-dot {
  width: 9px; height: 9px;
  background: rgba(255,255,255,.45);
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 50%;
  display: block;
  transition: background .4s, transform .4s, box-shadow .4s;
}

.m-label {
  position: absolute;
  top: 13px;
  font-size: 0.54rem;
  font-weight: 700;
  color: rgba(255,255,255,.72);
  white-space: nowrap;
}

.milestone.achieved .m-dot {
  background: #00C9E0;
  border-color: var(--white);
  transform: scale(1.6);
  box-shadow: 0 0 10px rgba(0,201,224,.9);
}


/* ══════════════════════════════════════
   SCREEN 2 – LEVEL SELECT
══════════════════════════════════════ */
.level-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 44px 20px 70px;
  text-align: center;
}

.screen-greeting {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0B7B9A;
  margin-bottom: 6px;
}

.screen-title {
  font-size: 1.9rem;
  font-weight: 800;
  background: linear-gradient(125deg, #0B7B9A 10%, #00C9E0 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.screen-sub {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 40px;
}

.level-cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.level-card {
  flex: 1 1 220px;
  max-width: 240px;
  background: var(--white);
  border: 2.5px solid transparent;
  border-radius: var(--r-xl);
  padding: 36px 24px 30px;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
  font-family: 'Quicksand', sans-serif;
  position: relative;
  overflow: hidden;
}

.level-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.level-card--a1::before { background: linear-gradient(90deg,#A8EDEA,#6FCF97); }
.level-card--a2::before { background: linear-gradient(90deg,#00C9E0,#0B7B9A); }
.level-card--b1::before { background: linear-gradient(90deg,#006E8A,#00B4D8); }

.level-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-hover);
}
.level-card--a1:hover { border-color: #6FCF97; }
.level-card--a2:hover { border-color: #0B7B9A; }
.level-card--b1:hover { border-color: #006E8A; }

.level-badge {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  padding: 8px 22px;
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.level-card--a1 .level-badge { background: #E8FFF4; color: #27AE60; }
.level-card--a2 .level-badge { background: #E0F8FC; color: #0B7B9A; }
.level-card--b1 .level-badge { background: #D6F0F7; color: #006E8A; }

.level-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.level-desc {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 16px;
}

.level-stars { font-size: 1.1rem; }


/* ══════════════════════════════════════
   SCREEN 3 – CATEGORY SELECT
══════════════════════════════════════ */
.category-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 38px 20px 70px;
  text-align: center;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.cat-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px 14px 22px;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans), background var(--trans);
  font-family: 'Quicksand', sans-serif;
  position: relative;
  overflow: hidden;
}

.cat-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: var(--shadow-hover);
}

/* Level-coloured hover border */
.cat-card.lvl-a1:hover  { border-color: #6FCF97; background: #F0FFF7; }
.cat-card.lvl-a2:hover  { border-color: #0B7B9A; background: #D6F0F7; }
.cat-card.lvl-b1:hover  { border-color: #006E8A; background: #E8F8FF; }

.cat-card.completed {
  border-color: #27AE60;
  background: #F0FFF7;
}
.cat-card.completed::after {
  content: '';
}

.cat-card.partial {
  border-color: #A78BFA;
  background: #FAF5FF;
}

/* ✅ Tamamlandı etiketi */
.cat-progress-label {
  font-size: 0.70rem;
  font-weight: 700;
  margin-top: 7px;
  color: #7C3AED;
}
.cat-progress-label.done-label {
  color: #27AE60;
  font-size: 0.75rem;
}

/* Progress bar */
.cat-progress-bar-wrap {
  margin-top: 8px;
  height: 5px;
  background: #EDE9FE;
  border-radius: 99px;
  overflow: hidden;
}
.cat-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED, #A855F7);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.cat-emoji {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 10px;
  line-height: 1;
}

.cat-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.3;
}

.cat-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-top: 5px;
}


/* ══════════════════════════════════════
   SCREEN 4 – PRACTICE
══════════════════════════════════════ */
.main-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}

.page-title {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeSlideUp .5s ease both;
}

.round-badge {
  display: inline-block;
  background: linear-gradient(135deg, #0B7B9A, #00C9E0);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 5px 18px;
  border-radius: var(--r-pill);
  margin-bottom: 10px;
  box-shadow: 0 3px 12px rgba(11,123,154,.35);
}

.page-title h1 {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(125deg, #0B7B9A 10%, #00C9E0 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  line-height: 1.2;
}

.page-title p { font-size: 0.9rem; font-weight: 500; color: var(--text-mid); }
.page-title strong { color: #006E8A; }

/* Motivation Toast */
.motivation-toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, #006E8A, #00C9E0);
  color: var(--white);
  padding: 13px 32px;
  border-radius: var(--r-pill);
  font-size: 0.93rem;
  font-weight: 700;
  box-shadow: 0 10px 36px rgba(11,123,154,.45);
  z-index: 999;
  opacity: 0;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
  white-space: nowrap;
  pointer-events: none;
}
.motivation-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 30px 28px 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans);
  animation: fadeSlideUp .5s ease both;
}
.card--answer { animation-delay: .1s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.card--question::before { background: linear-gradient(90deg, #00C9E0, #0B7B9A); }
.card--answer::before   { background: linear-gradient(90deg, #006E8A, #00B4D8); }

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 16px;
}
.card--question .card-tag { background: #E0F8FC; color: #0B7B9A; }
.card--answer   .card-tag { background: #D6F0F7; color: #006E8A; }

.sentence-text {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.65;
  color: var(--text-dark);
  padding: 16px 18px;
  border-radius: var(--r-md);
  border-left: 4px solid transparent;
  margin-bottom: 8px;
}
.card--question .sentence-text { background: #E0F8FC; border-left-color: #00C9E0; }
.card--answer   .sentence-text { background: #D6F0F7; border-left-color: #006E8A; }

/* Dots */
.dots-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 22px;
}

.dot-circle {
  width: 27px; height: 27px;
  border-radius: 50%;
  border: 2.5px solid #B8E8F5;
  background: transparent;
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  flex-shrink: 0;
}
.dot-circle.filled { border-color: transparent; transform: scale(1.14); }
.card--question .dot-circle.filled {
  background: linear-gradient(135deg, #00C9E0, #0B7B9A);
  box-shadow: 0 3px 10px rgba(0,201,224,.35);
}
.card--answer .dot-circle.filled {
  background: linear-gradient(135deg, #006E8A, #00B4D8);
  box-shadow: 0 3px 10px rgba(0,180,216,.35);
}
.dot-circle.filled::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.95);
  font-size: 0.6rem;
  font-weight: 900;
}

/* Record area */
.record-area { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--r-pill);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--trans), filter var(--trans), box-shadow var(--trans);
  user-select: none;
  outline: none;
}
.card--question .rec-btn {
  background: linear-gradient(135deg, #00C9E0, #0B7B9A);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(0,201,224,.38);
}
.card--answer .rec-btn {
  background: linear-gradient(135deg, #006E8A, #00B4D8);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(0,180,216,.38);
}
.rec-btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.03); filter: brightness(1.07); }
.rec-btn:active:not(:disabled) { transform: scale(.97); }
.rec-btn:disabled { opacity: .42; cursor: default; transform: none; filter: none; box-shadow: none; }

.rec-btn.recording { animation: pulseRec .9s ease-in-out infinite; }
.card--question .rec-btn.recording { background: linear-gradient(135deg,#FF4D4D,#FF8C42); }
.card--answer   .rec-btn.recording { background: linear-gradient(135deg,#FF4D4D,#FF6B9D); }
@keyframes pulseRec {
  0%,100% { transform: scale(1);    box-shadow: 0 4px 14px rgba(255,77,77,.35); }
  50%      { transform: scale(1.05); box-shadow: 0 6px 26px rgba(255,77,77,.65); }
}

.rec-btn.done-state {
  background: linear-gradient(135deg,#6FCF97,#27AE60) !important;
  box-shadow: 0 4px 16px rgba(39,174,96,.35) !important;
}
.mic-icon { font-size: 1.1rem; line-height: 1; }
.rec-status { font-size: 0.8rem; font-weight: 600; color: var(--text-soft); transition: color var(--trans); }
.rec-status.active { color: #FF4D4D; font-weight: 700; }
.rec-status.done   { color: #27AE60; font-weight: 700; }
.rec-status.warn   { color: #D97706; font-weight: 700; }
.rec-status.great  { color: #059669; font-weight: 700; }
.rec-status.close  { color: #D97706; font-weight: 700; }
.rec-status.miss   { color: #DC2626; font-weight: 700; }
.spoken-text       { font-style: italic; opacity: .85; font-size: 0.85em; }

/* ══════════════════════════════════════
   CARD HEADER ROW (tag + listen pill)
══════════════════════════════════════ */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}

/* ── Listen Button ── */
.listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 8px;
  border: none;
  border-radius: 14px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  transition: transform var(--trans), box-shadow var(--trans), filter var(--trans);
  letter-spacing: 0.03em;
}
.listen-btn--q {
  background: linear-gradient(135deg, #00C9E0, #0B7B9A);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,201,224,.40);
}
.listen-btn--a {
  background: linear-gradient(135deg, #006E8A, #00B4D8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,110,138,.38);
}
.listen-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.08);
}
.listen-btn:active:not(:disabled) { transform: scale(.96); }
.listen-btn:disabled { opacity: .45; cursor: default; transform: none; filter: none; box-shadow: none; }
.listen-btn.loading  { opacity: .7; cursor: wait; }

.listen-btn-icon {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.listen-btn.playing .listen-btn-icon {
  animation: iconPulse .8s ease-in-out infinite;
}
@keyframes iconPulse {
  0%,100% { transform: scale(1);    }
  50%      { transform: scale(1.15); }
}

.listen-btn-label { line-height: 1; }

.listen-btn-bars {
  display: flex; align-items: center; gap: 2px;
  height: 16px; width: 0; overflow: hidden; opacity: 0;
  transition: width .3s ease, opacity .3s ease;
}
.listen-btn.playing .listen-btn-bars { width: 22px; opacity: 1; }
.listen-btn-bars span {
  display: block; width: 3px; border-radius: 3px;
  background: rgba(255,255,255,.9);
  animation: waveBar .85s ease-in-out infinite; flex-shrink: 0;
}
.listen-btn-bars span:nth-child(1){ height: 4px;  animation-delay: 0s; }
.listen-btn-bars span:nth-child(2){ height: 10px; animation-delay: .1s; }
.listen-btn-bars span:nth-child(3){ height: 16px; animation-delay: .2s; }
.listen-btn-bars span:nth-child(4){ height: 10px; animation-delay: .3s; }
.listen-btn-bars span:nth-child(5){ height: 5px;  animation-delay: .4s; }

@keyframes waveBar {
  0%,100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1.0);  }
}

/* ══════════════════════════════════════
   TURKISH TRANSLATION
══════════════════════════════════════ */
.sentence-tr {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2E7A93;
  font-style: italic;
  margin-top: 0;
  margin-bottom: 20px;
  padding: 0 4px;
  line-height: 1.5;
}
.sentence-tr::before { content: '🇹🇷 '; font-style: normal; }

/* ══════════════════════════════════════
   BOTTOM ACTIONS (OK + Next)
══════════════════════════════════════ */
.bottom-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 0 14px;
}

/* OK Panel */
.ok-wrap {
  text-align: center;
  animation: fadeSlideUp .6s cubic-bezier(.34,1.56,.64,1) both;
  width: 100%;
}
.congrats-msg { font-size: 1.25rem; font-weight: 800; color: #006E8A; margin-bottom: 18px; }
.ok-btn {
  background: linear-gradient(135deg, #0B7B9A, #00C9E0);
  color: var(--white);
  border: none;
  border-radius: var(--r-pill);
  padding: 15px 60px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .06em;
  box-shadow: 0 6px 28px rgba(11,123,154,.40);
  transition: transform var(--trans), box-shadow var(--trans);
  animation: heartbeat 1.8s ease infinite;
}
.ok-btn:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 12px 36px rgba(0,201,224,.50); }
@keyframes heartbeat {
  0%,100% { transform: scale(1);    }
  12%      { transform: scale(1.06); }
  25%      { transform: scale(1);    }
  37%      { transform: scale(1.04); }
  60%      { transform: scale(1);    }
}

/* Next / Skip button */
.next-skip-btn {
  background: transparent;
  border: 2.5px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-mid);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 32px;
  cursor: pointer;
  letter-spacing: .04em;
  transition: border-color var(--trans), color var(--trans), background var(--trans), transform var(--trans);
}
.next-skip-btn:hover {
  border-color: #006E8A;
  color: #006E8A;
  background: #D6F0F7;
  transform: translateY(-2px);
}
.next-skip-btn:active { transform: scale(.97); }


/* ══════════════════════════════════════
   SUCCESS OVERLAY
══════════════════════════════════════ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(11,61,82,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .3s ease;
}

.overlay-card {
  background: var(--white);
  border-radius: 38px;
  padding: 52px 44px 44px;
  text-align: center;
  max-width: 390px;
  width: 92%;
  box-shadow: 0 24px 70px rgba(11,123,154,.25);
  animation: popIn .55s cubic-bezier(.34,1.56,.64,1) both;
  position: relative;
  overflow: hidden;
}
.overlay-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, #00C9E0, #0B7B9A, #006E8A, #00B4D8);
  border-radius: 38px 38px 0 0;
}

.overlay-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
  animation: bounce 1.2s ease infinite;
}
@keyframes bounce { 0%,100%{transform:translateY(0)} 45%{transform:translateY(-14px)} }

.overlay-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #0B7B9A, #00C9E0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.overlay-sub {
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 28px;
}

.overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overlay-btn {
  border: none;
  border-radius: var(--r-pill);
  padding: 14px 0;
  width: 100%;
  font-family: 'Quicksand', sans-serif;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .03em;
  transition: transform var(--trans), box-shadow var(--trans);
}
.overlay-btn--next {
  background: linear-gradient(135deg, #0B7B9A, #00C9E0);
  color: var(--white);
  box-shadow: 0 6px 24px rgba(11,123,154,.40);
}
.overlay-btn--cats {
  background: #D6F0F7;
  color: #006E8A;
  box-shadow: none;
}
.overlay-btn:hover { transform: translateY(-2px) scale(1.03); }
.overlay-btn--next:hover { box-shadow: 0 10px 32px rgba(11,123,154,.50); }


/* ══════════════════════════════════════
   KEYFRAMES
══════════════════════════════════════ */
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes popIn  { from{transform:scale(.65);opacity:0} to{transform:scale(1);opacity:1} }
@keyframes fadeSlideUp { from{transform:translateY(22px);opacity:0} to{transform:translateY(0);opacity:1} }


/* ══════════════════════════════════════
   RESPONSIVE – MOBILE
══════════════════════════════════════ */
@media (max-width: 620px) {
  .welcome-title       { font-size: 1.9rem; }
  .jl-logo-inner       { width: 72px; height: 72px; }
  .jl-j,.jl-l          { font-size: 2rem; }

  .score-header        { padding: 9px 12px 14px; }
  .back-btn            { padding: 4px 10px; font-size: 0.72rem; }
  .m-label             { font-size: 0.46rem; }
  .bar-track           { height: 15px; }

  .level-cards         { gap: 12px; }
  .level-card          { padding: 26px 16px 22px; }
  .screen-title        { font-size: 1.5rem; }

  .category-grid       { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 12px; }
  .cat-card            { padding: 20px 10px 16px; }
  .cat-emoji           { font-size: 1.8rem; }

  .card                { padding: 22px 16px 18px; }
  .sentence-text       { font-size: 1rem; padding: 13px 14px; }
  .dot-circle          { width: 22px; height: 22px; }
  .dots-row            { gap: 6px; }
  .rec-btn             { padding: 11px 20px; font-size: 0.88rem; }
  .page-title h1       { font-size: 1.45rem; }
  .listen-btn          { padding: 8px 16px; font-size: 0.82rem; }

  .overlay-card        { padding: 38px 22px 32px; }
  .overlay-title       { font-size: 1.8rem; }
  .motivation-toast    { font-size: 0.83rem; padding: 11px 20px; white-space: normal; max-width: 88vw; text-align: center; }
}

/* ═══════════════════════════════════════════════════
   LIVE TRANSCRIPT - Öğrencinin konuştuğu metni göster
═══════════════════════════════════════════════════ */
.live-transcript-box {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px dashed rgba(11, 123, 154, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  transition: all 0.3s ease;
  display: none; /* Sadece kayıt sırasında / sonrasında görünür */
}

.live-transcript-box.active {
  display: block;
  border-color: #e74c3c;
  background: #fff5f5;
  animation: lt-pulse 1.6s infinite ease-in-out;
}

.live-transcript-box.has-result {
  display: block;
}

.live-transcript-box.correct {
  border-color: #27ae60;
  border-style: solid;
  background: #f0fdf4;
}

.live-transcript-box.close {
  border-color: #f39c12;
  border-style: solid;
  background: #fffbeb;
}

.live-transcript-box.wrong {
  border-color: #e74c3c;
  border-style: solid;
  background: #fef2f2;
}

@keyframes lt-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.3); }
  50%      { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
}

.live-transcript-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a5568;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lt-icon { font-size: 0.95rem; }

.lt-accuracy {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: none;
  letter-spacing: 0;
}

.lt-accuracy.correct { background: #27ae60; color: #fff; }
.lt-accuracy.close   { background: #f39c12; color: #fff; }
.lt-accuracy.wrong   { background: #e74c3c; color: #fff; }

.live-transcript {
  font-size: 1rem;
  line-height: 1.55;
  color: #1a202c;
  font-weight: 500;
  min-height: 24px;
  word-wrap: break-word;
}

.live-transcript:empty::before {
  content: 'Konuşmaya başlayın... 🎤';
  color: #a0aec0;
  font-style: italic;
  font-weight: 400;
  font-size: 0.92rem;
}

/* Kelime karşılaştırma vurgusu */
.live-transcript .word-correct {
  color: #27ae60;
  font-weight: 600;
}
.live-transcript .word-wrong {
  color: #e74c3c;
  text-decoration: underline wavy #e74c3c;
  text-underline-offset: 3px;
}
.live-transcript .word-extra {
  color: #a0aec0;
  font-style: italic;
}

/* iOS / desteklenmeyen tarayıcılar için bilgi mesajı */
.live-transcript-box.unsupported {
  display: block;
  border-style: solid;
  border-color: #cbd5e0;
  background: #f7fafc;
}
.live-transcript-box.unsupported .live-transcript {
  font-size: 0.85rem;
  color: #718096;
  font-style: italic;
}

@media (max-width: 720px) {
  .live-transcript-box { padding: 10px 12px; }
  .live-transcript     { font-size: 0.92rem; }
}
