/* ============================================================
   main.css — Kuran Yolcugum
   İslami renk paleti, mobil-önce tasarım
   ============================================================ */

:root {
  --color-primary:    #1a6b3c;   /* koyu yeşil */
  --color-primary-lt: #2a9d5c;   /* açık yeşil */
  --color-gold:       #c9a227;   /* altın */
  --color-gold-lt:    #f0cc6e;   /* açık altın */
  --color-bg:         #fafaf7;   /* krem arka plan */
  --color-surface:    #ffffff;
  --color-text:       #1a1a2e;
  --color-text-muted: #6b7280;
  --color-border:     #e5e7eb;
  --color-danger:     #dc2626;
  --color-success:    #16a34a;
  --color-warning:    #d97706;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);

  --font-body:  'Segoe UI', Tahoma, sans-serif;
  --font-arabic: 'Amiri', 'Arabic Typesetting', serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- Layout ---- */
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* ---- Header ---- */
.app-header {
  background: var(--color-primary);
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-md);
}
.app-header .logo { font-size: 1.25rem; font-weight: 700; letter-spacing: .5px; }
.app-header nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  margin-left: 20px;
  font-size: .9rem;
  transition: color .2s;
}
.app-header nav a:hover, .app-header nav a.active { color: var(--color-gold-lt); }

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
}
.card.highlight { border-left: 4px solid var(--color-gold); }

/* ---- Buttons ---- */
.btn-primary, .btn-secondary, .btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform .1s, box-shadow .1s;
}
.btn-primary  { background: var(--color-primary); color: #fff; }
.btn-secondary{ background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-danger   { background: var(--color-danger); color: #fff; }
.btn-primary:hover  { background: var(--color-primary-lt); transform: translateY(-1px); }
.btn-danger:hover   { opacity: .9; }
.btn-back { color: #fff; text-decoration: none; font-size: .9rem; }

/* ---- Tables ---- */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  background: var(--color-primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--color-border); }
.data-table tr:hover td { background: #f9fafb; }

/* ---- Dashboard: User Summary ---- */
.user-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.user-summary .avatar { font-size: 3rem; }
.user-summary .info h2 { font-size: 1.4rem; }
.user-summary .level-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .8rem;
  margin-top: 4px;
}
.user-summary .stats {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-left: auto;
}
.stat { text-align: center; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: .75rem; color: var(--color-text-muted); }
.streak-fire { color: var(--color-warning) !important; }

/* ---- XP Bar ---- */
.xp-bar-section .xp-label {
  display: flex; justify-content: space-between;
  font-size: .85rem; margin-bottom: 6px;
}
.xp-bar-track {
  height: 14px;
  background: #e5e7eb;
  border-radius: 7px;
  overflow: hidden;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
  border-radius: 7px;
  transition: width .8s ease;
}
.xp-hint { font-size: .8rem; color: var(--color-text-muted); margin-top: 6px; }
.level-info { color: var(--color-primary); font-weight: 600; }

/* ---- Sure Grid ---- */
.surah-list h3 { font-size: 1.2rem; margin: 24px 0 12px; }
.surah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.surah-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-decoration: none;
  color: var(--color-text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  display: flex; flex-direction: column; gap: 6px;
}
.surah-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-primary-lt); }
.surah-card.golden { border-color: var(--color-gold); background: linear-gradient(135deg, #fffdf0, #fff9e0); }
.surah-card.in-progress { border-color: var(--color-primary-lt); }
.surah-no { font-size: .75rem; color: var(--color-text-muted); font-weight: 600; }
.surah-name-tr { font-weight: 700; font-size: 1rem; display: block; }
.surah-name-ar { font-family: var(--font-arabic); font-size: 1.1rem; display: block; direction: rtl; }
.surah-meta { display: flex; gap: 8px; font-size: .75rem; color: var(--color-text-muted); }
.diff { padding: 2px 7px; border-radius: 10px; background: #f0f4f0; color: var(--color-primary); font-weight: 600; }

/* Adım noktaları */
.surah-progress { display: flex; align-items: center; gap: 4px; }
.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-border);
  display: inline-block;
}
.step-dot.done { background: var(--color-primary); }
.golden-star { font-size: .9rem; margin-left: 4px; }

/* ---- Recent Badges ---- */
.badge-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.badge-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; width: 72px; text-align: center;
  opacity: .4; filter: grayscale(1);
}
.badge-item.earned { opacity: 1; filter: none; }
.badge-item img { width: 48px; height: 48px; }
.badge-item span { font-size: .7rem; color: var(--color-text-muted); }
.link-more { font-size: .85rem; color: var(--color-primary); text-decoration: none; }
.link-more:hover { text-decoration: underline; }

/* ---- Children Grid ---- */
.children-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 16px; }
.child-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.child-avatar { font-size: 2.5rem; }
.child-info { flex: 1; }
.child-info h3 { font-size: 1rem; }
.child-info p  { font-size: .85rem; color: var(--color-text-muted); }

/* ---- Badges ---- */
.badge { padding: 3px 9px; border-radius: 12px; font-size: .75rem; font-weight: 600; }
.badge-done    { background: #dcfce7; color: var(--color-success); }
.badge-pending { background: #fef9c3; color: var(--color-warning); }

/* ---- Footer ---- */
.app-footer {
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted);
  font-size: .85rem;
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .user-summary { flex-direction: column; text-align: center; }
  .user-summary .stats { margin: 0 auto; }
  .surah-grid { grid-template-columns: repeat(2, 1fr); }
  .app-header { padding: 10px 14px; }
  .app-header nav a { margin-left: 12px; }
}
