/* =========================================================
   KODLA 1. SINIF ETKİNLİK PLATFORMU - ANA STİL DOSYASI
   Tasarım: Canlı, Çocuk Dostu, Modern, Akıllı Tahta Uyumlu & Dark Mode
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Quicksand:wght@500;600;700&display=swap');

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #06b6d4;
  --accent-pink: #ec4899;
  --accent-yellow: #f59e0b;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;

  --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #fdf4ff 100%);
  --card-bg: rgba(255, 255, 255, 0.94);
  --header-bg: rgba(255, 255, 255, 0.92);
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 20px 30px -10px rgba(0, 0, 0, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.06);

  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;

  --font-kids: 'Fredoka', 'Quicksand', system-ui, sans-serif;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 9999px;
}

/* =========================================================
   🌙 DARK MODE (KARANLIK MOD) DEĞİŞKENLERİ
   ========================================================= */
body.dark-mode {
  --bg-gradient: linear-gradient(135deg, #090d16 0%, #0f172a 50%, #1e1b4b 100%);
  --card-bg: rgba(30, 41, 59, 0.95);
  --header-bg: rgba(15, 23, 42, 0.94);
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 20px 35px -10px rgba(0, 0, 0, 0.45);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-light: #334155;
  color-scheme: dark;
}

body.dark-mode .app-header {
  border-bottom-color: #334155;
}
body.dark-mode .brand-text h1 {
  color: #ffffff;
}
body.dark-mode .modal-card,
body.dark-mode .curriculum-info-bar,
body.dark-mode .group-setup-quick,
body.dark-mode .timer-setup-quick,
body.dark-mode .duel-top-bar,
body.dark-mode .duel-referee-bar,
body.dark-mode .student-header-banner,
body.dark-mode .quiz-card,
body.dark-mode .wb-duel-side,
body.dark-mode .wb-single-board,
body.dark-mode .wb-header-bar,
body.dark-mode .homework-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc;
}
body.dark-mode .modal-header {
  border-bottom-color: #334155;
}
body.dark-mode .modal-header h2 {
  color: #f8fafc;
}
body.dark-mode .modal-footer {
  background: #0f172a !important;
  border-top-color: #334155;
}
body.dark-mode .btn-secondary,
body.dark-mode .nav-mode-btn {
  background: #334155;
  border-color: #475569;
  color: #f1f5f9;
}
body.dark-mode .btn-secondary:hover,
body.dark-mode .nav-mode-btn:hover {
  background: #475569;
}
body.dark-mode .category-pill {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
body.dark-mode .category-pill:hover {
  background: #334155;
}
body.dark-mode .act-title,
body.dark-mode .section-title,
body.dark-mode .quiz-question-text,
body.dark-mode .hw-card-title,
body.dark-mode .student-current-name {
  color: #f8fafc !important;
}
body.dark-mode .select-custom,
body.dark-mode .input-custom,
body.dark-mode .textarea-custom {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}
body.dark-mode .student-item {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}
body.dark-mode .std-name {
  color: #f8fafc;
}
body.dark-mode .quiz-opt-btn {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}
body.dark-mode .quiz-opt-btn:hover:not(:disabled) {
  background: #1e293b;
  border-color: #6366f1;
}
body.dark-mode .wb-letter-tile {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}
body.dark-mode .wb-slot {
  background: #0f172a;
  border-color: #475569;
  color: #f8fafc;
}
body.dark-mode .wb-letters-pool {
  background: #0f172a;
}
body.dark-mode .arena-timer-badge {
  background: #1e293b;
  color: #f8fafc;
  border-color: #6366f1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-kids);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.4;
  transition: background 0.3s ease, color 0.3s ease;
}

/* -------------------------------------------------------------
   NAVBAR & ÜST ÇUBUK
   ------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-light);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  animation: gentle-bounce 3s infinite ease-in-out;
}

@keyframes gentle-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e1b4b;
  letter-spacing: -0.5px;
}

.brand-text span {
  font-size: 0.8rem;
  color: #0284c7;
  font-weight: 600;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
}

.header-center-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-mode-btn {
  font-family: var(--font-kids);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.nav-mode-btn:hover {
  background: #e2e8f0;
}

.nav-mode-btn.active {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* -------------------------------------------------------------
   BUTONLAR
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-kids);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

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

.btn-music-toggle {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 8px 16px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  font-size: 1.2rem;
}

.btn-sm {
  font-size: 0.88rem;
  padding: 8px 14px;
}

.btn-lg {
  font-size: 1.2rem;
  padding: 14px 26px;
  border-radius: var(--radius-lg);
}

/* -------------------------------------------------------------
   EKRANLAR (SCREENS)
   ------------------------------------------------------------- */
.app-screen {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.app-screen.active {
  display: block;
  opacity: 1;
}

/* -------------------------------------------------------------
   MODALLAR
   ------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.3rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 2px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* -------------------------------------------------------------
   ÖĞRETMEN PROFİL MENÜSÜ & AVATAR
   ------------------------------------------------------------- */
.teacher-profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}
.teacher-profile-chip:hover {
  border-color: #4f46e5;
  background: #eff6ff;
}
body.dark-mode .teacher-profile-chip {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}
.teacher-avatar-icon {
  font-size: 1.3rem;
}
.teacher-name-txt {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
}
body.dark-mode .teacher-name-txt {
  color: #f8fafc;
}

/* Sürükle-Bırak Kelime Kurma Stilleri */
.wb-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 24px;
}

.wb-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  background: #ffffff;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.wb-duel-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.wb-duel-side, .wb-single-board {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 3px solid #cbd5e1;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wb-side-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}

.wb-student-tag {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
}

.wb-hint-box, .wb-target-hint {
  font-size: 1.25rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 20px;
  text-align: center;
}

.wb-slots-container {
  display: flex;
  gap: 14px;
  margin-bottom: 30px;
  justify-content: center;
}

.wb-slot {
  width: 75px;
  height: 85px;
  border: 3px dashed #94a3b8;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e293b;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
}
.wb-slot:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.wb-letters-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
  background: #f1f5f9;
  padding: 16px;
  border-radius: var(--radius-md);
  width: 100%;
}

.wb-letter-tile {
  width: 65px;
  height: 70px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-kids);
  font-size: 2.2rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  transition: all 0.15s;
}
.wb-letter-tile:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 15px rgba(37, 99, 235, 0.4);
}
.wb-letter-tile.used {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.9);
}

.correct-glow {
  border-color: #10b981 !important;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.8) !important;
  background: #f0fdf4 !important;
}

.wrong-shake {
  border-color: #ef4444 !important;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.8) !important;
  background: #fef2f2 !important;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Bilgi Yarışması (Quiz) */
.quiz-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px;
}

.quiz-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--card-shadow);
  border: 2px solid #e2e8f0;
}

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

.quiz-subject-badge {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
}

.quiz-counter {
  font-size: 1.1rem;
  font-weight: 700;
  color: #64748b;
}

.quiz-question-text {
  font-size: 1.7rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 24px;
}

.quiz-team-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  background: #f8fafc;
  padding: 10px 16px;
  border-radius: var(--radius-md);
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.quiz-opt-btn {
  font-family: var(--font-kids);
  font-size: 1.3rem;
  font-weight: 700;
  text-align: left;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  border: 2.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.quiz-opt-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateX(6px);
}
.quiz-opt-btn.btn-correct {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #15803d !important;
}
.quiz-opt-btn.btn-wrong {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #b91c1c !important;
}

.quiz-feedback-box {
  margin-top: 24px;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  font-size: 1.2rem;
}
.feedback-correct {
  background: #dcfce7;
  border: 2px solid #86efac;
  color: #166534;
}
.feedback-wrong {
  background: #fee2e2;
  border: 2px solid #fca5a5;
  color: #991b1b;
}

/* Ödev Kartları */
.hw-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.homework-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.homework-card:hover {
  transform: translateY(-4px);
  border-color: #3b82f6;
}

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

.hw-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.hw-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 20px;
  flex-grow: 1;
}

.hw-card-actions {
  display: flex;
  gap: 10px;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}

/* =========================================================
   📋 e-OKUL TOPLU İÇE AKTARIM VE GELİŞMİŞ ÖNİZLEME STİLLERİ
   ========================================================= */
.import-badge-hint {
  font-size: 0.74rem;
  background: #e0f2fe;
  color: #0284c7;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}
body.dark-mode .import-badge-hint {
  background: #0369a1;
  color: #e0f2fe;
}

.bulk-import-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}
.bulk-import-desc strong {
  color: var(--primary);
}

.file-drop-zone {
  border: 2px dashed #93c5fd;
  background: #f0f9ff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
  margin-bottom: 10px;
  cursor: pointer;
}
.file-drop-zone:hover, .file-drop-zone.drag-over {
  background: #e0f2fe;
  border-color: #3b82f6;
  transform: translateY(-1px);
}
body.dark-mode .file-drop-zone {
  background: #0f172a;
  border-color: #3b82f6;
}

.drop-zone-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.drop-zone-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  font-size: 0.88rem;
  color: #1e293b;
}
body.dark-mode .drop-zone-text {
  color: #f8fafc;
}
.drop-zone-text span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.or-divider {
  text-align: center;
  position: relative;
  margin: 10px 0;
}
.or-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-light);
  z-index: 1;
}
.or-divider span {
  position: relative;
  z-index: 2;
  background: #ffffff;
  padding: 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
body.dark-mode .or-divider span {
  background: #1e293b;
  color: #94a3b8;
}

.bulk-preview-box {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 10px;
}
body.dark-mode .bulk-preview-box {
  background: #0f172a;
  border-color: #334155;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
body.dark-mode .badge-success {
  background: #14532d;
  color: #86efac;
}

.preview-info-tag {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.preview-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  padding: 4px;
}

.preview-std-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
body.dark-mode .preview-std-chip {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

.chip-num {
  background: #e0f2fe;
  color: #0284c7;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
}
body.dark-mode .chip-num {
  background: #0369a1;
  color: #e0f2fe;
}

.chip-name {
  color: #1e293b;
}
body.dark-mode .chip-name {
  color: #f8fafc;
}

.bulk-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

/* =========================================================
   📱 MOBİL ALT GEZİNME MENÜSÜ (BOTTOM NAVIGATION)
   Akıllı tahtada (768px üzeri) GİZLİ, mobilde ALTA SABİT
   ========================================================= */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid var(--border-light);
  height: 64px;
  display: none; /* Akıllı tahtada varsayılan olarak gizli */
  align-items: stretch;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
}

body.dark-mode .mobile-bottom-nav {
  background: rgba(15, 23, 42, 0.96);
  border-top-color: #334155;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  color: #64748b;
  font-family: var(--font-kids);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
body.dark-mode .mobile-nav-item {
  color: #94a3b8;
}

.mobile-nav-item .m-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 3px;
  transition: transform 0.2s ease;
}

.mobile-nav-item .m-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.mobile-nav-item:active {
  transform: scale(0.95);
}

.mobile-nav-item.active {
  color: var(--primary);
}
body.dark-mode .mobile-nav-item.active {
  color: #818cf8;
}

.mobile-nav-item.active .m-nav-icon {
  transform: scale(1.15) translateY(-2px);
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 32px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
}
body.dark-mode .mobile-nav-item.active::after {
  background: #818cf8;
}

/* =========================================================
   📱 MOBİL DUYARLI DÜZEN (RESPONSIVE STYLES)
   768px ve altındaki ekranlar için tam optimizasyon
   Akıllı Tahtada (769px ve üstü) düzen aynen korunur
   ========================================================= */
@media (max-width: 768px) {
  /* Sayfa altına menü payı ekle */
  body {
    padding-bottom: 74px !important;
  }

  /* Mobil Alt Menüyü Göster */
  .mobile-bottom-nav {
    display: flex !important;
  }

  /* Üst Çubuktaki Masaüstü Menü Butonlarını Gizle (Altta Var) */
  .header-center-info {
    display: none !important;
  }

  /* Üst Çubuk Aksiyonlarını Sadeleştir */
  .app-header {
    padding: 8px 12px;
    gap: 8px;
  }

  .brand-wrapper {
    gap: 8px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
    border-radius: 10px;
  }

  .brand-text h1 {
    font-size: 1.05rem;
    letter-spacing: -0.3px;
  }

  .brand-text span {
    display: none; /* Mobilde rozeti gizle, yer kazandır */
  }

  /* Masaüstü Tam Ekran, Şarkılar ve Sınıf Butonlarını Üstten Gizle */
  #btn-fullscreen,
  #btn-open-music-modal,
  #btn-open-students-modal {
    display: none !important;
  }

  .teacher-name-txt {
    display: none; /* Mobilde sadece avatar göster */
  }

  .teacher-profile-chip {
    padding: 4px 8px;
  }

  /* Karşılama Banner'ı */
  .dashboard-container {
    padding: 14px 10px;
  }

  .dashboard-hero {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .hero-title {
    font-size: 1.35rem;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 0.88rem;
    margin-bottom: 16px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    font-size: 1rem;
    padding: 12px;
  }

  /* Müfredat Bilgi Çubuğu */
  .curriculum-info-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
  }

  .curriculum-details {
    flex-direction: row;
    gap: 10px;
  }

  .curriculum-controls {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  /* Etkinlik Kategorileri (Yatay Dokunmatik Kaydırma) */
  .category-filter-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    gap: 8px;
    scrollbar-width: none;
  }
  .category-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .category-pill {
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 0.88rem;
  }

  /* Etkinlik Kartları Izgarası */
  .activities-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  /* Modallar Mobilde */
  .modal-backdrop {
    padding: 10px;
    align-items: flex-end; /* Mobilde alt çekmece hissi */
  }

  .modal-card {
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    width: 100%;
  }

  .modal-header {
    padding: 14px 18px;
  }

  .modal-header h2 {
    font-size: 1.15rem;
  }

  .modal-body {
    padding: 16px;
    gap: 16px;
  }

  .students-modal-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* Kelime Kurma Oyunu Mobilde */
  .wb-container {
    padding: 14px 10px;
  }

  .wb-header-bar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    padding: 12px 14px;
  }

  .wb-duel-split {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .wb-slots-container {
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
  }

  .wb-slot {
    width: 48px;
    height: 56px;
    font-size: 1.7rem;
    border-radius: 12px;
  }

  .wb-letters-pool {
    gap: 8px;
    padding: 12px;
  }

  .wb-letter-tile {
    width: 46px;
    height: 50px;
    font-size: 1.5rem;
    border-radius: 10px;
  }

  /* Bilgi Yarışması Mobilde */
  .quiz-container {
    padding: 14px 10px;
  }

  .quiz-card {
    padding: 20px 16px;
  }

  .quiz-question-text {
    font-size: 1.25rem;
    margin-bottom: 16px;
  }

  .quiz-opt-btn {
    font-size: 1.1rem;
    padding: 14px 18px;
  }

  /* Ödevler Mobilde */
  .homework-container {
    padding: 14px 10px;
  }

  .hw-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

