/* ============================================================
   BaseXP — Kripto Tamagotchi | shared.css
   Tasarım Sistemi v1.0
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES
   ════════════════════════════════════════════════════════════ */
:root {
  /* ── Ana Renkler ── */
  --bg-deep:        #050810;
  --bg-base:        #080d1a;
  --bg-card:        #0d1526;
  --bg-card-hover:  #121d35;
  --bg-modal:       #0a1220;

  /* ── Neon Aksanlar ── */
  --neon-blue:      #00c8ff;
  --neon-cyan:      #00ffea;
  --neon-green:     #00ff88;
  --neon-yellow:    #ffe600;
  --neon-purple:    #b347ff;
  --neon-pink:      #ff2d7a;
  --neon-orange:    #ff6b00;

  /* ── Semantik Renkler ── */
  --color-hunger:   #ff6b35;
  --color-water:    #00c8ff;
  --color-happy:    #ffe600;
  --color-energy:   #00ff88;
  --color-xp:       #b347ff;
  --color-usdc:     #2775ca;

  /* ── Metin ── */
  --text-primary:   #f0f4ff;
  --text-secondary: #7a8fbb;
  --text-muted:     #3d5080;
  --text-accent:    #00c8ff;

  /* ── Border ── */
  --border-subtle:  rgba(0, 200, 255, 0.08);
  --border-glow:    rgba(0, 200, 255, 0.25);
  --border-active:  rgba(0, 200, 255, 0.6);

  /* ── Gölgeler ── */
  --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-neon:    0 0 20px rgba(0, 200, 255, 0.3);
  --shadow-glow-blue:   0 0 30px rgba(0, 200, 255, 0.4);
  --shadow-glow-green:  0 0 30px rgba(0, 255, 136, 0.4);
  --shadow-glow-yellow: 0 0 30px rgba(255, 230, 0, 0.4);
  --shadow-glow-purple: 0 0 30px rgba(179, 71, 255, 0.4);

  /* ── Tipografi ── */
  --font-main:  'Outfit', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;

  /* ── Spacing ── */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;

  /* ── Border Radius ── */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* ── Transitions ── */
  --ease-out:   cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ── Z-index ── */
  --z-base:    1;
  --z-card:    10;
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-toast:   400;
  --z-top:     999;
}

/* ════════════════════════════════════════════════════════════
   RESET & BASE
   ════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--neon-blue); border-radius: 2px; }

/* ── Selection ── */
::selection { background: rgba(0, 200, 255, 0.25); color: var(--text-primary); }

/* ════════════════════════════════════════════════════════════
   ARKA PLAN SİSTEMİ
   ════════════════════════════════════════════════════════════ */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Mesh Gradient */
.bg-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0, 200, 255, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(179, 71, 255, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(0, 255, 136, 0.04) 0%, transparent 50%);
  animation: bgPulse 12s ease-in-out infinite alternate;
}

/* Animasyonlu Grid */
.bg-scene::after {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridScroll 20s linear infinite;
}

@keyframes bgPulse {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.05); }
}

@keyframes gridScroll {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

/* Floating Orbs */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 15s ease-in-out infinite;
  pointer-events: none;
}
.bg-orb--1 { width: 300px; height: 300px; background: rgba(0, 200, 255, 0.08); top: -100px; left: -80px; animation-delay: 0s; }
.bg-orb--2 { width: 250px; height: 250px; background: rgba(179, 71, 255, 0.07); bottom: 100px; right: -60px; animation-delay: -5s; }
.bg-orb--3 { width: 200px; height: 200px; background: rgba(0, 255, 136, 0.05); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -10s; }

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  33%       { transform: translateY(-30px) scale(1.05); }
  66%       { transform: translateY(20px) scale(0.95); }
}

/* ════════════════════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════════════════════ */
.app-wrapper {
  position: relative;
  z-index: var(--z-base);
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: var(--sp-md);
  padding-bottom: calc(72px + var(--sp-md)); /* nav height */
}

/* ════════════════════════════════════════════════════════════
   BOTTOM NAV
   ════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 68px;
  background: rgba(8, 13, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: var(--z-nav);
  padding: 0 var(--sp-sm);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--r-md);
  transition: all 0.2s var(--ease-out);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  min-width: 56px;
  text-decoration: none;
}

.nav-item .nav-icon {
  font-size: 20px;
  transition: transform 0.3s var(--ease-spring);
}

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

.nav-item.active {
  color: var(--neon-blue);
  text-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
}

.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 6px rgba(0, 200, 255, 0.8));
}

/* ════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-md) 0;
}

.header-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-logo span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  display: block;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
  margin-top: -2px;
}

/* ════════════════════════════════════════════════════════════
   KARTLAR
   ════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), 0 0 20px rgba(0, 200, 255, 0.08);
}

.card--glow {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-neon);
}

.card--active {
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 1px rgba(0, 200, 255, 0.15), var(--shadow-glow-blue);
}

.card--sm { padding: var(--sp-md); border-radius: var(--r-md); }
.card--xl { padding: var(--sp-xl); border-radius: var(--r-xl); }

/* ════════════════════════════════════════════════════════════
   İHTİYAÇ BARLARI
   ════════════════════════════════════════════════════════════ */
.need-bars {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.need-bar {
  display: grid;
  grid-template-columns: 28px 1fr 40px;
  align-items: center;
  gap: var(--sp-sm);
}

.need-bar__icon {
  font-size: 18px;
  text-align: center;
  filter: drop-shadow(0 0 4px currentColor);
}

.need-bar__track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-full);
  overflow: hidden;
  position: relative;
}

.need-bar__fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 0.8s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.need-bar__fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: barShimmer 2.5s ease-in-out infinite;
}

@keyframes barShimmer {
  0%   { left: -60%; }
  100% { left: 160%; }
}

.need-bar__fill--hunger  { background: linear-gradient(90deg, #ff4800, #ff9a3c); }
.need-bar__fill--water   { background: linear-gradient(90deg, #0066ff, #00c8ff); }
.need-bar__fill--happy   { background: linear-gradient(90deg, #ff8c00, #ffe600); }
.need-bar__fill--energy  { background: linear-gradient(90deg, #00a854, #00ff88); }

/* Kritik durum titreme */
.need-bar__fill--critical {
  animation: barPulse 0.8s ease-in-out infinite;
}
@keyframes barPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.need-bar__value {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  color: var(--text-secondary);
}

/* ════════════════════════════════════════════════════════════
   BUTONLAR
   ════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Shimmer efekti */
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.4s ease;
  pointer-events: none;
}
.btn:hover::before { left: 160%; }

.btn:active { transform: scale(0.96); }

/* Varyantlar */
.btn--primary {
  background: linear-gradient(135deg, #0066ff, var(--neon-blue));
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 200, 255, 0.3);
}
.btn--primary:hover {
  box-shadow: 0 6px 25px rgba(0, 200, 255, 0.5);
  transform: translateY(-1px);
}

.btn--green {
  background: linear-gradient(135deg, #008f4c, var(--neon-green));
  color: #001a0d;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.25);
}
.btn--green:hover {
  box-shadow: 0 6px 25px rgba(0, 255, 136, 0.45);
  transform: translateY(-1px);
}

.btn--yellow {
  background: linear-gradient(135deg, #cc9900, var(--neon-yellow));
  color: #1a1000;
  box-shadow: 0 4px 15px rgba(255, 230, 0, 0.25);
}
.btn--yellow:hover {
  box-shadow: 0 6px 25px rgba(255, 230, 0, 0.45);
  transform: translateY(-1px);
}

.btn--purple {
  background: linear-gradient(135deg, #6600cc, var(--neon-purple));
  color: #fff;
  box-shadow: 0 4px 15px rgba(179, 71, 255, 0.3);
}
.btn--purple:hover {
  box-shadow: 0 6px 25px rgba(179, 71, 255, 0.5);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn--ghost:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
  background: rgba(0, 200, 255, 0.05);
}

.btn--usdc {
  background: linear-gradient(135deg, #1a5fa8, var(--color-usdc));
  color: #fff;
  box-shadow: 0 4px 15px rgba(39, 117, 202, 0.35);
}
.btn--usdc:hover {
  box-shadow: 0 6px 25px rgba(39, 117, 202, 0.55);
  transform: translateY(-1px);
}

/* Boyutlar */
.btn--sm { padding: 8px 14px; font-size: 12px; border-radius: var(--r-sm); }
.btn--lg { padding: 16px 28px; font-size: 16px; border-radius: var(--r-lg); }
.btn--xl { padding: 18px 36px; font-size: 18px; border-radius: var(--r-lg); }
.btn--full { width: 100%; }
.btn--icon { padding: 12px; aspect-ratio: 1; border-radius: var(--r-md); }

/* Yüklenme durumu */
.btn--loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn--loading::after {
  content: '';
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
  margin-left: var(--sp-xs);
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════
   XP / LEVEL BADGE
   ════════════════════════════════════════════════════════════ */
.xp-bar-wrap {
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-full);
  height: 6px;
  overflow: hidden;
  position: relative;
}

.xp-bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
  box-shadow: 0 0 8px rgba(179, 71, 255, 0.6);
  transition: width 1s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.xp-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: barShimmer 2s ease-in-out infinite;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  background: linear-gradient(135deg, rgba(179, 71, 255, 0.15), rgba(255, 45, 122, 0.1));
  border: 1px solid rgba(179, 71, 255, 0.3);
  border-radius: var(--r-full);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-purple);
  letter-spacing: 0.05em;
}

.xp-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

/* ════════════════════════════════════════════════════════════
   CÜZDAN BAĞLANTI
   ════════════════════════════════════════════════════════════ */
.wallet-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  background: rgba(0, 200, 255, 0.06);
  border: 1px solid rgba(0, 200, 255, 0.15);
  border-radius: var(--r-full);
  padding: 6px 14px 6px 8px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.wallet-badge:hover {
  background: rgba(0, 200, 255, 0.12);
  border-color: rgba(0, 200, 255, 0.35);
}

.wallet-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
  animation: dotPulse 2s ease-in-out infinite;
}
.wallet-dot--disconnected {
  background: var(--text-muted);
  box-shadow: none;
  animation: none;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 136, 0.8); }
  50%       { box-shadow: 0 0 16px rgba(0, 255, 136, 1); }
}

.wallet-address {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

/* ════════════════════════════════════════════════════════════
   KONUŞMa BALONU
   ════════════════════════════════════════════════════════════ */
.speech-bubble {
  position: relative;
  background: rgba(13, 21, 38, 0.95);
  border: 2px solid var(--neon-blue);
  border-radius: var(--r-xl);
  border-bottom-left-radius: var(--r-sm);
  padding: var(--sp-md) var(--sp-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 280px;
  box-shadow: 0 4px 20px rgba(0, 200, 255, 0.2);
  animation: bubblePop 0.4s var(--ease-spring);
}

.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -12px; left: 20px;
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 5px solid transparent;
  border-top: 12px solid var(--neon-blue);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px; left: 22px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 4px solid transparent;
  border-top: 10px solid rgba(13, 21, 38, 0.95);
}

@keyframes bubblePop {
  0%   { transform: scale(0.7) translateY(10px); opacity: 0; }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ════════════════════════════════════════════════════════════
   KARAKTER ANİMASYONLARI
   ════════════════════════════════════════════════════════════ */
.character-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.character-display {
  font-size: 80px;
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.15));
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.3s ease;
}

/* İdle animasyon */
.char-idle {
  animation: charIdle 3s ease-in-out infinite;
}
@keyframes charIdle {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  25%       { transform: translateY(-8px) rotate(1deg); }
  75%       { transform: translateY(-4px) rotate(-0.5deg); }
}

/* Ağlama */
.char-cry {
  animation: charCry 0.4s ease-in-out infinite alternate;
}
@keyframes charCry {
  0%   { transform: scale(1) rotate(-3deg); }
  100% { transform: scale(0.95) rotate(3deg); }
}

/* Dans */
.char-dance {
  animation: charDance 0.5s ease-in-out infinite alternate;
}
@keyframes charDance {
  0%   { transform: scale(1.05) rotate(-5deg) translateY(-5px); }
  100% { transform: scale(0.95) rotate(5deg) translateY(5px); }
}

/* Sevinç (tap) */
.char-happy {
  animation: charHappy 0.6s var(--ease-bounce);
}
@keyframes charHappy {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3) rotate(-8deg); }
  60%  { transform: scale(0.9) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Uyuyor */
.char-sleep {
  animation: charSleep 2s ease-in-out infinite;
  filter: brightness(0.6) saturate(0.4);
}
@keyframes charSleep {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50%       { transform: rotate(5deg) translateY(-5px); }
}

/* Evrim ışığı */
.char-evolve {
  animation: charEvolve 0.3s ease-in-out infinite alternate;
  filter: brightness(2) saturate(2) drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
}
@keyframes charEvolve {
  0%   { transform: scale(1); }
  100% { transform: scale(1.2); }
}

/* ── Uyku Zzz'ları ── */
.zzz-bubble {
  position: absolute;
  font-size: 18px;
  color: var(--neon-blue);
  font-weight: 700;
  opacity: 0;
  animation: zzzFloat 3s ease-in-out infinite;
}
.zzz-bubble:nth-child(1) { animation-delay: 0s; }
.zzz-bubble:nth-child(2) { animation-delay: 1s; font-size: 14px; }
.zzz-bubble:nth-child(3) { animation-delay: 2s; font-size: 10px; }

@keyframes zzzFloat {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.5); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(30px, -50px) scale(1.2); }
}

/* ── Ağlama Gözyaşları ── */
.tear {
  position: absolute;
  width: 6px; height: 10px;
  background: linear-gradient(180deg, var(--neon-blue), transparent);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  animation: tearDrop 1.2s ease-in infinite;
}
@keyframes tearDrop {
  0%   { opacity: 0; transform: translateY(0); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(40px); }
}

/* ════════════════════════════════════════════════════════════
   TOAST BİLDİRİMLER
   ════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: var(--sp-lg);
  right: var(--sp-md);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  max-width: 320px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  background: rgba(8, 13, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: var(--r-lg);
  padding: var(--sp-md) var(--sp-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-card), var(--shadow-neon);
  pointer-events: auto;
  animation: toastSlide 0.4s var(--ease-spring) forwards;
  position: relative;
  overflow: hidden;
}

.toast--success { border-color: rgba(0, 255, 136, 0.4); }
.toast--success::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--neon-green); }

.toast--error { border-color: rgba(255, 45, 122, 0.4); }
.toast--error::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--neon-pink); }

.toast--xp { border-color: rgba(179, 71, 255, 0.4); }
.toast--xp::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--neon-purple); }

.toast--warning { border-color: rgba(255, 230, 0, 0.4); }
.toast--warning::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--neon-yellow); }

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-text { flex: 1; line-height: 1.4; }
.toast-close { cursor: pointer; color: var(--text-muted); font-size: 16px; padding: 0 4px; }

@keyframes toastSlide {
  0%   { transform: translateX(120%); opacity: 0; }
  100% { transform: translateX(0);    opacity: 1; }
}

.toast.removing {
  animation: toastRemove 0.3s var(--ease-out) forwards;
}
@keyframes toastRemove {
  to { transform: translateX(120%); opacity: 0; }
}

/* ════════════════════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--sp-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-sheet {
  background: var(--bg-modal);
  border: 1px solid var(--border-glow);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--sp-xl) var(--sp-lg) var(--sp-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-spring);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  position: absolute;
  top: var(--sp-sm);
  left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 4px;
  background: var(--border-glow);
  border-radius: var(--r-full);
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-lg);
  text-align: center;
}

/* ════════════════════════════════════════════════════════════
   KONFETİ (Seviye atlama)
   ════════════════════════════════════════════════════════════ */
.confetti-particle {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: var(--z-top);
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ════════════════════════════════════════════════════════════
   EVRİM SİNEMATİK
   ════════════════════════════════════════════════════════════ */
.evolution-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-top);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(179, 71, 255, 0.3), rgba(5, 8, 16, 0.97));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.evolution-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.evolution-char {
  font-size: 100px;
  animation: evolutionPulse 0.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.6));
}

@keyframes evolutionPulse {
  0%   { transform: scale(1);    filter: drop-shadow(0 0 20px rgba(255,255,255,0.4)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 60px rgba(255,255,255,0.9)); }
}

.evolution-text {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: center;
  margin-top: var(--sp-lg);
  background: linear-gradient(135deg, var(--neon-yellow), var(--neon-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textGlow 0.8s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0%   { filter: brightness(1); }
  100% { filter: brightness(1.4) drop-shadow(0 0 20px rgba(255, 230, 0, 0.6)); }
}

.evolution-rays {
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 0deg,
    transparent 0deg, rgba(255, 230, 0, 0.06) 10deg,
    transparent 20deg, rgba(255, 230, 0, 0.06) 30deg,
    transparent 40deg, rgba(255, 230, 0, 0.06) 50deg,
    transparent 60deg, rgba(255, 230, 0, 0.06) 70deg,
    transparent 80deg, rgba(255, 230, 0, 0.06) 90deg,
    transparent 100deg, rgba(255, 230, 0, 0.06) 110deg,
    transparent 120deg, rgba(255, 230, 0, 0.06) 130deg,
    transparent 140deg, rgba(255, 230, 0, 0.06) 150deg,
    transparent 160deg, rgba(255, 230, 0, 0.06) 170deg,
    transparent 180deg, rgba(255, 230, 0, 0.06) 190deg,
    transparent 200deg, rgba(255, 230, 0, 0.06) 210deg,
    transparent 220deg, rgba(255, 230, 0, 0.06) 230deg,
    transparent 240deg, rgba(255, 230, 0, 0.06) 250deg,
    transparent 260deg, rgba(255, 230, 0, 0.06) 270deg,
    transparent 280deg, rgba(255, 230, 0, 0.06) 290deg,
    transparent 300deg, rgba(255, 230, 0, 0.06) 310deg,
    transparent 320deg, rgba(255, 230, 0, 0.06) 330deg,
    transparent 340deg, rgba(255, 230, 0, 0.06) 350deg,
    transparent 360deg
  );
  animation: raysRotate 8s linear infinite;
  pointer-events: none;
}

@keyframes raysRotate {
  to { transform: rotate(360deg); }
}

/* ════════════════════════════════════════════════════════════
   STREAK BADGE
   ════════════════════════════════════════════════════════════ */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.15), rgba(255, 230, 0, 0.1));
  border: 1px solid rgba(255, 107, 0, 0.35);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-orange);
}

.streak-fire {
  font-size: 14px;
  animation: firePulse 1s ease-in-out infinite alternate;
}
@keyframes firePulse {
  0%   { transform: scale(1) rotate(-5deg); }
  100% { transform: scale(1.15) rotate(5deg); }
}

/* ════════════════════════════════════════════════════════════
   AKTİVİTE KARTLARI
   ════════════════════════════════════════════════════════════ */
.activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
}

.activity-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xs);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.activity-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.activity-card:hover, .activity-card:active {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card), var(--shadow-neon);
}

.activity-card:hover::before { opacity: 1; }

.activity-card--free::before  { background: linear-gradient(135deg, rgba(0,255,136,0.05), transparent); }
.activity-card--paid::before  { background: linear-gradient(135deg, rgba(39,117,202,0.08), transparent); }

.activity-card--done {
  opacity: 0.45;
  pointer-events: none;
}

.activity-card--done::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--neon-green);
  background: rgba(0, 0, 0, 0.5);
}

.activity-icon { font-size: 28px; }
.activity-name { font-size: 12px; font-weight: 700; text-align: center; color: var(--text-primary); }
.activity-xp {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-purple);
}
.activity-cost {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-usdc);
  font-weight: 600;
}
.activity-cooldown {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ════════════════════════════════════════════════════════════
   TİPOGRAFİ YARDIMCILARI
   ════════════════════════════════════════════════════════════ */
.text-gradient-blue {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-gradient-green {
  background: linear-gradient(135deg, #00cc6a, var(--neon-green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-gradient-purple {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-gradient-gold {
  background: linear-gradient(135deg, var(--neon-orange), var(--neon-yellow));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.heading-1 { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.heading-2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.heading-3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.heading-4 { font-size: 15px; font-weight: 700; }

.text-sm  { font-size: 13px; }
.text-xs  { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mono { font-family: var(--font-mono); }

/* ════════════════════════════════════════════════════════════
   LEADERBOARD
   ════════════════════════════════════════════════════════════ */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md);
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: all 0.2s var(--ease-out);
}

.leaderboard-row:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

.leaderboard-row--me {
  border-color: rgba(179, 71, 255, 0.35);
  background: rgba(179, 71, 255, 0.05);
}

.rank-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  width: 28px;
  text-align: center;
  color: var(--text-muted);
}
.rank-badge--1 { color: var(--neon-yellow); font-size: 16px; }
.rank-badge--2 { color: #c0c0c0; font-size: 15px; }
.rank-badge--3 { color: #cd7f32; font-size: 14px; }

/* ════════════════════════════════════════════════════════════
   MAĞAZA ITEM
   ════════════════════════════════════════════════════════════ */
.shop-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--sp-lg) var(--sp-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
}

.shop-item:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 25px rgba(0, 200, 255, 0.15);
}

.shop-item__badge {
  position: absolute;
  top: 10px; right: 10px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--r-full);
  letter-spacing: 0.05em;
}

.shop-item__icon { font-size: 40px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4)); }
.shop-item__name { font-size: 13px; font-weight: 700; text-align: center; }
.shop-item__desc { font-size: 11px; color: var(--text-secondary); text-align: center; line-height: 1.5; }
.shop-item__price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-usdc);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ════════════════════════════════════════════════════════════
   MİNİ OYUN ALAN
   ════════════════════════════════════════════════════════════ */
.game-arena {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
}

.game-score {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 900;
  text-align: center;
  color: var(--neon-yellow);
  text-shadow: 0 0 20px rgba(255, 230, 0, 0.5);
  letter-spacing: -0.03em;
}

/* ════════════════════════════════════════════════════════════
   HARİTA
   ════════════════════════════════════════════════════════════ */
.world-node {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  border: 2px solid transparent;
  background: var(--bg-card);
}

.world-node--unlocked {
  border-color: var(--neon-green);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
  animation: nodeGlow 2s ease-in-out infinite alternate;
}

.world-node--locked {
  opacity: 0.4;
  filter: grayscale(1);
  cursor: default;
}

.world-node--current {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 25px rgba(255, 230, 0, 0.5);
  animation: currentPulse 1.5s ease-in-out infinite;
}

@keyframes nodeGlow {
  0%   { box-shadow: 0 0 10px rgba(0, 255, 136, 0.2); }
  100% { box-shadow: 0 0 25px rgba(0, 255, 136, 0.5); }
}

@keyframes currentPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 230, 0, 0.4); transform: scale(1); }
  50%       { box-shadow: 0 0 35px rgba(255, 230, 0, 0.7); transform: scale(1.08); }
}

/* ════════════════════════════════════════════════════════════
   YARDIMCI CLASS'LAR
   ════════════════════════════════════════════════════════════ */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs  { gap: var(--sp-xs); }
.gap-sm  { gap: var(--sp-sm); }
.gap-md  { gap: var(--sp-md); }
.gap-lg  { gap: var(--sp-lg); }

.mt-xs  { margin-top: var(--sp-xs); }
.mt-sm  { margin-top: var(--sp-sm); }
.mt-md  { margin-top: var(--sp-md); }
.mt-lg  { margin-top: var(--sp-lg); }
.mt-xl  { margin-top: var(--sp-xl); }
.mb-sm  { margin-bottom: var(--sp-sm); }
.mb-md  { margin-bottom: var(--sp-md); }
.mb-lg  { margin-bottom: var(--sp-lg); }

.w-full  { width: 100%; }
.text-center { text-align: center; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* ── Glow sınıfları ── */
.glow-blue   { box-shadow: var(--shadow-glow-blue); }
.glow-green  { box-shadow: var(--shadow-glow-green); }
.glow-yellow { box-shadow: var(--shadow-glow-yellow); }
.glow-purple { box-shadow: var(--shadow-glow-purple); }

/* ── Pulse animasyon ── */
.pulse {
  animation: genericPulse 2s ease-in-out infinite;
}
@keyframes genericPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

/* ── Fade in ── */
.fade-in {
  animation: fadeIn 0.4s var(--ease-out) forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Stagger animasyonlar (liste) ── */
.stagger > *:nth-child(1)  { animation-delay: 0.05s; }
.stagger > *:nth-child(2)  { animation-delay: 0.10s; }
.stagger > *:nth-child(3)  { animation-delay: 0.15s; }
.stagger > *:nth-child(4)  { animation-delay: 0.20s; }
.stagger > *:nth-child(5)  { animation-delay: 0.25s; }
.stagger > *:nth-child(6)  { animation-delay: 0.30s; }
.stagger > *:nth-child(7)  { animation-delay: 0.35s; }
.stagger > *:nth-child(8)  { animation-delay: 0.40s; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE (Max 480px hedef, büyük ekranlar için center)
   ════════════════════════════════════════════════════════════ */
@media (min-width: 481px) {
  .app-wrapper {
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
  }
  .bottom-nav {
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
  }
}

/* Yatay mod */
@media (orientation: landscape) and (max-height: 450px) {
  .page-content { padding-bottom: calc(56px + var(--sp-sm)); }
  .bottom-nav { height: 52px; }
  .character-display { font-size: 60px; }
}

/* ════════════════════════════════════════════════════════════
   PWA / SAFE AREA
   ════════════════════════════════════════════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(68px + env(safe-area-inset-bottom));
  }
  .page-content {
    padding-bottom: calc(72px + env(safe-area-inset-bottom) + var(--sp-md));
  }
}

/* ════════════════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
