@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  /* Dark Theme (Default) */
  --bg-primary: #06060f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(16, 16, 32, 0.7);
  --bg-card-hover: rgba(22, 22, 44, 0.82);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-input: rgba(255, 255, 255, 0.05);

  /* Accents */
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-pink: #ec4899;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #06b6d4 100%);
  --gradient-purple: linear-gradient(135deg, #8b5cf6, #6d28d9);
  --gradient-blue: linear-gradient(135deg, #3b82f6, #2563eb);
  --gradient-green: linear-gradient(135deg, #10b981, #059669);
  --gradient-card: linear-gradient(145deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.05));

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #c4b5fd;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(139, 92, 246, 0.3);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);

  /* Sizing */
  --sidebar-width: 260px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Light Theme ── */
[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-glass: rgba(0, 0, 0, 0.05);
  --bg-input: #e2e8f0;

  --text-primary: #000000;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  --text-accent: #6d28d9;

  --border-subtle: rgba(0, 0, 0, 0.12);
  --border-glow: rgba(139, 92, 246, 0.3);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .hero-title, .brand-name {
  font-family: 'Outfit', sans-serif;
}

/* ── Background Effects ── */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease;
}

[data-theme="light"] body::before {
  opacity: 0.4;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
}

/* ── Theme Toggle ── */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-md);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-icon { opacity: 0; transform: rotate(90deg) scale(0); }
.moon-icon { opacity: 1; transform: rotate(0) scale(1); }

[data-theme="light"] .sun-icon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .moon-icon { opacity: 0; transform: rotate(-90deg) scale(0); }

/* ── Layout ── */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 32px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(139, 92, 246, 0.08);
  color: var(--accent-purple);
  font-weight: 600;
}

.nav-item .nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* ── Sidebar User Profile ── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glow);
}

.user-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-display-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-provider-label {
  font-size: 11px;
  color: var(--text-muted);
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
}

.logout-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.network-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { transform: scale(1.02); opacity: 0.8; box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes pulse-yellow {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.4); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(234, 179, 8, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  max-width: 1200px;
}

/* ── Hero Banner ── */
.hero-banner {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  background: radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  line-height: 1.5;
}

/* ── Hero Auth Panel ── */
.hero-auth-panel {
  margin-top: 32px;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 700px;
  animation: slideInUp 0.6s ease-out;
}

.auth-divider {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-auth-panel .btn-social {
  flex: 1;
  min-width: 140px;
  justify-content: center;
  padding: 12px 20px;
  font-size: 14px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.hero-auth-panel .btn-social:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-social.discord { background: #5865F2; color: white; }
.btn-social.twitter { background: #000000; color: white; border: 1px solid rgba(255,255,255,0.1) !important; }
.btn-social.google { background: #ffffff; color: #000; }

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

/* ── Dashboard Grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 32px;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Entry Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeInUp 0.5s ease backwards;
}

.dashboard-grid > *:nth-child(1) { animation-delay: 0.1s; }
.dashboard-grid > *:nth-child(2) { animation-delay: 0.2s; }
.dashboard-grid > *:nth-child(3) { animation-delay: 0.3s; }
.dashboard-grid > *:nth-child(4) { animation-delay: 0.4s; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Balance Card ── */
.balance-total {
  font-family: 'Outfit', sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -1.5px;
}

.balance-total .currency {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
  letter-spacing: 0;
}

.balance-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-weight: 500;
}

.balance-row {
  display: flex;
  gap: 16px;
}

.balance-item {
  flex: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.3s ease;
}

.balance-item:hover {
  border-color: var(--border-glow);
  background: rgba(139, 92, 246, 0.03);
}

.balance-item-icon {
  font-size: 20px;
  margin-bottom: 12px;
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.balance-item-value {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.balance-item-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Action Buttons Panel ── */
.actions-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  text-align: left;
}

.action-btn:hover:not(:disabled) {
  transform: translateX(4px);
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.action-btn .action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.action-btn .action-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.action-btn.create .action-icon {
  background: var(--gradient-purple);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.action-btn.send .action-icon {
  background: var(--gradient-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.action-btn.topup .action-icon {
  background: var(--gradient-green);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.action-btn.withdraw .action-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.action-btn-text {
  display: flex;
  flex-direction: column;
  font-family: 'Outfit', sans-serif;
}

.action-btn-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Transactions ── */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  background: var(--bg-glass);
  border: 1px solid transparent;
}

.tx-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-subtle);
  transform: scale(1.01);
}

.tx-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.tx-icon.send { color: var(--accent-blue); background: rgba(59, 130, 246, 0.1); }
.tx-icon.receive { color: var(--accent-green); background: rgba(16, 185, 129, 0.1); }
.tx-icon.topup { color: var(--accent-orange); background: rgba(245, 158, 11, 0.1); }
.tx-icon.fee { color: var(--accent-pink); background: rgba(236, 72, 153, 0.1); }

.tx-details {
  flex: 1;
  min-width: 0;
}

.tx-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.tx-address {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'Inter', monospace;
  letter-spacing: -0.2px;
}

.tx-amount-group {
  text-align: right;
}

.tx-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.tx-amount.positive { color: var(--accent-green); }
.tx-amount.negative { color: var(--text-primary); }

.tx-status {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
  display: inline-block;
}

.tx-status.confirmed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tx-status.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ── Spending Progress ── */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.2); }
  50% { box-shadow: 0 0 25px rgba(139, 92, 246, 0.5); }
  100% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.2); }
}

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

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-up {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 2. Interactive Polish */
.card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(139, 92, 246, 0.1);
}

.balance-total {
  animation: fade-in-up 0.6s ease-out;
}

#balance-card.highlight {
  animation: pulse-glow 2s infinite;
  border-color: var(--accent-purple);
}

/* 3. Onboarding Modal Styles */
.onboarding-content {
  animation: scale-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(139, 92, 246, 0.1);
}

.onboarding-step {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s ease;
}

.onboarding-step:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.06);
}

/* 4. Faucet Card Enhancements */
.faucet-card {
  animation: fade-in-up 0.8s ease-out;
  position: relative;
  overflow: hidden;
}

.faucet-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 200%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer 4s infinite linear;
  pointer-events: none;
}

/* 5. Skeleton Loader (Shimmer) */
.shimmer-loading {
  background: linear-gradient(90deg, 
    var(--bg-input) 25%, 
    rgba(255, 255, 255, 0.08) 50%, 
    var(--bg-input) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* Shorthand for usage in JS */
.invisible-until-load {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.visible-now {
  opacity: 1;
}

/* ── Spending Progress ── */
.spending-card-content {
  padding: 16px;
  background: var(--bg-glass);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.spending-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.spending-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.spending-pct {
  font-size: 12px;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-orange), var(--accent-red));
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.pending-item {
  animation: pulse-yellow 3s infinite ease-in-out;
  border-color: rgba(234, 179, 8, 0.2) !important;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 90%;
  max-width: 480px;
  backdrop-filter: blur(40px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(139, 92, 246, 0.1);
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  margin-bottom: 32px;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: var(--accent-purple);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-purple);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary.green {
  background: var(--gradient-green);
}
.btn-primary.green:hover {
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.btn-primary.blue {
  background: var(--gradient-blue);
}
.btn-primary.blue:hover {
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

/* ── Fee Preview ── */
.fee-preview {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.fee-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}

.fee-row .label { color: var(--text-muted); }
.fee-row .value { color: var(--text-primary); font-weight: 500; }
.fee-row.total { border-top: 1px solid var(--border-subtle); padding-top: 8px; margin-top: 4px; }
.fee-row.total .value { color: var(--accent-purple); font-weight: 700; }

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 4s forwards;
  max-width: 380px;
}

.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent-blue); }

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

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ── Wallet Address Display ── */
.wallet-address-display {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-address-text {
  font-family: 'Inter', monospace;
  font-size: 13px;
  color: var(--text-accent);
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color 0.2s;
}

.copy-btn:hover { color: var(--accent-purple); }

/* ── Loading Spinner ── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

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

/* ── No Wallet State ── */
.no-wallet-state {
  text-align: center;
  padding: 60px 24px;
}

.no-wallet-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.no-wallet-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.no-wallet-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── Wallet Section (visible after creation) ── */
.wallet-info-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.wallet-info-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.wallet-info-address {
  font-family: 'Inter', monospace;
  font-size: 13px;
  color: var(--accent-purple);
  flex: 1;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: 72px; /* Space for mobile menu button */
  }
  .hero-banner {
    padding: 24px 20px;
  }
  .hero-title {
    font-size: 24px;
    letter-spacing: -0.5px;
  }
  .balance-total {
    font-size: 32px;
  }
  .balance-row {
    flex-direction: column;
    gap: 12px;
  }
  .mobile-menu-btn {
    display: flex !important;
  }
  .dashboard-grid {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-banner {
    border-radius: var(--radius-lg);
    padding: 20px;
  }
  .card {
    padding: 20px;
  }
  .balance-total {
    font-size: 28px;
  }
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 101;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 20px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ── Secure Linking Buttons ── */
.secure-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.btn-social {
  width: 100% !important;
  padding: 12px 16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background-image: none !important; /* Kill the default gradient */
}

.btn-social.discord { background-color: #5865F2 !important; color: #fff !important; }
.btn-social.twitter { background-color: #000000 !important; color: #fff !important; border: 1px solid rgba(255,255,255,0.2) !important; }
.btn-social.google { background-color: #ffffff !important; color: #000 !important; }

.btn-social:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-social:active {
  transform: translateY(0);
}

#link-status-msg a:hover {
  text-decoration: underline !important;
}

/* ── Auth/Landing State ── */
body.auth-hidden .sidebar,
body.auth-hidden .mobile-menu-btn {
  display: none !important;
}

body.auth-hidden .main-content {
  margin-left: 0 !important;
  width: 100vw !important;
  max-width: 100% !important;
  padding: 40px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 80vh !important;
}

body.auth-hidden .hero-banner {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

body.auth-hidden .hero-subtitle {
  margin: 0 auto;
}

body.auth-hidden .hero-auth-panel {
  margin-left: auto;
  margin-right: auto;
}

body.auth-hidden section {
  display: none !important;
}
