/* ==========================================================================
   5. Sınıf Sosyal Bilgiler İnteraktif Ödev Sistemi
   Modern, Çocuk Dostu, Tamamen Duyarlı (100% Mobile Responsive) CSS
   ========================================================================== */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary: #0891b2;
    --secondary-light: #ecfeff;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --purple: #8b5cf6;
    --pink: #ec4899;

    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #cbd5e1;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 30px rgba(0,0,0,0.1);
    --shadow-fun: 0 10px 25px -5px rgba(79, 70, 229, 0.25);

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.bg-gradient-page {
    background: linear-gradient(135deg, #f0f4ff 0%, #eef2ff 35%, #fdf4ff 100%);
    min-height: 100vh;
}

/* Konteyner */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Navbar */
.navbar-top {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #e0e7ff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.brand-title {
    font-size: 19px;
    font-weight: 800;
    color: #1e1b4b;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Butonlar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 42px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
}

.btn-outline-light {
    background: #fff;
    color: var(--primary);
    border: 2px solid #e0e7ff;
}

.btn-outline-light:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 13px 26px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    min-height: 34px;
}

/* Canlı Oto-Kayıt Bildirim Rozeti */
.autosave-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.autosave-badge.saving {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* Giriş Sayfası (Hero Grid - Dengeli & Eşit Ölçülü Tasarım) */
.hero-container {
    padding-top: 28px;
    padding-bottom: 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Sol ve Sağ kutu tam eşit 1:1 ölçüde */
    gap: 24px;
    align-items: stretch; /* Boyutlar birbiriyle uyumlu ve dengeli */
}

.hero-info-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    box-shadow: var(--shadow-md);
    border: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.author-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 12px;
    align-self: flex-start;
}

.hero-heading {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 10px;
}

.hero-heading span {
    background: linear-gradient(120deg, var(--primary), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: #475569;
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 16px;
}

/* 4 Aşama Kartları - Kompakt & Eşit Boyut */
.stages-preview {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 16px;
}

.stage-mini-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stage-mini-box:hover {
    transform: translateX(3px);
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.stage-1 { border-left: 4px solid var(--primary); }
.stage-2 { border-left: 4px solid var(--accent); }
.stage-3 { border-left: 4px solid var(--success); }
.stage-4 { border-left: 4px solid var(--pink); }

.stage-1 .mini-icon { background: #e0e7ff; color: var(--primary); }
.stage-2 .mini-icon { background: #fef3c7; color: #d97706; }
.stage-3 .mini-icon { background: #d1fae5; color: #059669; }
.stage-4 .mini-icon { background: #fce7f3; color: #db2777; }

.mini-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.stage-mini-box h4 {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 2px;
    color: #1e293b;
}

.stage-mini-box p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
}

.topics-section {
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

.topics-section-title {
    font-size: 11.5px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.topic-tag {
    background: #f1f5f9;
    color: #334155;
    padding: 5px 11px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
}

/* Giriş Formu Kartı (Eşit Ölçülü) */
.hero-form-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    box-shadow: var(--shadow-fun);
    border: 2px solid #e0e7ff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.form-card-header {
    text-align: center;
    margin-bottom: 22px;
}

.avatar-circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.form-card-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #1e1b4b;
}

.form-card-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.student-form .form-group {
    margin-bottom: 16px;
}

.student-form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #334155;
}

.student-form label i {
    color: var(--primary);
    margin-right: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #cbd5e1;
    border-radius: var(--radius-md);
    background: #f8fafc;
    transition: all 0.2s ease;
    color: #1e293b;
    min-height: 46px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-select {
    cursor: pointer;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.form-footer-tip {
    margin-top: 18px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1.5px solid #86efac;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: #166534;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
    transition: all 0.3s ease;
    line-height: 1.5;
}

.form-footer-tip:hover {
    border-color: #34d399;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.15);
}

.form-footer-tip i.tip-icon {
    font-size: 20px;
    color: #059669;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Gelişmiş Otomatik Kayıt Güvence Kutusu */
.autosave-notice-box {
    margin-top: 20px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1.5px solid #86efac;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
    transition: all 0.3s ease;
}

.autosave-notice-box:hover {
    border-color: #34d399;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.18);
    transform: translateY(-1px);
}

.notice-icon-wrap {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    flex-shrink: 0;
}

.notice-content-wrap {
    flex: 1;
}

.notice-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #065f46;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notice-desc {
    font-size: 12.5px;
    color: #166534;
    line-height: 1.5;
    margin: 0;
}

.notice-desc strong {
    color: #064e3b;
    font-weight: 800;
    background: #dcfce7;
    padding: 1px 6px;
    border-radius: 5px;
}

/* Alertler */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: var(--accent-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* ==========================================================================
   ÖDEV SAYFASI BİLEŞENLERİ (odev.php)
   ========================================================================== */

.student-bar-header {
    background: #fff;
    border-bottom: 2px solid #e2e8f0;
    padding: 14px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 90;
}

.student-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.student-badge-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.student-name {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.student-meta {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.sound-toggle-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    min-height: 36px;
}

/* Stepper - 4 Aşama Göstergesi */
.stepper-container {
    padding: 18px 0 6px;
}

.stepper-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.step-item {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.step-item.active {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.15);
}

.step-item.completed {
    border-color: var(--success);
    background: #f0fdf4;
}

.step-item.locked {
    opacity: 0.65;
    background: #f8fafc;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.step-item.active .step-number {
    background: var(--primary);
    color: #fff;
}

.step-item.completed .step-number {
    background: var(--success);
    color: #fff;
}

.step-title {
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.step-status {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.step-item.completed .step-status {
    color: #15803d;
}

/* Aşama Ana Kartı */
.stage-main-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 2px solid #e2e8f0;
    box-shadow: var(--shadow-lg);
    margin-top: 14px;
    margin-bottom: 40px;
    overflow: hidden;
}

.stage-card-header {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.stage-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stage-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stage-header-title h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 2px;
}

.stage-header-title p {
    font-size: 13px;
    color: #c7d2fe;
}

.stage-score-pill {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,0.3);
}

.stage-body {
    padding: 24px;
}

/* ==========================================================================
   AŞAMA 1: YENİLENMİŞ, TAM MOBİL UYUMLU EŞLEŞTİRME PARKURU
   ========================================================================== */

/* Kategori Butonları: Wrap destekli, tam görünebilir, şık grid */
.category-selector-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.cat-tab-btn {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: left;
    min-height: 52px;
}

.cat-tab-btn:hover {
    border-color: var(--primary);
    background: #fff;
    transform: translateY(-1px);
}

.cat-tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.cat-tab-btn.completed {
    background: #ecfdf5;
    color: #065f46;
    border-color: #34d399;
}

.cat-tab-btn.completed.active {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.cat-tab-btn .badge-pill {
    background: rgba(0, 0, 0, 0.08);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.cat-tab-btn.active .badge-pill {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Eşleştirme Masası */
.matching-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.matching-column-title {
    font-size: 14px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.match-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-card {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 52px;
}

.match-card:hover {
    border-color: var(--primary);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.match-card.selected {
    border-color: var(--primary) !important;
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    font-weight: 800;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.25);
    animation: pulseBorder 1.5s infinite;
}

@keyframes pulseBorder {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.match-card.matched {
    border-color: #34d399 !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
    cursor: default;
    pointer-events: none;
    font-weight: 700;
}

.match-card.wrong {
    animation: shake 0.4s ease-in-out;
    border-color: var(--danger) !important;
    background: var(--danger-light) !important;
    color: #991b1b !important;
}

.match-card-icon {
    font-size: 16px;
    color: #94a3b8;
    flex-shrink: 0;
}

.match-card.matched .match-card-icon {
    color: var(--success);
}

/* Kategori Gezinme Çubuğu (Önceki - Sonraki Kategori) */
.category-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-top: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================================================
   AŞAMA 2: DOĞRU / YANLIŞ STİLLERİ
   ========================================================================== */
.tf-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tf-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: all 0.2s ease;
}

.tf-card.answered {
    border-color: #cbd5e1;
    background: #fff;
}

.tf-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.tf-number-badge {
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.tf-category-tag {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.tf-question-text {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.tf-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tf-btn {
    padding: 12px;
    border-radius: var(--radius-md);
    border: 2px solid #cbd5e1;
    background: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 50px;
}

.tf-btn.tf-true:hover {
    border-color: var(--success);
    color: var(--success);
    background: #f0fdf4;
}

.tf-btn.tf-false:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: #fef2f2;
}

.tf-btn.tf-true.active {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tf-btn.tf-false.active {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.tf-explanation {
    margin-top: 14px;
    padding: 12px 14px;
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #1e3a8a;
    display: none;
}

/* ==========================================================================
   AŞAMA 3: ÇOKTAN SEÇMELİ TEST STİLLERİ
   ========================================================================== */
.quiz-nav-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e2e8f0;
}

.quiz-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-dot:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quiz-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 3px 8px rgba(79, 70, 229, 0.3);
}

.quiz-dot.answered {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.quiz-question-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 20px;
}

.quiz-q-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.quiz-q-text {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.6;
    margin-bottom: 18px;
    white-space: pre-line;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-opt-card {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 2px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    transition: all 0.2s ease;
    min-height: 52px;
}

.quiz-opt-card:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.opt-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.quiz-opt-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: #1e1b4b;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.quiz-opt-card.selected .opt-letter {
    background: var(--primary);
    color: #fff;
}

.quiz-navigation-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================================================
   AŞAMA 4: KLASİK YAZMA ETKİNLİĞİ STİLLERİ
   ========================================================================== */
.classic-prompt-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 22px;
}

.classic-card-header {
    margin-bottom: 12px;
}

.classic-card-title {
    font-size: 17px;
    font-weight: 800;
    color: #1e1b4b;
    margin-bottom: 4px;
}

.classic-card-text {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 12px;
    line-height: 1.5;
}

.classic-hint-box {
    background: #eff6ff;
    border: 1px dashed #93c5fd;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: #1e40af;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
}

.classic-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 2px solid #cbd5e1;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    color: #1e293b;
    resize: vertical;
    transition: all 0.2s;
}

.classic-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.classic-counter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    flex-wrap: wrap;
    gap: 6px;
}

.classic-counter-bar .counter-valid {
    color: var(--success);
    font-weight: 800;
}

/* Aşama Alt Kontrol / Geçiş Çubuğu */
.stage-footer-actions {
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

/* Modallar */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    padding: 16px;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: all 0.25s ease;
}

.modal-overlay.show .modal-card {
    transform: scale(1);
}

.modal-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.modal-icon-circle.celebrate {
    background: #ecfdf5;
    color: var(--success);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.15);
}

.modal-icon-circle.alert {
    background: #fef2f2;
    color: var(--danger);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.15);
}

.modal-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: #1e1b4b;
    margin-bottom: 8px;
}

.modal-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ==========================================================================
   ADMİN PANELİ STİLLERİ
   ========================================================================== */
.admin-layout {
    min-height: 100vh;
    background: #f1f5f9;
}

.admin-nav {
    background: #1e293b;
    color: #fff;
    padding: 12px 0;
}

.admin-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-nav-links a:hover,
.admin-nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.admin-header-bar {
    padding: 24px 0;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-val {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.admin-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    background: #f8fafc;
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.admin-table tr:hover td {
    background: #f8fafc;
}

/* Hızlı Sınıf Filtre Hapları */
.class-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.class-pill-btn {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.class-pill-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.class-pill-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* ==========================================================================
   YAZDIRMA (PRINT) & KATILIM BELGESİ (tamamlandi.php)
   ========================================================================== */
.certificate-card {
    background: #fff;
    border: 8px double #4338ca;
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 20px auto;
    position: relative;
}

.cert-badge {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

@media print {
    .navbar-top, .footer-bottom, .btn, .no-print, .student-bar-header, .autosave-badge {
        display: none !important;
    }
    body {
        background: #fff !important;
        font-size: 12pt;
    }
    .certificate-card {
        border: 4px solid #000;
        box-shadow: none;
        margin: 0 auto;
        padding: 20px;
    }
}

/* ==========================================================================
   DUYARLI TASARIM (MOBILE / TABLET / DESKTOP BREAKPOINTS)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .stepper-track {
        grid-template-columns: repeat(2, 1fr);
    }
    .matching-board {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stepper-track {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .step-item {
        padding: 8px 10px;
    }
    .step-title {
        font-size: 12px;
    }
    .stages-preview {
        grid-template-columns: 1fr;
    }
    .category-selector-tabs {
        grid-template-columns: 1fr;
    }
    .stage-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .stage-body {
        padding: 14px;
    }
    .tf-actions {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .hero-heading {
        font-size: 22px;
    }
    .btn-lg {
        width: 100%;
    }
    .stage-footer-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
