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

:root {
  --bg: #0a0e1a;
  --bg2: #111827;
  --bg3: #1a2233;
  --card: #141c2e;
  --border: #1e2d45;
  --blue: #0085FF;
  --blue-dark: #006fd6;
  --green: #00c896;
  --red: #ff4d6a;
  --text: #e8edf5;
  --text2: #8b9ab5;
  --text3: #5a6a82;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #3da3ff; }

/* ── App Shell (sidebar layout) ── */
:root { --sidebar-w: 240px; }

body.app-layout {
  display: block;
  overflow-x: hidden;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 300;
  overflow-y: auto;
  transition: transform .25s ease;
}

.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 32px 32px 60px;
}

.app-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Sidebar sections */
.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.su-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #005ad4);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.su-name { font-size: 13px; font-weight: 600; }
.su-email { font-size: 11px; color: var(--text3); }

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
}

.snav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .8px;
  color: var(--text3); text-transform: uppercase;
  padding: 0 10px; margin-bottom: 4px;
}

.snav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--text2);
  transition: background .15s, color .15s;
  margin-bottom: 2px;
  position: relative;
}
.snav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.snav-item svg { flex-shrink: 0; opacity: .7; }
.snav-item:hover svg { opacity: 1; }

.snav-active {
  background: rgba(0,133,255,0.12) !important;
  color: var(--blue) !important;
  font-weight: 600 !important;
}
.snav-active svg { opacity: 1 !important; color: var(--blue); }
.snav-active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--blue);
}

.snav-badge {
  margin-left: auto;
  font-size: 9px; font-weight: 700; letter-spacing: .5px;
  padding: 2px 7px; border-radius: 8px;
}
.snav-badge-blue { background: rgba(0,133,255,0.15); color: var(--blue); }
.snav-badge-green { background: rgba(0,200,150,0.12); color: var(--green); }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.snav-network {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text3);
}
.snav-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-blue { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.dot-green { background: var(--green); }

.snav-signout {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--red);
  padding: 8px 10px; border-radius: 8px;
  transition: background .15s;
}
.snav-signout:hover { background: rgba(255,77,106,0.08); color: var(--red); }

/* Mobile topbar (hidden on desktop) */
.mobile-topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 400;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 0 20px; height: 56px;
  align-items: center; justify-content: space-between;
}

.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; padding: 4px;
}
.sidebar-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text2); border-radius: 2px;
  transition: background .2s;
}
.sidebar-toggle:hover span { background: var(--text); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 250;
  background: rgba(0,0,0,0.5);
}
.overlay-visible { display: block !important; }

/* Responsive */
@media (max-width: 860px) {
  .mobile-topbar { display: flex; }
  .app-main { margin-left: 0; padding: 80px 20px 50px; }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.sidebar-open {
    transform: translateX(0);
  }
}

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,26,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; color: var(--text);
  text-decoration: none;
}
.nav-logo:hover { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text2); font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }


/* ── Messages ── */
.messages-wrapper { max-width: 1200px; margin: 16px auto; padding: 0 24px; }
.alert {
  padding: 12px 18px; border-radius: 8px;
  margin-bottom: 8px; font-size: 14px;
}
.alert-success { background: rgba(0,200,150,0.12); border: 1px solid rgba(0,200,150,0.3); color: var(--green); }
.alert-error { background: rgba(255,77,106,0.12); border: 1px solid rgba(255,77,106,0.3); color: var(--red); }

/* ── Hero ── */
.hero {
  min-height: 540px;
  display: flex; align-items: center;
  max-width: 1200px; margin: 0 auto;
  padding: 80px 24px 60px;
  gap: 60px;
}
.hero-inner { flex: 1; }
.hero-badge {
  display: inline-block;
  background: rgba(0,133,255,0.15); color: var(--blue);
  border: 1px solid rgba(0,133,255,0.3);
  padding: 4px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600; letter-spacing: .5px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(36px,5vw,56px);
  font-weight: 800; line-height: 1.15;
  color: var(--text); margin-bottom: 18px;
}
.hero-sub { color: var(--text2); font-size: 18px; margin-bottom: 32px; max-width: 460px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-trust { color: var(--text3); font-size: 13px; }
.hero-graphic { flex: 0 0 280px; display: flex; flex-direction: column; gap: 16px; }

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.pc-icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}
.btc-icon { background: rgba(247,147,26,0.15); color: #f7931a; }
.eth-icon { background: rgba(98,126,234,0.15); color: #627eea; }
.pc-name { font-size: 13px; color: var(--text2); }
.pc-price { font-size: 16px; font-weight: 700; }
.pc-change { margin-left: auto; font-size: 13px; font-weight: 600; }
.pc-change.up { color: var(--green); }
.pc-change.down { color: var(--red); }

.floating { animation: floatA 3.5s ease-in-out infinite; }
.floating-slow { animation: floatB 4.5s ease-in-out infinite; }
@keyframes floatA { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes floatB { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* ── Ticker ── */
.ticker-bar {
  background: var(--bg2); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden; padding: 10px 0; white-space: nowrap;
}
.ticker-track {
  display: inline-block;
  animation: scrollTicker 28s linear infinite;
}
.ticker-item {
  display: inline-block; padding: 0 32px;
  font-size: 13px; color: var(--text2);
}
.ticker-item strong { color: var(--text); margin-right: 6px; }
.tick-up { color: var(--green); }
.tick-down { color: var(--red); }
@keyframes scrollTicker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ── Sections ── */
.section { padding: 70px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-title {
  font-size: 30px; font-weight: 700;
  margin-bottom: 32px; text-align: center;
}

/* ── Market Table ── */
.table-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.market-table { width: 100%; border-collapse: collapse; }
.market-table th {
  padding: 14px 20px; text-align: left;
  font-size: 12px; font-weight: 600; letter-spacing: .6px;
  color: var(--text3); text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.market-table td {
  padding: 16px 20px; font-size: 14px;
  border-bottom: 1px solid rgba(30,45,69,0.5);
}
.market-table tr:last-child td { border-bottom: none; }
.market-table tr:hover td { background: rgba(255,255,255,0.02); }
.rank { color: var(--text3); font-weight: 500; }
.asset-cell { display: flex; align-items: center; gap: 12px; }
.asset-name { font-weight: 600; }
.asset-sym { font-size: 12px; color: var(--text3); }
.price-cell { font-weight: 600; }
.change-cell.positive { color: var(--green); }
.change-cell.negative { color: var(--red); }

/* ── Asset Icons ── */
.asset-icon, .bal-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.icon-btc { background: rgba(247,147,26,0.15); color: #f7931a; }
.icon-eth { background: rgba(98,126,234,0.15); color: #627eea; }
.icon-sol { background: rgba(153,69,255,0.15); color: #9945ff; }
.icon-usdt { background: rgba(38,161,123,0.15); color: #26a17b; }
.icon-bnb { background: rgba(240,185,11,0.15); color: #f0b90b; }
.icon-xrp { background: rgba(0,90,212,0.15); color: #005ad4; }

/* ── Features ── */
.features-section { padding: 70px 0; background: var(--bg2); }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 24px;
}
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.feature-icon { font-size: 32px; margin-bottom: 14px; }
.feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--text2); font-size: 14px; }

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, #0a1628 0%, #0d2040 100%);
  border-top: 1px solid var(--border);
  padding: 70px 24px; text-align: center;
}
.cta-banner h2 { font-size: 34px; font-weight: 800; margin-bottom: 10px; }
.cta-banner p { color: var(--text2); margin-bottom: 28px; font-size: 17px; }

/* ── Auth Pages ── */
.auth-page {
  flex: 1; display: flex; align-items: center;
  justify-content: center; padding: 40px 24px;
}
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 36px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-sub { color: var(--text2); text-align: center; font-size: 14px; margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text2); }

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 13px; font-weight: 600; color: var(--text2); }
.field-error { font-size: 12px; color: var(--red); }
.field-help { font-size: 11px; color: var(--text3); }
.form-error {
  background: rgba(255,77,106,0.1); border: 1px solid rgba(255,77,106,0.3);
  color: var(--red); padding: 10px 14px; border-radius: 8px; font-size: 13px;
}

.form-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px;
  outline: none; transition: border-color .2s;
}
.form-input:focus { border-color: var(--blue); }

/* ── Dashboard ── */
.dashboard-page { flex: 1; padding: 32px 0 60px; }
.dash-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
}
.dash-title { font-size: 26px; font-weight: 700; }
.dash-sub { color: var(--text3); font-size: 13px; margin-top: 4px; }
.dash-badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(0,200,150,0.1); border: 1px solid rgba(0,200,150,0.25);
  color: var(--green); padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
}
.badge-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; }

/* Balance Banner */
.balance-banner {
  background: linear-gradient(135deg, #0a2040, #0a1628);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 32px;
  margin-bottom: 28px;
  display: flex; justify-content: space-between; align-items: center;
}
.bb-label { font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.bb-amount { font-size: 38px; font-weight: 800; line-height: 1; }
.bb-note { font-size: 13px; color: var(--text3); margin-top: 6px; }
.bb-bar {
  display: flex; height: 8px; border-radius: 4px; overflow: hidden;
  width: 200px; gap: 2px;
}
.bb-seg { height: 100%; min-width: 8px; border-radius: 4px; flex: 1; }
.seg-btc { background: #f7931a; }
.seg-eth { background: #627eea; }
.seg-sol { background: #9945ff; }
.seg-usdt { background: #26a17b; }
.seg-bnb { background: #f0b90b; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.mt-4 { margin-top: 20px; }
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border);
}
.card-header h2 { font-size: 15px; font-weight: 600; }
.network-tag {
  background: rgba(0,133,255,0.1); color: var(--blue);
  border: 1px solid rgba(0,133,255,0.25);
  padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}

/* Dashboard Grid */
.dash-grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* Balance List */
.balance-list { padding: 8px 0; }
.balance-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  transition: background .15s;
}
.balance-row:hover { background: rgba(255,255,255,0.02); }
.bal-info { flex: 1; }
.bal-name { font-size: 14px; font-weight: 600; }
.bal-sym { font-size: 12px; color: var(--text3); }
.bal-amounts { text-align: right; }
.bal-crypto { font-size: 14px; font-weight: 600; }
.bal-usd { font-size: 12px; color: var(--text3); }

/* Transactions */
.tx-list { padding: 8px 0; }
.tx-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
}
.tx-row:hover { background: rgba(255,255,255,0.02); }
.tx-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,133,255,0.1); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.tx-info { flex: 1; }
.tx-pair { font-size: 14px; font-weight: 600; }
.tx-time { font-size: 12px; color: var(--text3); }
.tx-amounts { text-align: right; }
.tx-from { font-size: 13px; color: var(--red); }
.tx-to { font-size: 13px; color: var(--green); }
.tx-status {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px;
}
.status-completed { background: rgba(0,200,150,0.1); color: var(--green); }

.empty-state { padding: 28px 22px; text-align: center; color: var(--text3); font-size: 14px; }

/* ── Amount mode toggle ── */
.amount-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.amount-toggle-label { font-size: 12px; color: var(--text3); }
.amount-toggle {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 3px;
  gap: 2px;
}
.atog-btn {
  padding: 5px 16px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  background: none; border: none; cursor: pointer;
  color: var(--text3); transition: background .15s, color .15s;
}
.atog-btn:hover { color: var(--text); }
.atog-active {
  background: var(--blue) !important;
  color: #fff !important;
}

/* ── Not supported banner ── */
.not-supported-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(255,180,0,0.08);
  border: 1px solid rgba(255,180,0,0.25);
  border-radius: 10px; padding: 14px 16px;
  margin-bottom: 16px;
}
.ns-icon { font-size: 18px; line-height: 1.4; flex-shrink: 0; }
.ns-title { font-size: 14px; font-weight: 600; color: #ffb400; }
.ns-sub { font-size: 13px; color: var(--text2); margin-top: 2px; }
.ns-sub strong { color: #f7931a; }

/* ── Label hint ── */
.label-hint {
  float: right; font-size: 11px; font-weight: 400;
  color: var(--text3); font-family: monospace;
}

/* ── Fee address block ── */
.fee-address-block {
  margin: 0 24px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
}
.fab-label { font-size: 11px; font-weight: 700; letter-spacing: .6px; color: var(--text3); text-transform: uppercase; margin-bottom: 10px; }
.fab-address-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.fab-address {
  font-family: monospace; font-size: 12px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 12px;
  flex: 1; word-break: break-all; line-height: 1.5;
  user-select: all;
}
.fab-copy-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(0,133,255,0.1); border: 1px solid rgba(0,133,255,0.3);
  color: var(--blue); border-radius: 6px;
  padding: 7px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background .15s;
}
.fab-copy-btn:hover { background: rgba(0,133,255,0.2); }
.fab-note { font-size: 11px; color: var(--text3); }

/* ── Fee confirm checkbox ── */
.fee-confirm-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 24px 16px; cursor: pointer;
  background: rgba(0,200,150,0.06);
  border: 1px solid rgba(0,200,150,0.2);
  border-radius: 8px; padding: 12px 14px;
}
.fee-confirm-check input[type="checkbox"] { display: none; }
.fcc-box {
  width: 18px; height: 18px; border-radius: 4px;
  border: 2px solid var(--border); background: var(--bg3);
  flex-shrink: 0; margin-top: 1px;
  transition: background .15s, border-color .15s;
  display: flex; align-items: center; justify-content: center;
}
.fee-confirm-check input:checked + .fcc-box {
  background: var(--green); border-color: var(--green);
}
.fee-confirm-check input:checked + .fcc-box::after {
  content: '✓'; font-size: 11px; color: #fff; font-weight: 700;
}
.fcc-text { font-size: 13px; color: var(--text2); line-height: 1.5; }
.fcc-text strong { color: var(--text); }

/* ── Tx fee status badges ── */
.tx-fee-status { flex-shrink: 0; }
.fee-paid-badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px;
  background: rgba(0,200,150,0.1); color: var(--green);
  white-space: nowrap;
}
.fee-pending-badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px;
  background: rgba(255,180,0,0.1); color: #ffb400;
  white-space: nowrap;
}

/* ── Modal fee callout ── */
.modal-fee-callout {
  margin: 0 24px 16px;
  background: rgba(255,77,106,0.08);
  border: 1px solid rgba(255,77,106,0.25);
  border-radius: 10px; padding: 16px 20px; text-align: center;
}
.mfc-label { font-size: 11px; font-weight: 700; letter-spacing: .8px; color: var(--red); text-transform: uppercase; margin-bottom: 6px; }
.mfc-amount { font-size: 24px; font-weight: 800; color: var(--text); }
.mfc-usd { font-size: 13px; color: var(--text3); margin-top: 3px; }
.mfc-note { font-size: 11px; color: var(--text3); margin-top: 8px; }

/* ── Dual Banners ── */
.dual-banners {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-bottom: 28px;
}
@media (max-width: 700px) { .dual-banners { grid-template-columns: 1fr; } }

.banner-testnet {
  background: linear-gradient(135deg, #0a2040, #0a1628);
  border-color: rgba(0,133,255,0.3);
}
.banner-mainnet {
  background: linear-gradient(135deg, #0f1f10, #0a1a0d);
  border-color: rgba(0,200,150,0.2);
}
.banner-label-row { margin-bottom: 10px; }
.banner-net-tag {
  display: inline-block;
  padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
}
.testnet-tag { background: rgba(0,133,255,0.15); color: var(--blue); border: 1px solid rgba(0,133,255,0.3); }
.mainnet-tag { background: rgba(0,200,150,0.12); color: var(--green); border: 1px solid rgba(0,200,150,0.25); }
.testnet-tag-sm { background: rgba(0,133,255,0.12); color: var(--blue); border: 1px solid rgba(0,133,255,0.25); padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.mainnet-tag-sm { background: rgba(0,200,150,0.1); color: var(--green); border: 1px solid rgba(0,200,150,0.2); padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.zero-bal { color: var(--text3); }
.mt-2 { margin-top: 8px; }

/* ── Form Tabs (Swap / Withdraw) ── */
.form-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.form-tab {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.form-tab:hover { color: var(--text); border-color: var(--blue); }
.form-tab-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ── Swap Card ── */
.swap-form-body { padding: 22px; }
.swap-field { margin-bottom: 16px; }
.swap-field label { font-size: 12px; font-weight: 600; color: var(--text2); display: block; margin-bottom: 8px; }

.swap-direction-label {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 20px;
  background: var(--bg3); border-radius: 8px; border: 1px solid var(--border);
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.dir-from { color: var(--blue); }
.dir-arrow { color: var(--text3); }
.dir-to { color: var(--green); }

.amount-input-wrap { position: relative; }
.amount-input-wrap input { width: 100%; padding-right: 54px; }
.amount-sym {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 700; color: var(--text3);
}

.usd-equiv {
  display: flex; align-items: center; gap: 10px;
  margin-top: -8px; margin-bottom: 14px;
  font-size: 13px; color: var(--text2);
}
.min-warning { color: var(--red); font-size: 12px; font-weight: 600; }

.fee-breakdown {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
}
.fee-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 5px 0;
  color: var(--text2);
}
.fee-row span:last-child { font-weight: 600; color: var(--text); }
.fee-highlight span:first-child { color: var(--red); }
.fee-highlight span:last-child { color: var(--red); }
.fee-net { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.fee-net span:first-child { color: var(--green); font-weight: 600; }
.fee-net span:last-child { color: var(--green); font-size: 14px; }

.swap-btn { margin-top: 0; }
.swap-btn:disabled { background: var(--bg3); color: var(--text3); cursor: not-allowed; transform: none; border: 1.5px solid var(--border); }
.swap-min-note { text-align: center; font-size: 11px; color: var(--text3); margin-top: 10px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--text3);
  font-size: 18px; cursor: pointer; padding: 2px 6px;
  transition: color .2s;
}
.modal-close:hover { color: var(--text); }

.modal-net-flow {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 20px 24px 16px;
}
.modal-net {
  text-align: center; padding: 12px 22px;
  border-radius: 10px; min-width: 100px;
}
.from-net { background: rgba(0,133,255,0.1); border: 1px solid rgba(0,133,255,0.25); }
.to-net { background: rgba(0,200,150,0.1); border: 1px solid rgba(0,200,150,0.25); }
.mnet-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--text3); margin-bottom: 4px; }
.from-net .mnet-name { color: var(--blue); font-weight: 700; }
.to-net .mnet-name { color: var(--green); font-weight: 700; }
.modal-arrow { font-size: 22px; color: var(--text3); }

.modal-breakdown { padding: 0 24px 16px; }
.mb-row {
  display: flex; justify-content: space-between;
  padding: 9px 0; font-size: 14px;
  border-bottom: 1px solid rgba(30,45,69,0.5);
}
.mb-row:last-child { border-bottom: none; }
.mb-row span { color: var(--text2); }
.mb-divider { border-top: 1px solid var(--border); margin: 6px 0; }
.fee-row-modal strong { color: var(--red); }
.net-row-modal strong { color: var(--green); font-size: 15px; }
.fee-red { color: var(--red) !important; }
.fee-green { color: var(--green) !important; }

.modal-disclaimer {
  margin: 0 24px 16px; padding: 12px 14px;
  background: rgba(255,77,106,0.07); border: 1px solid rgba(255,77,106,0.2);
  border-radius: 8px; font-size: 12px; color: var(--text3); line-height: 1.5;
}

.modal-actions {
  display: flex; gap: 12px; padding: 16px 24px 22px;
  border-top: 1px solid var(--border);
}
.modal-actions .btn-outline,
.modal-actions .btn-primary { flex: 1; text-align: center; padding: 12px; }

/* ── Modal info note ── */
.modal-info-note {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0 24px 20px;
  background: rgba(0,133,255,0.07);
  border: 1px solid rgba(0,133,255,0.2);
  border-radius: 8px; padding: 12px 14px;
  font-size: 13px; color: var(--text2); line-height: 1.5;
}
.modal-info-note svg { flex-shrink: 0; margin-top: 1px; color: var(--blue); }
.modal-info-note strong { color: var(--text); }

/* ── Swap History ── */
.history-list { padding: 6px 0; }
.history-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(30,45,69,0.5);
  transition: background .13s; cursor: pointer;
}
.history-row:last-child { border-bottom: none; }
.history-row:hover { background: rgba(255,255,255,0.02); }
.hr-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; flex-shrink: 0;
}
.hr-info { flex: 1; }
.hr-title { font-size: 14px; font-weight: 600; }
.hr-id { font-size: 12px; color: var(--text3); margin-top: 2px; }
.hr-amounts { text-align: right; }
.hr-gross { font-size: 14px; font-weight: 600; }
.hr-usd { font-size: 12px; color: var(--text3); }
.hr-status { flex-shrink: 0; }
.hr-chevron { color: var(--text3); flex-shrink: 0; }

.hstatus {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}
.hstatus-pending  { background: rgba(255,180,0,0.1);  color: #ffb400; border: 1px solid rgba(255,180,0,0.25); }
.hstatus-claimed  { background: rgba(0,133,255,0.1);  color: var(--blue); border: 1px solid rgba(0,133,255,0.25); }
.hstatus-done     { background: rgba(0,200,150,0.1);  color: var(--green); border: 1px solid rgba(0,200,150,0.25); }

/* ── Order Detail ── */
.back-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text3);
  transition: color .15s;
}
.back-link:hover { color: var(--text); }

.order-detail-grid {
  display: grid; grid-template-columns: 1fr 420px; gap: 24px;
}
@media (max-width: 900px) { .order-detail-grid { grid-template-columns: 1fr; } }

.order-fee-body { padding: 22px; }
.ofb-desc { font-size: 14px; color: var(--text2); margin-bottom: 18px; line-height: 1.6; }

.ofb-fee-callout {
  background: rgba(255,77,106,0.07);
  border: 1px solid rgba(255,77,106,0.2);
  border-radius: 10px; padding: 16px 18px;
  margin-bottom: 18px; text-align: center;
}
.ofc-label { font-size: 11px; font-weight: 700; letter-spacing: .7px; color: var(--red); text-transform: uppercase; margin-bottom: 6px; }
.ofc-amount { font-size: 26px; font-weight: 800; color: var(--text); }
.ofc-usd { font-size: 13px; color: var(--text3); margin-top: 3px; }

.ofb-address-block { margin-bottom: 18px; }

.fee-confirmed-state { text-align: center; padding: 20px 0 10px; }
.fcs-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(0,133,255,0.12); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  margin: 0 auto 14px;
}
.fcs-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.fcs-sub { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* ── Profile Page ── */
.profile-page { flex: 1; padding: 36px 0 60px; }

.profile-header {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 28px;
}
.profile-avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #005ad4);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(0,133,255,0.15);
}
.profile-name { font-size: 24px; font-weight: 700; }
.profile-email { color: var(--text2); font-size: 14px; margin-top: 2px; }
.profile-since { color: var(--text3); font-size: 12px; margin-top: 4px; }

.profile-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 800px) { .profile-stats { grid-template-columns: repeat(2, 1fr); } }
.pstat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.pstat-label { font-size: 12px; color: var(--text3); margin-bottom: 6px; font-weight: 500; }
.pstat-value { font-size: 20px; font-weight: 700; }
.pstat-net { display: flex; gap: 8px; align-items: center; font-size: 14px; }

.profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 800px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-form-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.profile-form-actions { margin-top: 6px; }

.account-details { padding: 8px 0; }
.ad-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 22px; font-size: 14px;
  border-bottom: 1px solid rgba(30,45,69,0.5);
}
.ad-row:last-child { border-bottom: none; }
.ad-row span { color: var(--text2); }
.ad-row strong { font-weight: 600; }
.status-active { color: var(--green); }

.security-list { padding: 8px 0; }
.sec-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(30,45,69,0.5);
}
.sec-item:last-child { border-bottom: none; }
.sec-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.sec-ok { background: rgba(0,200,150,0.12); color: var(--green); }
.sec-warn { background: rgba(255,180,0,0.12); color: #ffb400; }
.sec-title { font-size: 14px; font-weight: 600; }
.sec-desc { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ── Footer ── */
.footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 30px 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; margin-bottom: 10px;
}
.footer-note { color: var(--text3); font-size: 13px; margin-bottom: 6px; }
.footer-copy { color: var(--text3); font-size: 12px; }


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-first additions
   Breakpoints: 768px (tablet/large phone), 480px (small phone)
   ═══════════════════════════════════════════════════════════════ */

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background .15s;
  z-index: 200;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.06); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease, background .15s;
}
/* Animated X when open */
.nav-hamburger-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--text); }
.nav-hamburger-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--text); }

/* ── Tablet / large phone (≤ 768px) ── */
@media (max-width: 768px) {

  /* --- Navbar --- */
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;                          /* hidden until toggled */
    position: absolute;
    top: 64px;                              /* below the navbar */
    left: 0; right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 20px;
    z-index: 150;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }
  .nav-links.nav-open { display: flex; }   /* shown when JS adds class */

  .nav-links a {
    padding: 13px 12px;
    border-radius: 8px;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a:hover { background: rgba(255,255,255,0.05); }

  /* CTA buttons inside mobile menu — full width */
  .nav-links .btn-primary-sm,
  .nav-links .btn-outline-sm {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
  }

  /* Navbar must be position:relative so the dropdown offsets correctly */
  .navbar { position: sticky; top: 0; z-index: 100; }
  .nav-container { position: relative; }

  /* --- Hero --- */
  .hero {
    flex-direction: column;
    padding: 48px 20px 40px;
    gap: 36px;
    min-height: auto;
    text-align: center;
  }
  .hero-inner { width: 100%; }
  .hero-sub   { margin: 0 auto 28px; max-width: 100%; }
  .hero-cta   { justify-content: center; }

  .hero-graphic {
    flex: none;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 14px;
  }
  .price-card {
    flex: 1;
    max-width: 200px;
    padding: 14px 16px;
  }
  .pc-icon { width: 36px; height: 36px; font-size: 15px; }
  .pc-price { font-size: 14px; }

  /* --- Market table: hide rank column, make table scroll if needed --- */
  .table-card { overflow-x: auto; }
  .market-table .rank,
  .market-table th:first-child { display: none; }

  /* --- Features grid: 2 columns on tablet --- */
  .features-grid { grid-template-columns: repeat(2, 1fr); }

  /* --- Section padding --- */
  .section { padding: 48px 0; }
  .features-section { padding: 48px 0; }
  .section-title { font-size: 24px; margin-bottom: 24px; }
  .cta-banner { padding: 50px 20px; }
  .cta-banner h2 { font-size: 26px; }
}

/* ── Small phones (≤ 480px) ── */
@media (max-width: 480px) {

  /* Hero */
  .hero { padding: 36px 16px 32px; gap: 28px; }
  .hero-title { font-size: 30px; }
  .hero-graphic { flex-direction: column; align-items: center; }
  .price-card { width: 100%; max-width: 100%; }

  /* Market table: also hide 24h Change column to avoid crowding */
  .market-table th:nth-child(4),
  .market-table td:nth-child(4) { display: none; }

  /* Features grid: single column on small phones */
  .features-grid { grid-template-columns: 1fr; }

  /* Container padding */
  .container { padding: 0 16px; }
  .messages-wrapper { padding: 0 16px; }
}
