/* ============================================================
   JUNIOR LAB – Main Stylesheet
   Tema: Turkuaz + Sarı + Açık Mor | Renkli & Eğlenceli
   Font: Nunito (Yuvarlak)
   ============================================================ */

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

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Ana Renkler */
  --turquoise:    #0ec6c6;
  --turquoise-d:  #0aabab;
  --turquoise-l:  #e0fafa;
  --yellow:       #FFD93D;
  --yellow-d:     #f5c400;
  --yellow-l:     #fffbe6;
  --lavender:     #b39ddb;
  --lavender-d:   #9575cd;
  --lavender-l:   #f0ebff;

  /* Yardımcı Renkler */
  --green:        #43e97b;
  --green-d:      #28a76a;
  --red:          #ff6b6b;
  --red-d:        #e53e3e;
  --orange:       #FFa94d;
  --blue:         #64b5f6;
  --pink:         #f48fb1;

  /* Nötr */
  --bg:           #f5feff;
  --card:         #ffffff;
  --text:         #2d3436;
  --text-s:       #636e72;
  --border:       #d0f0f0;
  --shadow:       0 4px 20px rgba(14,198,198,0.12);
  --shadow-lg:    0 8px 36px rgba(14,198,198,0.22);
  --shadow-y:     0 4px 20px rgba(255,217,61,0.25);

  --radius:       20px;
  --radius-sm:    12px;
  --radius-xs:    8px;
  --font:         'Nunito', sans-serif;
}

html { scroll-behavior: smooth; }

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

.hidden { display: none !important; }

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--turquoise-l); }
::-webkit-scrollbar-thumb { background: var(--turquoise); border-radius: 10px; }

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-page {
  background: linear-gradient(145deg, #0ec6c6 0%, #6ee7e7 40%, #b39ddb 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── SITE HEADER ─────────────────────────────────────────── */
.site-header {
  text-align: center;
  padding: 44px 20px 12px;
  color: white;
}

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logo-icon {
  font-size: 2.6rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

/* ── JL BADGE LOGO ───────────────────────────────────────── */
.jl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--yellow), #f59e0b);
  border-radius: 12px;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 900;
  color: #1a1a2e;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.35);
  flex-shrink: 0;
  user-select: none;
}

/* Nav bar'daki (küçük) JL badge */
.nav-logo .jl-badge {
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.logo-text {
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.logo-text strong {
  color: var(--yellow);
  font-weight: 900;
}

.logo-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  margin-top: 6px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
}

/* ── AUTH CONTAINER ──────────────────────────────────────── */
.auth-container {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(14,198,198,0.25), 0 2px 8px rgba(179,157,219,0.15);
  width: 100%;
  max-width: 430px;
  margin: 24px 16px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.8);
}

.auth-tabs {
  display: flex;
  background: var(--turquoise-l);
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 15px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  border: none;
  background: transparent;
  color: var(--text-s);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-bottom: 3px solid transparent;
}

.tab-btn.active {
  color: var(--turquoise-d);
  background: white;
  border-bottom-color: var(--turquoise);
}

.tab-btn:hover:not(.active) {
  background: rgba(14,198,198,0.08);
  color: var(--turquoise-d);
}

.auth-panel {
  display: none;
  padding: 30px 28px;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.auth-panel.active { display: flex; }

.auth-icon {
  font-size: 3.4rem;
  filter: drop-shadow(0 4px 8px rgba(14,198,198,0.2));
}

.auth-panel h2 {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--text);
}

.auth-desc {
  color: var(--text-s);
  font-size: 0.9rem;
  text-align: center;
  font-weight: 600;
}

.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-s);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label i { color: var(--turquoise); }

.form-group input {
  width: 100%;
  padding: 13px 16px;
  border: 2.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  outline: none;
  background: var(--turquoise-l);
  color: var(--text);
}

.form-group input:focus {
  border-color: var(--turquoise);
  background: white;
  box-shadow: 0 0 0 4px rgba(14,198,198,0.12);
}

.form-group input::placeholder { color: #aabfbf; font-weight: 600; }

.form-error {
  color: var(--red-d);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  background: #fff0f0;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  border: 1.5px solid #fca5a5;
  width: 100%;
}

.form-success {
  color: var(--green-d);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  background: #f0fff5;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--green);
  width: 100%;
}

/* ── LEADERBOARD PREVIEW (AUTH) ───────────────────────────── */
.leaderboard-preview {
  background: rgba(255,255,255,0.20);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 20px 24px;
  width: 100%;
  max-width: 430px;
  margin: 0 16px 28px;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.35);
}

.leaderboard-preview h3 {
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.leaderboard-list { display: flex; flex-direction: column; gap: 7px; }

.lb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.2);
}

.lb-medal { font-size: 1.2rem; }
.lb-name  { flex: 1; font-weight: 800; }
.lb-pts   { font-weight: 900; color: var(--yellow); font-size: 0.95rem; }

.loading-text { color: rgba(255,255,255,0.75); font-size: 0.88rem; font-weight: 600; }
.no-data      { color: rgba(255,255,255,0.65); font-size: 0.88rem; font-weight: 600; }

/* ── SITE FOOTER ─────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 18px;
  color: rgba(255,255,255,0.65);
  font-size: 0.8rem;
  font-weight: 600;
  position: relative;
}

/* Gizli admin linki */
.admin-secret-link {
  position: absolute;
  bottom: 14px;
  right: 18px;
  color: rgba(255,255,255,0.25);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.3s;
  padding: 4px 8px;
  border-radius: 6px;
}
.admin-secret-link:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.12);
}

/* ── ÖĞRENCİ MESAJ KUTUSU ────────────────────────────────── */
.messages-section {
  margin-bottom: 28px;
}

.msg-badge {
  background: var(--red);
  color: white;
  font-size: 0.72rem;
  font-weight: 900;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  animation: bounceIn 0.5s ease;
  padding: 0 5px;
}

.student-messages-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.student-msg-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 2px solid var(--lavender-l);
  transition: transform 0.2s;
  position: relative;
}
.student-msg-item:hover { transform: translateY(-2px); }

.unread-msg {
  border-color: var(--lavender-d);
  background: linear-gradient(135deg, var(--lavender-l), white);
}

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

.student-msg-from {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--lavender-d);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--lavender-l);
  padding: 4px 12px;
  border-radius: 20px;
}

.student-msg-date {
  font-size: 0.75rem;
  color: var(--text-s);
  font-weight: 600;
}

.student-msg-body {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.6;
}

.new-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, var(--lavender), var(--lavender-d));
  color: white;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  animation: bounceIn 0.4s ease;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--turquoise) 0%, var(--turquoise-d) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 5px 16px rgba(14,198,198,0.38);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(14,198,198,0.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.small  { width: auto; padding: 9px 18px; font-size: 0.85rem; }

.btn-secondary {
  padding: 12px 26px;
  background: white;
  color: var(--turquoise-d);
  border: 2.5px solid var(--turquoise);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover {
  background: var(--turquoise-l);
  transform: translateY(-2px);
}

.btn-home {
  padding: 12px 26px;
  background: linear-gradient(135deg, var(--lavender) 0%, var(--lavender-d) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(179,157,219,0.35);
}
.btn-home:hover { transform: translateY(-2px); filter: brightness(1.08); }

.btn-logout {
  padding: 8px 15px;
  background: rgba(255,255,255,0.18);
  color: white;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 30px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}
.btn-logout:hover { background: rgba(255,255,255,0.30); }

/* ============================================================
   TOP NAV
   ============================================================ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--turquoise) 0%, var(--turquoise-d) 100%);
  padding: 13px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 18px rgba(14,198,198,0.3);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 1.1rem;
  font-weight: 900;
  text-decoration: none;
}

.nav-logo .logo-text strong { color: var(--yellow); }

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.22);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s;
}
.back-btn:hover { background: rgba(255,255,255,0.38); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-name {
  color: rgba(255,255,255,0.92);
  font-weight: 800;
  font-size: 0.92rem;
}

.nav-points {
  background: var(--yellow);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(255,217,61,0.4);
}

.nav-points i { color: var(--orange); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-page { background: var(--bg); }

.dashboard-main {
  max-width: 1020px;
  margin: 0 auto;
  padding: 26px 18px 48px;
}

/* ── HERO BANNER ─────────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, var(--turquoise) 0%, #38d9d9 50%, var(--lavender) 100%);
  border-radius: var(--radius);
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  margin-bottom: 26px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '⭐';
  position: absolute;
  font-size: 8rem;
  opacity: 0.06;
  right: 160px;
  top: -20px;
  pointer-events: none;
}

.hero-text h1 {
  font-size: 1.9rem;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.hero-text p  {
  color: rgba(255,255,255,0.85);
  margin-top: 5px;
  font-weight: 600;
}

.hero-points {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.points-circle {
  width: 96px;
  height: 96px;
  background: rgba(255,255,255,0.22);
  border: 3px solid rgba(255,255,255,0.55);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.points-number {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}
.points-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.82);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.level-badge {
  background: var(--yellow);
  color: #5a4000;
  padding: 6px 16px;
  border-radius: 30px;
  font-weight: 900;
  font-size: 0.82rem;
  box-shadow: 0 3px 10px rgba(255,217,61,0.45);
}

/* ── STATS ROW ───────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 2px solid transparent;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--turquoise-l);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

/* Kart renkleri – turkuaz-sarı-mor teması */
.grammar-color { background: linear-gradient(135deg, var(--turquoise), var(--turquoise-d)); }
.vocab-color   { background: linear-gradient(135deg, var(--lavender),   var(--lavender-d)); }
.dialog-color  { background: linear-gradient(135deg, var(--yellow),     var(--yellow-d));   color: #5a4000 !important; }
.done-color    { background: linear-gradient(135deg, #f48fb1, #e91e8c); }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.45rem; font-weight: 900; color: var(--text); }
.stat-label { font-size: 0.72rem; color: var(--text-s); font-weight: 700; }

/* ── SECTION TITLE ───────────────────────────────────────── */
.section-title {
  font-size: 1.22rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-title i { color: var(--turquoise-d); }

/* ── MODULES ─────────────────────────────────────────────── */
.modules-section { margin-bottom: 34px; }

.modules-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.module-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border-left: 6px solid transparent;
  position: relative;
  overflow: hidden;
}

.module-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 70%, rgba(14,198,198,0.04));
  pointer-events: none;
}

.module-card:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-lg);
}

.grammar-card  { border-left-color: var(--turquoise); }
.vocab-card    { border-left-color: var(--lavender-d); }
.dialog-card   { border-left-color: var(--yellow-d); }

.grammar-card:hover  { background: linear-gradient(90deg, var(--turquoise-l), white); }
.vocab-card:hover    { background: linear-gradient(90deg, var(--lavender-l), white); }
.dialog-card:hover   { background: linear-gradient(90deg, var(--yellow-l), white); }

.module-emoji { font-size: 2.6rem; flex-shrink: 0; }

.module-info { flex: 1; }
.module-info h3 {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--text);
}
.module-info p {
  font-size: 0.85rem;
  color: var(--text-s);
  margin: 4px 0 10px;
  font-weight: 600;
}

.module-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: capitalize;
}

.grammar-card  .tag { background: var(--turquoise-l); color: var(--turquoise-d); border: 1.5px solid #b2f0f0; }
.vocab-card    .tag { background: var(--lavender-l);  color: var(--lavender-d);  border: 1.5px solid #d8caff; }
.dialog-card   .tag { background: var(--yellow-l);    color: #a07800;            border: 1.5px solid #ffe599; }

.module-arrow { color: var(--turquoise); font-size: 1.15rem; }

/* ── LEADERBOARD (DASHBOARD) ─────────────────────────────── */
.leaderboard-section { margin-bottom: 20px; }
.leaderboard-table-wrap { overflow-x: auto; border-radius: var(--radius); }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
}

.lb-table thead th {
  background: linear-gradient(135deg, var(--turquoise), var(--turquoise-d));
  color: white;
  padding: 13px 16px;
  text-align: left;
  font-weight: 900;
  white-space: nowrap;
}

.lb-table tbody tr {
  border-bottom: 1.5px solid var(--border);
  transition: background 0.2s;
}
.lb-table tbody tr:hover   { background: var(--turquoise-l); }
.lb-table tbody td         { padding: 12px 16px; }

.my-row { background: var(--yellow-l) !important; font-weight: 800; }

.lb-name-cell { display: flex; align-items: center; gap: 7px; }

.you-tag {
  background: var(--turquoise);
  color: white;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 900;
}

/* ============================================================
   EXERCISE PAGE
   ============================================================ */
.exercise-page { background: var(--bg); }

.exercise-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 26px 18px 52px;
}

/* ── TOPIC SELECTOR ──────────────────────────────────────── */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.topic-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border-top: 5px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topic-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Konu kartı renkleri */
.blue-card   { border-top-color: var(--turquoise);  background: linear-gradient(160deg, var(--turquoise-l), white); }
.yellow-card { border-top-color: var(--yellow-d);   background: linear-gradient(160deg, var(--yellow-l),    white); }
.purple-card { border-top-color: var(--lavender-d); background: linear-gradient(160deg, var(--lavender-l),  white); }
.green-card  { border-top-color: var(--green-d);    background: linear-gradient(160deg, #e8fff4,            white); }
.red-card    { border-top-color: var(--red);        background: linear-gradient(160deg, #fff0f0,            white); }
.orange-card { border-top-color: var(--orange);     background: linear-gradient(160deg, #fff4e6,            white); }
.teal-card   { border-top-color: var(--turquoise-d);background: linear-gradient(160deg, var(--turquoise-l), white); }
.pink-card   { border-top-color: var(--pink);       background: linear-gradient(160deg, #fff0f6,            white); }

.topic-emoji { font-size: 2.4rem; }
.topic-card h3 { font-size: 1rem; font-weight: 900; color: var(--text); text-transform: capitalize; }
.topic-card p  { font-size: 0.82rem; color: var(--text-s); font-weight: 600; }

.topic-meta { display: flex; gap: 8px; margin-top: 4px; }
.topic-meta span {
  font-size: 0.76rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 8px;
}

.blue-card   .topic-meta span { background: var(--turquoise-l); color: var(--turquoise-d); }
.yellow-card .topic-meta span { background: var(--yellow-l);    color: #a07800; }
.purple-card .topic-meta span { background: var(--lavender-l);  color: var(--lavender-d); }
.green-card  .topic-meta span { background: #e8fff4;            color: var(--green-d); }
.red-card    .topic-meta span { background: #fff0f0;            color: var(--red-d); }
.orange-card .topic-meta span { background: #fff4e6;            color: #c05600; }
.teal-card   .topic-meta span { background: var(--turquoise-l); color: var(--turquoise-d); }
.pink-card   .topic-meta span { background: #fff0f6;            color: #c2185b; }

/* ── EXERCISE AREA ───────────────────────────────────────── */
.exercise-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.btn-back-topic {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 30px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-s);
}
.btn-back-topic:hover {
  border-color: var(--turquoise);
  color: var(--turquoise-d);
  background: var(--turquoise-l);
}

.exercise-progress {
  font-size: 0.96rem;
  font-weight: 900;
  color: var(--text-s);
  background: var(--card);
  padding: 7px 16px;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.exercise-score-live {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-d));
  color: #5a4000;
  padding: 7px 16px;
  border-radius: 30px;
  font-weight: 900;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-y);
}

/* ── PROGRESS BAR ────────────────────────────────────────── */
.progress-bar-wrap {
  height: 12px;
  background: var(--turquoise-l);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
  border: 1.5px solid var(--border);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--turquoise), var(--lavender));
  border-radius: 12px;
  transition: width 0.5s ease;
  position: relative;
}

/* ── QUESTION CARD ───────────────────────────────────────── */
.question-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  min-height: 230px;
  border: 2px solid var(--turquoise-l);
}

.question-type-badge {
  display: inline-block;
  background: var(--turquoise-l);
  color: var(--turquoise-d);
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 16px;
  border: 1.5px solid var(--border);
}

.question-text {
  font-size: 1.28rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 22px;
  line-height: 1.5;
}

.vocab-question-emoji {
  font-size: 3.8rem;
  text-align: center;
  margin-bottom: 10px;
}

/* ── OPTIONS ─────────────────────────────────────────────── */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.option-btn {
  padding: 15px 18px;
  background: var(--bg);
  border: 2.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
  color: var(--text);
}

.option-btn:hover:not(:disabled) {
  border-color: var(--turquoise);
  background: var(--turquoise-l);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14,198,198,0.18);
}

.option-btn.correct {
  background: #dcfce7;
  border-color: var(--green-d);
  color: var(--green-d);
  font-weight: 900;
}

.option-btn.wrong {
  background: #fee2e2;
  border-color: var(--red-d);
  color: var(--red-d);
  font-weight: 900;
}

.option-btn:disabled { cursor: default; }

/* ── FILL IN THE BLANK ───────────────────────────────────── */
.fill-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-direction: column;
}

.fill-input {
  width: 100%;
  padding: 14px 18px;
  border: 2.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.3s;
  outline: none;
  background: var(--turquoise-l);
  color: var(--text);
}
.fill-input:focus {
  border-color: var(--turquoise);
  background: white;
  box-shadow: 0 0 0 4px rgba(14,198,198,0.12);
}
.fill-input:disabled { background: #f0f0f0; }

.btn-check {
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--turquoise), var(--turquoise-d));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(14,198,198,0.3);
}
.btn-check:hover { filter: brightness(1.08); transform: translateY(-2px); }

.fill-hint {
  color: var(--red-d);
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 4px;
  background: #fff0f0;
  padding: 5px 10px;
  border-radius: 8px;
}

/* ── QUESTION TYPE BADGE COLOURS ─────────────────────────── */
.badge-en-tr   { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.badge-tr-en   { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.badge-emoji   { background: #fce7f3; color: #9d174d; border-color: #fbcfe8; }
.badge-sentence{ background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.badge-scramble{ background: #dcfce7; color: #14532d; border-color: #bbf7d0; }

/* ── WORD PUZZLE ─────────────────────────────────────────── */
.puzzle-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.puzzle-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  min-height: 56px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.puzzle-divider {
  text-align: center;
  color: var(--text-s);
  font-size: 0.85rem;
  opacity: 0.6;
}

.puzzle-answer-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.puzzle-answer {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  min-height: 56px;
  background: linear-gradient(135deg, #f0fff4, #dcfce7);
  border: 2.5px solid var(--green-d);
  border-radius: var(--radius-sm);
  padding: 12px;
  transition: all 0.3s;
}

.puzzle-placeholder {
  color: var(--text-s);
  font-size: 0.85rem;
  font-weight: 700;
  align-self: center;
  opacity: 0.7;
}

.puzzle-tile {
  width: 44px;
  height: 44px;
  background: white;
  border: 2.5px solid var(--turquoise-d);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--turquoise-d);
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(14,198,198,0.15);
}

.puzzle-tile:hover:not(:disabled) {
  background: var(--turquoise-l);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(14,198,198,0.25);
}

.puzzle-tile.selected {
  background: linear-gradient(135deg, var(--turquoise), var(--turquoise-d));
  color: white;
  border-color: var(--turquoise-d);
}

.puzzle-tile.selected:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-3px) scale(1.08);
}

.puzzle-tile.correct {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: #15803d;
  color: white;
}

.puzzle-tile.wrong {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #b91c1c;
  color: white;
}

.puzzle-tile:disabled { cursor: default; transform: none !important; }

.btn-puzzle-clear {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fee2e2;
  border: 2px solid var(--red);
  color: var(--red-d);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-puzzle-clear:hover { background: var(--red); color: white; transform: scale(1.1); }

.puzzle-check-btn {
  align-self: center;
  margin-top: 4px;
}

/* show puzzle-check when JS sets display:inline-flex */

/* ── FEEDBACK BOX ────────────────────────────────────────── */
.feedback-box {
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.correct-feedback {
  background: linear-gradient(135deg, #dcfce7, #f0fff4);
  border: 2px solid var(--green-d);
}
.wrong-feedback {
  background: linear-gradient(135deg, #fee2e2, #fff5f5);
  border: 2px solid var(--red);
}

.feedback-icon { font-size: 1.9rem; flex-shrink: 0; }

.feedback-text { font-weight: 900; font-size: 1rem; flex: 1; }
.correct-feedback .feedback-text { color: var(--green-d); }
.wrong-feedback   .feedback-text { color: var(--red-d); }

.feedback-explanation {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-s);
  font-weight: 700;
  line-height: 1.6;
  padding-top: 8px;
  border-top: 1.5px solid rgba(0,0,0,0.07);
  margin-top: 4px;
}

.btn-next {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--turquoise), var(--turquoise-d));
  color: white;
  border: none;
  border-radius: 30px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.3s;
  margin-left: auto;
  box-shadow: 0 4px 12px rgba(14,198,198,0.3);
}
.btn-next:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

/* ── RESULT SCREEN ───────────────────────────────────────── */
.result-screen {
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 52px 34px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--turquoise-l);
}

.result-emoji { font-size: 5.5rem; margin-bottom: 14px; }
.result-screen h2 {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}
.result-screen p {
  color: var(--text-s);
  font-size: 1rem;
  margin-bottom: 26px;
  font-weight: 600;
}

.result-score-big {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--turquoise-d);
  margin-bottom: 30px;
  line-height: 1;
}
.result-score-big small {
  font-size: 1rem;
  color: var(--text-s);
  font-weight: 700;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FLASHCARDS (VOCABULARY)
   ============================================================ */
.flashcard-hint {
  text-align: center;
  color: var(--text-s);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 18px;
  background: var(--turquoise-l);
  padding: 8px 16px;
  border-radius: 30px;
  display: inline-block;
  border: 1.5px solid var(--border);
}

.flashcard-wrap {
  perspective: 1000px;
  margin: 0 auto 22px;
  width: 100%;
  max-width: 380px;
  height: 230px;
}

.flashcard {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}

.flashcard.flipped { transform: rotateY(180deg); }

.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  padding: 26px;
}

.flashcard-front {
  background: linear-gradient(135deg, var(--turquoise) 0%, #38d9d9 100%);
  color: white;
}

.flashcard-back {
  background: linear-gradient(135deg, var(--lavender-d) 0%, var(--lavender) 100%);
  color: white;
  transform: rotateY(180deg);
}

.fc-emoji { font-size: 3.6rem; }
.fc-word  { font-size: 2.1rem; font-weight: 900; text-shadow: 0 2px 6px rgba(0,0,0,0.1); }

.fc-translation { font-size: 1.7rem; font-weight: 900; }
.fc-example     { font-size: 0.85rem; color: rgba(255,255,255,0.88); font-style: italic; text-align: center; margin-top: 4px; }
.fc-example-tr  { font-size: 0.82rem; color: rgba(255,255,255,0.70); font-style: italic; text-align: center; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 6px; margin-top: 2px; }

/* ── Dinle Butonu ───────────────────────────────── */
.fc-listen-btn {
  margin-top: 14px;
  padding: 8px 22px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fc-listen-btn:hover  { background: rgba(255,255,255,0.35); transform: scale(1.06); }
.fc-listen-btn:active { transform: scale(0.96); }

/* ── Otomatik Seslendir Etiketi ─────────────────── */
.fc-auto-speak {
  margin-top: 10px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: pulse-speak 2s ease-in-out infinite;
}
@keyframes pulse-speak {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

/* ── Ses Butonu (eski – artık kullanılmıyor, gizle) ─ */
.fc-speak-btn {
  display: none;
}
.fc-speak-btn.speaking {
  background: rgba(255,255,255,0.45);
  animation: pulse-speak 0.6s ease-in-out infinite alternate;
}
@keyframes pulse-speak {
  from { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  to   { transform: scale(1.07); box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

.flashcard-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 18px;
}

.btn-fc-nav {
  padding: 10px 22px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 30px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.3s;
  color: var(--text);
}
.btn-fc-nav:hover {
  border-color: var(--turquoise);
  color: var(--turquoise-d);
  background: var(--turquoise-l);
  transform: translateY(-2px);
}

.fc-counter {
  font-weight: 900;
  color: var(--text-s);
  background: var(--card);
  padding: 7px 16px;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

/* ── GRAMMAR EXAMPLE CARD ────────────────────────────────── */
.grammar-example-card {
  background: linear-gradient(135deg, #1a1a4e 0%, #2d2d80 100%);
  border-radius: var(--radius);
  padding: 36px 30px 28px;
  box-shadow: 0 8px 32px rgba(30,30,100,0.22);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 200px;
  justify-content: center;
  position: relative;
  border: 2px solid rgba(255,255,255,0.1);
}

.gec-note {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--yellow);
  background: rgba(255, 210, 0, 0.15);
  border: 1.5px solid rgba(255, 210, 0, 0.35);
  border-radius: 20px;
  padding: 4px 14px;
  letter-spacing: 0.5px;
  text-align: center;
}

.gec-sentence {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  text-align: center;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.gec-translation {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-align: center;
  font-style: italic;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 12px;
  width: 100%;
  text-align: center;
}

.gec-listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 26px;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 30px;
  color: #fff;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.22s;
}
.gec-listen-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}
.gec-listen-btn:active { transform: scale(0.96); }
.gec-listen-btn.speaking {
  background: rgba(255,255,255,0.3);
  animation: gecPulse 0.7s ease-in-out infinite alternate;
}
@keyframes gecPulse {
  from { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  to   { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}

/* ============================================================
   DIALOG PAGE
   ============================================================ */
.dialog-script-wrap {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  max-height: 350px;
  overflow-y: auto;
  border: 2px solid var(--turquoise-l);
}

.dialog-script { display: flex; flex-direction: column; gap: 12px; }

.dialog-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
}
.dialog-line:hover          { border-color: var(--turquoise); background: var(--turquoise-l); }
.dialog-line.selected-line  { border-color: var(--turquoise); background: var(--turquoise-l); }
.dialog-line.highlight-line { background: var(--lavender-l); border-color: var(--lavender); }

.dialog-speaker {
  font-weight: 900;
  font-size: 0.82rem;
  color: var(--turquoise-d);
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--turquoise-l);
  padding: 2px 8px;
  border-radius: 6px;
}

.dialog-text {
  font-size: 0.9rem;
  color: var(--text);
  font-style: italic;
  flex: 1;
  line-height: 1.6;
  font-weight: 600;
}

.btn-listen {
  flex-shrink: 0;
  background: linear-gradient(135deg, #0ec6c6 0%, #7c6fe0 100%);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 1rem;
  padding: 0;
  box-shadow: 0 3px 10px rgba(14,198,198,0.38);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  position: relative;
  overflow: hidden;
}
.btn-listen::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  opacity: 0;
  transition: opacity 0.18s;
}
.btn-listen:hover {
  transform: scale(1.18);
  box-shadow: 0 6px 18px rgba(14,198,198,0.55);
  background: linear-gradient(135deg, #0ba8a8 0%, #5c4fc0 100%);
}
.btn-listen:hover::before { opacity: 1; }
.btn-listen:active { transform: scale(0.93); }
.btn-listen.speaking {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  animation: listenPulse 0.9s ease-in-out infinite;
}
@keyframes listenPulse {
  0%, 100% { box-shadow: 0 3px 10px rgba(245,158,11,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(245,158,11,0.15), 0 3px 18px rgba(245,158,11,0.5); }
}

/* ── VOCAB FLASHCARD LISTEN BUTTON ───────────────────────── */
.fc-listen-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.fc-listen-big {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  background: var(--card);
  border: 2px solid var(--turquoise);
  border-radius: 30px;
  color: var(--turquoise-d);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.22s;
  box-shadow: 0 3px 10px rgba(14,198,198,0.15);
}
.fc-listen-big i { font-size: 1.1rem; }
.fc-listen-big:hover {
  background: var(--turquoise-l);
  border-color: var(--turquoise-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(14,198,198,0.25);
}
.fc-listen-big:active { transform: scale(0.96); }
.fc-listen-big.speaking {
  background: linear-gradient(135deg, var(--turquoise-l), #b2f0f0);
  border-color: var(--turquoise-d);
  animation: listenPulse 0.7s ease-in-out infinite alternate;
}
@keyframes listenPulse {
  from { box-shadow: 0 0 0 0 rgba(14,198,198,0.35); }
  to   { box-shadow: 0 0 0 10px rgba(14,198,198,0); }
}

/* ── RECORDING SECTION ───────────────────────────────────── */
.recording-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 2px solid var(--lavender-l);
}

.recording-section h4 {
  font-size: 1.02rem;
  font-weight: 900;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.recording-section h4 i { color: var(--lavender-d); }

.record-hint {
  font-size: 0.85rem;
  color: var(--text-s);
  margin-bottom: 14px;
  font-style: italic;
  font-weight: 600;
}

.select-line-label {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--text-s);
  margin-bottom: 8px;
}

.record-line-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.line-select-btn {
  padding: 7px 13px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
  color: var(--text-s);
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.line-select-btn.active {
  border-color: var(--turquoise);
  color: var(--turquoise-d);
  background: var(--turquoise-l);
  font-weight: 900;
}
.line-select-btn:hover:not(.active) {
  border-color: var(--lavender);
  background: var(--lavender-l);
  color: var(--lavender-d);
}

.recorder-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.btn-record {
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--lavender), var(--lavender-d));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(149,117,205,0.35);
}
.btn-record:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-record.recording-active {
  background: linear-gradient(135deg, var(--red), var(--red-d));
  animation: pulse-btn 1s infinite;
  box-shadow: 0 4px 14px rgba(255,107,107,0.45);
}

@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 4px 14px rgba(255,107,107,0.35); }
  50%       { box-shadow: 0 4px 26px rgba(255,107,107,0.75); }
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red-d);
  font-weight: 800;
  font-size: 0.85rem;
}

.rec-dot {
  width: 12px;
  height: 12px;
  background: var(--red);
  border-radius: 50%;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── RECORDED AUDIOS ─────────────────────────────────────── */
.recorded-audios {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.audio-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}
.audio-item:hover { border-color: var(--turquoise); }

.audio-item-info { flex: 1; min-width: 0; }
.audio-speaker   { font-size: 0.75rem; font-weight: 900; color: var(--turquoise-d); display: block; }
.audio-text      { font-size: 0.78rem; color: var(--text-s); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }

.audio-player { height: 34px; flex: 2; min-width: 160px; accent-color: var(--turquoise); }

.btn-delete-audio {
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}
.btn-delete-audio:hover { color: var(--red-d); }

/* ── DIALOG CONTEXT ──────────────────────────────────────── */
.dialog-context {
  background: var(--yellow-l);
  border-left: 5px solid var(--yellow-d);
  padding: 9px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 0.82rem;
  color: #7a5800;
  font-weight: 700;
  margin-bottom: 14px;
  font-style: italic;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-msg {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(70px);
  background: linear-gradient(135deg, var(--turquoise), var(--lavender-d));
  color: white;
  padding: 13px 28px;
  border-radius: 40px;
  font-weight: 900;
  font-size: 0.92rem;
  box-shadow: 0 6px 24px rgba(14,198,198,0.45);
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
}
.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   DASHBOARD FOOTER
   ============================================================ */
.dashboard-page .site-footer {
  text-align: center;
  padding: 22px;
  color: var(--text-s);
  font-size: 0.8rem;
  font-weight: 700;
  border-top: 2px solid var(--border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero-banner { flex-direction: column; text-align: center; gap: 22px; padding: 24px 20px; }
  .hero-text h1 { font-size: 1.5rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .options-grid { grid-template-columns: 1fr; }
  .result-actions { flex-direction: column; align-items: stretch; }
  .result-actions button { width: 100%; justify-content: center; }
  .top-nav { padding: 11px 16px; }
  .nav-name { display: none; }
  .flashcard-wrap { height: 200px; }
  .fc-word { font-size: 1.7rem; }
  .lb-table { font-size: 0.8rem; }
  .lb-table thead th, .lb-table tbody td { padding: 9px 11px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 1.15rem; }
  .topic-grid { grid-template-columns: 1fr; }
  .module-card { padding: 16px 18px; }
  .module-emoji { font-size: 2rem; }
  .question-card { padding: 20px; }
  .question-text { font-size: 1.08rem; }
  .recording-section { padding: 16px; }
  .auth-container { margin: 14px 12px; }
  .auth-panel { padding: 22px 18px; }
  .hero-banner::before { display: none; }
}

/* ============================================================
   FLOATING BUBBLES (Auth Page Dekorasyon)
   ============================================================ */
.bubble {
  position: fixed;
  border-radius: 50%;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: floatUp linear infinite;
}

.b1 {
  width: 120px; height: 120px;
  background: var(--yellow);
  bottom: -140px; left: 8%;
  animation-duration: 9s;
  animation-delay: 0s;
}
.b2 {
  width: 80px; height: 80px;
  background: white;
  bottom: -100px; left: 55%;
  animation-duration: 12s;
  animation-delay: 2s;
}
.b3 {
  width: 60px; height: 60px;
  background: var(--lavender);
  bottom: -80px; left: 30%;
  animation-duration: 10s;
  animation-delay: 4s;
}
.b4 {
  width: 100px; height: 100px;
  background: var(--turquoise-l);
  bottom: -120px; right: 10%;
  animation-duration: 14s;
  animation-delay: 1s;
}

@keyframes floatUp {
  0%   { transform: translateY(0) scale(1);   opacity: 0.18; }
  50%  { opacity: 0.12; }
  100% { transform: translateY(-110vh) scale(1.2); opacity: 0; }
}

/* ============================================================
   EXTRA POLISH
   ============================================================ */

/* Kart giriş animasyonu */
.auth-container {
  animation: slideUp 0.5s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Module kartlarına hover rengi */
.grammar-card .module-arrow { color: var(--turquoise-d); }
.vocab-card   .module-arrow { color: var(--lavender-d); }
.dialog-card  .module-arrow { color: var(--yellow-d); }

/* Topic kart hover efekti */
.topic-card:hover .topic-emoji {
  transform: scale(1.15) rotate(-5deg);
  display: inline-block;
  transition: transform 0.3s;
}

/* Sonuç ekranı animasyonu */
.result-screen {
  animation: popIn 0.4s cubic-bezier(0.4,0,0.2,1);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Spinner yükleme */
.fa-spin {
  animation: fa-spin 1s linear infinite;
}
@keyframes fa-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Puan circle nabız efekti */
.points-circle {
  animation: pulseCircle 3s ease-in-out infinite;
}
@keyframes pulseCircle {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
  50%       { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}

/* Level badge zıplama */
.level-badge {
  animation: bounceIn 0.6s cubic-bezier(0.4,0,0.2,1);
}
@keyframes bounceIn {
  0%   { transform: scale(0.7); opacity: 0; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1);   opacity: 1; }
}

/* Doğru cevap kutucuk animasyonu */
.option-btn.correct {
  animation: correctFlash 0.4s ease;
}
@keyframes correctFlash {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Header logo zıplama */
.site-header .jl-badge {
  display: inline-flex;
  animation: logoBounce 2.5s ease-in-out infinite;
}
.site-header .logo-icon {
  display: inline-block;
  animation: logoBounce 2.5s ease-in-out infinite;
}
@keyframes logoBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* Flashcard ipucu metni pulse */
.flashcard-hint {
  animation: hintPulse 3s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* Ses kaydı butonu aktif titreşim */
.btn-record.recording-active {
  animation: pulse-btn 0.9s ease-in-out infinite, recShake 0.5s ease-in-out;
}
@keyframes recShake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}

/* Tüm butonlar için ortak focus stili */
button:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 3px;
}

/* Auth page input focus ışıma efekti */
.form-group input:focus {
  animation: inputGlow 0.3s ease forwards;
}
@keyframes inputGlow {
  from { box-shadow: 0 0 0 0 rgba(14,198,198,0); }
  to   { box-shadow: 0 0 0 4px rgba(14,198,198,0.15); }
}

/* Stat kartları sıralı giriş animasyonu */
.stat-card:nth-child(1) { animation: fadeSlide 0.4s 0.1s both; }
.stat-card:nth-child(2) { animation: fadeSlide 0.4s 0.2s both; }
.stat-card:nth-child(3) { animation: fadeSlide 0.4s 0.3s both; }
.stat-card:nth-child(4) { animation: fadeSlide 0.4s 0.4s both; }

.module-card:nth-child(1) { animation: fadeSlide 0.4s 0.2s both; }
.module-card:nth-child(2) { animation: fadeSlide 0.4s 0.35s both; }
.module-card:nth-child(3) { animation: fadeSlide 0.4s 0.5s both; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 4th module card animation */
.module-card:nth-child(4) { animation: fadeSlide 0.4s 0.65s both; }

/* ============================================================
   SPEAKING MODULE
   ============================================================ */

/* Speaking module card on dashboard */
.speaking-card { border-top: 5px solid #f43f5e; }
.speaking-card:hover { border-top-color: #e11d48; }
.speaking-card .module-arrow { color: #f43f5e; }

/* Section subtitle */
.section-sub {
  text-align: center;
  color: var(--text-s);
  font-size: 0.92rem;
  font-weight: 700;
  margin: -14px 0 18px;
}

/* Progress label next to header title */
.sp-progress-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--turquoise-d);
}

/* Instructions box */
.sp-instructions {
  background: linear-gradient(135deg, #f8faff 0%, #f0fdf4 100%);
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-inst-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.sp-inst-row strong { font-weight: 900; }
.sp-inst-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
  color: white;
}
.sp-inst-blue  { background: linear-gradient(135deg, var(--turquoise), #06b6d4); }
.sp-inst-red   { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.sp-inst-green { background: linear-gradient(135deg, #22c55e, #16a34a); }

/* Step number badge inside sentence card */
.sp-step-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--turquoise), var(--lavender-d));
  color: white;
  font-size: 0.9rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(14,198,198,0.3);
}
.sp-card-done .sp-step-badge {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 3px 8px rgba(34,197,94,0.35);
}

/* Progress circle badge in header */
.sp-progress-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--turquoise), var(--lavender-d));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* Finish button in done banner */
.sp-finish-btn {
  padding: 12px 32px;
  font-size: 1rem;
  box-shadow: 0 6px 20px rgba(14,198,198,0.4);
}

/* Sentence cards list */
.sp-sentences {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

/* Individual sentence card */
.sp-sentence-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  padding: 16px 18px;
  transition: border-color 0.25s, box-shadow 0.25s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.sp-sentence-card:hover { border-color: var(--turquoise); box-shadow: 0 4px 14px rgba(14,198,198,0.12); }
.sp-sentence-card.sp-card-done {
  border-color: #22c55e;
  background: #f0fdf4;
}

.sp-sentence-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-sentence-texts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sp-sentence-en {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
}

.sp-sentence-tr {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-s);
  font-style: italic;
}

.sp-sentence-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  align-items: flex-end;
}

/* ── LISTEN BUTTON (speaking page) ─────────────────────────── */
.btn-listen-sp {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #e0f9f9 0%, #cce8ff 100%);
  border: 2px solid var(--turquoise);
  border-radius: 30px;
  padding: 7px 14px;
  color: var(--turquoise-d);
  font-size: 0.82rem;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(14,198,198,0.18);
}
.btn-listen-sp .sp-btn-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--turquoise), #06b6d4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.btn-listen-sp:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(14,198,198,0.32);
  background: linear-gradient(135deg, #ccf8f8 0%, #bfdbfe 100%);
}
.btn-listen-sp:hover .sp-btn-icon { transform: scale(1.15); }
.btn-listen-sp.sp-speaking .sp-btn-icon {
  animation: speakerPulse 0.7s ease-in-out infinite alternate;
}
@keyframes speakerPulse {
  from { box-shadow: 0 0 0 0 rgba(14,198,198,0.5); }
  to   { box-shadow: 0 0 0 7px rgba(14,198,198,0); }
}

/* ── RECORD BUTTON (speaking page) ─────────────────────────── */
.btn-record-sp {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #ff6b8a 0%, #f43f5e 60%, #e11d48 100%);
  border: none;
  border-radius: 30px;
  padding: 7px 14px;
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(244,63,94,0.42);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-record-sp .sp-btn-icon {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.btn-record-sp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244,63,94,0.58);
}
.btn-record-sp:hover .sp-btn-icon { transform: scale(1.15); }
.btn-record-sp:disabled {
  opacity: 0.32;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.btn-record-sp.recording-active {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  animation: recPulseBtn 0.85s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(239,68,68,0.6);
}
.btn-record-sp.recording-active .sp-btn-icon {
  background: rgba(255,255,255,0.3);
}
@keyframes recPulseBtn {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ── AUDIO ROW (after recording) ───────────────────────────── */
.sp-audio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8faff 0%, #f0fdf4 100%);
  border-radius: var(--radius-sm);
  border: 2px dashed #86efac;
}

.sp-audio-row-label {
  width: 100%;
  font-size: 0.75rem;
  font-weight: 800;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sp-audio-player {
  height: 38px;
  flex: 1;
  min-width: 160px;
  accent-color: var(--turquoise);
  border-radius: 30px;
}

/* ── RE-RECORD BUTTON ───────────────────────────────────────── */
.btn-re-record {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 30px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 900;
  color: #64748b;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-re-record .sp-btn-icon {
  width: 22px;
  height: 22px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #64748b;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.btn-re-record:hover {
  border-color: var(--turquoise);
  color: var(--turquoise-d);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(14,198,198,0.18);
}
.btn-re-record:hover .sp-btn-icon { background: var(--turquoise-l); color: var(--turquoise-d); }

/* ── APPROVE BUTTON ─────────────────────────────────────────── */
.btn-approve-sp {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
  border: none;
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 900;
  color: white;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  box-shadow: 0 4px 14px rgba(34,197,94,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-approve-sp .sp-btn-icon {
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.btn-approve-sp:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(34,197,94,0.55);
}
.btn-approve-sp:hover .sp-btn-icon { transform: scale(1.2); }

/* ── TICK / COMPLETED INDICATOR ────────────────────────────── */
.sp-tick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-radius: var(--radius-sm);
  border: 2px solid #86efac;
  color: #15803d;
  font-weight: 900;
  font-size: 0.9rem;
  animation: tickBounceIn 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.sp-tick-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(34,197,94,0.4);
}
.sp-tick-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sp-tick-text strong { font-size: 0.92rem; color: #15803d; }
.sp-tick-text small  { font-size: 0.75rem; color: #166534; font-weight: 700; }
@keyframes tickBounceIn {
  0%   { opacity: 0; transform: scale(0.6) translateY(6px); }
  70%  { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── GLOBAL RECORDING STATUS BAR ───────────────────────────── */
.sp-record-bar {
  position: sticky;
  bottom: 16px;
  background: linear-gradient(135deg, #1e1b4b 0%, #1f2937 60%, #111827 100%);
  color: white;
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.45);
  z-index: 100;
  margin-top: 16px;
  border: 1.5px solid rgba(244,63,94,0.35);
}

.sp-recording-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 0.88rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sp-rec-icon-wrap {
  width: 40px;
  height: 40px;
  background: rgba(244,63,94,0.2);
  border: 2px solid rgba(244,63,94,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  animation: recPulseBtn 1s ease-in-out infinite;
}

.sp-rec-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sp-rec-texts strong {
  font-size: 0.82rem;
  color: #fca5a5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sp-rec-texts span {
  font-size: 0.88rem;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-dot-big {
  width: 14px;
  height: 14px;
  background: #f43f5e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 0.8s step-end infinite;
}

/* ── STOP RECORDING BUTTON ──────────────────────────────────── */
.btn-stop-sp {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 30px;
  padding: 10px 20px;
  color: white;
  font-weight: 900;
  font-size: 0.88rem;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(244,63,94,0.5);
  white-space: nowrap;
}
.btn-stop-sp .sp-btn-icon {
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.btn-stop-sp:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(244,63,94,0.65);
}

/* ── ALL DONE BANNER ────────────────────────────────────────── */
.sp-done-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 30px 24px;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 50%, #6ee7b7 100%);
  border-radius: var(--radius);
  border: 3px solid #22c55e;
  margin-top: 24px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(34,197,94,0.25);
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

.sp-done-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #15803d;
}
.sp-done-emoji {
  font-size: 3.2rem;
  animation: logoBounce 1.5s ease-in-out infinite;
}
.sp-done-banner p {
  font-size: 1.1rem;
  font-weight: 900;
  color: #15803d;
  margin: 0;
}
.sp-done-banner small {
  font-size: 0.85rem;
  color: #166534;
  font-weight: 700;
}

/* ============================================================
   DIALOG MODULE – IMPROVEMENTS
   ============================================================ */

/* Dialog line layout upgrade with Turkish sub */
.dialog-line {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  margin-bottom: 10px;
  border: 2px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dialog-line:hover { border-color: var(--turquoise-l); }
.dialog-line.playing-line {
  border-color: var(--turquoise);
  background: linear-gradient(135deg, #e0f9f9 0%, #f0f0ff 100%);
  box-shadow: 0 0 0 3px rgba(14,198,198,0.15);
  animation: playingPulse 1s ease-in-out infinite;
}
@keyframes playingPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(14,198,198,0.12); }
  50%       { box-shadow: 0 0 0 6px rgba(14,198,198,0.25); }
}

.dialog-line-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dialog-line-texts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dialog-text {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.5;
}

.dialog-text-tr {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-s);
  font-style: italic;
}

/* ── WORD-BY-WORD HIGHLIGHT ──────────────────────────────── */
.dl-word {
  display: inline;
  border-radius: 5px;
  padding: 1px 2px;
  transition: background 0.12s, color 0.12s;
}
.dl-word.word-active {
  background: linear-gradient(135deg, #FFD93D, #ffb700);
  color: #1a1a1a;
  border-radius: 6px;
  padding: 1px 5px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(255,183,0,0.45);
  animation: wordPop 0.15s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes wordPop {
  0%   { transform: scale(0.88); }
  100% { transform: scale(1); }
}

/* ============================================================
   RESPONSIVE – SPEAKING
   ============================================================ */
@media (max-width: 600px) {
  .sp-sentence-body   { flex-wrap: wrap; }
  .sp-sentence-actions { width: 100%; justify-content: flex-end; }
  .sp-record-bar      { flex-direction: column; align-items: flex-start; }
}
