/* ============================================================
   StealthSwap — style.css
   Aesthetic: dark industrial · mono type · surgical precision
============================================================ */

:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #161616;
  --border: rgba(255,255,255,0.08);
  --border-hi: rgba(255,255,255,0.15);
  --text: #e8e6e0;
  --text2: #888780;
  --text3: #555450;
  --green: #1D9E75;
  --green-dim: rgba(29,158,117,0.15);
  --green-text: #5DCAA5;
  --amber: #EF9F27;
  --amber-dim: rgba(239,159,39,0.12);
  --amber-text: #FAC775;
  --red: #E24B4A;
  --radius: 10px;
  --radius-sm: 6px;
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

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

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background effects */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(29,158,117,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main, nav, footer { position: relative; z-index: 1; }

/* Nav */
nav {
  border-bottom: 0.5px solid var(--border);
  background: rgba(10,10,10,0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.logo-text {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-text em {
  font-style: normal;
  color: var(--green-text);
}

.logo-text.small { font-size: 12px; }

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

.nav-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text2);
  font-family: var(--mono);
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(29,158,117,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(29,158,117,0); }
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 24px 28px;
  max-width: 600px;
  margin: 0 auto;
}

.hero-tag {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--green-text);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.hero h1 em {
  font-style: normal;
  color: var(--green-text);
  font-weight: 500;
}

.hero-sub {
  font-size: 14px;
  color: var(--text2);
}

/* Swap wrapper */
.swap-wrapper {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 12px;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text2);
}

.tab.active {
  background: var(--bg3);
  border: 0.5px solid var(--border-hi);
  color: var(--text);
}

.tab-label {
  font-size: 13px;
  font-family: var(--sans);
  font-weight: 400;
}

.tab-badge {
  font-size: 10px;
  font-family: var(--mono);
  padding: 1px 6px;
  border-radius: 4px;
}

.tab-badge.green { background: var(--green-dim); color: var(--green-text); }
.tab-badge.amber { background: var(--amber-dim); color: var(--amber-text); }

/* Swap card */
.swap-card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}

.swap-body { padding: 20px; }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  font-size: 11px;
  color: var(--text2);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: block;
}

.est-label { font-style: normal; color: var(--text3); text-transform: none; letter-spacing: 0; }

.token-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--bg3);
  transition: border-color 0.15s;
}

.token-row:focus-within { border-color: var(--border-hi); }

.token-select {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  border: 0.5px solid var(--border);
}

.token-select:hover { background: rgba(255,255,255,0.07); }
.token-select.static { cursor: default; }
.token-select.static:hover { background: rgba(255,255,255,0.04); }

.token-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.token-sym {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.token-net {
  font-size: 10px;
  color: var(--text2);
}

.chevron { font-size: 10px; color: var(--text2); }

.xmr-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239,159,39,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--amber-text);
}

.amount-input {
  flex: 1;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  text-align: right;
  min-width: 0;
}

.amount-input::placeholder { color: var(--text3); }
.amount-input.out { color: var(--text2); }

/* Remove number input arrows */
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.amount-input[type=number] { -moz-appearance: textfield; }

.swap-arrow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.swap-arrow-line {
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

.arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.arrow-btn:hover { border-color: var(--border-hi); color: var(--text); }

.addr-field { margin-top: 4px; }

.addr-row {
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--bg3);
  transition: border-color 0.15s;
}

.addr-row:focus-within { border-color: var(--border-hi); }

.addr-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  background: transparent;
  border: none;
  outline: none;
}

.addr-input::placeholder { color: var(--text3); }
.addr-error { font-size: 11px; color: var(--red); margin-top: 4px; }
.field-hint { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* Meta rows */
.meta-section {
  border-top: 0.5px solid var(--border);
  padding: 4px 0;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 20px;
  font-size: 12px;
  color: var(--text2);
}

.meta-val {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  font-weight: 400;
}

.meta-val.mono { font-family: var(--mono); font-size: 10px; }

/* CTA button */
.cta-btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--green);
  color: #fff;
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, opacity 0.15s;
  border-top: 0.5px solid rgba(255,255,255,0.1);
}

.cta-btn:hover:not(:disabled) { background: #0F6E56; }
.cta-btn:disabled { background: var(--bg3); color: var(--text3); cursor: not-allowed; }
.cta-arrow { font-size: 16px; }

/* Chips */
.chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.chip {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.chip-label {
  font-size: 10px;
  color: var(--text2);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.chip-val {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

/* Providers panel */
.providers-panel {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}

.providers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
  color: var(--text);
  font-family: var(--mono);
}

.providers-sub { font-size: 10px; color: var(--text2); }

.provider-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}

.provider-item:last-child { border-bottom: none; }
.provider-item:hover { background: rgba(255,255,255,0.02); }
.provider-item.selected { background: rgba(29,158,117,0.06); border-left: 2px solid var(--green); }

.provider-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.provider-rate {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
}

.kyc-badge {
  font-size: 10px;
  font-family: var(--mono);
  padding: 2px 6px;
  border-radius: 4px;
}

.kyc-no { background: var(--green-dim); color: var(--green-text); }
.kyc-yes { background: rgba(226,75,74,0.12); color: #F09595; }
.providers-empty { padding: 16px; font-size: 12px; color: var(--text2); text-align: center; }

/* Bottom note */
.bottom-note {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  padding: 0 8px;
  line-height: 1.5;
}

/* Error box */
.error-box {
  background: rgba(226,75,74,0.08);
  border: 0.5px solid rgba(226,75,74,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: #F09595;
  margin-bottom: 10px;
}

/* FAQ */
.faq {
  max-width: 800px;
  margin: 32px auto 48px;
  padding: 0 24px;
}

.faq h2 {
  font-size: 14px;
  font-family: var(--mono);
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.faq-item {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.faq-item h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
}

.faq-item a { color: var(--green-text); text-decoration: none; }

/* Footer */
footer {
  border-top: 0.5px solid var(--border);
  padding: 16px 24px;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: var(--text2);
}

.footer-inner a {
  color: var(--text2);
  text-decoration: none;
  margin-left: auto;
}

.footer-inner a:hover { color: var(--text); }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  background: var(--bg2);
  border: 0.5px solid var(--border-hi);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
}

.modal-list {
  overflow-y: auto;
  padding: 12px 16px;
  flex: 1;
}

.modal-loading {
  font-size: 12px;
  color: var(--text2);
  text-align: center;
  padding: 20px;
}

/* Coin picker */
.coin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
}

.coin-item:hover { background: rgba(255,255,255,0.04); }

.coin-sym {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  min-width: 50px;
}

.coin-name { font-size: 11px; color: var(--text2); }

/* Track page */
.track-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.status-text {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* Confirm modal */
.confirm-modal code {
  font-family: var(--mono);
  font-size: 10px;
  background: rgba(255,255,255,0.05);
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--green-text);
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }

/* Responsive */
@media (max-width: 480px) {
  .nav-links { display: none; }
  .hero { padding: 32px 16px 20px; }
  .chips { grid-template-columns: repeat(3, 1fr); }
  .meta-row { padding: 6px 14px; }
  .swap-body { padding: 14px; }
}
