/* ===== ARVION LEDGER - MAIN STYLESHEET ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #030712;
  --bg-secondary: #0a0f1e;
  --bg-card: rgba(15, 23, 42, 0.8);
  --blue-electric: #3b82f6;
  --blue-glow: #60a5fa;
  --purple-neon: #8b5cf6;
  --purple-glow: #a78bfa;
  --cyan: #06b6d4;
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --border: rgba(148, 163, 184, 0.1);
  --border-glow: rgba(59, 130, 246, 0.3);
  --glass: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-blue: 0 0 30px rgba(59, 130, 246, 0.15);
  --shadow-purple: 0 0 30px rgba(139, 92, 246, 0.15);
  --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-card: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 3px; }

/* ===== PARTICLES CANVAS ===== */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#loading-screen.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.loader-logo {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 24px;
  animation: logoPulse 2s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(59,130,246,0.4), 0 0 80px rgba(139,92,246,0.2);
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(59,130,246,0.4), 0 0 80px rgba(139,92,246,0.2); transform: scale(1); }
  50% { box-shadow: 0 0 60px rgba(59,130,246,0.7), 0 0 120px rgba(139,92,246,0.4); transform: scale(1.05); }
}

.loader-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  animation: fadeSlideUp 0.8s ease forwards;
}

.loader-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: fadeSlideUp 0.8s ease 0.2s both;
}

.loader-bar-wrap {
  width: 240px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 32px;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: loadBar 2.5s ease forwards;
  box-shadow: 0 0 10px rgba(59,130,246,0.6);
}

@keyframes loadBar { 0% { width: 0%; } 60% { width: 70%; } 80% { width: 88%; } 100% { width: 100%; } }

/* ===== PAGE CONTAINER ===== */
.page {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.page.active { display: block; animation: pageIn 0.5s ease; }

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

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.glass-card-glow {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  box-shadow: var(--shadow-blue);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(59,130,246,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-glow);
  background: rgba(59,130,246,0.08);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-success {
  background: rgba(16,185,129,0.15);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.3);
}
.btn-success:hover { background: rgba(16,185,129,0.25); }

.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; border-radius: var(--radius); }

/* ===== FORM INPUTS ===== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.input-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: all 0.2s ease;
  width: 100%;
  outline: none;
}

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

.input-field:focus {
  border-color: var(--blue-electric);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.input-icon-wrap {
  position: relative;
}
.input-icon-wrap .input-field { padding-left: 44px; }
.input-icon-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 17px;
}

select.input-field { appearance: none; cursor: pointer; }
textarea.input-field { resize: vertical; min-height: 100px; }

/* ===== AUTH PAGE ===== */
#auth-page {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#auth-page.active { display: flex; }

.auth-container {
  width: 100%;
  max-width: 440px;
  z-index: 2;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
  box-shadow: 0 0 30px rgba(59,130,246,0.4);
  animation: logoPulse 3s ease-in-out infinite;
}

.auth-logo h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.auth-card {
  padding: 32px;
}

.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.auth-tab.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 12px rgba(59,130,246,0.3);
}

.auth-form { display: none; }
.auth-form.active { display: block; animation: pageIn 0.3s ease; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input { accent-color: var(--blue-electric); }

.forgot-link {
  font-size: 13px;
  color: var(--blue-electric);
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-link:hover { color: var(--blue-glow); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.btn-google:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }

/* ===== WALLET SETUP PAGE ===== */
#wallet-setup-page {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#wallet-setup-page.active { display: flex; }

.wallet-setup-container {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

.wallet-setup-container h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.wallet-setup-container p {
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.wallet-setup-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.wallet-option-card {
  padding: 40px 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  text-align: center;
}

.wallet-option-card:hover {
  border-color: var(--blue-electric);
  box-shadow: 0 0 40px rgba(59,130,246,0.2);
  transform: translateY(-4px);
}

.wallet-option-card .card-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  animation: floatIcon 3s ease-in-out infinite;
}

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

.wallet-option-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.wallet-option-card p { font-size: 14px; color: var(--text-secondary); }

/* ===== MAIN APP LAYOUT ===== */
#app-page {
  display: none;
  min-height: 100vh;
}
#app-page.active { display: flex; flex-direction: column; }

.app-header {
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.header-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 15px rgba(59,130,246,0.3);
}

.header-logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-btn {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  font-size: 17px;
}
.notif-btn:hover { background: rgba(255,255,255,0.1); }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--red);
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.avatar-btn {
  width: 38px;
  height: 38px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  border: none;
  color: white;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 0;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-item .nav-icon { font-size: 22px; transition: all 0.2s; }

.nav-item.active {
  color: var(--blue-electric);
}
.nav-item.active .nav-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 6px rgba(59,130,246,0.6));
}

/* ===== MAIN CONTENT ===== */
.app-content {
  flex: 1;
  padding: 20px 16px 100px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

/* ===== TABS ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: pageIn 0.3s ease; }

/* ===== HOME TAB ===== */
.wallet-hero-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #1e1b4b 100%);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(139,92,246,0.15);
}

.wallet-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-hero-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.wallet-balance {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 4px;
}

.wallet-balance-usd {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.wallet-address-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 14px;
}

.wallet-address-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: monospace;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue-electric);
  font-size: 15px;
  padding: 2px;
  transition: color 0.2s;
}
.copy-btn:hover { color: var(--blue-glow); }

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

.action-btn:hover {
  border-color: var(--border-glow);
  background: rgba(59,130,246,0.08);
  transform: translateY(-2px);
}

.action-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.action-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.section-link {
  font-size: 13px;
  color: var(--blue-electric);
  text-decoration: none;
  cursor: pointer;
}

/* ===== MARKET CARD ===== */
.market-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: all 0.2s;
  cursor: pointer;
}

.market-card:hover {
  border-color: var(--border-glow);
  background: rgba(59,130,246,0.05);
}

.market-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.market-info { flex: 1; min-width: 0; }
.market-name { font-weight: 600; font-size: 14px; }
.market-symbol { font-size: 12px; color: var(--text-muted); text-transform: uppercase; }

.market-price { text-align: right; }
.market-price-value { font-weight: 700; font-size: 15px; }
.market-change { font-size: 12px; font-weight: 600; }
.market-change.positive { color: var(--green); }
.market-change.negative { color: var(--red); }

/* ===== TRANSACTION ITEM ===== */
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.tx-item:hover { border-color: var(--border-glow); }

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

.tx-icon.sent { background: rgba(239,68,68,0.15); color: var(--red); }
.tx-icon.received { background: rgba(16,185,129,0.15); color: var(--green); }
.tx-icon.swap { background: rgba(59,130,246,0.15); color: var(--blue-electric); }

.tx-info { flex: 1; min-width: 0; }
.tx-type { font-weight: 600; font-size: 14px; }
.tx-hash { font-size: 12px; color: var(--text-muted); font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tx-amount { text-align: right; font-weight: 700; font-size: 14px; }
.tx-time { font-size: 12px; color: var(--text-muted); }

/* ===== SOL PRICE BANNER ===== */
.price-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.price-banner-label { font-size: 13px; color: var(--text-secondary); }
.price-banner-value { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; }
.price-banner-change { font-size: 13px; font-weight: 600; }

/* ===== SEND PAGE ===== */
.send-container { padding: 20px 0; }
.send-amount-display {
  text-align: center;
  padding: 32px 20px;
  margin-bottom: 24px;
}
.send-amount-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 52px;
  font-weight: 700;
  cursor: text;
  min-height: 64px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.send-amount-usd { font-size: 15px; color: var(--text-secondary); margin-top: 6px; }

.send-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.numpad-key {
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
}

.numpad-key:hover { background: rgba(59,130,246,0.1); border-color: var(--border-glow); }
.numpad-key:active { transform: scale(0.95); }

/* ===== SWAP PAGE ===== */
.swap-container { padding: 20px 0; }

.swap-card {
  padding: 24px;
  margin-bottom: 16px;
}

.swap-token-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.swap-token-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
}
.swap-token-select:hover { background: rgba(255,255,255,0.12); }

.swap-amount-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  font-family: 'Space Grotesk', sans-serif;
  width: 100%;
}
.swap-amount-input::placeholder { color: var(--text-muted); }

.swap-arrow-btn {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 auto;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
  border: none;
  color: white;
  transition: transform 0.3s;
}
.swap-arrow-btn:hover { transform: rotate(180deg); }

.swap-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.slippage-btns { display: flex; gap: 8px; }
.slippage-btn {
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.slippage-btn.active, .slippage-btn:hover {
  border-color: var(--blue-electric);
  color: var(--blue-electric);
  background: rgba(59,130,246,0.08);
}

/* ===== RECEIVE / DEPOSIT ===== */
.receive-container { text-align: center; padding: 20px 0; }

.qr-wrapper {
  display: inline-block;
  padding: 20px;
  background: white;
  border-radius: var(--radius);
  margin: 24px auto;
  box-shadow: 0 0 40px rgba(59,130,246,0.2);
}

.qr-wrapper img { display: block; width: 200px; height: 200px; }

.address-display {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
  line-height: 1.8;
  margin-bottom: 16px;
  position: relative;
}

/* ===== ACCOUNT PAGE ===== */
.account-header {
  text-align: center;
  padding: 24px 0 16px;
  margin-bottom: 20px;
}

.account-avatar {
  width: 72px;
  height: 72px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  box-shadow: 0 0 30px rgba(59,130,246,0.3);
  border: 3px solid rgba(59,130,246,0.3);
}

.account-name { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; }
.account-email { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

.settings-section { margin-bottom: 20px; }
.settings-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding: 0 4px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text-primary);
}

.settings-item:hover { border-color: var(--border-glow); background: rgba(59,130,246,0.05); }

.settings-item-left { display: flex; align-items: center; gap: 12px; }
.settings-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.settings-icon.blue { background: rgba(59,130,246,0.15); }
.settings-icon.purple { background: rgba(139,92,246,0.15); }
.settings-icon.green { background: rgba(16,185,129,0.15); }
.settings-icon.red { background: rgba(239,68,68,0.15); }
.settings-icon.yellow { background: rgba(245,158,11,0.15); }

.settings-item-label { font-size: 14px; font-weight: 500; }
.settings-item-sublabel { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.settings-item-right { color: var(--text-muted); font-size: 18px; }

/* ===== SUPPORT PAGE ===== */
.support-hero {
  text-align: center;
  padding: 24px 0 20px;
  margin-bottom: 20px;
}

.support-hero h2 { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.support-hero p { color: var(--text-secondary); font-size: 14px; }

.faq-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s;
}
.faq-question:hover { background: rgba(255,255,255,0.03); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-answer.open { max-height: 200px; }
.faq-answer-inner { padding: 0 16px 16px; }

.faq-icon { transition: transform 0.3s; color: var(--text-muted); }
.faq-question.open .faq-icon { transform: rotate(180deg); }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }

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

.modal {
  background: #0f172a;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius) var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-center {
  border-radius: var(--radius-lg);
  align-self: center;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; }
.modal-close {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.15); }

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.alert-warning {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  color: #fde68a;
}

.alert-success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #6ee7b7;
}

.alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}

.alert-info {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  color: #93c5fd;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-blue { background: rgba(59,130,246,0.15); color: var(--blue-electric); }
.badge-green { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-yellow { background: rgba(245,158,11,0.15); color: var(--yellow); }
.badge-purple { background: rgba(139,92,246,0.15); color: var(--purple-neon); }

/* ===== RECOVERY PHRASE GRID ===== */
.phrase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.phrase-word {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-family: monospace;
  color: var(--text-primary);
}

.phrase-word span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

/* ===== SUCCESS ANIMATIONS ===== */
.success-icon {
  width: 72px;
  height: 72px;
  background: rgba(16,185,129,0.15);
  border: 2px solid var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* ===== ANTI-PHISHING BANNER ===== */
.phishing-banner {
  background: rgba(245,158,11,0.08);
  border-bottom: 1px solid rgba(245,158,11,0.2);
  padding: 8px 16px;
  font-size: 11px;
  color: #fde68a;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: center;
  justify-content: center;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
  height: 160px;
  position: relative;
  margin: 10px 0;
}

.chart-svg { width: 100%; height: 100%; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  min-width: 220px;
  max-width: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

/* ===== IMPORT WALLET TABS ===== */
.import-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.import-tab {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
}
.import-tab.active {
  border-color: var(--blue-electric);
  background: rgba(59,130,246,0.1);
  color: var(--blue-electric);
}

/* ===== SKELETON LOADING ===== */
.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: shimmer 1.5s infinite;
  border-radius: 8px;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .wallet-balance { font-size: 32px; }
  .send-amount-big { font-size: 42px; }
  .wallet-setup-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .phrase-grid { grid-template-columns: repeat(3, 1fr); }
  .app-content { padding: 16px 12px 100px; }
}

@media (min-width: 768px) {
  .app-content { max-width: 600px; }
  .bottom-nav { max-width: 600px; left: 50%; transform: translateX(-50%); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .app-header { max-width: 600px; left: 50%; transform: translateX(-50%); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 20px rgba(59,130,246,0.3); } 50% { box-shadow: 0 0 40px rgba(59,130,246,0.6); } }

.glow-anim { animation: glow 2s ease-in-out infinite; }

/* PWA Install prompt */
.pwa-prompt {
  position: fixed;
  bottom: 90px;
  left: 16px;
  right: 16px;
  background: #0f172a;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 200;
  box-shadow: var(--shadow-blue);
  animation: slideUp 0.4s ease;
}

.pwa-text { flex: 1; font-size: 13px; }
.pwa-text strong { display: block; margin-bottom: 2px; }
.pwa-text span { color: var(--text-muted); font-size: 12px; }

/* ===== REDEEM SECTION ===== */
.redeem-section {
  padding: 20px 0;
}

.redeem-input-row {
  display: flex;
  gap: 10px;
}

.redeem-input-row .input-field {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: monospace;
}

/* Token icon fallback */
.token-icon-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
