/* ═══════════════════════════════════════════════════════════════
   Çocuk Akademi - Stil Dosyası
   ═══════════════════════════════════════════════════════════════ */

:root {
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    --bg: #F0F4FF;
    --card: #FFFFFF;
    --text: #1E293B;
    --text-light: #64748B;
    --border: #E2E8F0;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 16px;
    --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ─── Navbar ──────────────────────────────────────────────── */
.navbar {
    background: white;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-links a:hover { transform: scale(1.05); filter: brightness(1.1); }

.nav-home {
    background: #10B981 !important;
    color: white !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
}
.nav-profile {
    background: #F59E0B !important;
    color: white !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
}
.nav-admin { color: var(--warning) !important; }
.nav-logout {
    background: #EF4444 !important;
    color: white !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
}

/* ─── Flash Messages ──────────────────────────────────────── */
.flash-messages {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
    transition: opacity 0.3s;
}

.flash-success { background: #D1FAE5; color: #065F46; }
.flash-error { background: #FEE2E2; color: #991B1B; }
.flash-info { background: #DBEAFE; color: #1E40AF; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }

/* ─── Auth Pages ──────────────────────────────────────────── */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    font-size: 3.5rem;
    margin-bottom: 8px;
}

.auth-header h1 {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 800;
}

.auth-header p {
    color: var(--text-light);
    margin-top: 4px;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-footer { text-align: center; margin-top: 20px; }
.auth-footer a { color: var(--primary); font-weight: 700; text-decoration: none; }

/* Form Elements */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-weight: 700; font-size: 0.9rem; }

.form-input {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

.form-input:focus { border-color: var(--primary); }
.form-input-date { width: auto; }
.form-error { color: var(--danger); font-size: 0.85rem; font-weight: 600; }
.register-parent-section {
    margin-top: 8px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #f8fbff;
}

.register-parent-header {
    margin-bottom: 12px;
}

.register-parent-header h3 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.register-parent-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-info { background: #DBEAFE; color: #1E40AF; }
.btn-warning { background: #FEF3C7; color: #92400E; }
.btn-danger { background: #FEE2E2; color: #991B1B; }
.btn-sm:hover { filter: brightness(0.95); }

/* Avatar Picker */
.avatar-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar-option {
    cursor: pointer;
}

.avatar-option input { display: none; }

.avatar-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.6rem;
    border-radius: 12px;
    border: 3px solid var(--border);
    transition: all 0.2s;
}

.avatar-option input:checked + span {
    border-color: var(--primary);
    background: #EEF2FF;
    transform: scale(1.1);
}

.avatar-picker.small .avatar-option span { width: 40px; height: 40px; font-size: 1.3rem; }

/* Floating Emojis */
.auth-emojis { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }

.floating-emoji {
    position: absolute;
    font-size: 2rem;
    left: var(--x);
    animation: floatUp 8s ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0.3;
}

@keyframes floatUp {
    0% { bottom: -50px; opacity: 0; }
    20% { opacity: 0.3; }
    80% { opacity: 0.3; }
    100% { bottom: 110%; opacity: 0; }
}

/* ─── Dashboard ───────────────────────────────────────────── */
.dashboard { max-width: 1100px; margin: 0 auto; padding: 24px; }

.dashboard-header {
    text-align: center;
    margin-bottom: 32px;
}

.dashboard-header h1 { font-size: 1.8rem; color: var(--primary); }

.grade-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 6px;
}

.section-title { margin-bottom: 20px; color: var(--text); font-size: 1.3rem; }

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.teacher-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--card-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.teacher-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }

.teacher-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.teacher-icon { font-size: 2.5rem; }

.teacher-info-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.teacher-info-btn:hover { opacity: 1; }

.teacher-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text); }
.teacher-card p { color: var(--text-light); font-size: 0.9rem; line-height: 1.5; margin-bottom: 16px; }

.teacher-card-actions { display: flex; }

.btn-chat {
    background: var(--card-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
    width: 100%;
    text-align: center;
}

.btn-chat:hover { filter: brightness(0.9); transform: translateY(-1px); }

/* ─── Modal ───────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active { display: flex; }

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

.modal-lg { max-width: 700px; }

@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } }

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
    z-index: 2;
}

.loading { text-align: center; padding: 40px; color: var(--text-light); font-size: 1.1rem; }

/* Teacher Info Modal */
.teacher-info-modal { padding: 0; }

.teacher-info-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.teacher-info-icon { font-size: 3rem; }
.teacher-info-header h2 { font-size: 1.3rem; margin-bottom: 2px; }
.teacher-info-subject { color: var(--text-light); }

.teacher-info-body { padding: 0 24px 24px; }
.teacher-info-bio { font-size: 1rem; line-height: 1.6; margin-bottom: 16px; color: var(--text); }
.teacher-info-section { margin-bottom: 16px; }
.teacher-info-section h4 { margin-bottom: 8px; }
.teacher-info-desc { color: var(--text-light); font-style: italic; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
    background: #EEF2FF;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ─── Chat ────────────────────────────────────────────────── */
.chat-layout {
    display: flex;
    height: calc(100vh - 60px);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    flex: 1;
    min-width: 0;
}

/* ─── Topic Sidebar ───────────────────────────────────────── */
.topic-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.topic-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topic-sidebar-header h3 {
    margin: 0;
    font-size: 1rem;
}

.topic-sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.topic-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.topic-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: var(--text);
}

.topic-sidebar-item:hover {
    background: #F1F5F9;
}

.topic-sidebar-item.active {
    background: #EEF2FF;
    color: var(--primary);
    font-weight: 600;
}

.topic-sidebar-item.completed .topic-sidebar-name {
    text-decoration: line-through;
    opacity: 0.7;
}

.topic-sidebar-check {
    font-size: 1rem;
    flex-shrink: 0;
}

.topic-sidebar-name {
    flex: 1;
    line-height: 1.3;
}

.chat-topics-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    display: none;
}

.highlight-msg {
    animation: highlightFade 2s ease;
}

@keyframes highlightFade {
    0%, 30% { background: #FEF3C7; box-shadow: 0 0 12px rgba(245, 158, 11, 0.3); }
    100% { background: inherit; box-shadow: none; }
}

@media (max-width: 768px) {
    .topic-sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 16px rgba(0,0,0,0.1);
    }
    .topic-sidebar.open {
        transform: translateX(0);
    }
    .topic-sidebar-close {
        display: block;
    }
    .chat-topics-btn {
        display: block;
    }
}

.chat-header {
    padding: 16px 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0 0 var(--radius) var(--radius);
}

.chat-back {
    color: white;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.2);
}

.chat-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-teacher-icon { font-size: 2rem; }
.chat-header-info h2 { font-size: 1.1rem; }
.chat-header-info p { font-size: 0.85rem; opacity: 0.9; }

.chat-clear-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.chat-welcome-icon { font-size: 4rem; margin-bottom: 12px; }
.chat-welcome h3 { margin-bottom: 8px; color: var(--text); }

.chat-starters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.starter-btn {
    background: white;
    border: 2px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s;
}

.starter-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Messages */
.message {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.message-user { flex-direction: row-reverse; }

.message-avatar { font-size: 1.5rem; flex-shrink: 0; }

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-user .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-assistant .message-bubble {
    background: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.message-text { white-space: pre-wrap; }
.message-time { display: block; font-size: 0.7rem; opacity: 0.6; margin-top: 4px; text-align: right; }

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 16px !important;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--text-light);
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Chat Input */
.chat-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid var(--border);
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

.chat-input-wrapper input:focus { border-color: var(--primary); }

.btn-send {
    background: var(--primary);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send:hover { background: var(--primary-dark); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Profile ─────────────────────────────────────────────── */
.profile-page { max-width: 900px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 24px; }

.profile-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
}

.profile-header { margin-bottom: 20px; }
.profile-avatar-lg { font-size: 4rem; display: block; margin-bottom: 8px; }
.profile-header h2 { font-size: 1.5rem; }

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 20px 0;
}

.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-light); }

.progress-bar-container {
    background: var(--border);
    border-radius: 20px;
    height: 24px;
    position: relative;
    overflow: hidden;
    margin-top: 16px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 20px;
    transition: width 0.5s;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
}

/* Profile Edit */
.profile-edit-section {
    margin-top: 20px;
    text-align: left;
}

.profile-edit-section summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--primary);
    padding: 8px;
}

.profile-edit-form { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }

/* Goals */
.goals-section {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.goals-section h2 { margin-bottom: 16px; }

.goal-add-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.goal-add-form .form-input { flex: 1; min-width: 200px; }

.goals-list { display: flex; flex-direction: column; gap: 8px; }

.goal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.goal-item.completed { opacity: 0.6; }
.goal-item.completed .goal-title { text-decoration: line-through; }

.goal-check {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.goal-content { flex: 1; }
.goal-title { font-weight: 600; display: block; }
.goal-date { font-size: 0.8rem; color: var(--text-light); }

.goal-delete {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--danger);
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.goal-delete:hover { opacity: 1; }

/* Curriculum */
.curriculum-section {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.curriculum-section h2 { margin-bottom: 16px; }

.curriculum-subject {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.curriculum-subject summary {
    padding: 14px 16px;
    font-weight: 700;
    cursor: pointer;
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subject-progress {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 800;
}

.topic-list { padding: 8px 16px; }

.topic-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    cursor: pointer;
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.2s;
}

.topic-item:hover { background: #F8FAFC; }
.topic-item:last-child { border-bottom: none; }

.topic-item input { display: none; }

.topic-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.topic-item input:checked ~ .topic-check {
    background: var(--success);
    border-color: var(--success);
}

.topic-item input:checked ~ .topic-check::after {
    content: '✓';
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
}

.topic-item input:checked ~ .topic-name {
    text-decoration: line-through;
    color: var(--text-light);
}

.topic-name { font-size: 0.95rem; }

/* ─── Admin ───────────────────────────────────────────────── */
.admin-page { max-width: 1100px; margin: 0 auto; padding: 24px; }

.admin-header { margin-bottom: 24px; }
.admin-header h1 { font-size: 1.8rem; color: var(--primary); }
.admin-header p { color: var(--text-light); }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-stat-icon { font-size: 2rem; }
.admin-stat-value { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.admin-stat-label { font-size: 0.85rem; color: var(--text-light); }

.admin-section {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.admin-section h2 { margin-bottom: 16px; }

/* Teacher Stats */
.admin-teacher-stats { display: flex; flex-direction: column; gap: 10px; }

.admin-teacher-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.admin-teacher-icon { font-size: 1.3rem; }
.admin-teacher-name { width: 200px; font-weight: 600; font-size: 0.9rem; }
.admin-teacher-count { width: 80px; font-size: 0.85rem; color: var(--text-light); text-align: right; }

.admin-teacher-bar {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.admin-teacher-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }

/* Users Table */
.admin-table-container { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.admin-table th {
    background: var(--bg);
    font-weight: 700;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.admin-table tr:hover { background: #FAFBFF; }

.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* User Detail Modal */
.user-detail { padding: 24px; }

.user-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.user-detail-avatar { font-size: 3rem; }
.user-detail-header h2 { margin-bottom: 2px; }
.text-muted { color: var(--text-light); font-size: 0.85rem; }

.user-detail-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.admin-messages-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-msg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.85rem;
}

.admin-msg-role { font-size: 1rem; }
.admin-msg-teacher { font-weight: 700; color: var(--primary); min-width: 120px; }
.admin-msg-text { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-msg-time { color: var(--text-light); font-size: 0.75rem; white-space: nowrap; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
    .nav-links { gap: 4px; }
    .nav-links a { padding: 6px 10px; font-size: 0.8rem; }
    .teachers-grid { grid-template-columns: 1fr; }
    .profile-stats { gap: 16px; }
    .admin-teacher-name { width: 120px; }
    .admin-table { font-size: 0.8rem; }
    .goal-add-form { flex-direction: column; }
    .chat-header { border-radius: 0; }
}

.main-content { min-height: calc(100vh - 60px); }

/* ─── Teacher Photos ──────────────────────────────────────── */
.teacher-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card-color);
}

.teacher-info-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ─── Voice Recording ─────────────────────────────────────── */
.btn-voice {
    background: none;
    border: 2px solid var(--border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-voice:hover { border-color: var(--danger); }

.btn-voice.recording {
    background: var(--danger);
    border-color: var(--danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.voice-status {
    text-align: center;
    padding: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--danger);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── Topic Study Link ────────────────────────────────────── */
.topic-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #F1F5F9;
}

.topic-item-row:last-child { border-bottom: none; }

.topic-item-row .topic-item {
    flex: 1;
    border-bottom: none;
}

.topic-study-link {
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 16px;
    background: #EEF2FF;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.topic-study-link:hover {
    background: var(--primary);
    color: white;
}

/* ─── Photo Upload Label ──────────────────────────────────── */
.photo-upload-label {
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ─── Chat Photo Button & Images ──────────────────────────── */
.btn-photo {
    background: white;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-photo:hover { border-color: var(--primary); }

.image-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.image-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
}

.image-preview button {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
}

.chat-image {
    max-width: 240px;
    max-height: 200px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.chat-image:hover { opacity: 0.9; }

.image-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.image-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ─── Message Footer (time + TTS) ─────────────────────────── */
.message-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

/* ─── TTS Button ──────────────────────────────────────────── */
.btn-tts, .btn-img-gen {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 6px;
    opacity: 0.5;
    transition: all 0.2s ease;
}
.btn-tts:hover, .btn-img-gen:hover {
    opacity: 1;
    background: rgba(0,0,0,0.06);
    transform: scale(1.15);
}
.btn-tts.playing {
    opacity: 1;
    animation: pulse-tts 1s ease-in-out infinite;
}

/* Generated images inside chat bubbles */
.generated-image {
    max-width: 280px;
    border-radius: 12px;
    margin: 8px 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.generated-image:hover {
    transform: scale(1.02);
}
@keyframes pulse-tts {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ─── Animated Avatars ────────────────────────────────────── */
.animated-avatar {
    display: inline-block;
    animation: avatar-float 3s ease-in-out infinite;
}
@keyframes avatar-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Different delays per message so they don't all sync */
.message-row:nth-child(odd) .animated-avatar {
    animation-delay: 0.3s;
}
.message-row:nth-child(3n) .animated-avatar {
    animation-delay: 0.7s;
}

/* Dashboard teacher card avatars */
.teacher-card .animated-avatar {
    font-size: 2.5rem;
    animation: avatar-bounce 2s ease-in-out infinite;
}
@keyframes avatar-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-6px) rotate(-3deg); }
    75% { transform: translateY(-2px) rotate(3deg); }
}

/* ─── Yardım Butonu (Navbar) ──────────────────────────────── */
.nav-help {
    background: var(--primary-light) !important;
    color: white !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
}
.nav-help:hover {
    background: var(--primary) !important;
    transform: scale(1.05);
}

/* ─── Yardım Sayfası ─────────────────────────────────────── */
.help-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.help-hero {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 48px 32px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}
.help-hero h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}
.help-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.help-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.help-section h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.help-desc {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}
.help-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: #FEF3C7;
    border-radius: var(--radius-sm);
    color: #92400E;
    font-size: 0.9rem;
}

/* Kullanım Adımları */
.help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.help-card {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}
.help-card:hover { transform: translateY(-4px); }
.help-card-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.help-card h3 {
    font-size: 1.05rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}
.help-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Özellikler */
.help-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.help-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: transform 0.2s;
}
.help-feature:hover { transform: translateX(4px); }
.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}
.help-feature h4 {
    color: var(--primary-dark);
    margin-bottom: 4px;
}
.help-feature p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Ders Chipleri */
.help-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.subject-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    background: var(--chip-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.subject-chip:hover { transform: scale(1.08); }

/* Faydalar */
.help-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.benefit-card {
    text-align: center;
    padding: 24px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: transform 0.2s;
}
.benefit-card:hover { transform: translateY(-4px); }
.benefit-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}
.benefit-card h4 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}
.benefit-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* SSS */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.faq-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-align: left;
    transition: background 0.2s;
}
.faq-question:hover { background: var(--bg); }

.faq-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
    color: var(--text-light);
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 20px 16px;
}
.faq-answer p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.9rem;
}

/* Alt Bilgi */
.help-footer {
    text-align: center;
    padding: 32px;
    margin-bottom: 24px;
}
.help-footer p {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}
.btn-back-dashboard {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.btn-back-dashboard:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .help-hero { padding: 32px 20px; }
    .help-hero h1 { font-size: 1.5rem; }
    .help-section { padding: 20px; }
    .help-cards { grid-template-columns: 1fr 1fr; }
    .help-benefits { grid-template-columns: 1fr; }
}

/* ─── Oyunlaştırma Paneli ─────────────────────────────────────── */

.gamification-panel {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 28px;
    color: white;
    box-shadow: 0 8px 32px rgba(67, 56, 202, 0.3);
    position: relative;
    overflow: hidden;
}
.gamification-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

/* Level Card */
.gp-level-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.gp-avatar-area {
    position: relative;
    flex-shrink: 0;
}
.gp-big-avatar {
    font-size: 3.5rem;
    display: block;
    background: rgba(255,255,255,0.15);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.3);
}
.gp-level-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    border: 2px solid #1e1b4b;
}
.gp-info { flex: 1; min-width: 0; }
.gp-info h2 {
    font-size: 1.4rem;
    margin-bottom: 2px;
    color: white;
}
.gp-title {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fbbf24;
}
.gp-xp-bar-wrapper { margin-top: 4px; }
.gp-xp-bar {
    height: 12px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.gp-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #34d399, #10b981, #fbbf24);
    border-radius: 10px;
    transition: width 0.8s ease;
    position: relative;
}
.gp-xp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: rgba(255,255,255,0.2);
    border-radius: 10px 10px 0 0;
}
.gp-xp-text {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    margin-top: 4px;
    opacity: 0.8;
}

/* Stats Row */
.gp-stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.gp-stat {
    flex: 1;
    min-width: 70px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px 8px;
    transition: transform 0.2s;
}
.gp-stat:hover { transform: translateY(-2px); background: rgba(255,255,255,0.15); }
.gp-stat-icon { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.gp-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fbbf24;
}
.gp-stat-label {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* Badges */
.gp-badges-section { margin-bottom: 16px; }
.gp-badges-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: white;
}
.gp-badges-row, .gp-next-badges-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.gp-badge {
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    min-width: 70px;
    transition: transform 0.2s;
}
.gp-badge:hover { transform: scale(1.05); }
.gp-badge.earned {
    background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.15));
    border: 1px solid rgba(251,191,36,0.3);
}
.gp-badge.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}
.gp-badge-icon { font-size: 1.5rem; display: block; margin-bottom: 2px; }
.gp-badge-name { font-size: 0.65rem; display: block; font-weight: 600; }
.gp-badge-desc {
    font-size: 0.6rem;
    display: block;
    opacity: 0.7;
    margin-top: 4px;
}
.gp-badge.big {
    min-width: 100px;
    padding: 16px;
}
.gp-badge.big .gp-badge-icon { font-size: 2.5rem; }
.gp-badge.big .gp-badge-name { font-size: 0.85rem; }
.gp-badge-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s;
}
.gp-badge-more:hover { background: rgba(255,255,255,0.2); }

/* Next Badges */
.gp-next-badges h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.8);
}
.gp-next-badges-row {
    max-height: 80px;
    overflow: hidden;
}

/* All Badges Modal */
.all-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.all-badges-grid .gp-badge {
    background: var(--bg);
    color: var(--text);
}
.all-badges-grid .gp-badge.earned {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 2px solid #F59E0B;
}
.all-badges-grid .gp-badge-name { color: var(--text); }
.all-badges-grid .gp-badge-desc { color: var(--text-light); }

/* XP Popup */
.xp-popup {
    position: fixed;
    top: 80px;
    right: 24px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1.1rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
    animation: xpPopIn 0.4s ease, xpPopOut 0.4s ease 1.6s forwards;
}
.xp-popup-icon { font-size: 1.3rem; }

@keyframes xpPopIn {
    from { transform: translateX(100px) scale(0.5); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes xpPopOut {
    from { transform: translateX(0) scale(1); opacity: 1; }
    to { transform: translateX(100px) scale(0.5); opacity: 0; }
}

/* Tooltip Popup */
.gp-tooltip-popup {
    position: absolute;
    width: 280px;
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: tooltipIn 0.25s ease;
    border: 2px solid var(--primary-light);
}
.gp-tooltip-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--primary-light);
}
.gp-tooltip-header {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 6px;
}
.gp-tooltip-body {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
}
@keyframes tooltipIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.gp-stat { cursor: pointer; }
.gp-badge { cursor: pointer; }

/* Responsive Gamification */
@media (max-width: 768px) {
    .gamification-panel { padding: 16px; }
    .gp-level-card { flex-direction: column; text-align: center; gap: 12px; }
    .gp-big-avatar { font-size: 2.5rem; width: 64px; height: 64px; margin: 0 auto; }
    .gp-info h2 { font-size: 1.1rem; }
    .gp-stats-row { gap: 6px; }
    .gp-stat { padding: 8px 4px; min-width: 55px; }
    .gp-stat-icon { font-size: 1.2rem; }
    .gp-stat-value { font-size: 1rem; }
    .gp-badge { min-width: 60px; padding: 6px 8px; }
    .gp-next-badges-row { max-height: 60px; }
}

/* ═══════════════════════════════════════════════════════════════
   Oyunlar Sayfası
   ═══════════════════════════════════════════════════════════════ */

/* Navbar Oyunlar Butonu */
.nav-games {
    background: #EC4899 !important;
    color: white !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
}
.nav-games:hover {
    background: #DB2777 !important;
    transform: scale(1.05);
}

/* Navbar Sınavlar Butonu */
.nav-quiz {
    background: #8B5CF6 !important;
    color: white !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
}
.nav-quiz:hover {
    background: #7C3AED !important;
    transform: scale(1.05);
}

.games-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
}

/* Hero */
.games-hero {
    text-align: center;
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: white;
    padding: 40px 24px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}
.games-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.games-hero p { font-size: 1.1rem; opacity: 0.9; }

/* Oyun Kartları Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.game-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}
.game-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #EC4899, #8B5CF6, #06B6D4);
    opacity: 0;
    transition: opacity 0.3s;
}
.game-card:hover::before { opacity: 1; }
.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-color: #EC4899;
}
.game-card:active { transform: translateY(-2px) scale(0.98); }

/* ℹ️ Info Butonu */
.game-info-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
    padding: 0;
    line-height: 1;
}
.game-info-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 2px 10px rgba(99,102,241,0.3);
}

.game-card-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
    animation: cardBounce 2s ease-in-out infinite;
}
@keyframes cardBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.game-card h3 {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 6px;
}
.game-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.game-badge {
    display: inline-block;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Oyun Alanı */
#gameArea {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.game-back-btn {
    background: var(--bg);
    border: 2px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    color: var(--text);
}
.game-back-btn:hover { background: var(--border); }

.game-title-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}
#gameIcon { font-size: 1.5rem; }

.game-progress {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    white-space: nowrap;
}

.game-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}
.game-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #EC4899, #8B5CF6);
    border-radius: 8px;
    transition: width 0.4s ease;
}

.game-question {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.6;
}
.math-equation {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: 3px;
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius-sm);
}
.word-hint {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 600;
}
.word-masked {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: 6px;
    font-family: monospace;
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.game-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.game-option-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: #F0F0FF;
    transform: scale(1.03);
}
.game-option-btn.correct {
    background: #D1FAE5 !important;
    border-color: #10B981 !important;
    color: #065F46 !important;
    animation: correctPulse 0.4s ease;
}
.game-option-btn.wrong {
    background: #FEE2E2 !important;
    border-color: #EF4444 !important;
    color: #991B1B !important;
    animation: shake 0.4s ease;
}
@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Geri Bildirim */
.game-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    font-weight: 700;
    font-size: 1rem;
    animation: fadeIn 0.2s ease;
}
.feedback-correct { background: #D1FAE5; color: #065F46; }
.feedback-wrong { background: #FEE2E2; color: #991B1B; }
.feedback-icon { font-size: 1.3rem; }

/* Sonuç Ekranı */
#gameResult {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    animation: fadeIn 0.4s ease;
}
.result-card {
    background: white;
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
    max-width: 420px;
    width: 100%;
}
.result-emoji {
    font-size: 4rem;
    margin-bottom: 12px;
    display: block;
    animation: resultBounce 0.6s ease;
}
@keyframes resultBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.result-card h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 20px;
}
.result-score {
    margin-bottom: 16px;
}
.result-score-num {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
}
.result-score-total {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 700;
}
.result-stars {
    font-size: 2rem;
    margin-bottom: 16px;
    letter-spacing: 4px;
}
.result-xp {
    margin-bottom: 24px;
    min-height: 40px;
}
.xp-gain {
    display: inline-block;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1rem;
    animation: fadeIn 0.4s ease;
}
.level-up-text {
    display: inline-block;
    color: var(--primary);
    font-weight: 800;
    font-size: 1rem;
    margin-top: 8px;
    animation: resultBounce 0.5s ease;
}
.result-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.result-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.result-btn.replay {
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: white;
}
.result-btn.replay:hover { transform: scale(1.05); filter: brightness(1.1); }
.result-btn.back {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}
.result-btn.back:hover { background: var(--border); }

/* Responsive */
/* ─── Oyun Giriş Ekranı ──────────────────────────────── */
#gameIntro {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 24px;
}
.game-intro-card {
    background: white;
    border-radius: 24px;
    padding: 40px 32px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
    animation: introSlide 0.5s ease;
}
@keyframes introSlide {
    0% { transform: translateY(30px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
.game-intro-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}
.game-intro-title {
    font-size: 1.6rem;
    color: var(--text);
    margin-bottom: 20px;
    font-weight: 800;
}
.game-intro-card .info-step {
    text-align: left;
}
.game-intro-card .info-tip {
    text-align: left;
}
.game-intro-start-btn {
    display: block;
    width: 100%;
    padding: 16px;
    margin-top: 24px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.game-intro-start-btn:hover {
    transform: scale(1.04);
    filter: brightness(1.1);
    box-shadow: 0 6px 24px rgba(16,185,129,0.4);
}

@media (max-width: 600px) {
    .games-hero { padding: 28px 16px; }
    .games-hero h1 { font-size: 1.5rem; }
    .games-grid { grid-template-columns: 1fr; }
    .game-question-area { padding: 20px 16px; min-height: 250px; }
    .math-equation { font-size: 1.5rem; letter-spacing: 2px; padding: 14px; }
    .word-masked { font-size: 1.4rem; letter-spacing: 4px; }
    .game-options { grid-template-columns: 1fr; }
    .game-option-btn { padding: 14px; font-size: 1rem; }
    .result-card { padding: 32px 20px; }
    .result-score-num { font-size: 2.5rem; }
    .game-header { flex-wrap: wrap; }
    .game-title-bar { font-size: 1rem; }
    .game-mascot-row { gap: 8px; }
    .game-mascot { font-size: 2rem; width: 45px; height: 45px; }
    .game-mascot-bubble { font-size: 0.85rem; padding: 8px 12px; }
    .game-info-content { padding: 28px 18px; margin: 16px; }
    .game-intro-card { padding: 28px 18px; }
    .game-intro-icon { font-size: 3rem; }
    .game-intro-title { font-size: 1.3rem; }
    .game-combo { padding: 4px 10px; font-size: 0.8rem; }
    .game-live-score { font-size: 0.85rem; padding: 6px 14px; }
}

/* ─── Oyun Bilgi Modalı ──────────────────────────────── */
.game-info-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
}
.game-info-content {
    background: white;
    border-radius: 20px;
    padding: 36px 28px;
    max-width: 460px;
    width: 90%;
    position: relative;
    animation: modalPop 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
@keyframes modalPop {
    0% { transform: scale(0.8) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.game-info-close {
    position: absolute;
    top: 12px; right: 14px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-light);
}
.game-info-close:hover { background: var(--danger); color: white; }
.game-info-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 8px;
    display: block;
}
.game-info-content h2 {
    text-align: center;
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 20px;
}
.game-info-body {
    margin-bottom: 24px;
}
.info-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.5;
}
.info-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
}
.info-tip {
    background: #FEF3C7;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.9rem;
    color: #92400E;
    margin-top: 8px;
    border-left: 4px solid #F59E0B;
}
.game-info-play-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.game-info-play-btn:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
    box-shadow: 0 4px 20px rgba(236,72,153,0.4);
}

/* ─── Maskot Satırı ──────────────────────────────────── */
.game-mascot-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}
.game-mascot {
    font-size: 2.5rem;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(245,158,11,0.25);
    animation: mascotWiggle 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes mascotWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}
.game-mascot-bubble {
    background: white;
    border: 2px solid var(--border);
    border-radius: 16px 16px 16px 4px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
}
.mascot-bubble-pop {
    animation: bubblePop 0.4s ease;
}
@keyframes bubblePop {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ─── Soru Numarası Rozeti ───────────────────────────── */
.game-question-num-badge {
    display: inline-block;
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ─── Soru alanı giriş animasyonu ────────────────────── */
.question-enter {
    animation: questionSlide 0.35s ease;
}
@keyframes questionSlide {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Soru alanı zenginleştirilmiş */
.game-question-area {
    background: white;
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow);
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    position: relative;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

/* Seçenek butonları etkileşimli */
.game-option-btn {
    padding: 16px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    animation: optionFadeIn 0.3s ease backwards;
}
@keyframes optionFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Kombo Göstergesi ───────────────────────────────── */
.game-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.game-combo {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #F97316, #EF4444);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    animation: comboPulse 0.6s ease infinite alternate;
}
@keyframes comboPulse {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}
.combo-fire { font-size: 1rem; }
.combo-num { font-size: 1.1rem; }
.combo-label { font-size: 0.75rem; letter-spacing: 1px; }

/* ─── Canlı Skor ─────────────────────────────────────── */
.game-live-score {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: white;
    border: 2px solid var(--border);
    padding: 8px 18px;
    border-radius: 24px;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 6px;
}
.live-score-icon { font-size: 1.1rem; }

/* ─── Uçuşan Dekoratif Emojiler ─────────────────────── */
.game-floating-decor {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.float-emoji {
    position: absolute;
    font-size: 1.4rem;
    opacity: 0.15;
    animation: floatUp 6s ease-in-out infinite;
}
@keyframes floatUp {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.15; }
    50% { transform: translateY(-40px) rotate(15deg); opacity: 0.25; }
}

/* ─── Confetti ───────────────────────────────────────── */
.confetti-container {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}
.confetti-piece {
    position: absolute;
    top: -20px;
    font-size: 1rem;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   SINAV SAYFASI STİLLERİ
   ═══════════════════════════════════════════════════════ */
.quiz-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}
.quiz-hero {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    border-radius: var(--radius);
    color: white;
    margin-bottom: 28px;
}
.quiz-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.quiz-hero p { font-size: 1.05rem; opacity: 0.9; }

/* Ders Kartları */
.quiz-subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.quiz-subject-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.25s;
}
.quiz-subject-card:hover {
    border-color: #8B5CF6;
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(139,92,246,0.18);
}
.quiz-subject-icon { font-size: 2.8rem; margin-bottom: 10px; }
.quiz-subject-card h3 { font-size: 1rem; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.quiz-topic-count { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

/* Konu Seçim */
.quiz-topic-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.quiz-topic-header h2 { font-size: 1.4rem; color: var(--text); }
.quiz-back-btn {
    background: #F3F4F6;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
}
.quiz-back-btn:hover { background: #E5E7EB; }

.quiz-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.quiz-mode-btn {
    padding: 10px 24px;
    border: 2px solid #E5E7EB;
    border-radius: 24px;
    background: white;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
}
.quiz-mode-btn small { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.quiz-mode-btn.active {
    border-color: #8B5CF6;
    background: #F5F3FF;
    color: #7C3AED;
}
.quiz-mode-btn:hover { border-color: #8B5CF6; }

.quiz-topics-list {
    display: grid;
    gap: 10px;
}
.quiz-topic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.quiz-topic-item:hover {
    border-color: #8B5CF6;
    transform: translateX(6px);
    background: #F5F3FF;
}
.quiz-topic-mix {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    font-weight: 700;
}
.quiz-topic-icon { font-size: 1.2rem; }
.quiz-topic-name { font-size: 0.95rem; font-weight: 600; color: var(--text); }

/* Sınav Alanı */
.quiz-area-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}
.quiz-area-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}
.quiz-progress-info {
    background: #F3F4F6;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    color: #6D28D9;
}
.quiz-progress-bar {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}
.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8B5CF6, #6D28D9);
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}
.quiz-question-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow);
    text-align: center;
}
.quiz-card-enter { animation: questionSlide 0.35s ease; }
.quiz-q-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: white;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 16px;
}
.quiz-question-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 24px;
}
.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.quiz-option-btn {
    padding: 14px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    animation: optionFadeIn 0.3s ease backwards;
}
.quiz-option-btn:hover:not(:disabled) {
    border-color: #8B5CF6;
    background: #F5F3FF;
    transform: scale(1.02);
}
.quiz-option-btn.correct {
    background: #D1FAE5 !important;
    border-color: #10B981 !important;
    color: #065F46 !important;
}
.quiz-option-btn.wrong {
    background: #FEE2E2 !important;
    border-color: #EF4444 !important;
    color: #991B1B !important;
}
.quiz-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    animation: fadeIn 0.3s ease;
}
.quiz-fb-correct { background: #D1FAE5; color: #065F46; }
.quiz-fb-wrong { background: #FEE2E2; color: #991B1B; }
.quiz-feedback-icon { font-size: 1.4rem; }
.quiz-feedback-text { font-size: 0.95rem; }

/* Sonuç Ekranı */
#quizResult {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
}
.quiz-result-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
    animation: introSlide 0.4s ease;
}
.quiz-result-badge { font-size: 4rem; margin-bottom: 12px; }
.quiz-result-card h2 { font-size: 1.4rem; margin-bottom: 8px; color: var(--text); }
.quiz-result-subject { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; font-weight: 600; }
.quiz-result-score { margin-bottom: 12px; }
.quiz-score-num { font-size: 3.5rem; font-weight: 900; color: #8B5CF6; }
.quiz-score-total { font-size: 1.3rem; font-weight: 700; color: var(--muted); }
.quiz-result-grade { margin-bottom: 12px; }
.grade-letter {
    display: inline-block;
    font-size: 2rem;
    font-weight: 900;
    padding: 4px 20px;
    border-radius: 12px;
    margin-right: 8px;
}
.grade-Ap { background: #D1FAE5; color: #065F46; }
.grade-A { background: #D1FAE5; color: #065F46; }
.grade-B { background: #FEF3C7; color: #92400E; }
.grade-C { background: #FEF3C7; color: #92400E; }
.grade-D { background: #FEE2E2; color: #991B1B; }
.grade-F { background: #FEE2E2; color: #991B1B; }
.grade-pct { font-size: 1rem; color: var(--muted); font-weight: 700; }
.quiz-result-stars { font-size: 2rem; margin-bottom: 12px; letter-spacing: 4px; }
.quiz-result-xp { margin-bottom: 16px; }
.xp-gain { font-size: 1.1rem; font-weight: 800; color: #8B5CF6; }
.level-up-text { font-size: 1rem; font-weight: 700; color: #F59E0B; }
.quiz-result-review { margin-bottom: 20px; text-align: left; }
.quiz-review-title { font-weight: 800; font-size: 0.9rem; margin-bottom: 8px; color: var(--text); }
.quiz-review-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}
.review-correct { background: #F0FDF4; }
.review-wrong { background: #FEF2F2; }
.review-num { font-weight: 800; color: var(--muted); min-width: 20px; }
.review-icon { font-size: 1rem; }
.review-answer { color: #991B1B; font-weight: 700; }
.quiz-result-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.quiz-result-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.quiz-result-btn.replay { background: #8B5CF6; color: white; }
.quiz-result-btn.replay:hover { background: #7C3AED; }
.quiz-result-btn.topics { background: #F3F4F6; color: var(--text); }
.quiz-result-btn.topics:hover { background: #E5E7EB; }
.quiz-result-btn.subjects { background: #F3F4F6; color: var(--text); }
.quiz-result-btn.subjects:hover { background: #E5E7EB; }

/* Sınav Responsive */
@media (max-width: 600px) {
    .quiz-hero h1 { font-size: 1.5rem; }
    .quiz-subjects-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
    .quiz-subject-icon { font-size: 2.2rem; }
    .quiz-subject-card { padding: 18px 12px; }
    .quiz-options { grid-template-columns: 1fr; }
    .quiz-question-card { padding: 24px 16px; }
    .quiz-question-text { font-size: 1rem; }
    .quiz-result-card { padding: 28px 18px; }
    .quiz-score-num { font-size: 2.5rem; }
    .quiz-area-header { flex-wrap: wrap; }
    .quiz-mode-selector { flex-direction: column; }
    .quiz-mode-btn { width: 100%; text-align: center; }
}

/* ─── Ebeveyn Paneli ──────────────────────────────────────────── */

.parent-auth-card { border-top: 4px solid #6366f1; }
.parent-btn { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; }
.parent-btn:hover { background: linear-gradient(135deg, #4f46e5, #7c3aed) !important; }
.form-error { color: #ef4444; font-size: 0.85rem; display: block; margin-top: 4px; }
.form-hint { color: #9ca3af; font-size: 0.8rem; display: block; margin-top: 4px; }

.parent-dashboard { max-width: 1100px; margin: 0 auto; padding: 20px; }

.parent-header {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white; padding: 24px 32px; border-radius: 20px; margin-bottom: 24px;
}
.parent-header h1 { margin: 0; font-size: 1.6rem; }
.parent-header p { margin: 6px 0 0; opacity: 0.9; font-size: 1.05rem; }
.parent-header-date { font-size: 0.9rem; opacity: 0.85; text-align: right; }

/* Tabs */
.parent-tabs {
    display: flex; gap: 8px; margin-bottom: 24px;
    background: white; padding: 8px; border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow-x: auto;
}
.parent-tab {
    padding: 12px 24px; border: none; background: transparent;
    border-radius: 12px; font-weight: 700; font-size: 0.95rem;
    cursor: pointer; color: #6b7280; transition: all 0.2s;
    white-space: nowrap;
}
.parent-tab:hover { background: #f3f4f6; color: #4f46e5; }
.parent-tab.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.parent-tab-content { display: none; }
.parent-tab-content.active { display: block; }

/* Stats Grid */
.parent-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; margin-bottom: 24px;
}
.parent-stat-card {
    background: white; border-radius: 16px; padding: 24px; text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.2s;
}
.parent-stat-card:hover { transform: translateY(-3px); }
.stat-icon { font-size: 2rem; margin-bottom: 8px; }
.stat-value { font-size: 2rem; font-weight: 900; color: #1f2937; }
.stat-label { font-size: 0.85rem; color: #9ca3af; margin-top: 4px; font-weight: 600; }

.stat-xp { border-top: 4px solid #f59e0b; }
.stat-level { border-top: 4px solid #6366f1; }
.stat-streak { border-top: 4px solid #ef4444; }
.stat-messages { border-top: 4px solid #10b981; }
.stat-topics { border-top: 4px solid #3b82f6; }
.stat-goals { border-top: 4px solid #f97316; }

/* Card */
.parent-card {
    background: white; border-radius: 16px; padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 20px;
}
.parent-card h3 { margin: 0 0 16px; font-size: 1.15rem; color: #1f2937; }
.parent-empty { color: #9ca3af; text-align: center; padding: 20px; font-size: 0.95rem; }

/* XP Bar */
.parent-xp-bar-container { margin-top: 8px; }
.parent-xp-bar {
    height: 16px; background: #e5e7eb; border-radius: 10px; overflow: hidden;
}
.parent-xp-fill {
    height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 10px; transition: width 0.5s ease;
}
.parent-xp-label { font-size: 0.85rem; color: #6b7280; margin-top: 8px; text-align: center; }

/* Chart */
.parent-chart-container { height: 280px; position: relative; }

/* Badges */
.parent-badges-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.parent-badge {
    display: flex; flex-direction: column; align-items: center;
    background: #f9fafb; border-radius: 12px; padding: 16px 12px;
    text-align: center; transition: transform 0.2s;
}
.parent-badge:hover { transform: scale(1.05); }
.parent-badge-icon { font-size: 2rem; margin-bottom: 6px; }
.parent-badge-name { font-weight: 700; font-size: 0.85rem; color: #1f2937; }
.parent-badge-date { font-size: 0.75rem; color: #9ca3af; margin-top: 4px; }

/* Date Picker */
.parent-date-picker {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.parent-date-picker label { font-weight: 700; color: #374151; }
.parent-date-picker .form-input { max-width: 200px; }

/* Daily Summary */
.daily-summary-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-top: 16px;
}
.daily-summary-item {
    text-align: center; background: #f9fafb; border-radius: 12px; padding: 16px;
}
.ds-icon { display: block; font-size: 1.5rem; margin-bottom: 6px; }
.ds-value { display: block; font-size: 1.5rem; font-weight: 900; color: #1f2937; }
.ds-label { display: block; font-size: 0.8rem; color: #9ca3af; margin-top: 4px; }

/* XP Log */
.xp-log-list { display: flex; flex-direction: column; gap: 8px; }
.xp-log-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    background: #f9fafb; border-radius: 10px; font-size: 0.9rem;
}
.xp-time { color: #9ca3af; font-weight: 600; min-width: 50px; }
.xp-reason { flex: 1; color: #374151; }
.xp-amount { color: #10b981; font-weight: 800; }

/* Daily messages */
.daily-teacher-section { margin-bottom: 20px; }
.daily-teacher-header {
    font-weight: 800; font-size: 1.05rem; color: #4f46e5;
    padding: 10px 0; border-bottom: 2px solid #e5e7eb; margin-bottom: 12px;
}
.daily-teacher-header .msg-count { color: #9ca3af; font-weight: 600; font-size: 0.85rem; }
.daily-messages { display: flex; flex-direction: column; gap: 10px; }
.daily-msg {
    padding: 12px 16px; border-radius: 12px; font-size: 0.9rem;
}
.daily-msg.msg-user { background: #eff6ff; border-left: 3px solid #3b82f6; }
.daily-msg.msg-ai { background: #f0fdf4; border-left: 3px solid #10b981; }
.msg-label { font-weight: 700; font-size: 0.8rem; color: #6b7280; }
.msg-time { float: right; font-size: 0.75rem; color: #9ca3af; }
.msg-content { margin-top: 6px; color: #374151; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }

/* Topics list */
.topics-list { display: flex; flex-direction: column; gap: 8px; }
.topic-item { padding: 10px 16px; background: #f0fdf4; border-radius: 10px; font-size: 0.9rem; color: #374151; }

/* Filter Bar */
.parent-filter-bar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 0.8rem; font-weight: 700; color: #6b7280; }
.filter-group .form-input { max-width: 180px; }

/* Chat History */
.chat-history-list { display: flex; flex-direction: column; gap: 12px; }
.ch-message { padding: 14px 18px; border-radius: 14px; }
.ch-message.ch-user { background: #eff6ff; border-left: 3px solid #3b82f6; }
.ch-message.ch-ai { background: #f0fdf4; border-left: 3px solid #10b981; }
.ch-meta { display: flex; justify-content: space-between; margin-bottom: 6px; }
.ch-role { font-weight: 700; font-size: 0.85rem; color: #6366f1; }
.ch-time { font-size: 0.8rem; color: #9ca3af; }
.ch-content { color: #374151; line-height: 1.6; font-size: 0.92rem; white-space: pre-wrap; word-wrap: break-word; }
.ch-image { max-width: 200px; border-radius: 10px; margin-top: 8px; }

/* Pagination */
.parent-pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 12px; margin: 20px 0;
}
.pag-info { font-size: 0.85rem; color: #6b7280; font-weight: 600; }
.btn-small {
    padding: 8px 16px; border: none; border-radius: 10px;
    background: #6366f1; color: white; font-weight: 700;
    font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
}
.btn-small:hover { background: #4f46e5; }

/* Subject Progress */
.parent-progress-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.parent-subject-card {
    background: white; border-radius: 16px; padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.subject-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.subject-icon { font-size: 1.5rem; }
.subject-name { font-weight: 800; font-size: 1rem; color: #1f2937; }
.subject-progress-bar {
    height: 12px; background: #e5e7eb; border-radius: 8px; overflow: hidden;
}
.subject-progress-fill {
    height: 100%; background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 8px; transition: width 0.5s ease;
}
.subject-progress-text {
    font-size: 0.8rem; color: #6b7280; margin-top: 8px; text-align: right; font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .parent-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .daily-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .parent-header { flex-direction: column; text-align: center; }
    .parent-header-date { text-align: center; margin-top: 8px; }
    .parent-filter-bar { flex-direction: column; }
    .filter-group .form-input { max-width: 100%; }
    .parent-tabs { gap: 4px; padding: 6px; }
    .parent-tab { padding: 10px 16px; font-size: 0.85rem; }
    .parent-progress-grid { grid-template-columns: 1fr; }
    .parent-badges-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
