/* VocabKids - Öğrenci arayüzü: renkli, iri, eğlenceli (8-14 yaş) */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&display=swap');

:root {
    --bg: #EAF4FF;
    --purple: #7C3AED;
    --purple-dark: #6025D9;
    --pink: #F472B6;
    --yellow: #FBBF24;
    --green: #34D399;
    --blue: #38BDF8;
    --red: #F87171;
    --text: #2D2A4A;
    --card: #FFFFFF;
    --radius: 24px;
    --shadow: 0 10px 25px rgba(76, 29, 149, 0.15);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: 'Baloo 2', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

.kid-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

/* Top bar */
.kid-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.kid-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--purple);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kid-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
}

.kid-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
}

.kid-logout {
    color: var(--red);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Gamification stat strip (student dashboard) */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 560px) {
    .stat-strip { grid-template-columns: repeat(4, 1fr); }
}
.stat-pill {
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 0.9rem 0.5rem;
    text-align: center;
}
.stat-pill-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--purple);
}
.stat-pill-label {
    font-size: 0.75rem;
    color: #8b87ab;
    font-weight: 700;
    margin-top: 0.15rem;
}

/* Big playful buttons */
.kid-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 1.75rem;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    color: white;
    background: var(--purple);
    box-shadow: 0 6px 0 var(--purple-dark);
    transition: transform 0.08s ease;
}
.kid-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--purple-dark); }
.kid-btn.block { width: 100%; }
.kid-btn.pink { background: var(--pink); box-shadow: 0 6px 0 #db3d8f; }
.kid-btn.green { background: var(--green); box-shadow: 0 6px 0 #1fa87a; }
.kid-btn.blue { background: var(--blue); box-shadow: 0 6px 0 #1596d6; }

/* Activity cards grid */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}
@media (min-width: 640px) { .activity-grid { grid-template-columns: repeat(3, 1fr); } }

.activity-card {
    border-radius: 20px;
    padding: 1.5rem 1rem;
    text-align: center;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 6px 0 rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.1s;
}
.activity-card:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,0.15); }
.activity-card .emoji { font-size: 2.4rem; display: block; margin-bottom: 0.5rem; }

.activity-card.c1 { background: linear-gradient(160deg, #818CF8, #6366F1); }
.activity-card.c2 { background: linear-gradient(160deg, #C084FC, #A855F7); }
.activity-card.c3 { background: linear-gradient(160deg, #FBBF24, #F59E0B); }
.activity-card.c4 { background: linear-gradient(160deg, #6EE7B7, #10B981); }
.activity-card.c5 { background: linear-gradient(160deg, #F9A8D4, #EC4899); }
.activity-card.c6 { background: linear-gradient(160deg, #F87171, #EF4444); }

/* Word set cards */
.set-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.set-card .set-emoji { font-size: 2.2rem; }
.set-card .set-title { font-weight: 700; font-size: 1.15rem; }
.set-card .set-desc { color: #6b6890; font-size: 0.9rem; }

/* Auth (kid login) */
.kid-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(160deg, #7C3AED 0%, #38BDF8 100%);
}

.kid-auth-card {
    background: var(--card);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 380px;
    padding: 2rem 1.75rem;
    text-align: center;
}

.kid-auth-mascot { font-size: 4rem; margin-bottom: 0.25rem; }
.kid-auth-card h1 { font-size: 1.6rem; margin: 0 0 0.25rem; color: var(--purple); }
.kid-auth-card p.subtitle { color: #8b87ab; margin: 0 0 1.5rem; font-size: 0.95rem; }

.kid-field {
    text-align: left;
    margin-bottom: 1.1rem;
}
.kid-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}
.kid-input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 3px solid #E5E1FA;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.05em;
}
.kid-input:focus { outline: none; border-color: var(--purple); }

.kid-alert-error {
    background: #FFE4E6;
    color: #B91C1C;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.kid-alert-success {
    background: #DCFCE7;
    color: #15803D;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.kid-back-link {
    display: block;
    margin-top: 1.25rem;
    color: #a9a4cc;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Welcome / landing page */
.welcome-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(160deg, #7C3AED 0%, #38BDF8 100%);
    color: white;
}
.welcome-shell .mascot { font-size: 5rem; }
.welcome-shell h1 { font-size: 2.2rem; margin: 0.5rem 0; }
.welcome-shell p { opacity: 0.9; margin-bottom: 2rem; max-width: 420px; }
.welcome-actions { display: flex; flex-direction: column; gap: 0.9rem; width: 100%; max-width: 320px; }
.welcome-admin-link { margin-top: 2rem; color: rgba(255,255,255,0.7); font-size: 0.85rem; font-weight: 600; }

.role-tabs {
    display: flex;
    background: #F3EEFF;
    border-radius: 16px;
    padding: 5px;
    gap: 5px;
    margin-bottom: 1.5rem;
}
.role-tab {
    flex: 1;
    text-align: center;
    padding: 0.65rem 0.4rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #8b87ab;
    white-space: nowrap;
}
.role-tab.active {
    background: white;
    color: var(--purple);
    box-shadow: 0 3px 0 #E5E1FA;
}

/* Practice: shared progress bar */
.progress-track {
    background: #E5E1FA;
    border-radius: 99px;
    height: 14px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.progress-fill {
    background: linear-gradient(90deg, var(--purple), var(--blue));
    height: 100%;
    border-radius: 99px;
    transition: width 0.3s ease;
}
.progress-label {
    text-align: center;
    font-weight: 700;
    color: #8b87ab;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

/* Flashcards */
.flip-scene {
    max-width: 420px;
    margin: 0 auto;
    perspective: 1200px;
}
.flip-card {
    position: relative;
    width: 100%;
    height: 280px;
    cursor: pointer;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}
.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
}
.flip-front {
    background: linear-gradient(160deg, #818CF8, #6366F1);
    color: white;
}
.flip-back {
    background: white;
    color: var(--text);
    transform: rotateY(180deg);
}
.flip-image {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    border: 3px solid rgba(255,255,255,0.6);
    background: white;
}
.flip-word {
    font-size: 2.4rem;
    font-weight: 800;
}
.flip-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.85;
}
.flip-example {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #6b6890;
    font-style: italic;
}
.speak-btn {
    margin-top: 1rem;
    background: rgba(255,255,255,0.25);
    border: none;
    border-radius: 99px;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    cursor: pointer;
    color: white;
}
.flip-back .speak-btn {
    background: var(--purple);
}

.practice-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}
.practice-nav .kid-btn {
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
}
.practice-nav .kid-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.finish-card {
    max-width: 420px;
    margin: 2rem auto 0;
    background: white;
    border-radius: 28px;
    box-shadow: var(--shadow);
    text-align: center;
    padding: 2.5rem 1.5rem;
}
.finish-card .stars { font-size: 2.5rem; margin-bottom: 0.5rem; }

/* Matching */
.match-columns {
    display: flex;
    gap: 1rem;
    max-width: 560px;
    margin: 0 auto;
}
.match-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.match-tile {
    background: white;
    border: 3px solid #E5E1FA;
    border-radius: 16px;
    padding: 0.9rem 0.75rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 0 #E5E1FA;
    transition: transform 0.1s;
}
.match-tile:active { transform: translateY(2px); }
.match-tile-image {
    display: block;
    width: 100%;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.4rem;
}
.match-tile.selected {
    border-color: var(--purple);
    box-shadow: 0 4px 0 var(--purple);
    background: #F3EEFF;
}
.match-tile.correct {
    border-color: var(--green);
    box-shadow: 0 4px 0 #1fa87a;
    background: #E7FBF3;
    color: #0f7a58;
    cursor: default;
    opacity: 0.7;
}
.match-tile.wrong {
    border-color: var(--red);
    box-shadow: 0 4px 0 #d64545;
    background: #FFEDED;
    animation: shake 0.35s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.match-tile:disabled { pointer-events: none; }
.match-stats {
    text-align: center;
    color: #8b87ab;
    font-weight: 700;
    margin-top: 1rem;
}

/* Test (multiple choice) */
.quiz-card {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 2rem 1.5rem;
    text-align: center;
}
.quiz-question-label {
    color: #8b87ab;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.quiz-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 0.75rem;
    border: 3px solid #E5E1FA;
}
.quiz-word {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--purple);
    margin-bottom: 1.5rem;
}
.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.quiz-option {
    background: #F7F5FF;
    border: 3px solid #E5E1FA;
    border-radius: 16px;
    padding: 1rem 0.5rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform 0.1s;
}
.quiz-option:active { transform: translateY(2px); }
.quiz-option.correct {
    background: #E7FBF3;
    border-color: var(--green);
    color: #0f7a58;
}
.quiz-option.wrong {
    background: #FFEDED;
    border-color: var(--red);
    color: #b91c1c;
    animation: shake 0.35s;
}
.quiz-option:disabled { pointer-events: none; opacity: 0.85; }
.quiz-next-wrap {
    margin-top: 1.5rem;
    min-height: 56px;
}

/* Cümle Kur (build sentence) */
.sentence-card {
    max-width: 560px;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 2rem 1.5rem;
    text-align: center;
}
.sentence-hint {
    color: #8b87ab;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.sentence-hint .tr-word {
    color: var(--purple);
    font-size: 1.2rem;
}
.sentence-strip {
    min-height: 64px;
    border: 3px dashed #E5E1FA;
    border-radius: 16px;
    background: #FAF9FF;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    margin: 1.25rem 0;
}
.sentence-strip.wrong-shake { animation: shake 0.35s; border-color: var(--red); }
.sentence-bank {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.sentence-tile {
    background: #F3EEFF;
    border: 2px solid #E5E1FA;
    border-radius: 12px;
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    cursor: pointer;
}
.sentence-strip .sentence-tile {
    background: var(--purple);
    color: white;
    border-color: var(--purple-dark);
}
.sentence-tile.used { visibility: hidden; }
.sentence-feedback {
    min-height: 28px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.sentence-feedback.ok { color: #0f7a58; }

/* Pronunciation */
.pronounce-card {
    max-width: 420px;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 2.5rem 1.5rem;
    text-align: center;
}
.pronounce-word {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--purple);
}
.pronounce-tr {
    color: #8b87ab;
    font-weight: 600;
    margin-top: 0.25rem;
    margin-bottom: 1.5rem;
}
.pronounce-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.mic-btn {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: none;
    background: var(--pink);
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    box-shadow: 0 6px 0 #db3d8f;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mic-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #db3d8f; }
.mic-btn.listening {
    animation: mic-pulse 1s infinite;
    background: var(--red);
    box-shadow: 0 6px 0 #d64545;
}
@keyframes mic-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.listen-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: var(--blue);
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 6px 0 #1596d6;
    align-self: center;
}
.listen-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #1596d6; }
.pronounce-feedback {
    min-height: 32px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.pronounce-feedback.great { color: #0f7a58; }
.pronounce-feedback.ok { color: #b45309; }
.pronounce-feedback.retry { color: #b91c1c; }
.pronounce-heard {
    color: #8b87ab;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 20px;
}
