/* =============================================
   NO KYC CRYPTO SWAP — design.css
   Aesthetic: Cypherpunk terminal · BTC/XMR dark
   Font: JetBrains Mono + DM Sans
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ─── CSS Variables ─── */
:root {
  --bg:         #080b10;
  --surface:    #0d1117;
  --panel:      #111620;
  --border:     #1e2530;
  --border-hi:  #2a3444;
  --accent:     #f7931a;
  --accent-dim: #c97514;
  --accent-glow:rgba(247,147,26,0.18);
  --xmr:        #ff6b00;
  --green:      #00d68f;
  --red:        #ff4560;
  --text:       #e2e8f0;
  --muted:      #4a5568;
  --muted-hi:   #718096;
  --mono:       'JetBrains Mono', monospace;
  --sans:       'DM Sans', sans-serif;
}

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

/* ─── Body ─── */
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  padding: 40px 20px 80px;
  min-height: 100vh;
  /* subtle noise texture */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(247,147,26,0.07) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

main {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ─── Container ─── */
.mix-container {
  width: 100%;
  max-width: 960px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 40px 48px;
  box-shadow:
    0 0 0 1px rgba(247,147,26,0.04),
    0 4px 40px rgba(0,0,0,0.7),
    0 1px 0 rgba(255,255,255,0.03) inset;
  position: relative;
  overflow: visible;
}

/* top accent line */
.mix-container::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
  border-radius: 0 0 4px 4px;
}

/* ─── Header ─── */
.mix-header {
  text-align: center;
  margin-bottom: 36px;
}

.mix-logo {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto 18px;
  filter: drop-shadow(0 0 12px rgba(247,147,26,0.35));
}

.mix-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* ─── Badge strip ─── */
.mix-header::after {
  content: '🔒 No KYC  ·  No Registration  ·  No Logs';
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-hi);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ─── Exchange Panel ─── */
.exchange-panel {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 28px;
  position: relative;
}

/* ─── Panel ─── */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: visible;
  transition: border-color 0.2s;
}

.panel:focus-within {
  border-color: var(--border-hi);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ─── Panel Label ─── */
.panel-label {
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}

/* ─── Panel Header ─── */
.panel-header {
  padding: 18px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Amount input */
.from-panel .panel-header input {
  width: 100%;
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  text-align: right;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  -moz-appearance: textfield;
}

.from-panel .panel-header input::-webkit-outer-spin-button,
.from-panel .panel-header input::-webkit-inner-spin-button { -webkit-appearance: none; }

.from-panel .panel-header input::placeholder { color: var(--muted); }

/* Receive amount */
.to-panel .panel-header .receive-big {
  width: 100%;
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  text-align: right;
  color: var(--green);
  background: transparent;
}

/* ─── Panel Select ─── */
.panel-select {
  padding: 0 14px 16px;
}

/* ─── Custom Select ─── */
.custom-select {
  position: relative;
  width: 100%;
  z-index: 100;
}

.select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.select-trigger:hover {
  border-color: var(--border-hi);
  background: rgba(255,255,255,0.05);
}

.select-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.select-value {
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arrow {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.2s;
}

.custom-select.active .arrow {
  transform: rotate(180deg);
}

/* ─── Options Dropdown ─── */
.options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--panel);
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  z-index: 10000;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(247,147,26,0.06);
}

.options::-webkit-scrollbar { width: 6px; }
.options::-webkit-scrollbar-track { background: transparent; }
.options::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
.options::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Search */
.search-input {
  position: sticky;
  top: 0;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  border-radius: 10px 10px 0 0;
  z-index: 2;
}

.search-input::placeholder { color: var(--muted); }

/* Opt group */
.opt-group {
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--panel);
  position: sticky;
  top: 44px;
  z-index: 1;
}

/* Option */
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.12s;
  box-shadow: inset 0 -1px 0 var(--border);
}

.option:last-child { box-shadow: none; }

.option:hover { background: rgba(247,147,26,0.06); }

.option.selected {
  background: rgba(247,147,26,0.08);
  box-shadow: inset 3px 0 0 var(--accent), inset 0 -1px 0 var(--border);
}

.option img { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }

.option span {
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Swap Button ─── */
.mix-swap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-hi);
  color: var(--muted-hi);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.25s;
}

.mix-swap:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  transform: translate(-50%, -50%) rotate(180deg);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ─── Wallet Input ─── */
.mix-form label {
  display: block;
  margin: 20px 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mix-form input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mix-form input[type="text"]:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.mix-form input[type="text"]::placeholder { color: var(--muted); }

/* ─── Submit Button ─── */
.mix-submit {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 15px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 28px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.mix-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.mix-submit:hover {
  background: #ffaa3d;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(247,147,26,0.4);
}

.mix-submit:active { transform: translateY(0); }

/* ─── SEO Section ─── */
.seo-section {
  max-width: 760px;
  margin: 48px auto 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted-hi);
}

.seo-section h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--text);
  font-family: var(--sans);
}

.seo-section h2:first-child { margin-top: 0; }

.seo-section p {
  margin-bottom: 14px;
  line-height: 1.75;
  font-size: 13.5px;
}

.seo-section ul {
  margin: 12px 0 16px 20px;
}

.seo-section li {
  margin-bottom: 8px;
  font-size: 13.5px;
  line-height: 1.65;
}

/* ─── Info Block ─── */
.info-block {
  max-width: 760px;
  margin: 20px auto 0;
  padding: 22px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
}

.info-block .label {
  font-family: var(--mono);
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-block .value p {
  margin: 0;
  font-size: 14px;
  font-family: var(--mono);
}

.info-block .value a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.info-block .value a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ─── Loader ─── */
.loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-hi);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  visibility: hidden;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Validation ─── */
.wallet-error {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 6px;
  display: none;
}

.wallet-input.error { border-color: var(--red) !important; }

.wallet-validation-status {
  display: inline-block;
  margin-left: 8px;
  font-size: 13px;
}

.wallet-validation-status.valid  { color: var(--green); }
.wallet-validation-status.invalid { color: var(--red); }

.amount-error {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 5px;
}

#amount.error { color: var(--red); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  body { padding: 24px 14px 60px; }

  .mix-container {
    padding: 28px 20px 36px;
    border-radius: 14px;
  }

  .mix-title { font-size: 18px; }

  .exchange-panel {
    flex-direction: column;
    gap: 0;
    position: relative;
  }

  .panel { border-radius: 12px; width: 100%; }

  .from-panel {
    z-index: 10;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .to-panel {
    z-index: 5;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: -1px;
  }

  .from-panel .panel-header input,
  .to-panel .panel-header .receive-big {
    font-size: 26px;
    max-width: 100%;
    text-align: center;
  }

  .mix-swap {
    position: relative;
    left: auto; top: auto;
    transform: none;
    margin: -20px auto;
    z-index: 20;
    width: 40px; height: 40px;
    flex-shrink: 0;
    order: 1;
  }

  .mix-swap:hover { transform: rotate(180deg); }

  .from-panel { order: 0; }
  .to-panel   { order: 2; }

  .mix-submit { margin-top: 24px; font-size: 14px; }

  .seo-section, .info-block {
    padding: 22px 18px;
    margin-top: 32px;
  }
}

@media (max-width: 480px) {
  body { padding: 16px 10px 48px; }

  .mix-container {
    padding: 22px 14px 28px;
    border-radius: 12px;
  }

  .mix-logo { width: 58px; height: 58px; margin-bottom: 14px; }
  .mix-title { font-size: 16px; }

  .panel-label { padding: 9px 14px; font-size: 10px; }
  .panel-header { padding: 14px 14px 10px; }

  .from-panel .panel-header input,
  .to-panel .panel-header .receive-big { font-size: 22px; }

  .panel-select { padding: 0 12px 14px; }
  .select-trigger { padding: 9px 12px; }

  .mix-swap { width: 38px; height: 38px; margin: -19px auto; }

  .mix-form input[type="text"] { padding: 11px 14px; }
  .mix-submit { padding: 13px 18px; }
}
