/* ============================================================
   animations.css - Tüm Animasyonlar
   ============================================================ */

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes bounceIn {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes checkPop {
  0%   { transform: scale(0) rotate(-45deg); }
  60%  { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes fireFlicker {
  0%   { transform: scale(1) rotate(-3deg);   filter: brightness(1); }
  100% { transform: scale(1.1) rotate(3deg);  filter: brightness(1.2) drop-shadow(0 0 6px #FF6B00); }
}

@keyframes timerPulse {
  from { opacity: 1; }
  to   { opacity: 0.6; }
}

@keyframes progressGrow {
  from { width: 0%; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

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

@keyframes floatUp {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-120px) scale(0.5); opacity: 0; }
}

@keyframes splashLogo {
  0%   { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(1.1) rotate(3deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0deg);   opacity: 1; }
}

@keyframes splashText {
  0%   { opacity: 0; letter-spacing: 8px; }
  100% { opacity: 1; letter-spacing: normal; }
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,0,0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(255,107,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,0,0); }
}

@keyframes waterFill {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

@keyframes dayCompleteGlow {
  0%,100% { box-shadow: 0 0 8px rgba(0,230,118,0.3); }
  50%      { box-shadow: 0 0 20px rgba(0,230,118,0.7); }
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes streakCountUp {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

/* ── Yardımcı Animasyon Sınıfları ─────────────────────────── */
.anim-fade-in     { animation: fadeIn      0.3s ease both; }
.anim-fade-in-up  { animation: fadeInUp    0.4s ease both; }
.anim-fade-in-down{ animation: fadeInDown  0.4s ease both; }
.anim-scale-in    { animation: scaleIn     0.35s cubic-bezier(0.34,1.56,0.64,1) both; }
.anim-bounce-in   { animation: bounceIn    0.5s cubic-bezier(0.34,1.56,0.64,1) both; }
.anim-slide-right { animation: slideInRight 0.35s ease both; }
.anim-slide-left  { animation: slideInLeft  0.35s ease both; }
.anim-page-enter  { animation: pageEnter   0.35s ease both; }

/* Gecikme yardımcıları */
.anim-delay-1 { animation-delay: 0.05s; }
.anim-delay-2 { animation-delay: 0.10s; }
.anim-delay-3 { animation-delay: 0.15s; }
.anim-delay-4 { animation-delay: 0.20s; }
.anim-delay-5 { animation-delay: 0.25s; }
.anim-delay-6 { animation-delay: 0.30s; }

/* ── Shimmer Skeleton ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-input)    50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% auto;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--border-radius-sm);
}

/* ── Pulse (neon nabız) ───────────────────────────────────── */
.pulse-orange {
  animation: pulseRing 1.8s ease infinite;
}

/* ── Check animasyonu ─────────────────────────────────────── */
.check-btn.checked {
  animation: checkPop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ── Gün tamamlanma parlaması ─────────────────────────────── */
.day-cell.completed {
  animation: dayCompleteGlow 2s ease infinite;
}

/* ── Sayfa Geçiş Sistemi ──────────────────────────────────── */
.page-transition {
  animation: pageEnter 0.3s ease both;
}

/* ── Confetti Parçacığı ───────────────────────────────────── */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  animation: floatUp 1s ease-out forwards;
}

/* ── Splash Ekranı ────────────────────────────────────────── */
.splash-logo-anim {
  animation: splashLogo 0.7s cubic-bezier(0.34,1.56,0.64,1) both;
}

.splash-text-anim {
  animation: splashText 0.6s ease 0.4s both;
}

.splash-btn-anim {
  animation: fadeInUp 0.5s ease 0.8s both;
}

/* ── Su Bardağı Dolma ─────────────────────────────────────── */
.water-glass.just-filled::before {
  animation: waterFill 0.3s ease both;
  transform-origin: bottom;
}

/* ── Streak Güncelleme ────────────────────────────────────── */
.streak-number.updated {
  animation: streakCountUp 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ── Spinner ──────────────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── Kart Hover (masaüstü için) ───────────────────────────── */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
  }
  .btn:hover {
    filter: brightness(1.1);
  }
}

/* ── Azaltılmış Hareket (Erişilebilirlik) ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
