/* ============================================================
   WORLD MEMORY TEST — Ana CSS Sistemi
   Tek dosya, tüm sayfalar bu dosyayı kullanır
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Outfit:wght@400;500;600;700&display=swap');

/* ── CSS Değişkenleri — Açık Tema (varsayılan) ────────────── */
:root {
  /* Marka renkleri */
  --brand-primary:   #1a3a7c;
  --brand-secondary: #f5c518;
  --brand-accent:    #4a9eff;

  /* Tema renkleri (açık mod) */
  --bg-page:         #eef2f9;
  --bg-card:         #ffffff;
  --bg-nav:          #ffffff;
  --bg-hero:         linear-gradient(135deg, #1a3a7c 0%, #2563eb 50%, #1e40af 100%);
  --bg-input:        #f5f7fc;
  --bg-modal:        rgba(0,0,0,0.5);

  --text-primary:    #1a2340;
  --text-secondary:  #4a5578;
  --text-muted:      #8892b0;
  --text-on-brand:   #ffffff;
  --text-on-accent:  #1a2340;

  --border-color:    #d8e0f0;
  --border-focus:    #4a9eff;

  --shadow-sm:       0 2px 8px rgba(26,58,124,0.08);
  --shadow-md:       0 4px 20px rgba(26,58,124,0.12);
  --shadow-lg:       0 8px 40px rgba(26,58,124,0.16);
  --shadow-card:     0 2px 12px rgba(26,58,124,0.10);

  /* Köşe yuvarlakları */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-pill: 999px;

  /* Geçişler */
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;

  /* Navbar yüksekliği */
  --navbar-h: 64px;

  /* Tema adı (JS için) */
  --theme-name: 'light';
}

/* ── Karanlık Tema ────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-page:         #0f1629;
  --bg-card:         #1a2545;
  --bg-nav:          #111e38;
  --bg-hero:         linear-gradient(135deg, #0d1f4a 0%, #1a3a7c 50%, #0f2a6b 100%);
  --bg-input:        #141f38;
  --bg-modal:        rgba(0,0,0,0.7);

  --text-primary:    #e8edf8;
  --text-secondary:  #9aafd4;
  --text-muted:      #5a6f9a;
  --text-on-brand:   #ffffff;
  --text-on-accent:  #ffffff;

  --border-color:    #243060;
  --border-focus:    #4a9eff;

  --shadow-sm:       0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:       0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:       0 8px 40px rgba(0,0,0,0.5);
  --shadow-card:     0 2px 12px rgba(0,0,0,0.35);

  --theme-name: 'dark';
}

/* ── Renk Temaları (Tema Kontrol Paneli) ──────────────────── */
[data-color="sari-altin"] {
  --brand-primary:   #7a5c00;
  --brand-secondary: #f5c518;
  --brand-accent:    #e8a800;
  --bg-hero: linear-gradient(135deg, #7a5c00 0%, #c49200 50%, #8a6800 100%);
}
[data-color="kirmizi"] {
  --brand-primary:   #7c1a1a;
  --brand-secondary: #f5c518;
  --brand-accent:    #ff4a4a;
  --bg-hero: linear-gradient(135deg, #7c1a1a 0%, #c0392b 50%, #96170f 100%);
}
[data-color="yesil"] {
  --brand-primary:   #1a5c2a;
  --brand-secondary: #f5c518;
  --brand-accent:    #2ecc71;
  --bg-hero: linear-gradient(135deg, #1a5c2a 0%, #27ae60 50%, #1e6b35 100%);
}
[data-color="mavi"] {
  --brand-primary:   #1a3a7c;
  --brand-secondary: #f5c518;
  --brand-accent:    #4a9eff;
  --bg-hero: linear-gradient(135deg, #1a3a7c 0%, #2563eb 50%, #1e40af 100%);
}
[data-color="pembe"] {
  --brand-primary:   #7c1a5a;
  --brand-secondary: #f5c518;
  --brand-accent:    #e84393;
  --bg-hero: linear-gradient(135deg, #7c1a5a 0%, #c0397b 50%, #961754 100%);
}
[data-color="turkuaz"] {
  --brand-primary:   #0a4a5c;
  --brand-secondary: #f5c518;
  --brand-accent:    #00bcd4;
  --bg-hero: linear-gradient(135deg, #0a4a5c 0%, #0097a7 50%, #006978 100%);
}
[data-color="turuncu"] {
  --brand-primary:   #7c3d0a;
  --brand-secondary: #f5c518;
  --brand-accent:    #ff7043;
  --bg-hero: linear-gradient(135deg, #7c3d0a 0%, #e64a19 50%, #bf360c 100%);
}

/* ── HT Kutu Önizleme (admin renk paneli) ─────────────────── */
.ht-box-preview {
  aspect-ratio:1;border-radius:12px;display:flex;align-items:center;
  justify-content:center;font-size:1.5rem;font-weight:900;
  border:2px solid rgba(255,255,255,.2);background:var(--ht-bg,#222238);
}
[data-color="sari-altin"] .ht-box-preview { background:#2a2200; border-color:rgba(196,146,0,.5); }
[data-color="kirmizi"]    .ht-box-preview { background:#2a0a0a; border-color:rgba(255,74,74,.5); }
[data-color="yesil"]      .ht-box-preview { background:#0a2211; border-color:rgba(46,204,113,.5); }
[data-color="mavi"]       .ht-box-preview { background:#0d1f40; border-color:rgba(74,158,255,.5); }
[data-color="pembe"]      .ht-box-preview { background:#2a0820; border-color:rgba(232,67,147,.5); }
[data-color="turkuaz"]    .ht-box-preview { background:#031a20; border-color:rgba(0,188,212,.5); }
[data-color="turuncu"]    .ht-box-preview { background:#2a1203; border-color:rgba(255,112,67,.5); }

/* ── Reset & Temel ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding-top: var(--navbar-h);
  transition: background var(--transition-slow), color var(--transition);
}

/* ── Sarı Border (marka imzası) ───────────────────────────── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brand-secondary);
  z-index: 1000;
}

/* ── Tipografi ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito', sans-serif;
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.25;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { color: var(--text-secondary); line-height: 1.7; }
a  { color: var(--brand-accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 4px; left: 0; right: 0;
  height: var(--navbar-h);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  z-index: 900;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  transition: background var(--transition-slow), border-color var(--transition);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.navbar-brand-text {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  color: var(--brand-primary);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Nav menü */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 16px;
}
.navbar-nav::-webkit-scrollbar { display: none; }

.navbar-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.navbar-nav a:hover {
  background: var(--bg-input);
  color: var(--text-primary);
  opacity: 1;
}

.navbar-nav a.active {
  background: var(--brand-primary);
  color: #fff;
}

/* Navbar sağ kontroller */
.navbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Dil seçici */
.lang-select {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  appearance: none;
  -webkit-appearance: none;
  min-width: 100px;
}

.lang-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.lang-select-wrapper {
  position: relative;
}

.lang-select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Gece/Gündüz butonu */
.btn-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--brand-primary);
  color: var(--brand-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.btn-theme-toggle:hover {
  transform: scale(1.08);
}

/* ── Kartlar ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: box-shadow var(--transition), border-color var(--transition), background var(--transition-slow);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-accent);
}

.card-sm { padding: 16px; border-radius: var(--radius-md); }
.card-lg { padding: 32px; border-radius: var(--radius-xl); }

/* Vurgulu kart */
.card-accent {
  border-color: var(--brand-accent);
  border-width: 2px;
}

/* ── Hero Bölümü ──────────────────────────────────────────── */
.hero {
  background: var(--bg-hero);
  border-radius: var(--radius-xl);
  padding: 72px 48px 68px;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 48px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero h1, .hero h2, .hero h3 { color: #fff; }
.hero p { color: rgba(255,255,255,0.85); }

/* ── Butonlar ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover  { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}

.btn-secondary {
  background: var(--brand-secondary);
  color: var(--brand-primary);
}

.btn-accent {
  background: var(--brand-accent);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary);
}

.btn-ghost {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  border-color: var(--brand-accent);
}

.btn-hero {
  background: #fff;
  color: var(--brand-primary);
  padding: 14px 36px;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* ── Form Elemanları ──────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(74,158,255,0.15);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Layout Konteynerleri ─────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm { max-width: 768px; margin: 0 auto; padding: 0 20px; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

.page-content {
  padding: 28px 0 60px;
}

/* Grid sistemleri */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Flex yardımcıları */
.flex       { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* ── Tema Kontrol Paneli ──────────────────────────────────── */
.theme-panel {
  position: fixed;
  right: 20px;
  top: calc(var(--navbar-h) + 20px);
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 800;
  transition: transform var(--transition-slow), background var(--transition-slow);
}

.theme-panel.hidden {
  transform: translateX(calc(100% + 30px));
}

.theme-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.theme-panel-body { padding: 14px 16px; }

.theme-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
  margin-top: 14px;
}

.theme-section-title:first-child { margin-top: 0; }

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Outfit', sans-serif;
}

.theme-btn:hover { border-color: var(--brand-accent); }
.theme-btn.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 6px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), border-color var(--transition);
}

.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { border-color: var(--text-primary); transform: scale(1.15); }

.theme-panel-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}

/* ── AI Chat Widget ───────────────────────────────────────── */
.ai-chat-bubble {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 850;
}

.ai-chat-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-primary);
  border: 3px solid var(--brand-secondary);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition), box-shadow var(--transition);
}

.ai-chat-btn:hover { transform: scale(1.1); }

.ai-chat-window {
  position: absolute;
  bottom: 68px;
  left: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: bottom left;
  max-height: 480px;
}

.ai-chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.ai-chat-header {
  padding: 14px 16px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

.ai-msg {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.5;
}

.ai-msg.bot {
  background: var(--bg-input);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.ai-msg.user {
  background: var(--brand-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.ai-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
}

.ai-chat-input-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
}

.ai-chat-input-row input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.ai-chat-input-row button {
  padding: 8px 14px;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: opacity var(--transition);
}

.ai-chat-input-row button:hover { opacity: 0.85; }

/* ── Badge & Etiketler ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-primary { background: var(--brand-primary); color: #fff; }
.badge-accent   { background: var(--brand-accent); color: #fff; }
.badge-warning  { background: var(--brand-secondary); color: var(--brand-primary); }
.badge-muted    { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* ── Tablo ────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead tr {
  background: var(--brand-primary);
  color: #fff;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: var(--bg-input); }

tbody td { padding: 11px 16px; color: var(--text-primary); }

/* ── Alert Mesajları ──────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.alert-warn    { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

[data-theme="dark"] .alert-success { background: #064e3b; color: #6ee7b7; border-color: #065f46; }
[data-theme="dark"] .alert-error   { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }
[data-theme="dark"] .alert-info    { background: #1e3a5f; color: #93c5fd; border-color: #1e40af; }
[data-theme="dark"] .alert-warn    { background: #78350f; color: #fcd34d; border-color: #92400e; }

/* ── Skor & İstatistik Kartları ───────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  transition: box-shadow var(--transition), background var(--transition-slow);
}

.stat-number {
  font-family: 'Nunito', sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--brand-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-modal);
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 28px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition);
}

.modal-overlay.open .modal { transform: scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

/* ── Progress / Oyun Elemanları ───────────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand-primary);
  border-radius: var(--radius-pill);
  transition: width 0.5s ease;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--brand-accent); }
.breadcrumb-sep { opacity: 0.4; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 28px 0;
  margin-top: 60px;
  transition: background var(--transition-slow);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-text { font-size: 0.82rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 0.82rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--brand-accent); opacity: 1; }

/* ── Yardımcı Sınıflar ────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--brand-primary); }
.text-accent  { color: var(--brand-accent); }
.text-sm      { font-size: 0.85rem; }
.text-xs      { font-size: 0.75rem; }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }

.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Mobil ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar-brand-text {
    font-size: 1.05rem !important;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 900 !important;
  }
  .navbar-brand { flex-shrink: 0; }
  .navbar-nav { padding: 0 8px; }
  .navbar-nav a { padding: 7px 10px; font-size: 0.8rem; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .hero { padding: 40px 20px; }

  .theme-panel {
    right: 10px;
    width: 200px;
  }

  .ai-chat-window { width: 280px; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 12px; gap: 8px; }
  .lang-select { min-width: 80px; font-size: 0.8rem; }
  .container { padding: 0 14px; }
  .card { padding: 16px; }
}

/* ── Animasyonlar ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.animate-fadeInUp { animation: fadeInUp 0.4s ease both; }
.animate-pulse     { animation: pulse 2s ease infinite; }

/* Staggered kartlar */
.card-grid-animate .card:nth-child(1) { animation: fadeInUp 0.4s 0.05s ease both; }
.card-grid-animate .card:nth-child(2) { animation: fadeInUp 0.4s 0.10s ease both; }
.card-grid-animate .card:nth-child(3) { animation: fadeInUp 0.4s 0.15s ease both; }
.card-grid-animate .card:nth-child(4) { animation: fadeInUp 0.4s 0.20s ease both; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════════════════
   GLOBAL UNIFIED HERO — Tüm sayfalarda aynı boyut/stil
   SVG artı/haç motifi + her sayfa kendi rengi
   ══════════════════════════════════════════════════════ */

/* SVG desen string (artı motifi) */
.page-hero {
  padding: 72px 48px 68px;
  text-align: center;
  background: var(--ph-color, var(--bg-hero));
  border-radius: 20px;
  margin: 0 auto 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 48px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.14);
  /* Aynı boyut & genişlik garantisi — tüm sayfalar eşit */
  min-height: 240px;
  max-width: 1120px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Katman 1: Artı/haç SVG deseni */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Katman 2: Radial parıltı */
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,.14), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.08), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.page-hero__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 14px;
  color: #bfdbfe;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
  letter-spacing: -.01em;
  line-height: 1.15;
}

.page-hero__sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: rgba(255,255,255,.88);
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 680px;
  line-height: 1.6;
}

/* Her sayfa için benzersiz renk */
.page-hero--memory   { --ph-color: linear-gradient(135deg,#1e3a8a 0%,#2563eb 45%,#1d4ed8 100%); }
.page-hero--major    { --ph-color: linear-gradient(135deg,#7c1a4a 0%,#c0397b 45%,#9d174d 100%); }
.page-hero--hatirlama{ --ph-color: linear-gradient(135deg,#4c1d95 0%,#7c3aed 45%,#5b21b6 100%); }
.page-hero--lingua   { --ph-color: linear-gradient(135deg,#0c4a6e 0%,#0284c7 45%,#075985 100%); }
.page-hero--iq       { --ph-color: linear-gradient(135deg,#064e3b 0%,#059669 45%,#047857 100%); }
.page-hero--blog     { --ph-color: linear-gradient(135deg,#1e1b4b 0%,#4f46e5 45%,#3730a3 100%); }
.page-hero--about    { --ph-color: linear-gradient(135deg,#78350f 0%,#d97706 45%,#92400e 100%); }
.page-hero--contact  { --ph-color: linear-gradient(135deg,#134e4a 0%,#0d9488 45%,#0f766e 100%); }

@media (max-width: 768px) {
  .page-hero { padding: 44px 22px 40px; border-radius: 16px; min-height: 180px; }
  .page-hero__title { font-size: clamp(1.1rem, 5vw, 1.6rem); }
  .page-hero__sub { font-size: .98rem; }
}
.page-hero--leaderboard { --ph-color: linear-gradient(135deg,#1a1a2e 0%,#6d28d9 45%,#4c1d95 100%); }
