/* Kelime Yolculuğu — Özgün Tasarım Sistemi */
:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #5eead4;
  --secondary: #f59e0b;
  --secondary-dark: #d97706;
  --success: #22c55e;
  --error: #ef4444;
  --bg: #f0fdfa;
  --bg-card: #ffffff;
  --text: #134e4a;
  --text-muted: #5f8a85;
  --border: #ccfbf1;
  --shadow: 0 4px 20px rgba(13, 148, 136, 0.12);
  --radius: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
body.dark {
  --bg: #042f2e;
  --bg-card: #0f3d3b;
  --text: #ecfdf5;
  --text-muted: #99c9c4;
  --border: #115e59;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }

.container { max-width: 480px; margin: 0 auto; padding: 0 16px; }

/* Logo */
.logo-wrap { text-align: center; padding: 24px 0 12px; }
.logo-icon {
  width: 72px; height: 72px; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; box-shadow: var(--shadow);
  position: relative;
}
.logo-icon::after {
  content: '🧭'; position: absolute; bottom: -4px; right: -4px;
  font-size: 22px; background: var(--secondary); border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
}
.logo-title {
  font-size: 1.6rem; font-weight: 800; color: var(--primary-dark);
  letter-spacing: -0.5px;
}
.logo-tagline { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

/* Butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border: none; border-radius: 50px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none; width: 100%;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; box-shadow: 0 4px 16px rgba(13,148,136,.35);
}
.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: #fff;
}
.btn-outline {
  background: var(--bg-card); color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-sm { padding: 10px 18px; font-size: .9rem; width: auto; }

/* Kartlar */
.card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  border: 1px solid var(--border); margin-bottom: 16px;
}
.card-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }

/* Menü grid */
.menu-grid { display: grid; gap: 10px; margin: 20px 0; }
.menu-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border-radius: var(--radius);
  padding: 16px 18px; border: 1px solid var(--border);
  color: var(--text); font-weight: 600; box-shadow: var(--shadow);
  transition: transform .15s;
}
.menu-item:active { transform: scale(.98); }
.menu-item .icon { font-size: 1.5rem; width: 36px; text-align: center; }

/* İstatistikler */
.stats-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin: 16px 0;
}
.stat-box {
  background: var(--bg-card); border-radius: 12px; padding: 14px;
  text-align: center; border: 1px solid var(--border);
}
.stat-box .val { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.stat-box .lbl { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

/* Reklam alanları — oyun butonlarından ayrı */
.ad-container {
  margin: 20px 0; padding: 12px;
  background: #f8f8f8; border: 1px dashed #ccc;
  border-radius: 8px; text-align: center;
  min-height: 60px; display: flex; align-items: center; justify-content: center;
}
.ad-placeholder { font-size: 11px; color: #999; }
.ad-container[data-ad-slot] { clear: both; }

/* Yolculuk haritası */
.journey-map { padding: 16px 0; }
.city-node {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; margin-bottom: 8px;
  background: var(--bg-card); border-radius: var(--radius);
  border: 2px solid var(--border); position: relative;
}
.city-node.unlocked { border-color: var(--primary); }
.city-node.locked { opacity: .55; }
.city-node.current { box-shadow: 0 0 0 3px var(--primary-light); }
.city-node .city-icon { font-size: 1.8rem; }
.city-node .city-info { flex: 1; }
.city-node .city-name { font-weight: 800; font-size: 1rem; }
.city-node .city-meta { font-size: .8rem; color: var(--text-muted); }
.city-node .city-stars { color: var(--secondary); font-size: .85rem; }
.city-connector {
  width: 2px; height: 16px; background: var(--primary-light);
  margin: 0 auto 8px;
}

/* Bölüm listesi */
.level-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.level-btn {
  aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--border);
  background: var(--bg-card); font-weight: 800; font-size: .9rem;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--text); position: relative;
}
.level-btn.done { background: var(--primary); color: #fff; border-color: var(--primary-dark); }
.level-btn.locked { opacity: .4; pointer-events: none; }
.level-btn .stars { font-size: .55rem; color: var(--secondary); }

/* Toast bildirim */
.toast {
  position: fixed; top: calc(20px + var(--safe-top)); left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--text); color: #fff;
  padding: 12px 24px; border-radius: 50px;
  font-weight: 700; z-index: 9999; opacity: 0;
  transition: transform .3s, opacity .3s; pointer-events: none;
  white-space: nowrap; max-width: 90vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.bonus { background: var(--secondary-dark); }

/* Popup +puan */
.float-points {
  position: fixed; pointer-events: none; z-index: 9998;
  font-size: 1.2rem; font-weight: 800; color: var(--success);
  animation: floatUp .8s ease forwards;
}
@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-60px); }
}

/* Overlay / modal */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.overlay.visible { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card); border-radius: 22px;
  padding: 28px 22px; max-width: 360px; width: 100%;
  text-align: center; animation: slideUp .35s ease;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Başarı rozetleri */
.achievement-grid { display: grid; gap: 10px; }
.achievement-item {
  display: flex; gap: 12px; align-items: center;
  padding: 14px; background: var(--bg-card);
  border-radius: 12px; border: 1px solid var(--border);
}
.achievement-item.locked { opacity: .5; }
.achievement-item .ach-icon { font-size: 2rem; }

/* Günlük ödül */
.daily-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 16px 0; }
.daily-day {
  text-align: center; padding: 10px 4px; border-radius: 10px;
  background: var(--bg-card); border: 2px solid var(--border); font-size: .7rem;
}
.daily-day.claimed { background: var(--primary-light); border-color: var(--primary); }
.daily-day.today { border-color: var(--secondary); box-shadow: 0 0 0 2px var(--secondary); }
.daily-day .day-num { font-weight: 800; font-size: .85rem; }

/* Ayarlar */
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.toggle {
  width: 50px; height: 28px; border-radius: 14px;
  background: #ccc; border: none; cursor: pointer; position: relative;
}
.toggle.on { background: var(--primary); }
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  transition: left .2s;
}
.toggle.on::after { left: 25px; }

/* Footer nav */
.page-footer { text-align: center; padding: 24px 16px calc(16px + var(--safe-bottom)); color: var(--text-muted); font-size: .8rem; }
.page-footer a { margin: 0 8px; }

/* Responsive masaüstü */
@media (min-width: 768px) {
  .container { max-width: 520px; }
}
