/* ============================================================
   CryptoSim — Vanilla CSS Design System
   No framework, no build step. Palette fixed per brief:
     --bg:#0B1220  --card:#111827  --primary:#14F195
     --secondary:#3B82F6  --accent:#FACC15
   Type: Poppins (UI/body) + JetBrains Mono (all figures/data)
   ============================================================ */

:root {
  --bg: #0B1220;
  --card: #111827;
  --primary: #14F195;
  --secondary: #3B82F6;
  --accent: #FACC15;
  --text: #FFFFFF;
  --muted: #94A3B8;
  --border: rgba(255, 255, 255, 0.08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container-w: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Poppins', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(20, 241, 149, 0.06), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(59, 130, 246, 0.07), transparent 45%);
  background-attachment: fixed;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, select, input, textarea { font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.font-mono { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.container-md { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 6px; } .gap-2 { gap: 10px; } .gap-3 { gap: 14px; } .gap-4 { gap: 18px; } .gap-5 { gap: 22px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .col-span-2, .col-span-3 { grid-column: span 2; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3 { grid-column: span 1; }
}

.mt-1{margin-top:6px} .mt-2{margin-top:10px} .mt-3{margin-top:14px} .mt-4{margin-top:18px} .mt-5{margin-top:24px} .mt-6{margin-top:32px} .mt-8{margin-top:44px}
.mb-1{margin-bottom:6px} .mb-2{margin-bottom:10px} .mb-3{margin-bottom:14px} .mb-4{margin-bottom:18px} .mb-5{margin-bottom:24px}
.p-4{padding:18px} .p-5{padding:22px} .p-6{padding:26px} .p-7{padding:30px}
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-xs { font-size: 12px; } .text-sm { font-size: 14px; } .text-base { font-size: 16px; }
.text-lg { font-size: 18px; } .text-xl { font-size: 22px; } .text-2xl { font-size: 28px; } .text-3xl { font-size: 36px; }
.font-semibold { font-weight: 600; } .font-bold { font-weight: 700; } .font-extrabold { font-weight: 800; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.rounded { border-radius: var(--radius-sm); }

/* ---------- Simulation badge ---------- */
.sim-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(20, 241, 149, 0.06);
  border: 0.1px solid #14F195;
  border-radius: 999px;
  padding: 5px 12px;
}
.sim-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #14F195;
  box-shadow: 0 0 0 3px rgba(35, 255, 163, 0.06);
  animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-hover:hover { transform: translateY(-3px); border-color: rgba(20,241,149,.25); box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.card-scale:hover { transform: scale(1.03); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; border: none; cursor: pointer; font-weight: 600; font-size: 14px; padding: 12px 20px; border-radius: var(--radius-sm); transition: filter .2s ease, transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease; text-align: center; }
.btn-primary { background: var(--primary); color: #041A10; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-secondary { background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.4); color: #DBEAFE; }
.btn-secondary:hover { background: rgba(59,130,246,.22); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--primary); color: var(--text); }
.btn-danger-outline { background: transparent; border: 1px solid rgba(248,113,113,.3); color: #F87171; }
.btn-danger-outline:hover { border-color: #F87171; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Fade-ins ---------- */
.fade-in { animation: fadeIn .6s ease forwards; opacity: 0; }
@keyframes fadeIn { from{opacity:0; transform:translateY(14px);} to{opacity:1; transform:translateY(0);} }
.fade-1{animation-delay:.08s} .fade-2{animation-delay:.16s} .fade-3{animation-delay:.24s} .fade-4{animation-delay:.32s}

/* ---------- Skeleton loaders ---------- */
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.09) 37%, rgba(255,255,255,.04) 63%); background-size: 400% 100%; animation: skeleton 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes skeleton { 0%{background-position:100% 50%} 100%{background-position:0 50%} }
.sk-h8 { height: 32px; } .sk-h6 { height: 24px; } .sk-h4 { height: 16px; }
.sk-w20 { width: 90px; } .sk-w24 { width: 110px; } .sk-w28 { width: 130px; } .sk-full { width: 100%; } .sk-3-4 { width: 75%; } .sk-5-6 { width: 84%; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; font-family: 'JetBrains Mono', monospace; }
.badge-success { background: rgba(20,241,149,.12); color: var(--primary); border: 1px solid rgba(20,241,149,.3); }
.badge-pending { background: rgba(250,204,21,.12); color: var(--accent); border: 1px solid rgba(250,204,21,.3); }
.badge-danger  { background: rgba(248,113,113,.12); color: #F87171; border: 1px solid rgba(248,113,113,.3); }
.badge-info    { background: rgba(59,130,246,.12); color: #93C5FD; border: 1px solid rgba(59,130,246,.3); }

/* ---------- Progress bars ---------- */
.progress-track { background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; height: 8px; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--secondary), var(--primary)); transition: width 1s ease; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.24); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: rgba(255,255,255,.02); }

/* ---------- Forms ---------- */
input, select, textarea {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 16px; }
.field textarea { resize: none; }
.field-error { display: none; font-size: 12px; color: #F87171; margin-top: 6px; }
.field.has-error input, .field.has-error textarea { border-color: #F87171; }
.field.has-error .field-error { display: block; }

/* ---------- Pagination ---------- */
.pagination-btn { min-width: 34px; height: 34px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 13px; font-family: 'JetBrains Mono', monospace; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.pagination-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--text); }
.pagination-btn.active { background: var(--primary); color: #041A10; border-color: var(--primary); }
.pagination-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- Filter chips / coin buttons ---------- */
.chip { font-size: 13px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.chip:hover { color: var(--text); }
.chip.active { background: rgba(20,241,149,.1); border-color: rgba(20,241,149,.35); color: var(--primary); }
.coin-btn { padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card); color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 13px; cursor: pointer; transition: border-color .15s ease, color .15s ease; text-align: center; }
.coin-btn.active { border-color: var(--primary); color: var(--primary); }

/* ---------- Toast ---------- */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 260px; max-width: 360px; background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 12px 16px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); animation: toast-in .25s ease; font-size: 14px; }
.toast.toast-error { border-left-color: #F87171; }
.toast.toast-warning { border-left-color: var(--accent); }
@keyframes toast-in { from{opacity:0; transform:translateX(20px);} to{opacity:1; transform:translateX(0);} }
.toast.toast-out { animation: toast-out .2s ease forwards; }
@keyframes toast-out { to{opacity:0; transform:translateX(20px);} }

/* ---------- Navbar ---------- */
.navbar { position: sticky; top: 0; z-index: 50; background: rgba(11,18,32,.85); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); }
.navbar-inner { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; color: #041A10; font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 10px 14px; border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; font-weight: 500; transition: background .15s ease, color .15s ease; }
.nav-link:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-link.active { background: rgba(20,241,149,.1); color: var(--primary); }
.nav-desktop { display: flex; }
.nav-mobile-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 8px; }
.nav-mobile-menu { display: none; border-top: 1px solid var(--border); padding: 12px 20px; }
.nav-mobile-menu.open { display: block; }

@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
  .navbar-cta { display: none; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 90px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 56px 0; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom { border-top: 1px solid var(--border); padding: 22px 0; text-align: center; font-size: 12px; color: var(--muted); }
.footer-links li { margin-bottom: 10px; font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- App sidebar (dashboard-style pages) ---------- */
.app-layout { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; padding: 32px 20px; max-width: 1400px; margin: 0 auto; width: 100%; }
@media (max-width: 1024px) {
  .app-layout { display: block; }
  .app-main { padding: 20px 16px; }
}
.sidebar { width: 256px; flex-shrink: 0; border-right: 1px solid var(--border); height: 100vh; position: sticky; top: 0; padding: 24px 16px; display: flex; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; padding: 0 8px; margin-bottom: 32px; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sidebar-footer { margin-top: 18px; }
.mobile-topbar { display: none; position: sticky; top: 0; z-index: 40; background: rgba(11,18,32,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); align-items: center; justify-content: space-between; padding: 0 16px; height: 56px; }
.mobile-sidebar-drawer { display: none; position: fixed; inset: 0; z-index: 50; }
.mobile-sidebar-drawer.open { display: block; }
.mobile-sidebar-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.mobile-sidebar-panel { position: absolute; left: 0; top: 0; height: 100%; width: 280px; background: var(--bg); border-right: 1px solid rgba(255,255,255,.1); padding: 20px; }

@media (max-width: 1024px) {
  .sidebar { display: none; }
  .mobile-topbar { display: flex; }
}

/* ---------- Modal ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 60; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal-box { position: relative; width: 100%; max-width: 520px; max-height: 85vh; overflow-y: auto; padding: 26px; }

/* ---------- Ticker ---------- */
.ticker-wrap { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; margin-bottom: 24px; }
.ticker-track { display: flex; gap: 40px; white-space: nowrap; animation: ticker-scroll 26s linear infinite; width: max-content; }
@keyframes ticker-scroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ---------- Mining animation (earnings page) ---------- */
.mining-scene {
  display: flex; align-items: flex-end; justify-content: center; gap: 14px;
  height: 90px; margin: 6px 0 4px;
}
.mining-coin {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 14px;
  color: #041A10;
  animation: coin-mine 1.8s ease-in-out infinite;
}
.mining-coin.c1 { background: var(--primary); animation-delay: 0s; }
.mining-coin.c2 { background: var(--secondary); animation-delay: .3s; color: #fff; }
.mining-coin.c3 { background: var(--accent); animation-delay: .6s; }
.mining-coin.c4 { background: var(--primary); animation-delay: .9s; }
@keyframes coin-mine {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .55; }
  50% { transform: translateY(-24px) rotate(180deg); opacity: 1; }
}

/* ---------- Details/FAQ ---------- */
details.card summary { cursor: pointer; font-weight: 500; display: flex; justify-content: space-between; align-items: center; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card[open] summary .chevron { transform: rotate(45deg); }
.chevron { color: var(--muted); transition: transform .2s ease; }

/* ---------- Misc ---------- */
.grad-text { background: linear-gradient(90deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glow { position: absolute; z-index: -1; width: 220px; height: 220px; background: rgba(20,241,149,.2); filter: blur(70px); border-radius: 50%; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}


.show-password {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: #10b981; /* Change to match your theme */
  text-decoration: none;
  cursor: pointer;
}

.show-password:hover {
  text-decoration: underline;
}

/* ---------- Prevent grid/flex children from forcing page-wide horizontal scroll ---------- */
[class*="grid"] > *,
[class*="flex"] > * {
  min-width: 0;
}

/* Safety net in case anything else slips through on pages I haven't reviewed yet */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}