:root {
  --xmr-orange: #ff6600;
  --xmr-orange-dim: #cc5200;
  --bg: #0e0f12;
  --panel: #16181d;
  --panel-2: #1d2027;
  --border: #2b2f38;
  --text: #e8eaed;
  --muted: #838a97;
  --green: #57c964;
}

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

body {
  background:
    radial-gradient(900px 500px at 50% -160px, rgba(255,102,0,0.10), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  min-height: 100vh;
  padding: 52px 16px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero { text-align: center; margin-bottom: 30px; }

.logo {
  width: 84px;
  height: 84px;
  image-rendering: pixelated;
  display: block;
  margin: 0 auto 16px;
  filter: drop-shadow(0 6px 18px rgba(255,102,0,0.28));
}

.brand {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
}
.brand .accent {
  color: var(--xmr-orange);
  text-shadow: 0 0 20px rgba(255,102,0,0.55);
}

.tagline {
  color: var(--text);
  margin-top: 12px;
  font-size: 16px;
}
.subtag {
  color: var(--muted);
  margin-top: 8px;
  font-size: 13px;
  max-width: 420px;
  line-height: 1.5;
  margin-left: auto;
  margin-right: auto;
}

.container {
  width: 100%;
  max-width: 460px;
}

.reserves {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  margin-bottom: 18px;
}
.reserves .amount {
  color: var(--xmr-orange);
  font-weight: 700;
}
.reserves .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  position: relative;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--xmr-orange), transparent);
  border-radius: 2px;
}

.card-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--xmr-orange);
  border: 1px solid var(--xmr-orange-dim);
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 18px;
}

.note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  border-left: 2px solid var(--xmr-orange-dim);
  padding-left: 12px;
  margin-top: 18px;
}

.field-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.row {
  display: flex;
  gap: 10px;
}

.amount-input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 22px;
  padding: 14px 16px;
  outline: none;
  min-width: 0;
}
.amount-input:focus {
  border-color: var(--xmr-orange);
  box-shadow: 0 0 0 3px rgba(255,102,0,0.12);
}
.amount-input:read-only { color: var(--text); cursor: default; }

.select-wrap {
  position: relative;
  width: 150px;
}
select {
  width: 100%;
  height: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  appearance: none;
  outline: none;
  cursor: pointer;
}
select:hover { border-color: #3a3f4a; }
select:focus {
  border-color: var(--xmr-orange);
  box-shadow: 0 0 0 3px rgba(255,102,0,0.12);
}
.select-wrap::after {
  content: "\25be";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.select-static {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 150px;
  padding: 14px 16px;
  background: var(--panel-2);
  border: 1px solid var(--xmr-orange-dim);
  border-radius: 8px;
  font-size: 15px;
  color: var(--xmr-orange);
  font-weight: 700;
}
.select-static .lock {
  font-size: 12px;
  opacity: 0.7;
  filter: grayscale(1) brightness(1.6);
}

.usd {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.swap-divider {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
.swap-arrow {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  color: var(--muted);
  font-size: 18px;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}

.address-label {
  color: var(--muted);
  font-size: 13px;
  margin: 24px 0 10px;
}
.address-input {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 15px 16px;
  outline: none;
}
.address-input:focus { border-color: var(--xmr-orange); }

.actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.btn-reset {
  width: 54px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.btn-reset:hover { color: var(--text); }
.btn-swap {
  flex: 1;
  background: var(--xmr-orange);
  border: none;
  border-radius: 8px;
  color: #111;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  padding: 16px;
  cursor: pointer;
  transition: background .15s;
}
.btn-swap:hover { background: var(--xmr-orange-dim); color: #fff; }

.footer {
  margin-top: 40px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--xmr-orange); }

/* Order details */
.mono { font-family: inherit; }
.break { word-break: break-all; }

.order-rows { margin-top: 4px; }
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.order-row .k {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.order-row .v {
  font-size: 14px;
  text-align: right;
}

.deposit-label {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 22px 0 10px;
}
.deposit-box {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  color: var(--xmr-orange);
}

.btn-swap:disabled {
  opacity: 0.6;
  cursor: default;
}

.status-pill {
  margin-top: 16px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--xmr-orange);
  background: rgba(255,102,0,0.08);
  border: 1px solid var(--xmr-orange-dim);
}
.status-pill .hourglass { margin-right: 6px; }

/* Chat launcher */
.chat-launcher {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--xmr-orange);
  color: var(--xmr-orange);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}
.chat-launcher .badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* Chat panel */
.chat-panel {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 52px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
}
.chat-panel.open { display: flex; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.chat-header img {
  width: 38px;
  height: 38px;
  image-rendering: pixelated;
}
.chat-header .name {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-header .name .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
}
.chat-header .sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.chat-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.chat-close:hover { color: var(--xmr-orange); }

.chat-cid {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 6px 0 8px;
  border-top: 1px solid var(--border);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.msg { max-width: 80%; }
.msg .bubble {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}
.msg .time { color: var(--muted); font-size: 11px; margin-top: 5px; }
.msg.user { align-self: flex-end; text-align: right; }
.msg.user .bubble {
  background: var(--xmr-orange);
  border-color: var(--xmr-orange);
  color: #111;
  font-weight: 700;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.chat-input input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 12px;
  outline: none;
}
.chat-input input:focus { border-color: var(--xmr-orange); }
.chat-input button {
  width: 46px;
  background: var(--xmr-orange);
  border: none;
  border-radius: 8px;
  color: #111;
  font-size: 18px;
  cursor: pointer;
}
.chat-input button:hover { background: var(--xmr-orange-dim); color: #fff; }

/* FAQ */
.faq-title {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 30px;
}
.faq-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 24px;
}
.faq-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.faq-row:last-child { border-bottom: none; }
.faq-row .k { color: var(--muted); font-size: 15px; }
.faq-row .v { font-size: 15px; }
.btn-back {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  padding: 16px;
  margin-top: 22px;
  text-decoration: none;
  cursor: pointer;
}
.btn-back:hover { color: var(--xmr-orange); border-color: var(--xmr-orange); }
.faq-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  width: 100%;
  max-width: 460px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.faq-footer a { color: var(--muted); text-decoration: none; }
.faq-footer a:hover { color: var(--xmr-orange); }

/* Skeleton loading */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.skeleton {
  display: inline-block;
  height: 1em;
  min-width: 80px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--panel-2) 25%, #2a2e38 50%, var(--panel-2) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  vertical-align: middle;
}
