/* =====================================================================
   TradeXPro Design System
   Deep charcoal foundation, neon green / crimson indicators,
   glass-morphism surfaces, premium typography.
   ===================================================================== */

:root {
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --bg-elev: #131c30;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e6ecf7;
  --text-dim: #9aa8c3;
  --text-faint: #64748b;

  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.12);
  --red: #f43f5e;
  --red-soft: rgba(244, 63, 94, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --blue: #3b82f6;

  --brand-1: #22d3ee;
  --brand-2: #10b981;
  --grad-brand: linear-gradient(135deg, #22d3ee 0%, #10b981 100%);
  --grad-danger: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 10px 40px rgba(16, 185, 129, 0.2);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;

  --sidebar-w: 264px;
  --header-h: 68px;
  --max-w: 1280px;
  --sidebar-bg: #080d19;
  --topbar-bg: rgba(11, 17, 32, 0.8);
  --toast-bg: rgba(15, 23, 42, 0.92);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-soft: #ffffff;
  --bg-elev: #ffffff;
  --surface: rgba(15, 23, 42, 0.035);
  --surface-strong: rgba(15, 23, 42, 0.07);
  --surface-hover: rgba(15, 23, 42, 0.1);
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --text-dim: #475569;
  --text-faint: #94a3b8;
  --sidebar-bg: #ffffff;
  --topbar-bg: rgba(244, 246, 251, 0.85);
  --toast-bg: rgba(255, 255, 255, 0.96);
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

/* ---------------- Reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 500px at 85% -5%, rgba(34, 211, 238, 0.09), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(16, 185, 129, 0.08), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; vertical-align: middle; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--brand-2); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }
::selection { background: rgba(34, 211, 238, 0.3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------------- Utilities ---------------- */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 24px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.mt-1{margin-top:6px}.mt-2{margin-top:12px}.mt-3{margin-top:20px}.mt-4{margin-top:30px}.mt-5{margin-top:44px}
.mb-1{margin-bottom:6px}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:20px}.mb-4{margin-bottom:30px}
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.nowrap { white-space: nowrap; }
.grid { display: grid; gap: 20px; }
.flex { display: flex; gap: 12px; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.center { display: flex; align-items: center; justify-content: center; }
.col { display: flex; flex-direction: column; gap: 12px; }

.pos { color: var(--green); }
.neg { color: var(--red); }
.neutral { color: var(--text-dim); }

/* ---------------- Typography helpers ---------------- */
.display-1 {
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cyan);
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: var(--radius-full);
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
.section-sub { color: var(--text-dim); max-width: 640px; margin-inline: auto; }

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px; letter-spacing: 0.01em;
  padding: 12px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--surface-strong); color: var(--text);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s, border-color 0.18s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-lg { padding: 15px 30px; font-size: 15px; border-radius: 10px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--grad-brand); color: #04121a; box-shadow: 0 6px 22px rgba(16, 185, 129, 0.35); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(34, 211, 238, 0.4); background: linear-gradient(135deg, #2de2ff 0%, #15c692 100%); color: #04121a; }
.btn-danger { background: var(--grad-danger); color: #fff; box-shadow: 0 6px 22px rgba(244, 63, 94, 0.3); }
.btn-danger:hover { color: #fff; filter: brightness(1.06); }
.btn-ghost { background: transparent; border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(34, 211, 238, 0.06); }
.btn-outline-green { border: 1px solid rgba(34, 197, 94, 0.5); color: var(--green); background: var(--green-soft); }
.btn-outline-green:hover { background: rgba(34, 197, 94, 0.2); color: var(--green); }
.btn-outline-red { border: 1px solid rgba(244, 63, 94, 0.5); color: var(--red); background: var(--red-soft); }
.btn-outline-red:hover { background: rgba(244, 63, 94, 0.2); color: var(--red); }
.btn-icon { padding: 10px; border-radius: 10px; }

/* ---------------- Glass cards ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-hover { transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s; }
.card-hover:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: var(--shadow-glow);
}
.card-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 4px 11px; border-radius: var(--radius-full);
  border: 1px solid transparent; white-space: nowrap;
}
.badge-green { color: var(--green); background: var(--green-soft); border-color: rgba(34,197,94,0.3); }
.badge-red { color: var(--red); background: var(--red-soft); border-color: rgba(244,63,94,0.3); }
.badge-amber { color: var(--amber); background: var(--amber-soft); border-color: rgba(245,158,11,0.3); }
.badge-cyan { color: var(--cyan); background: rgba(34,211,238,0.1); border-color: rgba(34,211,238,0.3); }
.badge-violet { color: var(--violet); background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.3); }
.badge-dim { color: var(--text-dim); background: var(--surface-strong); border-color: var(--border); }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-dim); }
.input, .select, textarea.input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.input::placeholder { color: var(--text-faint); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-group { position: relative; }
.input-group .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 13px; font-weight: 600; }
.input-group .input { padding-right: 70px; }
textarea.input { min-height: 110px; resize: vertical; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.input-icon .input { padding-left: 42px; }

/* ---------------- Table ---------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.table thead th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.table tbody td { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--surface); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .row-click { cursor: pointer; }
.table .row-click:hover td { background: var(--surface); }

/* ---------------- Skeleton / shimmer ---------------- */
.skeleton {
  position: relative; overflow: hidden; background: var(--surface-strong);
  border-radius: 8px; color: transparent !important;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.skel-line { height: 14px; margin-bottom: 10px; }
.skel-block { height: 90px; }

/* ---------------- Toasts ---------------- */
#toast-root { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  min-width: 280px; max-width: 380px; padding: 14px 16px;
  background: var(--toast-bg); backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--text);
  animation: toast-in 0.35s var(--ease);
}
.toast.out { animation: toast-out 0.3s var(--ease) forwards; }
.toast .t-icon { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 700; color: #fff; }
.toast .t-body { flex: 1; font-size: 13.5px; }
.toast .t-title { font-weight: 700; margin-bottom: 2px; }
.toast-success .t-icon { background: var(--green); }
.toast-error .t-icon { background: var(--red); }
.toast-info .t-icon { background: var(--cyan); }
.toast-warning .t-icon { background: var(--amber); }
@keyframes toast-in { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateX(120%); opacity: 0; } }

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(4, 8, 18, 0.7); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fade-in 0.2s ease;
}
.modal {
  width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow);
  animation: modal-in 0.35s var(--ease);
}
.modal-lg { max-width: 640px; }
@keyframes modal-in { from { transform: translateY(24px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- iOS install walkthrough ---------------- */
.tx-demo-dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 14px; }
.tx-demo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); transition: all 0.3s var(--ease); }
.tx-demo-dot.on { width: 20px; border-radius: 99px; background: var(--grad-brand); }
.tx-demo-phone {
  width: 210px; height: 430px; margin: 0 auto; position: relative;
  background: var(--surface-strong); border-radius: 30px; border: 6px solid var(--border-strong);
  box-shadow: var(--shadow); overflow: hidden;
}
.tx-demo-notch {
  position: relative; top: 6px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 20px; border-radius: 99px; background: #0b1220; z-index: 3;
}
.tx-demo-phonescreen {
  position: absolute; inset: 26px 0 0; background: var(--bg-elev);
  display: flex; flex-direction: column; align-items: center; padding: 18px 14px; gap: 14px;
}
.tx-demo-urlbar {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 6px 10px; font-size: 11px; text-align: center; color: var(--text-dim);
  font-family: var(--font-mono);
}
.tx-demo-site { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 2px; }
.tx-demo-siteicon {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, #4f8cff, #7a5cff);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 19px;
  animation: tx-pop .4s var(--ease);
}
.tx-demo-siteicon.big { width: 48px; height: 48px; border-radius: 11px; font-size: 25px; }
.tx-demo-sitetext { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tx-demo-sitetext .thin { height: 8px; border-radius: 4px; background: var(--surface-strong); }
.tx-demo-sitetext .thin:last-child { width: 60%; height: 6px; }
.tx-demo-sharesheet, .tx-demo-sharehalf {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  animation: tx-rise .5s var(--ease); box-shadow: var(--shadow-sm);
}
.tx-share-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  font-size: 12.5px; color: var(--text); background: transparent; animation: tx-rise .5s var(--ease) both;
}
.tx-share-row.on { background: var(--surface-strong); animation: tx-glow 1.6s ease-in-out infinite; }
.tx-share-icon {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--surface-strong); color: var(--text);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.tx-demo-bubble {
  margin-top: 6px; background: var(--bg-elev); border: 1px solid var(--border-strong);
  padding: 9px 12px; border-radius: 12px; font-size: 12px; line-height: 1.45; color: var(--text);
  animation: tx-bubble .5s var(--ease) .2s both; max-width: 100%;
}
.tx-demo-bubble b { color: var(--cyan); }
.tx-demo-confirm { justify-content: center; }
.tx-addsheet {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm);
  animation: tx-rise .5s var(--ease);
}
.tx-addtitle { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--text); }
.tx-addrow { display: flex; align-items: center; gap: 12px; }
.tx-addinfo { flex: 1; }
.tx-addname { font-weight: 600; font-size: 13.5px; }
.tx-addsite { font-size: 11.5px; color: var(--text-dim); }
.tx-addbtn {
  margin-top: 12px; background: var(--grad-brand); color: #fff; text-align: center;
  padding: 10px; border-radius: 10px; font-weight: 600; font-size: 14px;
  animation: tx-glow 2s ease-in-out infinite;
}
.tx-demo-nav { display: flex; gap: 8px; margin-top: 18px; }
@keyframes tx-pop { 0% { transform: scale(0.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes tx-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tx-bubble { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tx-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(120,140,255,0.35); } 50% { box-shadow: 0 0 0 6px rgba(120,140,255,0.12); } }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.tab {
  flex: 1; text-align: center; padding: 9px 14px; border-radius: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  background: transparent; border: none; transition: all 0.2s var(--ease);
}
.tab.active { background: var(--surface-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.tab:hover:not(.active) { color: var(--text); }
.tab-pane { animation: fade-up 0.3s var(--ease); }

/* ---------------- Animations ---------------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); } 100% { box-shadow: 0 0 0 18px rgba(34, 211, 238, 0); } }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0.25; } }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border-strong);
  border-top-color: var(--cyan); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn .spinner { width: 16px; height: 16px; border-width: 2px; }

/* ---------------- Loader ---------------- */
#app-loader {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center; background: var(--bg);
  transition: opacity 0.4s, visibility 0.4s;
}
#app-loader.done { opacity: 0; visibility: hidden; }
.loader-logo { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; }
.loader-bar { width: 180px; height: 3px; margin: 16px auto 0; background: var(--surface-strong); border-radius: 99px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 40%; background: var(--grad-brand); border-radius: 99px; animation: load-slide 1.1s infinite var(--ease); }
@keyframes load-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

/* ---------------- Coin icon ---------------- */
.coin-icon { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.coin-icon text { font-family: var(--font); }
.coin-icon-wrap { position: relative; display: inline-block; flex: none; border-radius: 50%; overflow: hidden; }
.coin-icon-wrap .coin-icon { width: 100%; height: 100%; display: block; }
.coin-icon-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ---------------- Progress ---------------- */
.progress { height: 8px; border-radius: 99px; background: var(--surface-strong); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--grad-brand); transition: width 0.6s var(--ease); }
.progress-green > i { background: var(--green); }
.progress-red > i { background: var(--red); }

/* ---------------- Ticker ---------------- */
.ticker { position: relative; overflow: hidden; background: rgba(5, 10, 22, 0.7); border-block: 1px solid var(--border); }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: marquee 36s linear infinite; padding-block: 12px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; white-space: nowrap; }
.ticker-item .sym { font-weight: 700; }
.ticker-item .px { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.ticker-item .chg { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding-block: 90px 70px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 75% 30%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(700px 500px at 15% 75%, rgba(16, 185, 129, 0.1), transparent 60%);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; position: relative; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-trust { display: flex; gap: 26px; margin-top: 36px; flex-wrap: wrap; }
.hero-trust .stat b { font-family: var(--font-display); font-size: 22px; display: block; }
.hero-trust .stat span { font-size: 12.5px; color: var(--text-dim); }

.hero-3d { position: relative; }
.coin-stack { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.coin-orb {
  position: absolute; width: 150px; height: 150px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 30px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
}
.coin-orb.btc { animation: float 5s ease-in-out infinite; background: radial-gradient(circle at 30% 25%, rgba(247,147,26,0.5), #0f172a 70%); }
.coin-orb.eth { width: 110px; height: 110px; transform: translate(120px, -60px); animation: float 6s 0.6s ease-in-out infinite; background: radial-gradient(circle at 30% 25%, rgba(98,126,234,0.5), #0f172a 70%); }
.coin-orb.sol { width: 100px; height: 100px; transform: translate(-130px, 70px); animation: float 5.4s 0.3s ease-in-out infinite; background: radial-gradient(circle at 30% 25%, rgba(153,69,255,0.55), #0f172a 70%); }
.coin-ring { position: absolute; width: 320px; height: 320px; border-radius: 50%; border: 1px dashed rgba(34, 211, 238, 0.25); animation: spin 30s linear infinite; }
.coin-ring::before { content: ""; position: absolute; inset: 40px; border-radius: 50%; border: 1px dashed rgba(16,185,129,0.2); }
.hero-chip {
  position: absolute; padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); animation: float 5s ease-in-out infinite;
}

/* ---------------- Markets table ---------------- */
.market-row { display: flex; align-items: center; gap: 12px; }
.spark { display: block; }

/* ---------------- Exchange preview ---------------- */
.exchange-split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: stretch; }
.order-form { display: flex; flex-direction: column; gap: 16px; }
.buy-sell-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.buy-btn { background: var(--green-soft); color: var(--green); border: 1px solid rgba(34,197,94,0.35); }
.buy-btn:hover { background: var(--green); color: #04121a; }
.sell-btn { background: var(--red-soft); color: var(--red); border: 1px solid rgba(244,63,94,0.35); }
.sell-btn:hover { background: var(--red); color: #fff; }

/* ---------------- Feature grid ---------------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-strong); border: 1px solid var(--border);
  margin-bottom: 16px; transition: all 0.3s var(--ease);
}
.feature-icon svg { width: 26px; height: 26px; stroke: var(--cyan); }

/* ---------------- Steps ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  background: var(--grad-brand); color: #04121a; margin-bottom: 16px; position: relative; z-index: 1;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.15);
}
.step-line { position: absolute; top: 23px; left: 12%; right: 12%; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent); opacity: 0.5; }

/* ---------------- PWA / app ---------------- */
.app-promo { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.qr-code { width: 180px; height: 180px; border-radius: var(--radius); background: #fff; padding: 12px; }
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 12px; background: var(--surface-strong); border: 1px solid var(--border); }
.store-badge b { display: block; font-size: 12px; line-height: 1.2; }
.store-badge span { font-size: 10px; color: var(--text-dim); }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--border); background: rgba(4, 8, 18, 0.6); margin-top: 90px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.6fr; gap: 36px; padding-block: 60px 40px; }
.footer-col h4 { font-size: 14px; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-dim); font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: var(--cyan); }
.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-row a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); transition: all 0.25s; }
.social-row a:hover { color: #04121a; background: var(--grad-brand); border-color: transparent; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-faint); }
.newsletter { display: flex; gap: 8px; }
.newsletter .input { flex: 1; }

/* ---------------- Sticky nav ---------------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(11, 17, 32, 0.78);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 26px; height: var(--header-h); }
.nav-logo { flex: 1 0 auto; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text); letter-spacing: -0.02em; min-width: 0; }
.nav-logo-img { max-width: 320px; max-height: 64px; height: auto; width: auto; object-fit: contain; display: block; }
.nav-logo .logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-brand); display: grid; place-items: center; color: #04121a; font-size: 17px; font-weight: 800; }
.nav-links { display: flex; gap: 4px; margin-left: auto; margin-right: 0; }
.nav-link { padding: 9px 14px; border-radius: 8px; color: var(--text-dim); font-weight: 500; font-size: 14.5px; transition: all 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-icon-btn { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; transition: all 0.2s; }
.nav-icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.lang-select { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); padding: 8px 12px; border-radius: 8px; }
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.mobile-nav-links { display: none; border-top: 1px solid var(--border); background: rgba(11,17,32,0.96); }
.mobile-nav-links.open { display: block; }
.mobile-nav-links a { display: block; padding: 14px 24px; color: var(--text-dim); border-bottom: 1px solid var(--border); font-weight: 500; }
.mobile-nav-links a:hover { color: var(--cyan); }

/* ---------------- Auth pages ---------------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-left { display: grid; place-items: center; padding: 40px; position: relative; overflow: hidden; border-right: 1px solid var(--border); }
.auth-right { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-feature-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.auth-feature-list svg { flex: none; margin-top: 3px; }

/* ---------------- 404 / misc ---------------- */
.code-404 { font-family: var(--font-display); font-size: clamp(6rem, 20vw, 12rem); font-weight: 800; line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .exchange-split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .step-line { display: none; }
  .app-promo { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-3d { max-width: 420px; margin-inline: auto; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .nav-links { display: none; }
  .nav-burger { display: grid; place-items: center; }
  .nav-actions .btn-login-label { display: none; }
  .nav-logo { flex: 1 1 auto; min-width: 0; }
  .nav-logo-img { width: 100%; max-width: 100%; height: 56px; max-height: 56px; object-fit: contain; }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .buy-sell-row { grid-template-columns: 1fr; }
  .container { padding-inline: 18px; }
  .hero { padding-block: 60px 50px; }
  .nav-inner { gap: 12px; }
  .nav-logo-img { height: 52px; max-height: 52px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 7px 10px; font-size: 13px; }
  .nav-icon-btn { width: 36px; height: 36px; }
}
@media (max-width: 420px) {
  .nav-logo-img { height: 48px; max-height: 48px; }
  .nav-actions .lang-select { display: none; }
  .nav-actions .btn { display: none; }
  .nav-icon-btn { width: 36px; height: 36px; }
}

/* ---------------- Floating translator ---------------- */
.ft-widget { position: fixed; right: 22px; bottom: 22px; z-index: 300; }

.ft-fab {
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  display: grid; place-items: center; color: #04121a;
  background: var(--grad-brand);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4), 0 4px 12px rgba(34, 211, 238, 0.3);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ft-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 38px rgba(16, 185, 129, 0.5), 0 6px 16px rgba(34, 211, 238, 0.4); }
.ft-fab:active { transform: scale(0.96); }

.ft-panel {
  position: absolute; right: 0; bottom: 66px;
  width: 230px; max-height: 70vh; overflow-y: auto;
  background: var(--toast-bg); backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.ft-widget.open .ft-panel { opacity: 1; visibility: visible; transform: none; }

.ft-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); padding: 8px 10px 10px; }

.ft-list { display: flex; flex-direction: column; gap: 2px; }
.ft-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 10px; border: none; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--text-dim); font-size: 13.5px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.ft-item:hover { background: var(--surface); color: var(--text); }
.ft-item.active { background: rgba(34, 211, 238, 0.1); color: var(--cyan); }

.ft-code {
  width: 30px; height: 30px; flex: none; border-radius: 8px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--surface-strong); color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}
.ft-item.active .ft-code { background: var(--cyan); color: #04121a; }
.ft-label { flex: 1; text-align: left; }
[dir="rtl"] .ft-label { text-align: right; }

@media (max-width: 640px) {
  .ft-widget { right: 14px; bottom: 76px; }
}
