/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-main: #0B0E14;
  --bg-card: #121824;
  --bg-card-hover: #182232;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #E2E8F0;
  --accent-green: #10B981;
  --accent-cyan: #06B6D4;
}

/* Light Theme Variables */
html.light {
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --border-color: rgba(0, 0, 0, 0.08);
  --text-main: #0F172A;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
html.light ::-webkit-scrollbar-thumb {
  background: #CBD5E1;
}

/* Card Base */
.crypto-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  transition: all 0.2s ease-in-out;
}

.crypto-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.15);
}

/* =========================================================
   LIGHT THEME OVERRIDES (Full & Robust)
   ========================================================= */

html.light body {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
}

/* Light Mode Header, Navbar, Footer */
html.light header {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.04);
}

html.light nav {
  background-color: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
}

html.light nav a {
  color: #475569 !important;
}
html.light nav a:hover {
  background-color: #E2E8F0 !important;
  color: #0F172A !important;
}
html.light nav a.bg-emerald-500\/10 {
  background-color: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
}

html.light footer {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  color: #64748B !important;
}

html.light footer a {
  color: #64748B !important;
}
html.light footer a:hover {
  color: #10B981 !important;
}

/* Light Mode Cards */
html.light .crypto-card {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

html.light .crypto-card:hover {
  border-color: rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 12px 30px -5px rgba(16, 185, 129, 0.12) !important;
}

/* Background Gradients & Containers */
html.light .bg-gradient-to-r.from-slate-900 {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 50%, #F1F5F9 100%) !important;
  border-color: #E2E8F0 !important;
}

html.light .from-purple-950\/40 {
  background: linear-gradient(135deg, #FAF5FF 0%, #F3E8FF 50%, #FAF5FF 100%) !important;
  border-color: #E9D5FF !important;
}

html.light .bg-slate-900,
html.light .bg-slate-950,
html.light .bg-slate-900\/90,
html.light .bg-slate-950\/80,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/70,
html.light .bg-slate-900\/60 {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
}

html.light .bg-slate-800,
html.light .bg-slate-800\/80,
html.light .bg-slate-800\/60,
html.light .bg-slate-800\/50 {
  background-color: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #E2E8F0 !important;
}

html.light .border-slate-800,
html.light .border-slate-700,
html.light .border-slate-800\/80,
html.light .border-slate-800\/60,
html.light .border-slate-800\/50,
html.light .divide-slate-800,
html.light .divide-slate-800\/60 {
  border-color: #E2E8F0 !important;
}

/* Typography Overrides */
html.light .text-white {
  color: #0F172A !important;
}

html.light .text-slate-100,
html.light .text-slate-200,
html.light .text-slate-300 {
  color: #1E293B !important;
}

html.light .text-slate-400,
html.light .text-slate-500 {
  color: #64748B !important;
}

html.light .text-slate-600,
html.light .text-slate-700 {
  color: #94A3B8 !important;
}

/* Form Inputs, Selects, Buttons */
html.light input,
html.light select,
html.light textarea {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

html.light input:focus,
html.light select:focus,
html.light textarea:focus {
  border-color: #10B981 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

html.light input[readonly] {
  background-color: #F1F5F9 !important;
  color: #334155 !important;
}

/* Table styling in Light Mode */
html.light table {
  color: #1E293B !important;
}

html.light thead,
html.light thead.bg-slate-900,
html.light thead.bg-slate-900\/80,
html.light thead.bg-slate-900\/90 {
  background-color: #F1F5F9 !important;
  color: #475569 !important;
  border-color: #E2E8F0 !important;
}

html.light tbody tr:hover {
  background-color: #F8FAFC !important;
}

/* Mobile Drawer & Modals */
html.light #mobile-drawer {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

html.light #user-dropdown {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

html.light #user-dropdown a:hover {
  background-color: #F1F5F9 !important;
}

html.light #plan-modal .crypto-card,
html.light #approve-modal .crypto-card {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

/* Selection Buttons in Light Mode */
html.light .coin-select-btn,
html.light .withdraw-coin-btn {
  background-color: #F8FAFC !important;
  border-color: #E2E8F0 !important;
  color: #334155 !important;
}

html.light .coin-select-btn:hover,
html.light .withdraw-coin-btn:hover {
  background-color: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
}

html.light .coin-select-btn.border-emerald-500 {
  background-color: rgba(16, 185, 129, 0.08) !important;
  border-color: #10B981 !important;
  color: #065F46 !important;
}

html.light .withdraw-coin-btn.border-rose-500 {
  background-color: rgba(244, 63, 94, 0.08) !important;
  border-color: #F43F5E !important;
  color: #9F1239 !important;
}

html.light .pic-option-btn {
  background-color: #FFFFFF !important;
  border-color: #CBD5E1 !important;
}
html.light .pic-option-btn:hover {
  background-color: #F1F5F9 !important;
  border-color: #10B981 !important;
}

/* Theme Switcher Toggle */
html.light .theme-toggle-btn {
  background-color: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #334155 !important;
}
html.light .theme-toggle-btn:hover {
  background-color: #E2E8F0 !important;
  color: #D97706 !important;
}

/* Explicit Sun / Moon Icon Switcher */
html.dark .theme-sun-icon {
  display: block !important;
}
html.dark .theme-moon-icon {
  display: none !important;
}
html.light .theme-sun-icon {
  display: none !important;
}
html.light .theme-moon-icon {
  display: block !important;
}

/* Glow effects */
.glow-emerald {
  box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.35);
}

.glow-cyan {
  box-shadow: 0 0 25px -5px rgba(6, 182, 212, 0.35);
}

/* Mining Pulse Animation */
@keyframes mining-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.04); opacity: 1; filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.6)); }
  100% { transform: scale(1); opacity: 0.8; }
}

.mining-anim {
  animation: mining-pulse 2.5s infinite ease-in-out;
}

/* Toast alert notification */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #1E293B;
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-left: 4px solid #10B981;
}

.toast-error {
  border-left: 4px solid #EF4444;
}

.toast-info {
  border-left: 4px solid #06B6D4;
}

/* Mobile Responsive Helpers */
@media (max-width: 640px) {
  .crypto-card {
    padding: 1rem !important;
  }
  table th, table td {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* Floating Animations for Hero Crypto Graphic */
@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(2deg);
  }
}

@keyframes float-delayed {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(14px) rotate(-2deg);
  }
}

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

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.08);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

.animate-float-delayed {
  animation: float-delayed 5.5s ease-in-out infinite 0.7s;
}

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

.animate-pulse-glow {
  animation: pulse-glow 3.5s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

