/* ============================================================
   StakeX — Premium Dark Fintech Design System
   Mobile-first, glassmorphism, smooth animations
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-primary:   #080b18;
  --bg-secondary: #0d1225;
  --bg-card:      #111827;
  --bg-glass:     rgba(17, 24, 39, 0.6);
  --border:       rgba(255,255,255,0.07);
  --border-glow:  rgba(99,102,241,0.3);

  /* Accent */
  --accent:       #6366f1;
  --accent-2:     #8b5cf6;
  --accent-3:     #06b6d4;
  --accent-green: #10b981;
  --accent-red:   #ef4444;
  --accent-gold:  #f59e0b;

  /* Gradients */
  --grad-main:    linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-green:   linear-gradient(135deg, #059669 0%, #10b981 100%);
  --grad-red:     linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  --grad-gold:    linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --grad-card:    linear-gradient(145deg, rgba(99,102,241,0.12) 0%, rgba(139,92,246,0.06) 100%);
  --grad-cyan:    linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Shadows */
  --shadow-card:  0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
  --shadow-glow:  0 0 40px rgba(99,102,241,0.15);
  --shadow-green: 0 0 30px rgba(16,185,129,0.2);
  --shadow-red:   0 0 30px rgba(239,68,68,0.2);

  /* Sidebar */
  --sidebar-w: 260px;

  /* Bottom nav */
  --bottom-nav-h: 70px;

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-normal: 0.25s ease;
  --t-slow:   0.4s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family:      var(--font-body);
  background-color: var(--bg-primary);
  color:            var(--text-primary);
  min-height:       100vh;
  overflow-x:       hidden;
  line-height:      1.6;
  font-size:        15px;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* ── Noise Texture Overlay ────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

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

.main-content {
  flex: 1;
  min-width: 0;
  padding: 24px 20px;
  padding-bottom: calc(var(--bottom-nav-h) + 24px);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--t-normal);
}

.sidebar-logo {
  padding: 28px 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo img { width: 36px; height: 36px; border-radius: 10px; }

.sidebar-logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  margin-bottom: 2px;
  position: relative;
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-item:hover {
  background: rgba(99,102,241,0.1);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99,102,241,0.15);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--grad-main);
  border-radius: 0 4px 4px 0;
}

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

.wallet-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.wallet-pill:hover { border-color: var(--accent); }

.wallet-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Bottom Navigation (Mobile) ──────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: rgba(13, 18, 37, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t-fast);
  position: relative;
}

.bottom-nav-item svg { width: 20px; height: 20px; }

.bottom-nav-item.active { color: var(--accent); }

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Top Bar (Mobile) ─────────────────────────────────────── */
.topbar {
  display: none;
  position: sticky;
  top: 0; z-index: 150;
  background: rgba(8, 11, 24, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-gradient {
  background: var(--grad-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.card-gradient::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Balance Card ─────────────────────────────────────────── */
.balance-card {
  background: var(--grad-main);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(99,102,241,0.35);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -40px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.balance-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.03em;
}

.balance-amount {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  margin: 8px 0 4px;
}

.balance-sub {
  font-size: 13px;
  opacity: 0.75;
}

/* ── Pool Card ────────────────────────────────────────────── */
.pool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}

.pool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99,102,241,0.2);
}

.pool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-main);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

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

.pool-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.pool-apy {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pool-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.pool-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.pool-stat-value {
  font-size: 14px;
  font-weight: 600;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--t-fast);
  padding: 12px 24px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--t-fast);
}

.btn:hover::after { background: rgba(255,255,255,0.08); }
.btn:active::after { background: rgba(255,255,255,0.12); }

.btn-primary {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}

.btn-secondary {
  background: rgba(99,102,241,0.12);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.3);
}

.btn-secondary:hover { background: rgba(99,102,241,0.2); }

.btn-danger {
  background: var(--grad-red);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239,68,68,0.3);
}

.btn-success {
  background: var(--grad-green);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--text-primary); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 15px 32px; font-size: 15px; }
.btn-full { width: 100%; }

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

/* ── Badges / Status ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.04em;
}

.badge-active   { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.badge-inactive { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.badge-pending  { background: rgba(245,158,11,0.12); color: var(--accent-gold); }
.badge-won      { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.badge-lost     { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.badge-refunded { background: rgba(100,116,139,0.15); color: var(--text-secondary); }

.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Progress Bar ─────────────────────────────────────────── */
.progress-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 50px;
  height: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 50px;
  background: var(--grad-main);
  transition: width 0.6s ease;
}

.progress-bar.green { background: var(--grad-green); }
.progress-bar.gold  { background: var(--grad-gold); }

/* ── Forms / Inputs ───────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

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

.input-group {
  position: relative;
}

.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
}

.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

.form-input.has-prefix { padding-left: 40px; }
.form-input.has-suffix { padding-right: 60px; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  padding: 32px 24px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--t-slow) cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: var(--radius-xl); max-height: 80vh; }
  .modal-overlay:not(.open) .modal { transform: scale(0.9); }
  .modal-overlay.open .modal { transform: scale(1); }
}

.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 50px;
  margin: -20px auto 24px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast);
  color: var(--text-secondary);
}

.modal-close:hover { background: var(--border); color: var(--text-primary); }

/* ── Betting UI ───────────────────────────────────────────── */
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.crypto-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
}

.crypto-card:hover, .crypto-card.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.1);
}

.crypto-card.selected { box-shadow: 0 0 0 2px var(--accent); }

.crypto-icon { font-size: 24px; margin-bottom: 6px; }
.crypto-name { font-size: 12px; font-weight: 600; }
.crypto-price { font-size: 10px; color: var(--text-muted); }

.direction-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.direction-btn {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

.direction-btn.rise.selected {
  border-color: var(--accent-green);
  background: rgba(16,185,129,0.12);
  color: var(--accent-green);
  box-shadow: var(--shadow-green);
}

.direction-btn.fall.selected {
  border-color: var(--accent-red);
  background: rgba(239,68,68,0.08);
  color: var(--accent-red);
  box-shadow: var(--shadow-red);
}

.direction-icon { font-size: 28px; margin-bottom: 6px; }

.timeframe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}

.chip:hover, .chip.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.12);
  color: var(--accent);
}

.payout-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Leaderboard ──────────────────────────────────────────── */
.rank-badge {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.rank-1 { background: var(--grad-gold); color: #fff; box-shadow: 0 4px 16px rgba(245,158,11,0.4); }
.rank-2 { background: linear-gradient(135deg, #64748b, #94a3b8); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #92400e, #b45309); color: #fff; }
.rank-n { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Transaction Timeline ─────────────────────────────────── */
.tx-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.tx-item:last-child { border-bottom: none; }

.tx-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tx-icon.stake   { background: rgba(99,102,241,0.15); }
.tx-icon.unstake { background: rgba(245,158,11,0.12); }
.tx-icon.reward  { background: rgba(16,185,129,0.12); }
.tx-icon.bet-win { background: rgba(16,185,129,0.12); }
.tx-icon.bet-loss { background: rgba(239,68,68,0.08); }

.tx-body { flex: 1; min-width: 0; }
.tx-title { font-size: 14px; font-weight: 600; }
.tx-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-family: var(--font-display); font-size: 15px; font-weight: 700; text-align: right; }
.tx-amount.positive { color: var(--accent-green); }
.tx-amount.negative { color: var(--accent-red); }

/* ── Stats Row ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.stat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(99,102,241,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 3px;
}

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

/* ── Countdown Timer ──────────────────────────────────────── */
.countdown {
  display: flex;
  gap: 8px;
  font-family: var(--font-display);
}

.countdown-unit {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
  min-width: 48px;
}

.countdown-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.countdown-label {
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Toast notifications ──────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease;
  pointer-events: all;
  max-width: 320px;
}

.toast.success { border-color: var(--accent-green); }
.toast.error   { border-color: var(--accent-red); }
.toast.info    { border-color: var(--accent); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ── Loading Skeleton ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: var(--radius-md);
}

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

/* ── Connect Wallet Page ──────────────────────────────────── */
.connect-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-primary);
}

.connect-card {
  width: 100%;
  max-width: 400px;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--t-fast);
  margin-bottom: 10px;
  background: var(--bg-card);
}

.wallet-option:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.wallet-option-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.wallet-option-name { font-size: 15px; font-weight: 600; }
.wallet-option-desc { font-size: 12px; color: var(--text-muted); }

/* ── Responsive Breakpoints ───────────────────────────────── */
@media (min-width: 768px) {
  .main-content {
    margin-left: var(--sidebar-w);
    padding: 32px 36px;
    padding-bottom: 32px;
  }
  .sidebar   { display: flex; }
  .bottom-nav { display: none; }
  .topbar    { display: none; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .page-title { font-size: 32px; }
}

@media (max-width: 767px) {
  .sidebar    { display: none; }
  .bottom-nav { display: block; }
  .topbar     { display: flex; }
  .balance-amount { font-size: 28px; }
  .crypto-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .main-content { padding: 16px; padding-bottom: calc(var(--bottom-nav-h) + 20px); }
  .crypto-grid  { grid-template-columns: repeat(3, 1fr); }
  .stats-grid   { grid-template-columns: repeat(2, 1fr); }
}

/* ── Utility ──────────────────────────────────────────────── */
.text-accent  { color: var(--accent); }
.text-green   { color: var(--accent-green); }
.text-red     { color: var(--accent-red); }
.text-gold    { color: var(--accent-gold); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.font-display { font-family: var(--font-display); }
.fw-bold { font-weight: 700; }
.fw-800  { font-weight: 800; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Fade-in animation ────────────────────────────────────── */
.fade-in {
  animation: fade-in 0.4s ease both;
}

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

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* ── Admin Overrides ──────────────────────────────────────── */
.admin-sidebar { width: 220px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
