/* ===== JUNIOR LAB - MAIN STYLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #6c63ff;
    --primary-dark: #5a52d5;
    --secondary: #ff6584;
    --accent: #43e97b;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e1b4b;
    --dark2: #312e81;
    --light: #f8fafc;
    --card-bg: rgba(255,255,255,0.95);
    --shadow: 0 8px 32px rgba(108,99,255,0.15);
    --radius: 20px;
    --radius-sm: 12px;
    /* iOS güvenli alan */
    --safe-top:    env(safe-area-inset-top,    0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left,   0px);
    --safe-right:  env(safe-area-inset-right,  0px);
}

/* ══════════════════════════════════════════════
   PWA / NATIVE APP DENEYİMİ
   iOS Safari + Android Chrome tam ekran kilidi
══════════════════════════════════════════════ */

/* 1) Tüm sayfa yüksekliği — iOS URL bar trick */
html {
    height: 100%;
    /* iOS overscroll bounce'u tamamen kapat */
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    /* iOS'ta scroll position fix */
    position: fixed;
    width: 100%;
    /* Beyaz flash yok */
    background: #1e1b4b;
}

body {
    font-family: 'Nunito', sans-serif;
    /* Tam ekran — iOS URL bar dahil */
    height: 100%;
    width: 100%;
    overflow: hidden;          /* body scroll yok — ekranlar kendi scroll yapar */
    position: fixed;           /* iOS'ta pozisyon kaymasını engelle */
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);

    /* ── Native app hissi ── */
    -webkit-tap-highlight-color: transparent;   /* dokunma sarı çerçeve yok */
    -webkit-touch-callout: none;                /* uzun basma menüsü yok */
    -webkit-user-select: none;
    user-select: none;
    touch-action: pan-y;                        /* yalnızca dikey scroll */

    /* Safe area — notch / dynamic island / home bar */
    padding-top:    var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left:   var(--safe-left);
    padding-right:  var(--safe-right);
}

/* Her ekran tam viewport yüksekliğini kaplasın ve kendi içinde scroll yapsın */
.screen {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Standalone PWA (yüklü) modunda ekstra ayarlar */
@media (display-mode: standalone) {
    .main-header {
        /* Header'ı safe-top'a göre ayarla */
        padding-top: max(12px, var(--safe-top));
    }
    .fb-bar {
        padding-bottom: calc(14px + var(--safe-bottom));
    }
    /* Alt navigasyon home bar ile çakışmasın */
    .teacher-panel-link {
        padding-bottom: calc(16px + var(--safe-bottom));
    }
}

/* Input ve textarea: metin seçimine izin ver */
input, textarea, [contenteditable] {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

/* Butonlar: native dokunma hissi */
button, [role="button"], a {
    touch-action: manipulation;   /* 300ms gecikme yok */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* ===== PARTICLES ===== */
.particles {
    position: fixed; top:0; left:0; width:100%; height:100%;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
    position: absolute; border-radius: 50%;
    animation: floatUp linear infinite;
    opacity: 0.15;
}
@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity:0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-100px) rotate(720deg); opacity:0; }
}

/* ===== SCREENS ===== */
.screen { display:none; min-height:100vh; position:relative; z-index:1; }
.screen.active { display:block; }

/* ===== LOGIN PAGE ===== */
.login-page .login-container {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px;
}
.logo-area { text-align: center; margin-bottom: 30px; }
.logo-icon {
    width: 100px; height: 100px;
    background: linear-gradient(145deg, #4c1d95, #6c63ff 50%, #7c3aed);
    border-radius: 28px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 12px 40px rgba(108,99,255,0.5), 0 0 0 4px rgba(255,255,255,0.08);
    animation: pulse 2.5s ease-in-out infinite;
    position: relative;
    overflow: visible;
}
/* Parlama halkası */
.logo-icon::after {
    content: '';
    position: absolute; inset: -6px;
    border-radius: 34px;
    background: transparent;
    border: 2px solid rgba(245,158,11,0.35);
    animation: logoRing 2.5s ease-in-out infinite;
}
@keyframes logoRing {
    0%,100% { transform: scale(1);    opacity: .5; }
    50%      { transform: scale(1.06); opacity: 1;  }
}
@keyframes pulse {
    0%,100% { transform: scale(1); box-shadow: 0 10px 40px rgba(108,99,255,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 15px 50px rgba(108,99,255,0.6); }
}
.logo-title {
    font-size: 42px; font-weight: 900; color: white;
    letter-spacing: -1px; line-height: 1;
}
.logo-title span { color: #f59e0b; }
.logo-sub { color: rgba(255,255,255,0.7); font-size: 16px; margin-top: 6px; }

.login-card {
    background: rgba(255,255,255,0.97);
    border-radius: 28px; padding: 36px;
    width: 100%; max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-card h2 {
    font-size: 22px; font-weight: 800; color: var(--dark);
    margin-bottom: 6px; text-align: center;
}
.login-hint { text-align:center; color:#64748b; font-size:14px; margin-bottom:20px; }

/* ══════════════════════════════════════════
   LEVEL SELECTOR
══════════════════════════════════════════ */
.level-selector {
    margin-bottom: 22px;
}

.level-selector-label {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: center;
    margin-bottom: 12px;
}

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

.level-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 8px 12px;
    border-radius: 18px;
    border: 2.5px solid #e8edf5;
    background: #f4f7fb;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all 0.22s cubic-bezier(.34,1.56,.64,1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.level-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.level-card:active {
    transform: scale(0.96);
}

.level-card-icon {
    font-size: 28px;
    line-height: 1;
    display: block;
    margin-bottom: 2px;
}

.level-card-name {
    font-size: 13px;
    font-weight: 900;
    color: #334155;
    line-height: 1;
}

.level-card-desc {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1;
}

/* Checkmark badge — hidden by default */
.level-card-check {
    position: absolute;
    top: -7px; right: -7px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; color: transparent;
    transition: all 0.2s ease;
    border: 2px solid white;
}

/* ── STARTERS active ── */
.level-starters.active {
    border-color: #10b981;
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    box-shadow: 0 6px 18px rgba(16,185,129,0.2);
    transform: translateY(-2px);
}
.level-starters.active .level-card-name { color: #047857; }
.level-starters.active .level-card-desc { color: #6ee7b7; }
.level-starters.active .level-card-check {
    background: #10b981; color: white;
}

/* ── MOVERS active ── */
.level-movers.active {
    border-color: #6c63ff;
    background: linear-gradient(145deg, #f0f0ff, #e0e0ff);
    box-shadow: 0 6px 18px rgba(108,99,255,0.22);
    transform: translateY(-2px);
}
.level-movers.active .level-card-name { color: #4c46c8; }
.level-movers.active .level-card-desc { color: #a5b4fc; }
.level-movers.active .level-card-check {
    background: #6c63ff; color: white;
}

/* ── FLYERS active ── */
.level-flyers.active {
    border-color: #f59e0b;
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
    box-shadow: 0 6px 18px rgba(245,158,11,0.22);
    transform: translateY(-2px);
}
.level-flyers.active .level-card-name { color: #b45309; }
.level-flyers.active .level-card-desc { color: #fcd34d; }
.level-flyers.active .level-card-check {
    background: #f59e0b; color: white;
}

/* ── Word level badge in dashboard ── */
.word-level-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 8px;
    margin-top: 3px;
    background: rgba(108,99,255,0.15);
    color: #6c63ff;
    letter-spacing: 0.3px;
    cursor: default;
    pointer-events: none;
}

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 13px; font-weight: 700;
    color: #475569; margin-bottom: 6px;
}
.form-group label i { margin-right: 6px; color: var(--primary); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px 16px; border-radius: 14px;
    border: 2px solid #e2e8f0; font-family: 'Nunito', sans-serif;
    font-size: 15px; font-weight: 600; color: #1e293b;
    transition: all 0.3s; outline: none;
    background: #f8fafc;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(108,99,255,0.1);
}

.btn-primary {
    width: 100%; padding: 16px; border-radius: 16px;
    background: linear-gradient(135deg, #6c63ff, #5a52d5);
    color: white; border: none; cursor: pointer;
    font-family: 'Nunito', sans-serif; font-size: 17px; font-weight: 800;
    transition: all 0.3s; letter-spacing: 0.5px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(108,99,255,0.4); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    width: 100%; padding: 14px; border-radius: 16px;
    background: transparent; color: var(--primary);
    border: 2.5px solid var(--primary); cursor: pointer;
    font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 700;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-secondary:hover { background: var(--primary); color: white; }

.divider { text-align:center; margin: 18px 0; position:relative; }
.divider::before {
    content:''; position:absolute; top:50%; left:0; right:0;
    height:1px; background:#e2e8f0;
}
.divider span {
    background: white; padding: 0 12px;
    color: #94a3b8; font-size: 13px; position:relative;
}

.recent-players {
    margin-top: 20px; display:flex; flex-direction:column; gap:10px; align-items:center;
}
.recent-chip {
    background: rgba(255,255,255,0.15); color:white;
    border: none; border-radius: 20px; padding: 8px 16px;
    font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 700;
    cursor:pointer; transition:all 0.3s; backdrop-filter:blur(10px);
}
.recent-chip:hover { background:rgba(255,255,255,0.3); transform:scale(1.05); }

/* ── Otomatik Giriş Kartı ── */
.auto-login-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 16px 18px;
    width: 100%;
    max-width: 340px;
    animation: alPop .35s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes alPop {
    from { transform: scale(0.88) translateY(16px); opacity: 0; }
    to   { transform: scale(1)    translateY(0);    opacity: 1; }
}
.al-avatar {
    font-size: 38px;
    line-height: 1;
    flex-shrink: 0;
}
.al-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.al-name {
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.al-sub {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    font-weight: 600;
}
.al-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, #6c63ff, #5a52d5);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 10px 18px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 16px rgba(108,99,255,.45);
    transition: transform .15s, box-shadow .15s;
    white-space: nowrap;
}
.al-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(108,99,255,.55); }
.al-btn:active { transform: translateY(0); }
.al-btn:disabled { opacity: .7; cursor: default; }

.al-switch {
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color .2s;
}
.al-switch:hover { color: rgba(255,255,255,0.75); }

/* ===== MAIN HEADER ===== */
.main-header {
    background: rgba(255,255,255,0.1); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding: 0 24px; height: 70px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.logo-small {
    display:flex; align-items:center; gap:10px;
    color:white; font-size:20px; font-weight:800;
}
.logo-small i { color:#f59e0b; }

.player-info { display:flex; align-items:center; gap:12px; }
.avatar {
    width:44px; height:44px; border-radius:50%;
    background:linear-gradient(135deg,#f59e0b,#ef4444);
    display:flex; align-items:center; justify-content:center;
    font-size:22px; border:3px solid rgba(255,255,255,0.3);
}
.player-details { text-align:center; }
.player-name { color:white; font-size:15px; font-weight:800; display:block; }
.level-badge {
    display:inline-flex; align-items:center; gap:4px;
    background:rgba(245,158,11,0.25); color:#f59e0b;
    padding:2px 10px; border-radius:20px; font-size:12px; font-weight:700;
}

.stats-bar { display:flex; gap:16px; }
.stat-item { display:flex; align-items:center; gap:6px; color:white; font-size:14px; font-weight:700; }

.header-right { display:flex; align-items:center; gap:10px; }
.btn-icon {
    width:40px; height:40px; border-radius:12px;
    background:rgba(255,255,255,0.15); color:white; border:none;
    cursor:pointer; font-size:16px; transition:all 0.3s;
    display:flex; align-items:center; justify-content:center;
}
.btn-icon:hover { background:rgba(255,255,255,0.3); transform:scale(1.1); }
.btn-logout { background:rgba(239,68,68,0.2); }
.btn-logout:hover { background:rgba(239,68,68,0.5); }
.btn-voice { background:rgba(99,102,241,0.25); position:relative; }
.btn-voice:hover { background:rgba(99,102,241,0.5); }
.btn-voice::after {
    content:''; position:absolute; top:6px; right:6px;
    width:7px; height:7px; border-radius:50%;
    background:#43e97b; border:1.5px solid rgba(255,255,255,0.8);
    animation: voiceDot 2s ease-in-out infinite;
}
@keyframes voiceDot {
    0%,100%{opacity:1;transform:scale(1)}
    50%{opacity:0.5;transform:scale(0.7)}
}

/* ===== XP PROGRESS BAR ===== */
.xp-progress-bar {
    height: 12px; background: rgba(255,255,255,0.15);
    border-radius: 0; position: relative; overflow: visible;
    margin: 0;
}
.xp-bar-inner {
    height: 100%; background: linear-gradient(90deg,#43e97b,#38f9d7);
    border-radius: 0 6px 6px 0; transition: width 1s ease;
    box-shadow: 0 0 15px rgba(67,233,123,0.5);
}
.xp-bar-label {
    position:absolute; right:10px; top:50%; transform:translateY(-50%);
    color:white; font-size:11px; font-weight:700;
}

/* ===== DASHBOARD MAIN ===== */
.dashboard-main { padding: 30px 24px; max-width: 1200px; margin: 0 auto; }

.mistake-alert {
    background: linear-gradient(135deg,rgba(239,68,68,0.2),rgba(245,158,11,0.2));
    border: 2px solid rgba(245,158,11,0.4); border-radius: 16px;
    padding: 16px 20px; margin-bottom: 24px;
    display: flex; align-items: center; gap: 14px;
    color: white; animation: wiggle 0.5s ease;
}
@keyframes wiggle {
    0%,100%{transform:rotate(0deg)}25%{transform:rotate(-1deg)}75%{transform:rotate(1deg)}
}
.mistake-alert i { font-size:24px; color:#f59e0b; flex-shrink:0; }
.mistake-alert span { flex:1; font-size:14px; }
.mistake-alert button {
    background:linear-gradient(135deg,#f59e0b,#ef4444); color:white;
    border:none; border-radius:10px; padding:10px 16px;
    font-family:'Nunito',sans-serif; font-size:13px; font-weight:700;
    cursor:pointer; white-space:nowrap; flex-shrink:0;
    display:flex; align-items:center; gap:6px;
}

.section-title {
    font-size: 24px; font-weight: 900; color: white;
    margin-bottom: 6px; display:flex; align-items:center; gap:10px;
}
.section-title i { color:#f59e0b; }
.section-sub { color:rgba(255,255,255,0.6); font-size:14px; margin-bottom:24px; }

/* ===== GAMES GRID ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 40px;
}
.game-card {
    background: rgba(255,255,255,0.95); border-radius: 20px;
    padding: 24px 20px; text-align: center; cursor: pointer;
    transition: all 0.3s; position: relative; overflow: hidden;
    border: 3px solid transparent;
}
.game-card::before {
    content:''; position:absolute; top:0; left:0; right:0; height:5px;
    background: var(--card-color, #6c63ff);
}
.game-card:hover { transform:translateY(-6px); border-color:var(--card-color,#6c63ff); box-shadow: 0 15px 40px rgba(0,0,0,0.2); }
.game-card.locked { opacity:0.5; cursor:not-allowed; }
.game-card.locked:hover { transform:none; }
.game-icon { font-size:48px; margin-bottom:12px; display:block; line-height:1; }
.game-name { font-size:15px; font-weight:800; color:#1e293b; margin-bottom:4px; }
.game-desc { font-size:12px; color:#64748b; line-height:1.4; margin-bottom:10px; }
.game-badge {
    display:inline-block; padding:3px 10px; border-radius:20px;
    font-size:11px; font-weight:700; color:white;
    background: var(--card-color, #6c63ff);
}
.lock-icon {
    position:absolute; top:10px; right:10px; font-size:18px; color:#94a3b8;
}
.game-stars { color:#f59e0b; font-size:12px; margin-bottom:6px; }

/* ===== WORD STATS ===== */
.word-stats-section {
    background: rgba(255,255,255,0.08); border-radius:20px;
    padding:24px; margin-bottom:30px;
}
.word-stats-section h3 { color:white; font-size:18px; font-weight:800; margin-bottom:16px; display:flex; align-items:center; gap:8px; }
.word-stats-section h3 i { color:#f59e0b; }
.word-stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.stat-card {
    border-radius:16px; padding:20px; text-align:center;
    display:flex; flex-direction:column; align-items:center; gap:8px;
}
.stat-card.green { background:rgba(16,185,129,0.2); border:2px solid rgba(16,185,129,0.3); }
.stat-card.orange { background:rgba(245,158,11,0.2); border:2px solid rgba(245,158,11,0.3); }
.stat-card.red { background:rgba(239,68,68,0.2); border:2px solid rgba(239,68,68,0.3); }
.stat-card.blue { background:rgba(99,102,241,0.2); border:2px solid rgba(99,102,241,0.3); }
.stat-card i { font-size:24px; }
.stat-card.green i { color:#10b981; }
.stat-card.orange i { color:#f59e0b; }
.stat-card.red i { color:#ef4444; }
.stat-card.blue i { color:#818cf8; }
.stat-number { font-size:32px; font-weight:900; color:white; }
.stat-label { font-size:12px; color:rgba(255,255,255,0.7); font-weight:600; }

/* ===== GAME HEADER ===== */
.game-header {
    background: rgba(255,255,255,0.1); backdrop-filter:blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding: 0 20px; height:65px;
    display:flex; align-items:center; justify-content:space-between;
    position: sticky; top:0; z-index:100;
}
.btn-back {
    background:rgba(255,255,255,0.15); color:white; border:none;
    border-radius:12px; padding:10px 16px; cursor:pointer;
    font-family:'Nunito',sans-serif; font-size:14px; font-weight:700;
    display:flex; align-items:center; gap:8px; transition:all 0.3s;
}
.btn-back:hover { background:rgba(255,255,255,0.25); }

.game-title-area { flex:1; margin: 0 20px; text-align:center; }
.game-title-area h2 { color:white; font-size:18px; font-weight:900; margin-bottom:6px; }
.game-progress-bar { height:6px; background:rgba(255,255,255,0.2); border-radius:3px; overflow:hidden; }
.game-progress-inner { height:100%; background:linear-gradient(90deg,#43e97b,#38f9d7); border-radius:3px; transition:width 0.5s ease; }

.game-stats { display:flex; gap:12px; }
.gs-item {
    display:flex; align-items:center; gap:6px;
    padding:6px 12px; border-radius:10px; font-weight:700; font-size:16px;
}
.gs-item.correct { background:rgba(16,185,129,0.2); color:#43e97b; }
.gs-item.wrong { background:rgba(239,68,68,0.2); color:#ff6584; }
.gs-item.timer { background:rgba(245,158,11,0.2); color:#f59e0b; }

.game-content { padding:30px 20px; max-width:800px; margin:0 auto; }

/* ===== GAME COMMON COMPONENTS ===== */
.game-question-card {
    background:rgba(255,255,255,0.97); border-radius:24px;
    padding:32px; text-align:center; margin-bottom:24px;
    box-shadow: var(--shadow);
}
.question-label { font-size:13px; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:2px; margin-bottom:12px; }
.question-word { font-size:52px; font-weight:900; color:var(--dark); margin-bottom:8px; line-height:1.1; }
.question-sub { font-size:15px; color:#64748b; font-style:italic; }
.question-emoji { font-size:60px; margin-bottom:12px; display:block; }

.listen-btn {
    background:linear-gradient(135deg,#6c63ff,#ff6584);
    border:none; border-radius:50%; width:80px; height:80px;
    font-size:32px; color:white; cursor:pointer;
    display:flex; align-items:center; justify-content:center; margin:16px auto;
    transition:all 0.3s; box-shadow:0 8px 25px rgba(108,99,255,0.4);
}
.listen-btn:hover { transform:scale(1.1); box-shadow:0 12px 35px rgba(108,99,255,0.6); }
.listen-btn.playing { animation:listenPulse 1s ease-in-out infinite; }
@keyframes listenPulse { 0%,100%{transform:scale(1)}50%{transform:scale(1.15)} }

.answers-grid {
    display:grid; grid-template-columns:1fr 1fr; gap:12px;
}
.answer-btn {
    background:rgba(255,255,255,0.95); border:3px solid #e2e8f0;
    border-radius:16px; padding:18px; cursor:pointer;
    font-family:'Nunito',sans-serif; font-size:17px; font-weight:800; color:#1e293b;
    transition:all 0.3s; text-align:center;
}
.answer-btn:hover { border-color:var(--primary); background:#f5f3ff; transform:scale(1.02); }
.answer-btn.correct { background:#dcfce7; border-color:#16a34a; color:#15803d; }
.answer-btn.wrong { background:#fee2e2; border-color:#dc2626; color:#dc2626; }
.answer-btn.disabled { pointer-events:none; }

/* Tanım Eşleştir — Türkçe çeviri şıkları */
.def-tr-btn {
    padding:14px 12px;
    min-height:70px;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.def-tr-btn:hover { border-color:#7c3aed; background:#f5f3ff; }
.def-tr-btn.correct { background:#dcfce7; border-color:#16a34a; }
.def-tr-btn.wrong   { background:#fee2e2; border-color:#dc2626; }

/* ===== TYPING INPUT ===== */
.typing-area {
    background:rgba(255,255,255,0.97); border-radius:24px;
    padding:24px; margin-bottom:16px;
    box-shadow:var(--shadow);
}
.typing-input {
    width:100%; padding:18px 20px; border-radius:16px;
    border:3px solid #e2e8f0; font-family:'Nunito',sans-serif;
    font-size:22px; font-weight:700; color:#1e293b;
    text-align:center; outline:none; transition:all 0.3s;
    background:#f8fafc; letter-spacing:2px;
}
.typing-input:focus { border-color:var(--primary); background:white; box-shadow:0 0 0 4px rgba(108,99,255,0.1); }
.typing-input.correct { border-color:#16a34a; background:#dcfce7; }
.typing-input.wrong { border-color:#dc2626; background:#fee2e2; animation:shake 0.4s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)}25%{transform:translateX(-8px)}75%{transform:translateX(8px)} }

.submit-btn {
    width:100%; padding:16px; border-radius:16px;
    background:linear-gradient(135deg,#6c63ff,#5a52d5);
    color:white; border:none; cursor:pointer;
    font-family:'Nunito',sans-serif; font-size:18px; font-weight:800;
    transition:all 0.3s; display:flex; align-items:center; justify-content:center; gap:10px;
}
.submit-btn:hover { transform:translateY(-2px); box-shadow:0 8px 25px rgba(108,99,255,0.4); }

/* ===== FEEDBACK BAR — popup yok, ekranın altında sabit bant ===== */
.fb-bar {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-top: 3px solid transparent;
    animation: fbSlideUp .22s cubic-bezier(0.34,1.4,0.64,1) both;
    z-index: 200;
}
@keyframes fbSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.fb-bar--out {
    animation: fbSlideDown .2s ease both;
}
@keyframes fbSlideDown {
    from { transform: translateY(0);    opacity: 1; }
    to   { transform: translateY(100%); opacity: 0; }
}

/* Doğru — yeşil bant */
.fb-bar--ok {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-top-color: #16a34a;
}
/* Yanlış — kırmızı bant */
.fb-bar--no {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-top-color: #ef4444;
}

/* Sol taraf: ikon + bilgi */
.fb-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.fb-bar-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}
.fb-bar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.fb-bar-title {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -.2px;
}
.fb-bar--ok .fb-bar-title { color: #15803d; }
.fb-bar--no .fb-bar-title { color: #b91c1c; }

.fb-bar-word {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fb-bar-tr {
    font-weight: 600;
    color: #475569;
}
.fb-bar-ex {
    font-size: 11.5px;
    color: #64748b;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Devam butonu */
.fb-bar-btn {
    flex-shrink: 0;
    padding: 10px 22px;
    border: none;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s;
    color: #fff;
}
.fb-bar--ok .fb-bar-btn {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 4px 14px rgba(22,163,74,.35);
}
.fb-bar--no .fb-bar-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 14px rgba(239,68,68,.35);
}
.fb-bar-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.fb-bar-btn:active { transform: translateY(0); }
.fb-bar-btn:focus-visible { outline: 3px solid #6c63ff; outline-offset: 3px; }

/* Mobil */
@media (max-width: 480px) {
    .fb-bar { padding: 12px 14px; gap: 8px; }
    .fb-bar-icon { font-size: 22px; }
    .fb-bar-title { font-size: 13px; }
    .fb-bar-word  { font-size: 13px; }
    .fb-bar-btn   { padding: 9px 16px; font-size: 13px; }
}

/* ===== DEF-MINI TOAST (Tanım Eşleştir minik bildirim) ===== */
.def-mini {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 40px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    z-index: 2000;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    animation: defMiniIn .22s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes defMiniIn {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
.def-mini--out {
    animation: defMiniOut .18s ease both;
}
@keyframes defMiniOut {
    from { transform: translateX(-50%) translateY(0);    opacity: 1; }
    to   { transform: translateX(-50%) translateY(16px); opacity: 0; }
}
.def-mini--ok  { background: #dcfce7; color: #15803d; border: 2px solid #86efac; }
.def-mini--no  { background: #fee2e2; color: #b91c1c; border: 2px solid #fca5a5; }
.def-mini-star { font-size: 18px; line-height: 1; }
.def-mini-x    { font-size: 16px; font-weight: 900; }
.def-mini-word { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }

/* ===== RESULT SCREEN ===== */
.result-container {
    display:flex; flex-direction:column; align-items:center;
    justify-content:center; min-height:100vh; padding:30px;
}
.result-card {
    background:rgba(255,255,255,0.97); border-radius:28px;
    padding:40px; text-align:center; max-width:500px; width:100%;
    box-shadow:0 20px 60px rgba(0,0,0,0.3);
}
.result-emoji { font-size:80px; display:block; margin-bottom:16px; }
.result-title { font-size:32px; font-weight:900; color:var(--dark); margin-bottom:8px; }
.result-score-big { font-size:64px; font-weight:900; color:var(--primary); line-height:1; margin-bottom:8px; }
.result-score-label { color:#64748b; font-size:15px; margin-bottom:24px; }
.result-stats { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:24px; }
.result-stat { background:#f8fafc; border-radius:16px; padding:16px; }
.result-stat-num { font-size:28px; font-weight:900; }
.result-stat-label { font-size:12px; color:#64748b; font-weight:600; }
.result-stat.green .result-stat-num { color:#10b981; }
.result-stat.red .result-stat-num { color:#ef4444; }
.result-stat.yellow .result-stat-num { color:#f59e0b; }
.result-stat.purple .result-stat-num { color:#6c63ff; }
.result-actions { display:flex; flex-direction:column; gap:12px; }
.result-actions .btn-primary, .result-actions .btn-secondary { max-width:100%; }

/* ===== LEADERBOARD ===== */
.sub-header {
    background:rgba(255,255,255,0.1); backdrop-filter:blur(20px);
    border-bottom:1px solid rgba(255,255,255,0.15);
    padding:0 24px; height:65px;
    display:flex; align-items:center; justify-content:space-between;
}
.sub-header h2 { color:white; font-size:20px; font-weight:900; display:flex; align-items:center; gap:10px; }
.sub-header h2 i { color:#f59e0b; }

.leaderboard-content {
    padding:30px 24px; max-width:700px; margin:0 auto;
}
.lb-tabs { display:flex; gap:8px; margin-bottom:24px; }
.lb-tab {
    padding:10px 20px; border-radius:12px; cursor:pointer;
    background:rgba(255,255,255,0.1); color:rgba(255,255,255,0.7);
    border:none; font-family:'Nunito',sans-serif; font-size:14px; font-weight:700;
    transition:all 0.3s;
}
.lb-tab.active { background:rgba(255,255,255,0.95); color:var(--dark); }

.lb-list { display:flex; flex-direction:column; gap:10px; }
.lb-item {
    background:rgba(255,255,255,0.95); border-radius:16px;
    padding:16px 20px; display:flex; align-items:center; gap:16px;
    transition:all 0.3s;
}
.lb-item:hover { transform:translateX(4px); }
.lb-rank {
    width:36px; height:36px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-weight:900; font-size:16px; flex-shrink:0;
}
.lb-rank.gold { background:linear-gradient(135deg,#f59e0b,#d97706); color:white; }
.lb-rank.silver { background:linear-gradient(135deg,#94a3b8,#64748b); color:white; }
.lb-rank.bronze { background:linear-gradient(135deg,#cd7c4b,#b45309); color:white; }
.lb-rank.normal { background:#f1f5f9; color:#475569; }
.lb-avatar { font-size:28px; }
.lb-info { flex:1; }
.lb-name { font-size:16px; font-weight:800; color:#1e293b; }
.lb-meta { font-size:12px; color:#64748b; }
.lb-score { font-size:22px; font-weight:900; color:var(--primary); }
.lb-level { font-size:12px; color:#f59e0b; font-weight:700; }

/* ===== ADMIN ===== */
.admin-content { padding:24px; max-width:900px; margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.admin-card { background:rgba(255,255,255,0.97); border-radius:20px; padding:28px; }
.admin-card h3 { font-size:18px; font-weight:800; color:var(--dark); margin-bottom:20px; display:flex; align-items:center; gap:8px; }
.admin-card h3 i { color:var(--primary); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.admin-bulk { margin-top:24px; padding-top:24px; border-top:2px dashed #e2e8f0; }
.admin-bulk h4 { font-size:15px; font-weight:700; color:var(--dark); margin-bottom:6px; }
.hint-text { font-size:12px; color:#94a3b8; margin-bottom:10px; }
.form-group textarea { resize:vertical; line-height:1.5; }

.admin-search { margin-bottom:16px; }
.admin-search input { width:100%; }
.badge { background:var(--primary); color:white; border-radius:20px; padding:2px 10px; font-size:13px; margin-left:8px; }

.word-list { max-height:500px; overflow-y:auto; display:flex; flex-direction:column; gap:8px; }
.word-item {
    display:flex; align-items:center; gap:12px;
    padding:12px 14px; background:#f8fafc; border-radius:12px;
    transition:all 0.3s;
}
.word-item:hover { background:#f0f4ff; }
.word-item .word-en { font-size:15px; font-weight:800; color:#1e293b; flex:1; }
.word-item .word-tr { font-size:14px; color:#64748b; flex:1; }
.word-item .word-cat { font-size:11px; color:var(--primary); font-weight:700; background:#f0f4ff; padding:2px 8px; border-radius:10px; }
.word-item .word-del {
    background:none; border:none; color:#ef4444; cursor:pointer; font-size:16px;
    padding:4px; border-radius:6px; transition:all 0.3s;
}
.word-item .word-del:hover { background:#fee2e2; }

/* ===== ÖĞRENCİ AKTİVİTE RAPORU ===== */
.activity-summary { display:flex; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.act-stat {
    flex:1; min-width:90px; background:linear-gradient(135deg,#f0f4ff,#ede9fe);
    border-radius:14px; padding:14px 10px; text-align:center;
}
.act-stat-num { font-size:22px; font-weight:900; color:var(--primary); line-height:1.1; }
.act-stat-lbl { font-size:12px; font-weight:700; color:#64748b; margin-top:4px; }

.activity-list { max-height:480px; overflow-y:auto; display:flex; flex-direction:column; gap:8px; }
.activity-item {
    display:flex; align-items:center; gap:12px;
    background:#f8fafc; border:1px solid #eef2f7; border-radius:14px;
    padding:10px 14px; transition:background 0.2s;
}
.activity-item:hover { background:#f0f4ff; }
.act-avatar {
    width:42px; height:42px; min-width:42px; border-radius:50%;
    background:linear-gradient(135deg,#6c63ff,#a855f7);
    display:flex; align-items:center; justify-content:center; font-size:22px;
}
.act-info { flex:1; min-width:0; }
.act-name { font-size:15px; font-weight:800; color:#1e293b; }
.act-time { font-size:12px; color:#94a3b8; font-weight:600; margin-top:2px; }
.act-time i { margin-right:3px; }
.act-duration {
    font-size:14px; font-weight:800; color:#10b981; white-space:nowrap;
    background:#ecfdf5; padding:6px 12px; border-radius:10px;
}
.act-duration i { margin-right:4px; }

@media (max-width:480px) {
    .act-name { font-size:14px; }
    .act-duration { font-size:13px; padding:5px 9px; }
    .act-avatar { width:36px; height:36px; min-width:36px; font-size:18px; }
}

/* ===== MATCHING GAME ===== */
.matching-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.match-col { display:flex; flex-direction:column; gap:10px; }
.match-item {
    background:rgba(255,255,255,0.95); border:3px solid #e2e8f0;
    border-radius:14px; padding:14px 18px; cursor:pointer;
    font-family:'Nunito',sans-serif; font-size:16px; font-weight:700; color:#1e293b;
    transition:all 0.3s; text-align:center;
}
.match-item:hover { border-color:var(--primary); }
.match-item.selected { border-color:var(--primary); background:#f0f4ff; }
.match-item.matched { border-color:#16a34a; background:#dcfce7; color:#15803d; pointer-events:none; }
.match-item.wrong-match { border-color:#dc2626; background:#fee2e2; animation:shake 0.4s ease; }

/* ===== SCRAMBLE GAME ===== */
.scramble-letters { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin:20px 0; }
.letter-tile {
    width:48px; height:48px; border-radius:12px;
    background:linear-gradient(135deg,#6c63ff,#5a52d5); color:white;
    display:flex; align-items:center; justify-content:center;
    font-size:22px; font-weight:900; cursor:pointer;
    transition:all 0.3s; box-shadow:0 4px 12px rgba(108,99,255,0.3);
    user-select:none;
}
.letter-tile:hover { transform:translateY(-4px) scale(1.1); }
.letter-tile.used { background:#e2e8f0; color:#94a3b8; pointer-events:none; }
.answer-slots { display:flex; gap:8px; justify-content:center; margin:16px 0; flex-wrap:wrap; }
.answer-slot {
    width:48px; height:48px; border-radius:12px;
    border:3px dashed #e2e8f0; background:#f8fafc;
    display:flex; align-items:center; justify-content:center;
    font-size:22px; font-weight:900; color:#1e293b; cursor:pointer;
    transition:all 0.3s;
}
.answer-slot.filled { background:white; border-color:#6c63ff; }
.answer-slot.filled:hover { background:#fee2e2; border-color:#dc2626; }

/* ===== FILL BLANK GAME ===== */
.sentence-display {
    background:rgba(255,255,255,0.97); border-radius:24px;
    padding:30px; text-align:center; margin-bottom:20px;
    box-shadow:var(--shadow); font-size:24px; font-weight:700; color:#1e293b;
    line-height:1.8;
}
.blank-input {
    display:inline-block; min-width:120px; padding:6px 16px;
    border-bottom:4px solid var(--primary); background:transparent;
    font-family:'Nunito',sans-serif; font-size:22px; font-weight:900;
    color:var(--primary); text-align:center; outline:none; border-top:none;
    border-left:none; border-right:none;
}


/* ===== DRAG DROP GAME ===== */
.drag-drop-area { display:flex; gap:20px; align-items:flex-start; flex-wrap:wrap; }
.drag-words { display:flex; flex-wrap:wrap; gap:10px; flex:1; min-width:200px; }
.drag-word {
    background:linear-gradient(135deg,#6c63ff,#5a52d5); color:white;
    padding:12px 20px; border-radius:12px; cursor:grab; font-weight:700; font-size:16px;
    transition:all 0.3s; box-shadow:0 4px 12px rgba(108,99,255,0.3);
    user-select:none;
}
.drag-word:active { cursor:grabbing; transform:scale(1.05); }
.drop-zones { display:flex; flex-direction:column; gap:10px; flex:1; min-width:200px; }
.drop-zone {
    background:rgba(255,255,255,0.95); border:3px dashed #e2e8f0;
    border-radius:14px; padding:14px 18px; min-height:52px;
    display:flex; align-items:center; justify-content:space-between;
    transition:all 0.3s; font-weight:700; color:#1e293b;
}
.drop-zone.drag-over { border-color:var(--primary); background:#f0f4ff; }
.drop-zone.correct { border-color:#16a34a; background:#dcfce7; }
.drop-zone.wrong { border-color:#dc2626; background:#fee2e2; }
.drop-label { color:#94a3b8; font-size:13px; font-weight:600; }
.dropped-word {
    background:white; border:2px solid var(--primary);
    border-radius:8px; padding:4px 12px; font-size:14px; font-weight:700; color:var(--primary);
}

/* ===== WORD SEARCH GAME ===== */
.ws-grid {
    display: inline-grid;
    gap: 2px;
    background: rgba(255,255,255,0.97);
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--shadow);
    touch-action: none;
    /* Ekran genişliğine göre hücre boyutu: min(34px, (100vw-48px)/10) */
    --ws-cell: min(34px, calc((100vw - 48px) / 10));
}
.ws-cell {
    width: var(--ws-cell);
    height: var(--ws-cell);
    display: flex; align-items: center; justify-content: center;
    font-size: calc(var(--ws-cell) * 0.5);
    font-weight: 900; color: #1e293b; border-radius: 5px;
    cursor: pointer; transition: background 0.15s;
    user-select: none; -webkit-user-select: none;
}
.ws-cell:hover  { background: #f0f4ff; }
.ws-cell.selected { background: linear-gradient(135deg,#6c63ff,#5a52d5); color: white; }
.ws-cell.found    { background: linear-gradient(135deg,#43e97b,#38f9d7); color: #1e293b; }
.ws-word-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px; border-radius: 20px;
    background: rgba(255,255,255,0.15); color: white;
    font-weight: 700; font-size: 13px; transition: all 0.3s;
}
.ws-word-chip.found { background: rgba(67,233,123,0.3); text-decoration: line-through; color: rgba(255,255,255,0.5); }

/* ===== LOADING ===== */
.loading-spinner { text-align:center; color:rgba(255,255,255,0.7); font-size:20px; padding:40px; }

/* ===== TEACHER PANEL LİNK ===== */
.teacher-panel-link {
    display: block;
    margin: 28px auto 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.22);
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    transition: color .25s, background .25s;
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.teacher-panel-link:hover {
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.08);
}

/* ===== ADMIN ŞİFRE MODALI ===== */
.apm-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9000;
    animation: apmFadeIn .18s ease both;
}
@keyframes apmFadeIn { from{opacity:0} to{opacity:1} }

.apm-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px 28px;
    width: 90%; max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: apmPop .3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes apmPop {
    from { transform: scale(0.8) translateY(24px); opacity:0; }
    to   { transform: scale(1)   translateY(0);    opacity:1; }
}

.apm-icon  { font-size: 44px; margin-bottom: 10px; }
.apm-title { font-size: 20px; font-weight: 900; color: #1e293b; margin-bottom: 4px; }
.apm-sub   { font-size: 13px; color: #94a3b8; font-weight: 600; margin-bottom: 20px; }

.apm-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 4px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-user-select: text; user-select: text;
}
.apm-input:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 4px rgba(108,99,255,0.12);
}
@keyframes apmShake {
    0%,100%{transform:translateX(0)}
    20%{transform:translateX(-8px)}
    40%{transform:translateX(8px)}
    60%{transform:translateX(-6px)}
    80%{transform:translateX(6px)}
}
.apm-shake { animation: apmShake .45s ease both; border-color:#ef4444 !important; }

.apm-err {
    display: none;
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
}

.apm-btns {
    display: flex; gap: 10px; margin-top: 20px;
}
.apm-btn-cancel {
    flex: 1; padding: 11px; border: 2px solid #e2e8f0; border-radius: 12px;
    background: #fff; color: #64748b;
    font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800;
    cursor: pointer; transition: background .15s;
}
.apm-btn-cancel:hover { background: #f1f5f9; }

.apm-btn-ok {
    flex: 1; padding: 11px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #6c63ff, #5a52d5);
    color: #fff;
    font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800;
    cursor: pointer; transition: opacity .15s, transform .15s;
    box-shadow: 0 4px 14px rgba(108,99,255,.4);
}
.apm-btn-ok:hover  { transform: translateY(-2px); }
.apm-btn-ok:active { transform: translateY(0); }
.apm-btn-ok:disabled { opacity: .5; cursor: default; transform: none; }

/* Header logo */
#headerLogo {
    border-radius: 8px;
    padding: 2px 4px;
}

/* ===== TOAST ===== */
.toast {
    position:fixed; bottom:30px; left:50%; transform:translateX(-50%) translateY(100px);
    background:#1e293b; color:white; padding:14px 24px; border-radius:14px;
    font-weight:700; font-size:15px; z-index:9999; transition:all 0.4s cubic-bezier(0.34,1.56,0.64,1);
    pointer-events:none; white-space:nowrap; box-shadow:0 8px 25px rgba(0,0,0,0.3);
}
.toast.show { transform:translateX(-50%) translateY(0); }
.toast.success { background:linear-gradient(135deg,#10b981,#059669); }
.toast.error { background:linear-gradient(135deg,#ef4444,#dc2626); }
.toast.warning { background:linear-gradient(135deg,#f59e0b,#d97706); }

/* ===== CONFETTI ===== */
#confettiCanvas {
    position:fixed; inset:0; pointer-events:none; z-index:9998;
}

/* ===== HIDDEN WORD GAME ===== */
.hidden-letters { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin:20px 0; }
.hidden-letter {
    width:44px; height:56px; border-radius:10px;
    border-bottom:4px solid var(--primary); background:rgba(255,255,255,0.1);
    display:flex; align-items:center; justify-content:center;
    font-size:24px; font-weight:900; color:white; text-transform:uppercase;
    transition:all 0.3s;
}
.hidden-letter.revealed { background:rgba(255,255,255,0.95); color:var(--dark); border-color:#16a34a; }
.hidden-letter.wrong-guess { background:rgba(239,68,68,0.2); border-color:#dc2626; }
.hangman-keyboard { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; max-width:500px; margin:0 auto; }
.key-btn {
    width:42px; height:42px; border-radius:10px;
    background:rgba(255,255,255,0.95); border:none; cursor:pointer;
    font-family:'Nunito',sans-serif; font-size:16px; font-weight:800; color:#1e293b;
    transition:all 0.3s;
}
.key-btn:hover { background:var(--primary); color:white; }
.key-btn:disabled { background:rgba(255,255,255,0.2); color:rgba(255,255,255,0.3); cursor:not-allowed; }
.key-btn.key-correct { background:#dcfce7; color:#16a34a; cursor:not-allowed; }
.key-btn.key-wrong { background:#fee2e2; color:#dc2626; cursor:not-allowed; }
.hangman-lives { display:flex; gap:8px; justify-content:center; margin:12px 0; }
.life-heart { font-size:24px; transition:all 0.3s; }
.life-heart.lost { opacity:0.2; filter:grayscale(1); }

/* ===== SPEED ROUND ===== */
.speed-timer-ring { text-align:center; margin:16px 0; }
.speed-timer-circle {
    width:100px; height:100px; border-radius:50%;
    background:conic-gradient(#43e97b 0%, rgba(255,255,255,0.2) 0%);
    display:flex; align-items:center; justify-content:center;
    margin:0 auto; font-size:28px; font-weight:900; color:white;
    position:relative; box-shadow:0 0 30px rgba(67,233,123,0.3);
}

/* ===== PICTURE GAME ===== */
.picture-options {
    display:grid; grid-template-columns:1fr 1fr; gap:12px;
}
.picture-option {
    background:rgba(255,255,255,0.97); border:3px solid #e2e8f0;
    border-radius:16px; padding:20px; cursor:pointer;
    text-align:center; font-size:48px; transition:all 0.3s;
    font-weight:800;
}
.picture-option:hover { border-color:var(--primary); transform:scale(1.03); }
.picture-option.correct { border-color:#16a34a; background:#dcfce7; }
.picture-option.wrong { border-color:#dc2626; background:#fee2e2; }
.picture-option p { font-size:14px; color:#64748b; margin-top:8px; font-weight:700; }

/* ===== RESPONSIVE ===== */
@media (max-width:768px) {
    .admin-content { grid-template-columns:1fr; }
    .word-stats-grid { grid-template-columns:1fr 1fr; }
    .games-grid { grid-template-columns:repeat(2,1fr); }
    .matching-grid { grid-template-columns:1fr; }
    .drag-drop-area { flex-direction:column; }
    .stats-bar { display:none; }
    .answers-grid { grid-template-columns:1fr; }
    .question-word { font-size:36px; }
    .main-header { padding:0 12px; }
    .game-content { padding:20px 14px; }
    .form-row { grid-template-columns:1fr; }
    .word-search-grid-wrap { justify-content:center; }
    .ws-cell { width:30px; height:30px; font-size:15px; }
    .result-stats { grid-template-columns:1fr 1fr; }
    .picture-options { grid-template-columns:1fr 1fr; }
}
@media (max-width:480px) {
    .games-grid { grid-template-columns:1fr 1fr; }
    .answers-grid { grid-template-columns:1fr; }
    .letter-tile, .answer-slot { width:38px; height:38px; font-size:18px; }
    .logo-title { font-size:32px; }
    .login-card { padding:24px 20px; }
    .game-header { height:auto; padding:12px; flex-wrap:wrap; gap:8px; }
    .game-title-area { order:3; flex-basis:100%; margin:0; }
    .gs-item span { font-size:14px; }
    .word-stats-grid { grid-template-columns:1fr 1fr; }
    .dashboard-main { padding:20px 14px; }
    .result-card { padding:28px 20px; }
}



/* ===== WORD BROWSE SECTION ===== */
.word-browse-section {
    background: rgba(255,255,255,0.08); border-radius:20px;
    padding:24px; margin-bottom:24px;
}
.section-header-row {
    display:flex; align-items:center; justify-content:space-between;
}
.section-header-row h3 { color:white; font-size:18px; font-weight:800; display:flex; align-items:center; gap:8px; }
.section-header-row h3 i { color:#f59e0b; }

.browse-grid {
    display:grid; grid-template-columns:repeat(auto-fill, minmax(150px,1fr));
    gap:10px; max-height:400px; overflow-y:auto; padding-right:4px;
}
.browse-card {
    background:rgba(255,255,255,0.95); border-radius:14px;
    padding:14px 12px; cursor:pointer; transition:all 0.3s;
    border:2px solid transparent; text-align:center;
    position:relative; overflow:hidden;
}
.browse-card::before {
    content:''; position:absolute; top:0; left:0; right:0; height:3px;
    background:var(--bc, #6c63ff);
}
.browse-card:hover { transform:translateY(-3px); border-color:var(--bc,#6c63ff); box-shadow:0 8px 20px rgba(0,0,0,0.15); }
.browse-card.struggling { border-color:#ef4444; background:#fff5f5; }
.browse-card.practicing { border-color:#f59e0b; background:#fffbeb; }
.bc-word { font-size:16px; font-weight:900; color:#1e293b; margin-bottom:4px; }
.bc-tr { font-size:13px; color:#64748b; font-weight:600; margin-bottom:6px; }
.bc-cat { font-size:10px; color:white; background:var(--bc,#6c63ff); border-radius:10px; padding:2px 8px; font-weight:700; }
.bc-status { position:absolute; top:8px; right:8px; font-size:12px; }

/* ===== ANIMATIONS & EXTRAS ===== */
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes bounceIn { 0%{transform:scale(0.3)} 50%{transform:scale(1.1)} 70%{transform:scale(0.9)} 100%{transform:scale(1)} }
.game-card { animation: slideUp 0.4s ease both; }
.game-card:nth-child(1){animation-delay:0.05s}
.game-card:nth-child(2){animation-delay:0.1s}
.game-card:nth-child(3){animation-delay:0.15s}
.game-card:nth-child(4){animation-delay:0.2s}
.game-card:nth-child(5){animation-delay:0.25s}
.game-card:nth-child(6){animation-delay:0.3s}
.game-card:nth-child(7){animation-delay:0.35s}
.game-card:nth-child(8){animation-delay:0.4s}
.game-card:nth-child(9){animation-delay:0.45s}
.game-card:nth-child(10){animation-delay:0.5s}
.game-card:nth-child(11){animation-delay:0.55s}
.game-card:nth-child(12){animation-delay:0.6s}

/* new-badge */
.new-badge {
    position:absolute; top:10px; right:10px;
    background:linear-gradient(135deg,#ef4444,#f97316);
    color:white; font-size:10px; font-weight:900;
    padding:2px 8px; border-radius:20px;
    letter-spacing:1px; text-transform:uppercase;
}

/* category filter bar */
.cat-filter-bar {
    display:flex; gap:8px; flex-wrap:wrap; margin-bottom:20px;
}
.cat-chip {
    padding:6px 16px; border-radius:20px; cursor:pointer;
    background:rgba(255,255,255,0.12); color:rgba(255,255,255,0.7);
    border:2px solid transparent; font-family:'Nunito',sans-serif;
    font-size:13px; font-weight:700; transition:all 0.3s;
}
.cat-chip:hover, .cat-chip.active {
    background:rgba(255,255,255,0.95); color:var(--dark);
    border-color:transparent;
}

/* AI Brain banner */
.ai-banner {
    background:linear-gradient(135deg,rgba(108,99,255,0.3),rgba(168,85,247,0.3));
    border:2px solid rgba(108,99,255,0.4); border-radius:16px;
    padding:14px 20px; margin-bottom:20px;
    display:flex; align-items:center; gap:12px; color:white;
}
.ai-banner i { font-size:22px; color:#a78bfa; flex-shrink:0; }
.ai-banner p { font-size:13px; line-height:1.5; }
.ai-banner strong { color:#c4b5fd; }

/* scrollbar */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:rgba(255,255,255,0.05); }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.2); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.4); }

/* Flashcard space letter */
.hidden-letter.space { border-bottom-color:transparent; background:transparent; width:20px; min-width:20px; }

/* Game complete overlay ring */
.complete-ring {
    width:80px; height:80px; border-radius:50%;
    background:linear-gradient(135deg,#43e97b,#38f9d7);
    display:flex; align-items:center; justify-content:center;
    font-size:36px; margin:0 auto 16px;
    box-shadow:0 0 30px rgba(67,233,123,0.5);
    animation: bounceIn 0.6s ease;
}

/* Word category badge on flashcard back */
.cat-badge {
    display:inline-block; padding:4px 12px; border-radius:20px;
    background:rgba(255,255,255,0.2); color:rgba(255,255,255,0.9);
    font-size:12px; font-weight:700; margin-bottom:8px;
}

/* Progress steps */
.progress-dots {
    display:flex; gap:6px; justify-content:center; margin:16px 0;
}
.progress-dot {
    width:10px; height:10px; border-radius:50%;
    background:rgba(255,255,255,0.2); transition:all 0.3s;
}
.progress-dot.done { background:#43e97b; }
.progress-dot.current { background:white; transform:scale(1.3); }

/* ===================================================
   VOICE BUTTON — speaking pulse animation
   =================================================== */
@keyframes voicePulse {
    0%,100% { box-shadow:0 0 0 0 rgba(108,99,255,0.6); }
    50%      { box-shadow:0 0 0 8px rgba(108,99,255,0); }
}
.btn-voice.speaking {
    background: linear-gradient(135deg,#6c63ff,#a855f7) !important;
    color: white !important;
    animation: voicePulse 0.9s ease infinite;
}

/* ===================================================
   VOICE SELECTOR MODAL — Ultra Fluid UI  (vsp-*)
   =================================================== */

/* ── Overlay ── */
.vsp-overlay {
    position: fixed; inset: 0;
    background: rgba(8, 6, 25, 0.72);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    animation: vspFadeIn .2s ease both;
}
@keyframes vspFadeIn { from { opacity:0 } to { opacity:1 } }

/* ── Sheet (modal kutu) ── */
.vsp-sheet {
    background: #fff;
    border-radius: 26px;
    width: 94%;
    max-width: 520px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    box-shadow:
        0 8px 32px rgba(108,99,255,.18),
        0 32px 80px rgba(0,0,0,.38),
        0 0 0 1px rgba(255,255,255,.06);
    animation: vspPop .3s cubic-bezier(.34,1.52,.64,1) both;
}
@keyframes vspPop {
    from { transform: translateY(32px) scale(.96); opacity:0; }
    to   { transform: translateY(0)    scale(1);   opacity:1; }
}

/* ── Header ── */
.vsp-header {
    background: linear-gradient(145deg, #16093c 0%, #3b1f7a 55%, #6d28d9 100%);
    padding: 20px 22px 16px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
/* header arka plan parlaması */
.vsp-header::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 80% 0%, rgba(168,85,247,.35) 0%, transparent 60%);
    pointer-events: none;
}

/* Kapat butonu */
.vsp-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: none; cursor: pointer; color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s, transform .18s;
    z-index: 1;
}
.vsp-close:hover { background: rgba(255,255,255,.26); transform: rotate(90deg); }

/* Başlık satırı */
.vsp-hdr-top {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px; position: relative;
}
.vsp-hdr-icon {
    font-size: 28px;
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255,255,255,.14);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.vsp-hdr-titles { display: flex; flex-direction: column; gap: 2px; }
.vsp-hdr-title  { color: #fff; font-size: 19px; font-weight: 900; letter-spacing: -.2px; }
.vsp-hdr-sub    { color: rgba(255,255,255,.5); font-size: 12.5px; font-weight: 600; }
.vsp-hdr-sub em { color: #c4b5fd; font-style: normal; font-weight: 800; }

/* ── Dalga animasyonu ── */
.vsp-wave {
    display: flex; align-items: flex-end; gap: 2.5px;
    height: 24px; margin-bottom: 11px;
    opacity: .3; transition: opacity .35s;
}
.vsp-wave--on { opacity: 1; }
.vsp-wave-b {
    flex: 1; min-width: 3px; border-radius: 2px;
    background: linear-gradient(to top, #a855f7, #c4b5fd);
    height: 4px;
}
.vsp-wave--on .vsp-wave-b {
    animation: vspWaveBar .65s ease-in-out infinite alternate;
}
@keyframes vspWaveBar {
    0%   { height: 3px; }
    100% { height: 20px; }
}

/* ── Önizleme pill ── */
.vsp-pill {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    background: rgba(255,255,255,.1);
    border: 1.5px solid rgba(255,255,255,.18);
    border-radius: 13px;
    padding: 10px 14px;
    color: rgba(255,255,255,.88);
    font-family: 'Nunito', sans-serif;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .15s;
    position: relative;
}
.vsp-pill:hover {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.38);
    transform: translateY(-1px);
}
.vsp-pill:active { transform: translateY(0); }
.vsp-pill-play {
    flex-shrink: 0;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: background .2s;
}
.vsp-pill:hover .vsp-pill-play { background: rgba(255,255,255,.32); }

/* ── Hız bölümü ── */
.vsp-speed {
    padding: 16px 20px 12px;
    background: #f8f7ff;
    border-bottom: 1px solid #ede9fe;
    flex-shrink: 0;
}
.vsp-speed-top {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.vsp-speed-label { font-size: 13px; font-weight: 800; color: #374151; }
.vsp-speed-chip {
    font-size: 12px; font-weight: 800;
    padding: 3px 12px; border-radius: 20px;
    transition: all .22s;
}

/* EQ barları */
.vsp-eq {
    display: flex; align-items: flex-end; gap: 2px;
    height: 28px; margin-bottom: 8px;
}
.vsp-eq-b {
    flex: 1; border-radius: 2px;
    background: #e2e8f0; min-height: 4px;
    transition: background .1s;
}
.vsp-eq-b--on {
    background: linear-gradient(to top, #6c63ff, #a855f7);
}

/* Slider satırı */
.vsp-slider-wrap {
    display: flex; align-items: center; gap: 10px;
}
.vsp-tick-l, .vsp-tick-r { font-size: 16px; flex-shrink: 0; }
.vsp-slider {
    flex: 1; height: 6px;
    accent-color: #6c63ff;
    cursor: pointer; border-radius: 3px;
}

/* ── Liste başlığı ── */
.vsp-list-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px 8px;
    font-size: 13px; font-weight: 800; color: #374151;
    flex-shrink: 0;
    border-bottom: 1px solid #f1f5f9;
}
.vsp-list-count {
    background: #f1f5f9; color: #6c63ff;
    padding: 2px 10px; border-radius: 12px;
    font-size: 12px; font-weight: 700;
}

/* ── Kaydırmalı liste ── */
.vsp-list {
    flex: 1; overflow-y: auto;
    padding: 8px 14px 20px;
}
.vsp-list::-webkit-scrollbar { width: 4px; }
.vsp-list::-webkit-scrollbar-thumb { background: #ddd6fe; border-radius: 2px; }

/* ── Grup bloğu ── */
.vsp-group { margin-bottom: 4px; }
.vsp-group-hdr {
    display: flex; align-items: center; gap: 7px;
    padding: 10px 4px 5px;
}
.vsp-group-dot {
    width: 22px; height: 22px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 900; color: #fff;
    flex-shrink: 0;
}
.vsp-group-name {
    font-size: 11px; font-weight: 800; color: #94a3b8;
    text-transform: uppercase; letter-spacing: .7px;
    flex: 1;
}
.vsp-group-count {
    background: #f1f5f9; color: #94a3b8;
    padding: 1px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 700;
}

/* ── Ses kartı (button) ── */
.vsp-card {
    display: flex; align-items: center; gap: 11px;
    width: 100%; text-align: left;
    padding: 11px 12px;
    border-radius: 14px;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    margin-bottom: 4px;
    transition: background .18s, border-color .18s, transform .14s, box-shadow .18s;
    outline: none;
    position: relative;
}
.vsp-card:hover {
    background: #f5f3ff !important;
    border-color: #c4b5fd !important;
    transform: translateX(3px);
}
.vsp-card:focus-visible {
    border-color: #6c63ff !important;
    box-shadow: 0 0 0 3px rgba(108,99,255,.22);
}
.vsp-card--on {
    box-shadow: 0 4px 16px rgba(108,99,255,.18);
}
.vsp-card--on:hover { transform: none; }

/* Avatar */
.vsp-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,.22);
    transition: transform .18s;
}
.vsp-card:hover .vsp-avatar { transform: scale(1.08); }

/* İsim & meta */
.vsp-info { flex: 1; min-width: 0; }
.vsp-name {
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
    font-size: 13.5px; font-weight: 800; color: #1e293b;
    margin-bottom: 4px;
}
.vsp-meta {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.vsp-lang {
    font-size: 11px; color: #94a3b8; font-weight: 600;
    background: #f1f5f9; padding: 1px 6px; border-radius: 6px;
}
.vsp-src { font-size: 12px; }

/* Seçim tiki */
.vsp-check {
    color: #6c63ff; font-weight: 900; font-size: 13px;
    background: #ede9fe;
    width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    animation: vspCheckPop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes vspCheckPop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* Rozet çipleri */
.vsp-badge {
    font-size: 9px; font-weight: 800;
    padding: 2px 7px; border-radius: 20px;
    letter-spacing: .4px; white-space: nowrap;
    flex-shrink: 0;
}
/* ♀ Kız Neural — pembe/mor gradyan */
.vb-neural-f { background: linear-gradient(135deg,#db2777,#a855f7); color: #fff; }
/* ♂ Erkek Neural — mavi/mor */
.vb-neural   { background: linear-gradient(135deg,#7c3aed,#6c63ff); color: #fff; }
.vb-apple    { background: #1c1c1e; color: #fff; }
.vb-google   { background: #4285f4; color: #fff; }
.vb-ms       { background: #0078d4; color: #fff; }

/* ── Dinle düğmesi ── */
.vsp-listen {
    flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 50%;
    background: #f1f5f9; color: #374151;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .18s, color .18s, transform .15s;
    border: none; outline: none;
}
.vsp-listen:hover { background: #6c63ff; color: #fff; transform: scale(1.12); }
.vsp-listen:focus-visible { box-shadow: 0 0 0 3px rgba(108,99,255,.3); }
.vsp-listen--playing { background: #6c63ff; color: #fff; animation: vspPulse 1s ease infinite; }
@keyframes vspPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(108,99,255,.5); }
    50%       { box-shadow: 0 0 0 8px rgba(108,99,255,.0); }
}
.vsp-play-ico {
    width: 16px; height: 16px; fill: currentColor;
    pointer-events: none;
}

/* ── Mobil ── */
@media (max-width: 480px) {
    .vsp-sheet   { border-radius: 22px 22px 0 0; max-height: 92vh; }
    .vsp-overlay { align-items: flex-end; }
    .vsp-header  { padding: 18px 18px 14px; }
    .vsp-name    { font-size: 12.5px; }
    .vsp-card    { padding: 10px 10px; }
}

