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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tabular-nums { font-variant-numeric: tabular-nums; }

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

.skeleton {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.dark .skeleton {
  background: linear-gradient(90deg, #21262d 25%, #30363d 50%, #21262d 75%);
  background-size: 200% 100%;
}

/* Balance counter */
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.count-up { animation: countUp 0.6s ease-out forwards; }

/* Card hover */
.card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }

/* Button press */
.btn-press:active { transform: scale(0.97); }

/* Slide transitions */
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.slide-in-right { animation: slideInRight 0.3s ease-out; }
.slide-in-left { animation: slideInLeft 0.3s ease-out; }
.slide-in-up { animation: slideInUp 0.3s ease-out; }
.fade-in { animation: fadeIn 0.3s ease-out; }
.slide-down { animation: slideDown 0.3s ease-out; }

/* Pulse */
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.pulse { animation: pulse 2s infinite; }

/* OTP digit focus */
@keyframes digitPulse { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
.digit-enter { animation: digitPulse 0.2s ease-out; }

/* Toast */
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
.toast-in { animation: toastIn 0.3s ease-out; }
.toast-out { animation: toastOut 0.3s ease-in; }

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

/* Glassmorphism card */
.glass-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
}

/* Donut chart */
@keyframes donutFill { from { stroke-dasharray: 0 100; } }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb { background: #30363d; }

/* Modal backdrop */
.modal-backdrop {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

/* Input focus ring */
input:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,82,194,0.2);
}

/* Bottom nav safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
}

/* Notification panel */
.notification-panel {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Prevent body scroll when modal open */
body.modal-open { overflow: hidden; }

/* Chart bar animation */
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar-grow { animation: barGrow 0.6s ease-out forwards; transform-origin: bottom; }

/* Stagger children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }