/* ===== CLIMATE ACTION TRACKER - CUSTOM ANIMATIONS ===== */

@keyframes flame {
  0%, 100% { transform: scaleY(1) scaleX(1) rotate(-2deg); }
  25% { transform: scaleY(1.08) scaleX(0.94) rotate(1deg); }
  50% { transform: scaleY(0.96) scaleX(1.06) rotate(-1deg); }
  75% { transform: scaleY(1.04) scaleX(0.97) rotate(2deg); }
}

@keyframes flame-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(251, 146, 60, 0.7)) drop-shadow(0 0 8px rgba(239, 68, 68, 0.4)); }
  50% { filter: drop-shadow(0 0 8px rgba(251, 146, 60, 1)) drop-shadow(0 0 16px rgba(239, 68, 68, 0.7)); }
}

.animate-flame {
  animation: flame 0.8s ease-in-out infinite, flame-glow 1.2s ease-in-out infinite;
  display: inline-block;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35); }
  50% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
}

.animate-pulse-green {
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes badge-unlock {
  0% { transform: scale(0.5) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); opacity: 1; }
  80% { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.animate-badge-unlock {
  animation: badge-unlock 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes progress-fill {
  from { width: 0%; }
  to { width: var(--target-width, 100%); }
}

.animate-progress {
  animation: progress-fill 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes count-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-count-in {
  animation: count-in 0.5s ease-out forwards;
}

@keyframes bounce-in {
  0% { opacity: 0; transform: scale(0.85) translateY(20px); }
  60% { transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-bounce-in {
  animation: bounce-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-slide-in-left {
  animation: slide-in-left 0.4s ease-out forwards;
}

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

.animate-shimmer {
  background: linear-gradient(90deg, #f0fdf4 25%, #dcfce7 50%, #f0fdf4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes check-draw {
  0% { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

.animate-check {
  stroke-dasharray: 100;
  animation: check-draw 0.5s ease-out forwards;
}

@keyframes xp-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); }
  50% { box-shadow: 0 0 16px rgba(34, 197, 94, 0.9), 0 0 32px rgba(34, 197, 94, 0.3); }
}

.animate-xp-glow {
  animation: xp-glow 2s ease-in-out infinite;
}

@keyframes day-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.animate-day-pop {
  animation: day-pop 0.3s ease-out forwards;
}

@keyframes notif-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.animate-notif {
  animation: notif-pulse 1.5s ease-in-out infinite;
}

@keyframes eco-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-eco-spin {
  animation: eco-spin 2s linear infinite;
}

@keyframes pin-drop {
  0% { transform: translateY(-20px) scale(0.8); opacity: 0; }
  60% { transform: translateY(4px) scale(1.1); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.animate-pin-drop {
  animation: pin-drop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.eco-gradient {
  background: linear-gradient(135deg, #16a34a 0%, #059669 50%, #0891b2 100%);
}

.eco-gradient-light {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #eff6ff 100%);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.sidebar-transition {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item {
  transition: transform 0.15s ease, color 0.15s ease;
}

.mobile-nav-item:active {
  transform: scale(0.9);
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f0fdf4;
}

::-webkit-scrollbar-thumb {
  background: #bbf7d0;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #86efac;
}

.badge-gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
}

.badge-silver {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1, #94a3b8);
}

.badge-bronze {
  background: linear-gradient(135deg, #d97706, #b45309, #92400e);
}

.eco-pattern {
  background-image: radial-gradient(circle at 20% 80%, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
