/* CashDi — Upgraded Premium UI based on rinhxu.online Design Language */
:root {
  --color-shopee: #ee4d2d;
  --color-shopee-dark: #d73211;
  --color-shopee-light: #ff7337;
  --color-tiktok: #fe2c55;
  --color-mint: #10b981;
  --color-coin: #ffc93c;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #f8fafc;
  color: #1e293b;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.dark body {
  background-color: #020617;
  color: #e2e8f0;
}

/* Bulletproof Dark Mode Fallbacks for High-Contrast Cards */
.dark .bg-white,
.dark .bg-white\/80,
.dark .bg-white\/90,
.dark .bg-white\/95 {
  background-color: #0f172a !important;
}
.dark .bg-gray-50,
.dark .bg-gray-50\/70,
.dark .bg-gray-50\/60,
.dark .bg-gray-50\/50,
.dark .bg-gray-100,
.dark .bg-orange-50\/80,
.dark .bg-amber-50\/90,
.dark .bg-amber-50\/70,
.dark .bg-slate-850 {
  background-color: #1e293b !important;
}
.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-200\/80,
.dark .border-gray-200\/70,
.dark .border-emerald-100,
.dark .border-amber-100,
.dark .border-orange-100 {
  border-color: #334155 !important;
}
.dark .text-gray-900 {
  color: #f8fafc !important;
}
.dark .text-gray-800 {
  color: #f1f5f9 !important;
}
.dark .text-gray-700 {
  color: #e2e8f0 !important;
}
.dark .text-gray-600 {
  color: #cbd5e1 !important;
}
.dark .text-gray-500 {
  color: #94a3b8 !important;
}
.dark .text-gray-400 {
  color: #94a3b8 !important;
}

/* Upgraded warm ambient mesh background */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(238, 77, 45, 0.08), transparent 38%),
    radial-gradient(circle at 88% 10%, rgba(255, 201, 60, 0.13), transparent 36%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.07), transparent 44%);
}

.dark .page-bg {
  background:
    radial-gradient(circle at 12% 8%, rgba(238, 77, 45, 0.14), transparent 40%),
    radial-gradient(circle at 88% 10%, rgba(255, 201, 60, 0.08), transparent 36%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.07), transparent 44%);
}

@keyframes floatCoin {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(5deg); }
}

.animate-float-coin {
  animation: floatCoin 3.6s ease-in-out infinite;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-modal-pop {
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-toast-in {
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.paste-highlight {
  box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.25) !important;
  border-color: #ee4d2d !important;
}

/* Subtle custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(238, 77, 45, 0.55);
}

/* Bulletproof Mobile & Desktop Responsiveness */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

*, ::before, ::after {
  box-sizing: border-box;
}

.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

/* Prevent auto-zoom on mobile inputs */
@media (max-width: 640px) {
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Safe area support for notch and home bar */
.pb-safe {
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}
