* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0A0A0F;
  height: 100dvh;
  color: #E4E4E7;
  overflow: hidden;
  max-width: 100vw;
  padding-bottom: 0;
  margin-bottom: 0;
  -webkit-text-size-adjust: 100%;
}

/* ── BACKGROUND ─────────────────────────────────── */
.bg-orb1, .bg-orb2 {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
}
.bg-orb1 {
  top: -20%; left: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.15), rgba(139,92,246,0.08), transparent);
  filter: blur(80px);
}
.bg-orb2 {
  bottom: -20%; right: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.12), rgba(99,102,241,0.06), transparent);
  filter: blur(80px);
}
.bg-grid { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* ── LOGIN ──────────────────────────────────────── */
#loginScreen {
  display: flex; align-items: center; justify-content: center;
  height: 100dvh; padding-top: env(safe-area-inset-top); position: relative; z-index: 1;
}
.login-card {
  background: rgba(255,255,255,0.025);
  padding: 40px 32px 32px;
  border-radius: 20px; text-align: center;
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  width: 400px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
}
.login-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  margin-bottom: 14px;
  box-shadow: 0 8px 28px rgba(99,102,241,0.45);
}
.login-logo svg { width: 30px; height: 30px; }
.login-card h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: #F4F4F5;
  margin-bottom: 4px;
}
.login-sub {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  color: #52525B; text-transform: uppercase; margin-bottom: 28px;
}

/* wallet option buttons */
.wallet-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.wallet-opt-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; width: 100%; text-align: left;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; color: #E4E4E7; cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.wallet-opt-btn:hover:not(:disabled) {
  border-color: rgba(99,102,241,0.55);
  background: rgba(99,102,241,0.06);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.2), 0 4px 16px rgba(99,102,241,0.12);
}
.wallet-opt-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wallet-opt-icon { font-size: 24px; flex-shrink: 0; line-height: 1; }
@keyframes wc-spin { to { transform: rotate(360deg); } }
.wc-spin { display: inline-block; animation: wc-spin 0.9s linear infinite; }
.wc-waiting { color: #a78bfa; }
.wallet-opt-text { flex: 1; }
.wallet-opt-name { font-size: 14px; font-weight: 600; color: #F4F4F5; }
.wallet-opt-sub  { font-size: 11px; color: #52525B; margin-top: 2px; }
.wallet-opt-arrow { color: #3F3F46; font-size: 18px; line-height: 1; flex-shrink: 0; transition: color 0.15s; }
.wallet-opt-btn:hover:not(:disabled) .wallet-opt-arrow { color: #818CF8; }

/* manual address entry card */
.addr-expand {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07); border-radius: 14px;
  overflow: hidden; transition: border-color 0.18s, box-shadow 0.18s;
}
.addr-expand:focus-within {
  border-color: rgba(99,102,241,0.55);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.2);
}
.addr-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; width: 100%; text-align: left;
  background: none; border: none; color: #E4E4E7; cursor: pointer;
}
.addr-header:hover .wallet-opt-arrow { color: #818CF8; }
.addr-body { padding: 0 14px 14px; display: none; }
.addr-body.open { display: block; }
.addr-row { display: flex; gap: 8px; margin-bottom: 8px; }
.addr-input {
  flex: 1; background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  color: #E4E4E7; font-size: 13px; font-family: monospace; padding: 10px 12px;
  outline: none; transition: border-color 0.15s;
}
.addr-input:focus { border-color: rgba(99,102,241,0.6); }
.addr-input.error { border-color: #EF4444; }
.addr-paste {
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; color: #71717A; cursor: pointer; padding: 0 12px; font-size: 18px;
  transition: border-color 0.15s, color 0.15s;
}
.addr-paste:hover { border-color: rgba(99,102,241,0.5); color: #E4E4E7; }
.addr-go {
  width: 100%; padding: 10px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border: none; border-radius: 10px; color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif;
  transition: opacity 0.15s;
}
.addr-go:hover { opacity: 0.9; }
.addr-go:disabled { opacity: 0.35; cursor: not-allowed; }
.addr-tip { font-size: 11px; color: #52525B; margin-top: 8px; line-height: 1.5; }

.login-footer {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; color: #3F3F46; margin-top: 4px;
}

/* ── AUTH TABS ──────────────────────────────────── */
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 4px;
}
.auth-tab {
  flex: 1; padding: 8px 0; font-size: 13px; font-weight: 600;
  background: none; border: none; border-radius: 9px;
  color: #71717A; cursor: pointer; transition: all 0.18s; font-family: 'Inter', sans-serif;
}
.auth-tab.active {
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #fff; box-shadow: 0 2px 10px rgba(99,102,241,0.35);
}

/* ── AUTH FORM FIELDS ───────────────────────────── */
.auth-field { margin-bottom: 14px; text-align: left; }
.auth-field label {
  display: block; font-size: 11px; font-weight: 600; color: #71717A;
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px;
}
.auth-field input {
  width: 100%; padding: 11px 14px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; color: #E4E4E7; font-size: 14px; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field input:focus {
  border-color: rgba(99,102,241,0.6);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.auth-field input.input-error { border-color: #EF4444; }
.auth-field input.input-ok    { border-color: #10B981; }

.auth-pw-row { position: relative; }
.auth-pw-row input { padding-right: 44px; }
.auth-pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #71717A; cursor: pointer;
  font-size: 16px; padding: 4px; line-height: 1;
  transition: color 0.15s;
}
.auth-pw-toggle:hover { color: #E4E4E7; }

.auth-username-row { position: relative; }
.auth-username-row input { padding-right: 34px; }
.auth-username-status {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 16px; line-height: 1;
}

.auth-field-err {
  font-size: 11px; color: #EF4444; margin-top: 5px; min-height: 16px; line-height: 1.4;
}
.auth-error {
  font-size: 12px; color: #EF4444; margin-bottom: 12px; min-height: 18px;
  text-align: center; line-height: 1.4;
}

.auth-submit-btn {
  width: 100%; padding: 13px; margin-top: 2px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border: none; border-radius: 12px; color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  transition: opacity 0.15s, transform 0.12s;
}
.auth-submit-btn:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
.auth-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ── APP SHELL ──────────────────────────────────── */
#appScreen { display: none; flex-direction: column; height: 100dvh; position: relative; z-index: 1; overflow: hidden; max-width: 100vw; padding-bottom: 0; margin-bottom: 0; }

/* ── TOP NAV ────────────────────────────────────── */
.top-nav {
  display: flex; align-items: center;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 20px; height: 56px; flex-shrink: 0; gap: 0;
}
.nav-brand {
  display: flex; align-items: center; gap: 9px; flex-shrink: 0; margin-right: 24px;
}
.nav-brand-logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-brand-logo svg { width: 16px; height: 16px; }
.nav-brand-name {
  font-size: 16px; font-weight: 800; letter-spacing: -0.3px; color: #F4F4F5;
}
.nav-brand-sub { font-size: 9px; font-weight: 600; letter-spacing: 1.5px; color: #52525B; text-transform: uppercase; }

/* underline-style tabs */
.nav-tabs { display: flex; align-items: stretch; gap: 0; flex: 1; }
.nav-tab {
  padding: 0 16px; height: 56px; border: none;
  background: transparent; color: #71717A;
  font-size: 13px; font-weight: 500; cursor: pointer;
  position: relative; font-family: 'Inter', sans-serif;
  transition: color 0.15s; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.nav-tab::after {
  content: ''; position: absolute; bottom: 0; left: 16px; right: 16px; height: 2px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border-radius: 2px 2px 0 0; opacity: 0; transition: opacity 0.15s;
}
.nav-tab.active { color: #F4F4F5; font-weight: 600; }
.nav-tab.active::after { opacity: 1; }
.nav-tab:hover:not(.active) { color: #A1A1AA; }
.chat-tab-badge {
  display: none; background: #EF4444; color: white;
  font-size: 9px; font-weight: 800; padding: 1px 5px;
  border-radius: 8px; line-height: 14px;
}

/* nav right */
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-wallet-addr {
  font-size: 12px; font-family: monospace; color: #52525B;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  padding: 5px 10px; border-radius: 8px;
}
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: white; cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.3);
  transition: box-shadow 0.15s;
}
.nav-avatar:hover { box-shadow: 0 0 0 2px rgba(99,102,241,0.7); }

/* ── SCREENS ─────────────────────────────────────── */
.screen { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

/* ── MARKET ──────────────────────────────────────── */
.market-header {
  padding: 20px 24px 0; flex-shrink: 0;
}
.market-header h2 { font-size: 22px; font-weight: 700; color: #F4F4F5; margin-bottom: 4px; }
.market-header p  { font-size: 13px; color: #71717A; }
.market-controls {
  padding: 16px 24px 12px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0;
}
.filter-tabs { display: flex; gap: 0; }
.filter-tab {
  padding: 7px 16px; border: none; background: transparent; color: #71717A;
  font-size: 13px; font-weight: 500; cursor: pointer; font-family: 'Inter', sans-serif;
  position: relative; transition: color 0.12s;
}
.filter-tab::after {
  content: ''; position: absolute; bottom: -12px; left: 0; right: 0; height: 2px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border-radius: 2px; opacity: 0; transition: opacity 0.12s;
}
.filter-tab.active { color: #F4F4F5; font-weight: 600; }
.filter-tab.active::after { opacity: 1; }
.filter-tab.buy.active  { color: #10B981; }
.filter-tab.buy.active::after { background: #10B981; }
.filter-tab.sell.active { color: #EF4444; }
.filter-tab.sell.active::after { background: #EF4444; }
.filter-tab:hover:not(.active) { color: #A1A1AA; }
.post-btn {
  margin-left: auto; padding: 8px 18px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white;
  border: none; border-radius: 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35); font-family: 'Inter', sans-serif;
  transition: opacity 0.15s, transform 0.1s;
}
.post-btn:active { opacity: 0.85; transform: scale(0.97); }

.offers-list {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.offers-list::-webkit-scrollbar { width: 4px; }
.offers-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 4px; }
.no-offers {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #3F3F46; gap: 6px; font-size: 13px;
}
.no-offers-icon { font-size: 40px; margin-bottom: 4px; opacity: 0.4; }

/* ── OFFER CARD ──────────────────────────────────── */
.offer-card {
  background: #1a1a2e; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 18px 16px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color 0.15s, background 0.15s;
}
.offer-card:hover { border-color: rgba(99,102,241,0.35); background: #1e1e32; }
.offer-card.mine { border-color: rgba(99,102,241,0.35); background: #1c1c30; }
.offer-top-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.offer-avatar-wrap2 { flex-shrink: 0; }
.offer-avatar-circle {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white; font-family: monospace;
}
.offer-user-col { flex: 1; min-width: 0; }
.offer-user-addr { font-size: 12px; font-family: monospace; color: #A1A1AA; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-user-meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #10B981; flex-shrink: 0; display: inline-block; }
.mine-tag { font-size: 10px; color: #818CF8; font-weight: 600; }
.offer-type-pill { font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 6px; letter-spacing: 0.5px; flex-shrink: 0; }
.pill-buy  { background: rgba(16,185,129,0.12); color: #10B981; border: 1px solid rgba(16,185,129,0.25); }
.pill-sell { background: rgba(239,68,68,0.1);   color: #EF4444; border: 1px solid rgba(239,68,68,0.2); }

.offer-rate-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px; }
.offer-rate-big { font-size: 26px; font-weight: 800; color: #10B981; letter-spacing: -0.5px; }
.offer-rate-sub { font-size: 12px; color: #52525B; font-weight: 500; }

.offer-details-row { display: flex; gap: 24px; margin-bottom: 14px; }
.offer-detail-item { display: flex; flex-direction: column; gap: 3px; }
.offer-detail-label { font-size: 10px; font-weight: 500; color: #52525B; text-transform: uppercase; letter-spacing: 0.6px; }
.offer-detail-val { font-size: 14px; font-weight: 700; color: #E4E4E7; }

.offer-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.offer-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-badge {
  font-size: 11px; padding: 3px 9px; border-radius: 6px; font-weight: 600;
  background: rgba(255,255,255,0.05); color: #71717A; border: 1px solid rgba(255,255,255,0.08);
}
.net-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.net-badge.bsc  { background: rgba(234,179,8,0.12); color: #EAB308; border: 1px solid rgba(234,179,8,0.2); }
.net-badge.tron { background: rgba(239,68,68,0.1);  color: #F87171; border: 1px solid rgba(239,68,68,0.18); }
.trade-btn-v2 {
  padding: 9px 18px; border: none; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: 'Inter', sans-serif; flex-shrink: 0;
  transition: opacity 0.12s, transform 0.1s;
}
.trade-btn-v2:active { opacity: 0.85; transform: scale(0.97); }
.buy-v2  { background: linear-gradient(135deg, #10B981, #059669); color: white; box-shadow: 0 3px 10px rgba(16,185,129,0.3); }
.sell-v2 { background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white; box-shadow: 0 3px 10px rgba(99,102,241,0.3); }
.cancel-offer-btn {
  padding: 7px 14px; background: transparent; color: #EF4444;
  border: 1px solid rgba(239,68,68,0.25); border-radius: 10px;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
  transition: background 0.12s;
}
.cancel-offer-btn:hover { background: rgba(239,68,68,0.07); }

/* ── CHAT SCREEN ─────────────────────────────────── */
#chatScreen .app-layout { display: flex; flex: 1; overflow: hidden; }
.sidebar {
  width: 260px; min-width: 260px;
  background: rgba(255,255,255,0.01);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.sidebar-top { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sidebar-top h2 { font-size: 11px; font-weight: 600; color: #52525B; letter-spacing: 1px; text-transform: uppercase; }
.user-list { flex: 1; overflow-y: auto; padding: 6px; }
.user-list::-webkit-scrollbar { width: 4px; }
.user-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 4px; }
.no-users { padding: 20px 16px; font-size: 12px; color: #3F3F46; text-align: center; }
.user-item {
  padding: 10px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; gap: 10px; transition: background 0.12s;
}
.user-item:hover { background: rgba(255,255,255,0.04); }
.user-item.active { background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white; font-family: monospace;
}
.user-meta { flex: 1; min-width: 0; }
.user-addr { font-size: 12px; font-family: monospace; color: #A1A1AA; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-online { font-size: 10px; color: #10B981; margin-top: 2px; font-weight: 500; }
.unread-badge {
  background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white;
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}
.chat-area { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.empty-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; color: #27272A;
}
.empty-state .lock-icon { font-size: 48px; opacity: 0.3; }
.empty-state h3 { font-size: 16px; color: #3F3F46; font-weight: 600; }
.empty-state p  { font-size: 12px; color: #27272A; }
#chatPanel { display: none; flex-direction: column; flex: 1; min-height: 0; }

/* chat header */
.chat-header {
  background: rgba(255,255,255,0.02); backdrop-filter: blur(10px);
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0;
  position: relative; z-index: 100;
}
.chat-header .avatar { width: 36px; height: 36px; font-size: 11px; }
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-addr {
  font-size: 13px; font-family: monospace; color: #F4F4F5;
  font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.chat-header-addr:hover { color: #8B5CF6; }

/* Toast notification */
#copyToast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: rgba(16,185,129,0.95); color: #fff; font-size: 13px; font-weight: 600;
  padding: 8px 18px; border-radius: 20px; pointer-events: none;
  opacity: 0; transition: opacity 0.2s, transform 0.2s; z-index: 2000;
}
#copyToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* My wallet address in home header */
.home-my-addr {
  font-size: 11px; font-family: monospace; color: rgba(255,255,255,0.4);
  cursor: pointer; padding: 2px 6px; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.home-my-addr:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.8); }

/* Chat context / delete menu */
#chatOptionsMenu {
  position: fixed; z-index: 1500; background: rgba(18,18,26,0.98);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
  overflow: hidden; min-width: 180px; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.chat-opt-item {
  padding: 14px 18px; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background 0.12s;
}
.chat-opt-item:hover { background: rgba(255,255,255,0.06); }
.chat-opt-item.danger { color: #EF4444; }
.chat-opt-cancel { color: rgba(255,255,255,0.5); border-top: 1px solid rgba(255,255,255,0.06); }
.chat-header-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #10B981; margin-top: 3px; }
.chat-info-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.08);
  background: transparent; color: #71717A; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color 0.12s, color 0.12s;
}
.chat-info-btn:hover { border-color: rgba(99,102,241,0.4); color: #818CF8; }

/* messages */
#messages {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  box-sizing: border-box; width: 100%;
}
#messages::-webkit-scrollbar { width: 4px; }
#messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 4px; }
.msg {
  max-width: 75%; padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.5;
  word-break: break-word; overflow-wrap: break-word;
  box-sizing: border-box;
}
.msg.them {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px 16px 16px 16px; align-self: flex-start; color: #E4E4E7;
  margin-left: 0;
}
.msg.me {
  background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white;
  border-radius: 16px 4px 16px 16px; align-self: flex-end;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
  margin-right: 0;
}
.msg-time { font-size: 10px; margin-top: 4px; display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.msg.me .msg-time    { color: rgba(255,255,255,0.45); }
.msg.them .msg-time  { color: rgba(255,255,255,0.3); }
.msg-ticks { font-size: 12px; font-weight: 700; letter-spacing: -1px; line-height: 1; flex-shrink: 0; }
.ticks-sent      { color: rgba(255,255,255,0.4); }
.ticks-delivered { color: rgba(255,255,255,0.4); }
.ticks-read      { color: #93c5fd; }  /* light blue — clearly visible on purple gradient */
.sys-msg { text-align: center; font-size: 11px; color: #3F3F46; padding: 4px 0; align-self: center; }

/* chat input */
.input-area {
  padding: 10px 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0;
  box-sizing: border-box; width: 100%;
}
.attach-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.08);
  background: transparent; color: #71717A; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color 0.12s;
}
.attach-btn:hover { border-color: rgba(255,255,255,0.18); color: #A1A1AA; }
#msgInput {
  flex: 1; padding: 10px 14px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px; font-size: 14px; outline: none;
  font-family: 'Inter', sans-serif; resize: none; color: #E4E4E7; max-height: 100px;
  transition: border-color 0.15s;
}
#msgInput:focus { border-color: rgba(99,102,241,0.5); }
#msgInput::placeholder { color: #3F3F46; }
.lock-indicator { color: #3F3F46; font-size: 14px; flex-shrink: 0; align-self: center; line-height: 1; }
#sendBtn {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border: none; border-radius: 50%; color: white; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 4px 12px rgba(99,102,241,0.4);
  transition: opacity 0.12s, transform 0.1s;
}
#sendBtn:active { opacity: 0.85; transform: scale(0.92); }

/* ── TRADE CARD ──────────────────────────────────── */
.trade-card {
  flex-shrink: 0; padding: 16px 18px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tc-top-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.tc-badges { display: flex; gap: 8px; align-items: center; }
.tc-status-badge {
  font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.status-waiting  .tc-status-badge { background: rgba(234,179,8,0.15);   color: #EAB308; border: 1px solid rgba(234,179,8,0.3); }
.status-paid     .tc-status-badge { background: rgba(99,102,241,0.15);  color: #818CF8; border: 1px solid rgba(99,102,241,0.3); }
.status-complete .tc-status-badge { background: rgba(16,185,129,0.15);  color: #10B981; border: 1px solid rgba(16,185,129,0.3); }
.status-expired  .tc-status-badge,
.status-cancelled .tc-status-badge { background: rgba(239,68,68,0.12); color: #EF4444; border: 1px solid rgba(239,68,68,0.25); }
.tc-net-badge {
  font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
  background: rgba(234,179,8,0.1); color: #EAB308; border: 1px solid rgba(234,179,8,0.2);
}
.tc-timer-wrap { display: flex; align-items: center; gap: 5px; }
.tc-timer-icon { font-size: 13px; opacity: 0.7; }
.tc-timer { font-size: 15px; font-weight: 800; font-family: monospace; color: #EAB308; }
.tc-timer.urgent { color: #EF4444; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.45} }

.tc-amounts-grid { display: flex; gap: 0; margin-bottom: 14px; }
.tc-amount-col { flex: 1; }
.tc-amount-col + .tc-amount-col { border-left: 1px solid rgba(255,255,255,0.06); padding-left: 16px; margin-left: 16px; }
.tc-col-label { font-size: 10px; font-weight: 500; color: #52525B; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 4px; }
.tc-col-value { font-size: 18px; font-weight: 800; color: #F4F4F5; }
.tc-col-value.tc-green { color: #10B981; }
.tc-usdt-unit { font-size: 13px; font-weight: 600; color: #71717A; }

.tc-payment-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 14px; font-size: 13px;
}
.tc-payment-icon { font-size: 15px; flex-shrink: 0; }
.tc-payment-label { color: #71717A; }
.tc-payment-val { color: #F4F4F5; font-weight: 600; margin-left: 4px; }

.tc-action-btn {
  width: 100%; padding: 13px; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif;
  transition: opacity 0.12s; margin-bottom: 12px;
}
.tc-paid-btn {
  background: linear-gradient(135deg, #10B981, #059669); color: white;
  box-shadow: 0 6px 20px rgba(16,185,129,0.35);
}
.tc-paid-btn:active { opacity: 0.85; }
.tc-release-btn {
  background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white;
  box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}
.tc-release-btn:active { opacity: 0.85; }
.tc-cancel-link {
  display: block; text-align: center; color: #52525B; font-size: 12px;
  cursor: pointer; padding: 4px; transition: color 0.12s; margin-bottom: 12px;
  background: none; border: none; width: 100%; font-family: 'Inter', sans-serif;
}
.tc-cancel-link:hover { color: #EF4444; }
.tc-terminal-status {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 12px;
  font-size: 13px; font-weight: 600;
}
.status-complete .tc-terminal-status { background: rgba(16,185,129,0.08); color: #10B981; border: 1px solid rgba(16,185,129,0.2); }
.status-expired .tc-terminal-status,
.status-cancelled .tc-terminal-status { background: rgba(239,68,68,0.07); color: #EF4444; border: 1px solid rgba(239,68,68,0.2); }
.tc-enc-note {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 11px; color: #3F3F46;
}

/* ── POST OFFER MODAL ────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  z-index: 1000; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: rgba(12,12,18,0.98); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px 24px 0 0; padding: 24px 20px 36px;
  width: 100%; max-width: 480px; animation: slideUp 0.22s ease;
  backdrop-filter: blur(24px); z-index: 999; position: relative;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-title { font-size: 17px; font-weight: 700; color: #F4F4F5; margin-bottom: 20px; text-align: center; }
.type-toggle {
  display: flex; background: rgba(255,255,255,0.04);
  border-radius: 12px; padding: 4px; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}
.type-toggle button {
  flex: 1; padding: 10px; border: none; border-radius: 9px;
  background: transparent; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.15s; color: #71717A; font-family: 'Inter', sans-serif;
}
.type-toggle button.active.buy  { background: rgba(16,185,129,0.15); color: #10B981; }
.type-toggle button.active.sell { background: rgba(239,68,68,0.15);  color: #EF4444; }
.form-row { margin-bottom: 12px; }
.form-label { font-size: 11px; font-weight: 600; color: #52525B; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; font-size: 15px; font-weight: 600; color: #F4F4F5;
  outline: none; font-family: 'Inter', sans-serif; transition: border-color 0.15s;
}
.form-input:focus { border-color: rgba(99,102,241,0.5); }
.form-input::placeholder { color: #3F3F46; font-weight: 400; }
.option-group { display: flex; gap: 6px; }
.option-btn {
  flex: 1; padding: 9px 4px;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 9px;
  background: rgba(255,255,255,0.03); color: #71717A;
  font-size: 13px; font-weight: 600; cursor: pointer; text-align: center;
  transition: all 0.12s; font-family: 'Inter', sans-serif;
}
.option-btn.active { border-color: rgba(99,102,241,0.5); color: #818CF8; background: rgba(99,102,241,0.1); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn-cancel {
  flex: 1; padding: 13px; background: rgba(255,255,255,0.04); color: #71717A;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
}
.btn-post {
  flex: 2; padding: 13px; background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white;
  border: none; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: 'Inter', sans-serif; box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.btn-post:active { opacity: 0.85; }

/* ── NEW CHAT MODAL ───────────────────────────────── */
.new-chat-icon { text-align: center; margin-bottom: 8px; }
.new-chat-sub { font-size: 13px; color: #71717A; text-align: center; margin-bottom: 20px; line-height: 1.5; }
.modal-label { font-size: 11px; font-weight: 600; color: #52525B; text-transform: uppercase; letter-spacing: 0.8px; display: block; margin-bottom: 6px; }
.modal-input {
  flex: 1; padding: 12px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; font-size: 14px; font-weight: 500; color: #F4F4F5;
  outline: none; font-family: 'Inter', sans-serif; transition: border-color 0.15s;
}
.modal-input:focus { border-color: rgba(99,102,241,0.5); }
.modal-input::placeholder { color: #3F3F46; font-weight: 400; }
.new-chat-input-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.new-chat-tip { font-size: 12px; color: #EF4444; margin: 0 0 4px; min-height: 16px; }
.modal-cancel {
  flex: 1; padding: 13px; background: rgba(255,255,255,0.04); color: #71717A;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
}
.modal-submit {
  flex: 2; padding: 13px; background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white;
  border: none; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: 'Inter', sans-serif; box-shadow: 0 4px 14px rgba(99,102,241,0.35);
  display: flex; align-items: center; justify-content: center;
}
.modal-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── SCREEN HEADERS (market) ────────────────────── */
.screen-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: env(safe-area-inset-top) 16px 0; height: calc(56px + env(safe-area-inset-top)); flex-shrink: 0;
  background: rgba(10,10,15,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.screen-header-brand { display: flex; align-items: center; gap: 10px; }
.screen-header-logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.screen-header-logo svg { width: 16px; height: 16px; }
.screen-header-title { font-size: 17px; font-weight: 700; color: #F4F4F5; letter-spacing: -0.3px; }
.screen-header-actions { display: flex; gap: 4px; }
.screen-header-btn {
  width: 36px; height: 36px; border: none; background: transparent; cursor: pointer;
  color: #71717A; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.screen-header-btn:hover { background: rgba(255,255,255,0.06); color: #E4E4E7; }

/* ── HOME SCREEN ─────────────────────────────────── */
#homeView { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.home-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: env(safe-area-inset-top) 16px 0; height: calc(56px + env(safe-area-inset-top)); flex-shrink: 0;
  background: rgba(10,10,15,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.home-brand { display: flex; align-items: center; gap: 10px; }
.home-brand-logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.home-brand-logo svg { width: 16px; height: 16px; }
.home-brand-name { font-size: 17px; font-weight: 700; color: #F4F4F5; letter-spacing: -0.3px; }
.home-header-right { display: flex; align-items: center; gap: 4px; }
.home-action-btn {
  width: 36px; height: 36px; border: none; background: transparent; cursor: pointer;
  color: #71717A; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.home-action-btn:hover { background: rgba(255,255,255,0.06); color: #E4E4E7; }
.home-nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: white; cursor: pointer;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.3); margin-left: 2px;
  transition: box-shadow 0.15s;
}
.home-nav-avatar:hover { box-shadow: 0 0 0 2px rgba(99,102,241,0.7); }

.home-content { flex: 1; overflow-y: auto; }
.home-content::-webkit-scrollbar { width: 4px; }
.home-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 4px; }
.home-section-label {
  padding: 14px 16px 6px; font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: #52525B;
}

/* active trade card on home */
.active-trade-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer;
  background: #1a1a2e; border-radius: 12px;
  margin: 0 12px 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(234,179,8,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.12s;
}
.active-trade-card:hover { background: #1e1e32; border-color: rgba(99,102,241,0.2); }
.atc-avatar-wrap { position: relative; flex-shrink: 0; }
.atc-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white; font-family: monospace;
}
.atc-online-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 11px; height: 11px; border-radius: 50%; background: #10B981;
  border: 2px solid #0A0A0F;
}
.atc-info { flex: 1; min-width: 0; }
.atc-addr { font-size: 13px; font-family: monospace; font-weight: 600; color: #E4E4E7; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atc-badges { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.atc-amount { font-size: 12px; font-weight: 700; color: #A1A1AA; }
.atc-net-badge {
  font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 5px; letter-spacing: 0.3px;
  background: rgba(234,179,8,0.12); color: #EAB308; border: 1px solid rgba(234,179,8,0.22);
}
.atc-status-badge {
  font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 5px; letter-spacing: 0.3px;
}
.atc-s-waiting  { background: rgba(245,158,11,0.12); color: #F59E0B; border: 1px solid rgba(245,158,11,0.25); }
.atc-s-paid     { background: rgba(16,185,129,0.12);  color: #10B981; border: 1px solid rgba(16,185,129,0.25); }
.atc-s-complete { background: rgba(99,102,241,0.12);  color: #818CF8; border: 1px solid rgba(99,102,241,0.25); }
.atc-s-expired, .atc-s-cancelled { background: rgba(239,68,68,0.1); color: #EF4444; border: 1px solid rgba(239,68,68,0.2); }
.atc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.atc-timer-badge {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; font-family: monospace; color: #F59E0B;
  background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25);
  padding: 4px 9px; border-radius: 8px;
}
.atc-chevron { color: #52525B; }

/* conversation rows (WhatsApp-style) */
.conv-section-label {
  padding: 14px 16px 6px; font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: #52525B;
}
.conv-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer;
  transition: background 0.12s;
}
.conv-row:hover { background: rgba(255,255,255,0.03); }
.conv-avatar-wrap { position: relative; flex-shrink: 0; }
.conv-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(139,92,246,0.4));
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white; font-family: monospace;
}
.conv-online-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 13px; height: 13px; border-radius: 50%; background: #10B981;
  border: 2px solid #0A0A0F;
}
.conv-info { flex: 1; min-width: 0; }
.conv-top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.conv-addr { font-size: 13px; font-family: monospace; font-weight: 600; color: #F4F4F5; }
.conv-time { font-size: 11px; color: #52525B; flex-shrink: 0; }
.conv-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.conv-preview {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: #71717A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.conv-preview svg { flex-shrink: 0; color: #6366F1; }
.conv-badge {
  flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white;
  font-size: 10px; font-weight: 800; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* home empty state */
.home-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 72px 32px 48px; text-align: center; gap: 0;
}
.home-empty-icon {
  width: 88px; height: 88px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(139,92,246,0.14));
  border: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.home-empty-title { font-size: 19px; font-weight: 700; color: #E4E4E7; margin: 14px 0 10px; }
.home-empty-sub { font-size: 13px; color: #71717A; line-height: 1.65; max-width: 270px; margin: 0 0 16px; }
.home-empty-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: #10B981;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2);
  border-radius: 20px; padding: 5px 12px; margin-bottom: 22px;
}
.home-start-btn {
  padding: 13px 32px; background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white;
  border: none; border-radius: 14px; font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: 'Inter', sans-serif; box-shadow: 0 6px 20px rgba(99,102,241,0.4);
  transition: opacity 0.12s, transform 0.1s; margin-bottom: 16px;
}
.home-start-btn:active { opacity: 0.85; transform: scale(0.97); }
.home-empty-identity { font-size: 12px; color: #3F3F46; margin: 0; }
.home-goto-market {
  margin-top: 12px; padding: 10px 24px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6); color: white;
  border: none; border-radius: 12px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35); transition: opacity 0.12s;
}
.home-goto-market:hover { opacity: 0.88; }

/* FAB */
.home-fab {
  position: fixed; bottom: 80px; right: 20px; z-index: 50;
  width: 52px; height: 52px; border-radius: 50%;
  background: #7c3aed; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(124,58,237,0.5);
  transition: transform 0.15s, opacity 0.15s;
}
.home-fab:active { transform: scale(0.93); }

/* chat panel (full screen) */
#chatPanel { display: none; flex-direction: column; flex: 1; min-height: 0; }
.back-btn {
  width: 34px; height: 34px; border: none; background: transparent; cursor: pointer;
  color: #71717A; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; flex-shrink: 0; transition: color 0.12s;
}
.back-btn:hover { color: #E4E4E7; }
.chat-menu-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.08);
  background: transparent; color: #71717A; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color 0.12s, color 0.12s;
}
.chat-menu-btn:hover { border-color: rgba(255,255,255,0.18); color: #A1A1AA; }
.msg-sender {
  font-size: 10px; font-weight: 700; font-family: monospace; margin-bottom: 4px; display: block;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── WALLET SCREEN ──────────────────────────────── */
.wallet-screen-body { padding: 28px 20px; display: flex; flex-direction: column; align-items: center; flex: 1; }
.wallet-empty-icon { width: 72px; height: 72px; border-radius: 20px; background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.wallet-empty-title { font-size: 20px; font-weight: 700; color: #F4F4F5; margin-bottom: 10px; }
.wallet-empty-sub { font-size: 13px; color: #52525B; text-align: center; line-height: 1.6; max-width: 300px; margin-bottom: 28px; }
.wallet-connect-options { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; }
.wallet-connected-card {
  width: 100%; max-width: 340px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(99,102,241,0.25);
  border-radius: 18px; padding: 24px 20px; text-align: center;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.1), 0 8px 32px rgba(0,0,0,0.3);
}
.wallet-connected-dot { width: 10px; height: 10px; border-radius: 50%; background: #10B981; margin: 0 auto 10px; box-shadow: 0 0 8px rgba(16,185,129,0.6); }
.wallet-connected-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #10B981; margin-bottom: 14px; }
.wallet-connected-addr { font-size: 12px; font-family: monospace; color: #A1A1AA; background: rgba(0,0,0,0.3); border-radius: 8px; padding: 8px 12px; word-break: break-all; margin-bottom: 8px; }
.wallet-connected-method { font-size: 11px; color: #52525B; margin-bottom: 20px; }
.wallet-disconnect-btn { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); border-radius: 10px; color: #EF4444; font-size: 13px; font-weight: 600; padding: 9px 20px; cursor: pointer; font-family: 'Inter', sans-serif; transition: background 0.15s; }
.wallet-disconnect-btn:hover { background: rgba(239,68,68,0.18); }
.bnav-wallet-dot { width: 6px; height: 6px; border-radius: 50%; background: #10B981; position: absolute; top: 6px; right: calc(50% - 12px); }

/* ── BOTTOM NAV ─────────────────────────────────── */
.bottom-nav {
  display: flex; flex-shrink: 0;
  min-height: 62px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8,8,14,0.97);
  border-top: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  position: relative; z-index: 100;
}
.bnav-tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  border: none; background: transparent; cursor: pointer;
  color: #52525B; font-family: 'Inter', sans-serif;
  position: relative; transition: color 0.15s; padding: 8px 4px;
}
.bnav-tab.active { color: #818CF8; }
.bnav-tab.active .bnav-label {
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.bnav-tab:hover:not(.active):not(.bnav-soon-tab) { color: #A1A1AA; }
.bnav-soon-tab { opacity: 0.35; cursor: not-allowed; }
.bnav-svg { width: 22px; height: 22px; }
.bnav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }
.bnav-soon-tag {
  position: absolute; top: 6px; right: calc(50% - 18px);
  font-size: 7px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: #52525B; background: rgba(255,255,255,0.05); border-radius: 4px; padding: 1px 3px;
}
.bnav-badge {
  position: absolute; top: 6px; right: calc(50% - 20px);
  background: #EF4444; color: white; font-size: 9px; font-weight: 800;
  padding: 1px 4px; border-radius: 8px; min-width: 16px; text-align: center;
  display: none; line-height: 14px;
}
.bnav-tab.active::after {
  content: ''; position: absolute; bottom: 4px;
  width: 20px; height: 2px; border-radius: 2px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
}

@media (max-width: 580px) {
  .sidebar { width: 200px; min-width: 200px; }
  .offer-card { flex-wrap: wrap; }
  .offer-card-left { width: auto; }
  .offer-card-mid { flex-wrap: wrap; gap: 12px; }
}

/* ── WALLET NOT FOUND MODAL ────────────────────────── */
#walletNotFoundModal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 20px;
}
#walletNotFoundModal.open { display: flex; }
.wnf-card {
  background: rgba(12,12,18,0.98); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 28px 24px 24px; width: 100%; max-width: 360px;
  position: relative; z-index: 999; animation: slideUp 0.2s ease;
}
.wnf-icon { font-size: 40px; text-align: center; margin-bottom: 12px; }
.wnf-title { font-size: 18px; font-weight: 700; color: #F4F4F5; text-align: center; margin-bottom: 8px; }
.wnf-msg { font-size: 14px; color: rgba(255,255,255,0.55); text-align: center; line-height: 1.5; margin-bottom: 24px; }
.wnf-btn-install {
  display: block; width: 100%; padding: 13px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border: none; border-radius: 12px; color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer; margin-bottom: 10px;
}
.wnf-btn-manual {
  display: block; width: 100%; padding: 13px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; color: rgba(255,255,255,0.8);
  font-size: 15px; font-weight: 500; cursor: pointer;
}
.wnf-btn-install:hover { opacity: 0.88; }
.wnf-btn-manual:hover  { background: rgba(255,255,255,0.1); }

/* "Don't have a wallet?" hint */
.wc-no-wallet-hint {
  text-align: center; font-size: 12px; color: rgba(255,255,255,0.35);
  margin-top: 8px; cursor: pointer; transition: color 0.15s;
}
.wc-no-wallet-hint:hover { color: rgba(255,255,255,0.7); }
.wc-no-wallet-hint span { color: #8B5CF6; text-decoration: underline; }
