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

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: #080b08;
  color: #a8c4a8;
  padding: 40px 20px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* CRT scanlines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,255,80,0.012) 2px,
    rgba(0,255,80,0.012) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Green vignette glow */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,0.6) 100%),
    radial-gradient(ellipse at 20% 80%, rgba(0,255,80,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0,200,60,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

main {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Container */
.mix-container {
  width: 100%;
  max-width: 1000px;
  background: #0a0f0a;
  border: 1px solid rgba(0,255,80,0.2);
  border-radius: 4px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,255,80,0.06),
    0 0 60px rgba(0,255,80,0.06),
    0 24px 80px rgba(0,0,0,0.9);
}

/* Top terminal bar */
.mix-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    #00ff50 20%,
    #00cc40 50%,
    #00ff50 80%,
    transparent 100%
  );
  animation: terminal-scan 4s linear infinite;
  background-size: 200% 100%;
}

@keyframes terminal-scan {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* Corner brackets */
.mix-container::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 60px; height: 60px;
  border-bottom: 2px solid rgba(0,255,80,0.3);
  border-right: 2px solid rgba(0,255,80,0.3);
  pointer-events: none;
}

/* Header */
.mix-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

/* Top-left bracket decoration */
.mix-header::before {
  content: '[ ANONYMOUS SWAP ]';
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(0,255,80,0.35);
  letter-spacing: 4px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.mix-logo {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 14px;
  filter:
    drop-shadow(0 0 10px rgba(0,255,80,0.5))
    drop-shadow(0 0 30px rgba(0,255,80,0.2))
    grayscale(20%)
    hue-rotate(80deg);
}

.mix-title {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.4;
  color: #00ff50;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(0,255,80,0.7),
    0 0 30px rgba(0,255,80,0.3),
    0 0 60px rgba(0,255,80,0.1);
}

/* Privacy badges */
.mix-header::after {
  content: '✓ NO KYC  ✓ NO AML  ✓ NO LOGS  ✓ NO LIMITS';
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(0,255,80,0.5);
  letter-spacing: 2px;
  margin-top: 12px;
  text-transform: uppercase;
}

/* Form */
.mix-form {
  width: 100%;
  position: relative;
  z-index: 1;
}

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

/* Panel */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #060a06;
  border: 1px solid rgba(0,255,80,0.15);
  border-radius: 3px;
  overflow: visible;
  transition: all 0.2s;
  position: relative;
}

/* Corner bracket top-left */
.panel::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 20px; height: 20px;
  border-top: 2px solid #00ff50;
  border-left: 2px solid #00ff50;
  pointer-events: none;
}

/* Corner bracket bottom-right */
.panel::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 20px; height: 20px;
  border-bottom: 2px solid rgba(0,255,80,0.4);
  border-right: 2px solid rgba(0,255,80,0.4);
  pointer-events: none;
}

.panel:hover {
  border-color: rgba(0,255,80,0.35);
  box-shadow:
    0 0 20px rgba(0,255,80,0.07),
    inset 0 0 20px rgba(0,255,80,0.02);
}

/* Panel Label */
.panel-label {
  padding: 12px 18px 6px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(0,255,80,0.5);
  text-transform: uppercase;
  letter-spacing: 3px;
  border-bottom: 1px solid rgba(0,255,80,0.08);
  font-family: 'JetBrains Mono', monospace;
}

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

/* Amount Input */
.from-panel .panel-header input {
  width: 100%;
  max-width: 280px;
  padding: 8px 0;
  font-size: 40px;
  font-weight: 700;
  text-align: right;
  border: none;
  background: transparent;
  color: #00ff50;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -2px;
  text-shadow:
    0 0 10px rgba(0,255,80,0.7),
    0 0 30px rgba(0,255,80,0.3);
  caret-color: #00ff50;
}

.from-panel .panel-header input::placeholder {
  color: rgba(0,255,80,0.12);
  text-shadow: none;
}

/* Receive Amount */
.to-panel .panel-header .receive-big {
  width: 100%;
  max-width: 280px;
  padding: 8px 0;
  font-size: 40px;
  font-weight: 700;
  text-align: right;
  color: #c8e8c8;
  background: transparent;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -2px;
}

/* Select Area */
.panel-select {
  padding: 8px 16px 16px;
}

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

.select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(0,255,80,0.18);
  border-radius: 3px;
  background: rgba(0,255,80,0.03);
  cursor: pointer;
  color: #a8c4a8;
  transition: all 0.2s;
}

.select-trigger:hover {
  border-color: rgba(0,255,80,0.45);
  background: rgba(0,255,80,0.06);
  box-shadow: 0 0 12px rgba(0,255,80,0.08);
}

.select-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  filter: saturate(0.7) brightness(0.9);
}

.select-value {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #c8e8c8;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

.arrow {
  font-size: 10px;
  color: #00ff50;
  transition: transform 0.2s;
}

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

/* Options Dropdown */
.options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #060a06;
  padding: 0;
  border: 1px solid rgba(0,255,80,0.25);
  border-radius: 3px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 10000 !important;
  box-shadow:
    0 16px 48px rgba(0,0,0,0.95),
    0 0 20px rgba(0,255,80,0.08);
}

.options::-webkit-scrollbar { width: 4px; }
.options::-webkit-scrollbar-track { background: #060a06; }
.options::-webkit-scrollbar-thumb { background: rgba(0,255,80,0.3); border-radius: 2px; }
.options::-webkit-scrollbar-thumb:hover { background: #00ff50; }

/* Search Input */
.search-input {
  position: sticky;
  top: 0;
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid rgba(0,255,80,0.1);
  background: rgba(0,255,80,0.04);
  color: #a8c4a8;
  font-size: 12px;
  outline: none;
  border-radius: 3px 3px 0 0;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  caret-color: #00ff50;
}

.search-input::placeholder { color: rgba(0,255,80,0.2); }

/* Option Group */
.opt-group {
  padding: 8px 14px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(0,255,80,0.5);
  text-transform: uppercase;
  letter-spacing: 3px;
  background: #060a06;
  position: sticky;
  top: 44px;
  z-index: 1;
  font-family: 'JetBrains Mono', monospace;
}

/* Option Item */
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: #607860;
  transition: all 0.15s ease;
  border: none;
  box-shadow: inset 0 -1px 0 rgba(0,255,80,0.05);
}

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

.option:hover {
  background: rgba(0,255,80,0.06);
  color: #a8c4a8;
}

.option.selected {
  background: rgba(0,255,80,0.08);
  color: #00ff50;
  box-shadow: inset 3px 0 0 #00ff50, inset 0 -1px 0 rgba(0,255,80,0.05);
  text-shadow: 0 0 8px rgba(0,255,80,0.4);
}

.option img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  filter: saturate(0.6);
}

.option span {
  white-space: nowrap;
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.3px;
}

/* Swap Button */
.mix-swap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 3px;
  background: #060a06;
  border: 1px solid rgba(0,255,80,0.35);
  color: #00ff50;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
  box-shadow:
    0 0 12px rgba(0,255,80,0.15),
    inset 0 0 6px rgba(0,255,80,0.04);
  text-shadow: 0 0 8px rgba(0,255,80,0.7);
}

.mix-swap:hover {
  background: #00ff50;
  border-color: #00ff50;
  color: #030803;
  transform: translate(-50%, -50%) rotate(180deg);
  box-shadow:
    0 0 28px rgba(0,255,80,0.6),
    0 0 60px rgba(0,255,80,0.2);
  text-shadow: none;
}

/* Wallet Input */
.mix-form label {
  display: block;
  margin: 20px 0 6px;
  font-size: 9px;
  font-weight: 600;
  color: rgba(0,255,80,0.45);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: 'JetBrains Mono', monospace;
}

.mix-form input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(0,255,80,0.18);
  border-radius: 3px;
  background: #060a06;
  color: #a8c4a8;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.3px;
  caret-color: #00ff50;
}

.mix-form input[type="text"]:focus {
  border-color: rgba(0,255,80,0.5);
  box-shadow:
    0 0 0 2px rgba(0,255,80,0.07),
    0 0 20px rgba(0,255,80,0.06);
  color: #c8e8c8;
}

.mix-form input[type="text"]::placeholder {
  color: rgba(0,255,80,0.15);
  font-family: 'JetBrains Mono', monospace;
}

/* Submit Button */
.mix-submit {
  display: block;
  width: 100%;
  background: transparent;
  color: #00ff50;
  border: 1px solid #00ff50;
  padding: 17px 24px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-top: 24px;
  transition: all 0.25s;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 10px rgba(0,255,80,0.6);
  box-shadow:
    0 0 16px rgba(0,255,80,0.15),
    inset 0 0 16px rgba(0,255,80,0.03);
  position: relative;
  overflow: hidden;
}

/* Terminal cursor blink effect on button */
.mix-submit::before {
  content: '> ';
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.5;
}

/* Scan sweep */
.mix-submit::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(0,255,80,0.12),
    transparent
  );
  transition: left 0.5s;
}

.mix-submit:hover::after { left: 200%; }

.mix-submit:hover {
  background: #00ff50;
  color: #030803;
  text-shadow: none;
  transform: translateY(-1px);
  box-shadow:
    0 0 30px rgba(0,255,80,0.55),
    0 0 70px rgba(0,255,80,0.2),
    0 6px 20px rgba(0,0,0,0.6);
  letter-spacing: 6px;
}

.mix-submit:active {
  transform: translateY(0);
  box-shadow: 0 0 16px rgba(0,255,80,0.35);
}

/* SEO Section */
.seo-section {
  max-width: 800px;
  margin: 32px auto 0;
  padding: 28px;
  background: #060a06;
  border: 1px solid rgba(0,255,80,0.12);
  border-radius: 3px;
  color: #486048;
}

.seo-section h2 {
  font-size: 13px;
  font-weight: 700;
  margin: 20px 0 10px;
  color: rgba(0,255,80,0.7);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.seo-section h2::before { content: '// '; opacity: 0.5; }

.seo-section h2:first-child { margin-top: 0; }
.seo-section p  { margin-bottom: 12px; line-height: 1.8; font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.seo-section ul { margin: 12px 0 12px 16px; list-style: none; }
.seo-section li { margin-bottom: 8px; font-size: 13px; line-height: 1.6; font-family: 'JetBrains Mono', monospace; }
.seo-section li::before { content: '> '; color: rgba(0,255,80,0.4); }

/* Info Block */
.info-block {
  max-width: 800px;
  margin: 12px auto 0;
  padding: 18px 28px;
  background: #060a06;
  border: 1px solid rgba(0,255,80,0.12);
  border-radius: 3px;
  color: #a8c4a8;
}

.info-block .label {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 9px;
  color: rgba(0,255,80,0.4);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: 'JetBrains Mono', monospace;
}

.info-block .value p { margin: 0; font-size: 13px; font-family: 'JetBrains Mono', monospace; }

.info-block .value a {
  color: #00ff50;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  text-shadow: 0 0 6px rgba(0,255,80,0.3);
}

.info-block .value a:hover {
  color: #44ff80;
  text-shadow: 0 0 12px rgba(0,255,80,0.6);
}

/* Loader */
.loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0,255,80,0.15);
  border-top-color: #00ff50;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  visibility: hidden;
  margin-left: 8px;
  vertical-align: middle;
}

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

/* Responsive */
@media (max-width: 768px) {
  .mix-container { padding: 24px 16px; }
  .mix-title { font-size: 16px; letter-spacing: 1px; }

  .exchange-panel { flex-direction: column; gap: 0; position: relative; }
  .panel { border-radius: 3px; width: 100%; }
  .from-panel { z-index: 10; }
  .to-panel   { z-index: 5; margin-top: -1px; }

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

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

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

  .mix-submit { padding: 14px 20px; font-size: 11px; margin-top: 20px; letter-spacing: 3px; }
  .seo-section, .info-block { padding: 18px 14px; margin-top: 16px; }
  .seo-section h2 { font-size: 11px; }
  .seo-section p, .seo-section li { font-size: 12px; }
}

@media (max-width: 480px) {
  body { padding: 16px 10px; }
  .mix-container { padding: 20px 14px; }
  .mix-logo { width: 52px; height: 52px; }
  .mix-title { font-size: 14px; }
  .mix-header::before { font-size: 8px; letter-spacing: 2px; }
  .mix-header::after  { font-size: 8px; letter-spacing: 1px; }
  .panel-label { font-size: 9px; padding: 10px 14px 5px; }
  .panel-header { padding: 12px 14px; }
  .from-panel .panel-header input,
  .to-panel .panel-header .receive-big { font-size: 24px; }
  .panel-select { padding: 6px 12px 12px; }
  .select-trigger { padding: 9px 11px; }
  .mix-swap { width: 34px; height: 34px; margin: -17px auto; }
  .mix-form input[type="text"] { padding: 11px 13px; font-size: 12px; }
  .mix-submit { padding: 13px 16px; margin-top: 18px; letter-spacing: 2px; }
}

/* Validation */
.wallet-error { color: #ff4444; font-size: 11px; margin-top: 5px; display: none; font-family: 'JetBrains Mono', monospace; }
.wallet-input.error { border-color: #ff4444 !important; }
.wallet-validation-status { display: inline-block; margin-left: 8px; font-size: 13px; }
.wallet-validation-status.valid   { color: #00ff50; text-shadow: 0 0 6px rgba(0,255,80,0.5); }
.wallet-validation-status.invalid { color: #ff4444; }
.amount-error { color: #ff4444; font-size: 11px; margin-top: 5px; font-family: 'JetBrains Mono', monospace; }
#amount.error { color: #ff4444; }

/* ── SEO Section: FAQ question headers ───────────────────── */
.seo-section h3.seo-faq-q {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: rgba(0,255,80,0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 22px 0 8px;
  padding-left: 14px;
  border-left: 2px solid rgba(0,255,80,0.35);
  line-height: 1.5;
}

/* ── SEO Section: subtle entry animation for LCP perf ───── */
@media (prefers-reduced-motion: no-preference) {
  .seo-section {
    animation: seo-fade 0.4s ease both;
    animation-delay: 0.15s;
  }
  @keyframes seo-fade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ── SEO Section: highlight on hover for E-E-A-T signals ── */
.seo-section h2:hover,
.seo-section h3.seo-faq-q:hover {
  color: rgba(0,255,80,0.9);
  transition: color 0.2s;
}

/* ── SEO Section: link style inside text (if needed) ──────── */
.seo-section a {
  color: #00ff50;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0,255,80,0.3);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.seo-section a:hover {
  color: #44ff80;
  text-decoration-color: rgba(68,255,128,0.6);
}

/* ── Responsive: seo-section FAQ headings on mobile ──────── */
@media (max-width: 480px) {
  .seo-section h3.seo-faq-q {
    font-size: 11px;
    letter-spacing: 1px;
  }
}