/* ══ AI LİSTENİNG QUIZ ══════════════════════════════════════════════════════ */

/* ── Sayfa kapsayıcı ─────────────────────────────────────────────────────── */
.ls-page {
    position: fixed !important; inset: 0 !important; left: 0 !important;
    display: flex !important; flex-direction: column !important;
    background: var(--bg) !important;
    z-index: var(--z-drawer-bg, 200) !important;
    overflow: hidden !important;
    padding: 0 !important; margin: 0 !important;
    width: 100% !important; max-width: none !important;
    border-radius: 0 !important; border: none !important; box-shadow: none !important;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.ls-page.hidden { display: none !important; }

@media (max-width: 699px) {
    .ls-page {
        top: 52px !important;
        bottom: 60px !important;
    }
}

/* ── Header (sabit, flex-shrink:0) ──────────────────────────────────────── */
.ls-header {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px 10px;
    background: var(--white);
    border-bottom: 1.5px solid var(--border);
    flex-shrink: 0;
    z-index: 2;
}
.ls-exit-btn {
    width: 36px; height: 36px; border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surface, var(--white));
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px; color: var(--ink2); flex-shrink: 0;
}
.ls-header-center { flex: 1; text-align: center; }
.ls-header-title { font-size: .78rem; font-weight: 800; color: var(--ink2); letter-spacing: .5px; text-transform: uppercase; }
.ls-progress-wrap { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.ls-progress-track { flex: 1; height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.ls-progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #7c3aed, #ec4899); transition: width .5s; }
.ls-progress-num { font-size: .72rem; color: var(--ink3); white-space: nowrap; }
.ls-xp-pill {
    display: flex; align-items: center; gap: 4px;
    padding: 5px 12px; border-radius: 20px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff; font-size: .75rem; font-weight: 800; white-space: nowrap;
}

/* ── INTRO (flex:1, scroll) ──────────────────────────────────────────────── */
.ls-intro {
    display: none;
    flex: 1 1 0; min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex-direction: column;
    padding: 16px 16px 24px;
    gap: 16px;
}

.ls-intro-stats {
    display: grid; grid-template-columns: repeat(4,1fr); gap: 8px;
}
.ls-intro-stat {
    background: var(--surface2, #f0f2f5);
    border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 8px; text-align: center;
}
.ls-intro-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--ink); }
.ls-intro-stat-lbl { font-size: .65rem; color: var(--ink3); margin-top: 2px; }

.ls-intro-bar-wrap { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.ls-intro-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg,#6366f1,#8b5cf6); border-radius: 3px; transition: width .6s; }

.ls-intro-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .ls-intro-settings { grid-template-columns: 1fr; } }

.ls-intro-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; }
.ls-intro-card-label { font-size: .68rem; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 8px; }
.ls-intro-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-intro-chip {
    padding: 6px 14px; border-radius: 20px; font-size: .75rem; font-weight: 700;
    border: 1.5px solid var(--border); background: var(--surface2, #f0f2f5);
    color: var(--ink2); cursor: pointer; font-family: inherit;
}
.ls-intro-chip.active { background: #6366f1; border-color: #6366f1; color: #fff; }

.ls-list-grid { display: flex; flex-direction: column; gap: 6px; }
.ls-list-chip {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; border-radius: 10px; font-size: .78rem; font-weight: 600;
    border: 1.5px solid var(--border); background: var(--surface2, #f0f2f5);
    color: var(--ink); cursor: pointer; font-family: inherit; text-align: left;
}
.ls-list-chip.active { background: rgba(99,102,241,.12); border-color: #6366f1; color: #6366f1; }
.ls-list-chip-cnt {
    font-size: .65rem; font-weight: 700;
    background: var(--border); color: var(--ink3);
    padding: 2px 8px; border-radius: 10px; flex-shrink: 0;
}

.ls-intro-start-btn {
    width: 100%; padding: 18px; border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none; color: #fff; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: 1.05rem; font-weight: 800; font-family: inherit;
    box-shadow: 0 8px 24px rgba(99,102,241,.35);
}
.ls-intro-start-sub { font-size: .75rem; opacity: .8; font-weight: 600; }

/* ── QUIZ: Mod bar (sabit, flex-shrink:0) ────────────────────────────────── */
.ls-modbar {
    display: flex; gap: 6px; padding: 8px 16px;
    background: var(--white); border-bottom: 1px solid var(--border);
    flex-shrink: 0; overflow-x: auto; scrollbar-width: none; z-index: 2;
}
.ls-modbar::-webkit-scrollbar { display: none; }
.ls-mod-btn {
    padding: 6px 14px; border-radius: 20px; font-size: .75rem; font-weight: 700;
    border: 1.5px solid var(--border); background: var(--bg); color: var(--ink2);
    cursor: pointer; white-space: nowrap; font-family: inherit; flex-shrink: 0;
}
.ls-mod-btn.active {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff; border-color: transparent;
}

/* ── QUIZ: Stat bar (sabit, flex-shrink:0) ───────────────────────────────── */
.ls-statbar {
    width: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr;
    align-items: center; gap: 0;
    flex-shrink: 0; z-index: 2;
}
.ls-stat-divider { background: var(--border); height: 28px; }
.ls-stat-item { text-align: center; padding: 0 8px; }
.ls-stat-val { font-size: 1.3rem; font-weight: 900; display: block; line-height: 1.1; }
.ls-stat-lbl { font-size: .62rem; color: var(--ink3); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; display: block; }

/* ── QUIZ: Body (flex:1, scroll) ─────────────────────────────────────────── */
.ls-body {
    flex: 1 1 0; min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 14px 16px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}

/* ── Ses kartı ───────────────────────────────────────────────────────────── */
.ls-audio-card {
    width: 100%; max-width: 600px;
    background: linear-gradient(135deg, #1e0a3c 0%, #2d1b69 50%, #1a1040 100%);
    border-radius: 20px; padding: 18px 20px 14px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.ls-wave-wrap { display: flex; align-items: center; gap: 3px; height: 36px; }
.ls-wave-bar {
    width: 3px; border-radius: 3px;
    background: rgba(255,255,255,.35);
    animation: lsWaveIdle 1.4s ease-in-out infinite alternate;
}
.ls-wave-bar:nth-child(1)  { height:10px; animation-delay:0s; }
.ls-wave-bar:nth-child(2)  { height:18px; animation-delay:.1s; }
.ls-wave-bar:nth-child(3)  { height:28px; animation-delay:.2s; }
.ls-wave-bar:nth-child(4)  { height:34px; animation-delay:.3s; }
.ls-wave-bar:nth-child(5)  { height:36px; animation-delay:.4s; }
.ls-wave-bar:nth-child(6)  { height:30px; animation-delay:.5s; }
.ls-wave-bar:nth-child(7)  { height:22px; animation-delay:.6s; }
.ls-wave-bar:nth-child(8)  { height:28px; animation-delay:.7s; }
.ls-wave-bar:nth-child(9)  { height:34px; animation-delay:.8s; }
.ls-wave-bar:nth-child(10) { height:26px; animation-delay:.7s; }
.ls-wave-bar:nth-child(11) { height:18px; animation-delay:.6s; }
.ls-wave-bar:nth-child(12) { height:26px; animation-delay:.5s; }
.ls-wave-bar:nth-child(13) { height:34px; animation-delay:.4s; }
.ls-wave-bar:nth-child(14) { height:24px; animation-delay:.3s; }
.ls-wave-bar:nth-child(15) { height:14px; animation-delay:.2s; }
.ls-wave-bar:nth-child(16) { height: 8px; animation-delay:.1s; }
@keyframes lsWaveIdle { from{transform:scaleY(.4);opacity:.3} to{transform:scaleY(1);opacity:.7} }
.ls-wave-wrap.playing .ls-wave-bar { background:#a78bfa; animation:lsWavePlaying .5s ease-in-out infinite alternate; }
@keyframes lsWavePlaying { from{transform:scaleY(.3);opacity:.6} to{transform:scaleY(1.1);opacity:1} }

.ls-play-btn {
    width: 64px; height: 64px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff; font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 0 8px rgba(124,58,237,.2), 0 4px 16px rgba(124,58,237,.4);
}
.ls-play-btn.playing { animation: lsPlayPulse 1s ease-in-out infinite; }
@keyframes lsPlayPulse { 0%,100%{box-shadow:0 0 0 8px rgba(167,139,250,.3),0 0 0 16px rgba(167,139,250,.1)} 50%{box-shadow:0 0 0 12px rgba(167,139,250,.4),0 0 0 22px rgba(167,139,250,.2)} }

.ls-play-info { text-align: center; }
.ls-play-label { font-size: .68rem; color: rgba(255,255,255,.5); text-transform: uppercase; }
.ls-play-hint  { font-size: .82rem; color: rgba(255,255,255,.85); font-weight: 600; margin-top: 2px; }
.ls-replay-btn {
    padding: 5px 14px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08); color: rgba(255,255,255,.7);
    font-size: .72rem; cursor: pointer; font-family: inherit;
}

/* ── Combo ───────────────────────────────────────────────────────────────── */
.ls-combo-wrap { width: 100%; max-width: 480px; display: flex; justify-content: center; }
.ls-combo {
    padding: 6px 16px; border-radius: 20px; font-size: .8rem; font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff; display: none;
    animation: lsComboIn .3s cubic-bezier(.34,1.56,.64,1);
}
.ls-combo.show { display: block; }
@keyframes lsComboIn { from{transform:scale(.7);opacity:0} to{transform:scale(1);opacity:1} }

/* ── Soru kartı ──────────────────────────────────────────────────────────── */
.ls-card {
    width: 100%; max-width: 600px;
    background: var(--white); border: 1.5px solid var(--border);
    border-radius: 18px; padding: 18px;
}
.ls-instruction {
    font-size: .68rem; font-weight: 800; letter-spacing: .8px;
    text-transform: uppercase; color: var(--ink3); margin-bottom: 14px;
    display: flex; align-items: center; gap: 6px;
}
.ls-instruction::before {
    content: ''; display: block; width: 3px; height: 14px;
    border-radius: 3px; background: linear-gradient(180deg, #7c3aed, #ec4899); flex-shrink: 0;
}
.ls-sentence-wrap {
    font-size: 1rem; line-height: 1.75; color: var(--ink);
    margin-bottom: 16px; padding: 12px 14px;
    background: var(--bg); border-radius: 10px; border-left: 3px solid #7c3aed;
}
.ls-blank { display: inline-block; min-width: 80px; height: 26px; border-bottom: 2.5px solid #7c3aed; vertical-align: bottom; margin: 0 2px; text-align: center; font-weight: 700; color: #7c3aed; }

.ls-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ls-opt {
    padding: 12px 10px; border-radius: 12px;
    border: 1.5px solid var(--border); background: var(--bg);
    color: var(--ink); font-size: .88rem; font-weight: 600;
    cursor: pointer; text-align: center; font-family: inherit;
}
.ls-opt.correct { background: #dcfce7 !important; border-color: #16a34a !important; color: #15803d !important; }
.ls-opt.wrong   { background: #fee2e2 !important; border-color: #dc2626 !important; color: #b91c1c !important; }
.ls-opt.reveal  { background: #ede9fe !important; border-color: #7c3aed !important; color: #5b21b6 !important; }

.ls-input-wrap { margin-top: 6px; }
.ls-input {
    width: 100%; padding: 14px 16px; border-radius: 12px;
    border: 1.5px solid var(--border); background: var(--bg);
    color: var(--ink); font-size: 1rem; font-family: inherit;
    text-align: center; box-sizing: border-box; outline: none;
}
.ls-input.correct { border-color: #16a34a; background: #dcfce7; color: #15803d; }
.ls-input.wrong   { border-color: #dc2626; background: #fee2e2; color: #b91c1c; }
.ls-submit-btn {
    width: 100%; margin-top: 8px; padding: 13px;
    border-radius: 12px; border: none;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff; font-size: .9rem; font-weight: 700;
    cursor: pointer; font-family: inherit;
}
.ls-submit-btn:disabled { opacity: .5; }

.ls-spell-boxes { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 14px; }
.ls-spell-box {
    width: 32px; height: 38px; border: 1.5px solid var(--border); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; font-weight: 700; background: var(--bg); color: var(--ink2);
}

.ls-feedback { font-size: .85rem; font-weight: 600; text-align: center; min-height: 24px; padding: 6px 0; margin-top: 4px; border-radius: 8px; }
.ls-feedback.ok  { color: #15803d; background: #f0fdf4; }
.ls-feedback.err { color: #b91c1c; background: #fff1f2; }

/* ── Seri gücü ───────────────────────────────────────────────────────────── */
.ls-speed-wrap {
    width: 100%; max-width: 600px;
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 12px;
    background: var(--bg); border: 1px solid var(--border);
    font-size: .75rem; color: var(--ink3);
}
.ls-speed-dots { display: flex; gap: 4px; margin-left: auto; }
.ls-speed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.ls-speed-dot.on { background: #7c3aed; }

/* ── Sonuç ekranı ────────────────────────────────────────────────────────── */
.ls-result-screen {
    display: flex; flex-direction: column;
    align-items: center; gap: 16px;
    padding: 28px 16px; text-align: center; width: 100%;
}
.ls-result-emoji { font-size: 72px; }
.ls-result-title { font-size: 1.5rem; font-weight: 900; color: var(--ink); }
.ls-result-score { font-size: 3rem; font-weight: 900; background: linear-gradient(135deg,#7c3aed,#ec4899); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.ls-result-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; width: 100%; max-width: 360px; }
.ls-result-stat { background: var(--bg); border-radius: 12px; padding: 12px 8px; text-align: center; border: 1px solid var(--border); }
.ls-result-stat-val { font-size: 1.3rem; font-weight: 800; color: var(--ink); display: block; }
.ls-result-stat-lbl { font-size: .68rem; color: var(--ink3); text-transform: uppercase; }
.ls-result-btn {
    padding: 13px 28px; border-radius: 12px; border: none;
    background: linear-gradient(135deg,#7c3aed,#6d28d9); color: #fff;
    font-size: .9rem; font-weight: 700; cursor: pointer; font-family: inherit; width: 100%; max-width: 280px;
}
.ls-result-btn-sec {
    padding: 12px 28px; border-radius: 12px;
    border: 1.5px solid var(--border); background: var(--white); color: var(--ink2);
    font-size: .9rem; font-weight: 700; cursor: pointer; font-family: inherit; width: 100%; max-width: 280px;
}
