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

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

:root {
  --usdt:        #26a17b;   /* Tether green-teal  */
  --usdt-light:  #2ecc9e;
  --xmr:         #ff6600;   /* Monero orange      */
  --xmr-light:   #ff8c3a;
  --bg:          #07100d;   /* Very dark teal-black */
  --card:        #0b1612;
  --card2:       #0d1914;
  --border-usdt: rgba(38,161,123,0.2);
  --border-xmr:  rgba(255,102,0,0.18);
  --text:        #c8e0d4;
  --dim:         #3a6050;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 40px 20px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 0%   15%, rgba(38,161,123,0.13) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 85%, rgba(255,102,0,0.10)  0%, transparent 50%),
    radial-gradient(ellipse at 50%  50%, rgba(7,20,14,0.96)    0%, transparent 80%);
}

/* USDT circuit lines left, XMR organic right */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 48px,
      rgba(38,161,123,0.022) 48px,
      rgba(38,161,123,0.022) 49px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 48px,
      rgba(38,161,123,0.014) 48px,
      rgba(38,161,123,0.014) 49px
    ),
    repeating-linear-gradient(
      -55deg,
      transparent,
      transparent 60px,
      rgba(255,102,0,0.010) 60px,
      rgba(255,102,0,0.010) 61px
    );
  pointer-events: none;
  z-index: 0;
}

/* No-KYC privacy scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(38,161,123,0.007) 3px,
    rgba(38,161,123,0.007) 4px
  );
  pointer-events: none;
  z-index: 9998;
}

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

/* Container */
.mix-container {
  width: 100%;
  max-width: 1000px;
  background: var(--card);
  border: 1px solid var(--border-usdt);
  border-right-color: var(--border-xmr);
  border-radius: 16px;
  padding: 44px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.025) inset,
    0 24px 80px rgba(0,0,0,0.85),
    0 0 60px rgba(38,161,123,0.06),
    4px 0 60px rgba(255,102,0,0.04);
}

/* USDT→XMR top bar */
.mix-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    #26a17b 0%,
    #2ecc9e 25%,
    #a0c060 50%,
    #e07020 75%,
    #ff6600 100%
  );
  background-size: 200% 100%;
  animation: usdt-xmr-bar 7s ease-in-out infinite alternate;
}

@keyframes usdt-xmr-bar {
  0%   { background-position: 0%   0; }
  100% { background-position: 100% 0; }
}

/* Privacy shield centre glow */
.mix-container::after {
  content: '';
  position: absolute;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 300px;
  background: radial-gradient(ellipse,
    rgba(38,161,123,0.10) 0%,
    rgba(100,180,100,0.05) 40%,
    rgba(255,102,0,0.04)  70%,
    transparent 85%
  );
  pointer-events: none;
}

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

/* No KYC badge */
.mix-header::before {
  content: '🔒  NO KYC  ·  NO AML  ·  NO LIMITS  ·  NO LOGS';
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 2px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.mix-logo {
  width: 68px;
  height: 68px;
  display: block;
  margin: 0 auto 14px;
  filter:
    drop-shadow(0 0 10px rgba(38,161,123,0.55))
    drop-shadow(0 0 28px rgba(255,102,0,0.25));
}

.mix-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.6px;
  background: linear-gradient(135deg,
    #2ecc9e 0%,
    #26a17b 25%,
    #90c060 55%,
    #ff8c3a 80%,
    #ff6600 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Swap direction tag */
.mix-header::after {
  content: 'USDT  ⟶  XMR';
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  margin-top: 10px;
  background: linear-gradient(90deg, #26a17b, #ff6600);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 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;
}

/* FROM panel — USDT (teal-green) */
.from-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(38,161,123,0.04);
  border: 1px solid rgba(38,161,123,0.22);
  border-radius: 12px;
  overflow: visible;
  transition: all 0.25s;
  position: relative;
}

/* USDT corner brackets */
.from-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 22px; height: 2px;
  background: #26a17b;
  box-shadow: 0 0 8px rgba(38,161,123,0.7);
}

.from-panel::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 22px;
  background: #26a17b;
  box-shadow: 0 0 8px rgba(38,161,123,0.7);
}

.from-panel:hover {
  border-color: rgba(38,161,123,0.48);
  box-shadow: 0 0 28px rgba(38,161,123,0.1);
}

/* TO panel — XMR (orange) */
.to-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255,102,0,0.04);
  border: 1px solid rgba(255,102,0,0.22);
  border-radius: 12px;
  overflow: visible;
  transition: all 0.25s;
  position: relative;
}

/* XMR corner brackets */
.to-panel::before {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 22px; height: 2px;
  background: #ff6600;
  box-shadow: 0 0 8px rgba(255,102,0,0.7);
}

.to-panel::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 2px; height: 22px;
  background: #ff6600;
  box-shadow: 0 0 8px rgba(255,102,0,0.7);
}

.to-panel:hover {
  border-color: rgba(255,102,0,0.48);
  box-shadow: 0 0 28px rgba(255,102,0,0.09);
}

/* Panel */
.panel { }

/* Panel Label */
.panel-label {
  padding: 12px 18px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

.from-panel .panel-label {
  color: rgba(38,161,123,0.75);
  border-bottom-color: rgba(38,161,123,0.1);
}

.to-panel .panel-label {
  color: rgba(255,102,0,0.75);
  border-bottom-color: rgba(255,102,0,0.1);
}

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

/* Amount Input — USDT green */
.from-panel .panel-header input {
  width: 100%;
  max-width: 280px;
  padding: 8px 12px;
  font-size: 40px;
  font-weight: 800;
  text-align: right;
  border: none;
  background: transparent;
  color: #2ecc9e;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -2px;
  caret-color: #26a17b;
  text-shadow: 0 0 16px rgba(38,161,123,0.45);
}

.from-panel .panel-header input::placeholder {
  color: rgba(38,161,123,0.14);
  text-shadow: none;
}

/* Receive amount — XMR orange */
.to-panel .panel-header .receive-big {
  width: 100%;
  max-width: 280px;
  padding: 8px 12px;
  font-size: 40px;
  font-weight: 800;
  text-align: right;
  color: #ff8c3a;
  background: transparent;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -2px;
  text-shadow: 0 0 16px rgba(255,102,0,0.35);
}

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

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

.from-panel .select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(38,161,123,0.22);
  border-radius: 8px;
  background: rgba(38,161,123,0.06);
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}

.from-panel .select-trigger:hover {
  border-color: rgba(38,161,123,0.52);
  background: rgba(38,161,123,0.1);
  box-shadow: 0 0 14px rgba(38,161,123,0.1);
}

.to-panel .select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(255,102,0,0.22);
  border-radius: 8px;
  background: rgba(255,102,0,0.06);
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}

.to-panel .select-trigger:hover {
  border-color: rgba(255,102,0,0.52);
  background: rgba(255,102,0,0.1);
  box-shadow: 0 0 14px rgba(255,102,0,0.1);
}

/* fallback */
.select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--border-usdt);
  border-radius: 8px;
  background: rgba(38,161,123,0.06);
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}

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

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

.from-panel .arrow { font-size: 10px; color: #26a17b; transition: transform 0.2s; }
.to-panel   .arrow { font-size: 10px; color: #ff6600; transition: transform 0.2s; }
.arrow { font-size: 10px; color: #26a17b; 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: #0a1510;
  padding: 0;
  border: 1px solid rgba(38,161,123,0.28);
  border-radius: 10px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 10000 !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 24px rgba(38,161,123,0.08);
}

.to-panel .options {
  border-color: rgba(255,102,0,0.28);
  box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 24px rgba(255,102,0,0.07);
}

.options::-webkit-scrollbar { width: 4px; }
.options::-webkit-scrollbar-track { background: #0a1510; }
.options::-webkit-scrollbar-thumb { background: rgba(38,161,123,0.4); border-radius: 3px; }
.options::-webkit-scrollbar-thumb:hover { background: #26a17b; }

/* Search Input */
.search-input {
  position: sticky;
  top: 0;
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid rgba(38,161,123,0.1);
  background: rgba(38,161,123,0.05);
  color: var(--text);
  font-size: 12px;
  outline: none;
  border-radius: 10px 10px 0 0;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  caret-color: #26a17b;
}

.search-input::placeholder { color: rgba(38,161,123,0.22); }

/* Option Group */
.opt-group {
  padding: 8px 14px;
  font-size: 9px;
  font-weight: 700;
  color: #26a17b;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  background: #0a1510;
  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: #3a6050;
  transition: all 0.15s;
  box-shadow: inset 0 -1px 0 rgba(38,161,123,0.06);
}

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

.option:hover {
  background: rgba(38,161,123,0.07);
  color: var(--text);
}

.option.selected {
  background: rgba(38,161,123,0.1);
  color: #2ecc9e;
  box-shadow: inset 3px 0 0 #26a17b, inset 0 -1px 0 rgba(38,161,123,0.06);
}

.option img { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.option span {
  font-size: 13px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.3px;
}

/* Swap Button */
.mix-swap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card);
  border: none;
  color: #c8e0d4;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 0 0 1.5px rgba(38,161,123,0.5),
    0 0 0 3px rgba(255,102,0,0.15),
    0 0 20px rgba(38,161,123,0.15),
    0 0 20px rgba(255,102,0,0.08);
}

.mix-swap:hover {
  background: linear-gradient(135deg, #26a17b, #90c060, #e07020, #ff6600);
  box-shadow:
    0 0 30px rgba(38,161,123,0.5),
    0 0 30px rgba(255,102,0,0.35);
  color: #ffffff;
  transform: translate(-50%, -50%) rotate(180deg) scale(1.1);
}

/* Wallet Input */
.mix-form label {
  display: block;
  margin: 20px 0 7px;
  font-size: 10px;
  font-weight: 700;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-family: 'JetBrains Mono', monospace;
}

.mix-form input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(38,161,123,0.18);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
  font-family: 'JetBrains Mono', monospace;
  caret-color: #26a17b;
}

.mix-form input[type="text"]:focus {
  border-color: rgba(38,161,123,0.52);
  box-shadow:
    0 0 0 3px rgba(38,161,123,0.1),
    0 0 20px rgba(38,161,123,0.07);
}

.mix-form input[type="text"]::placeholder {
  color: rgba(38,161,123,0.2);
  font-family: 'Inter', sans-serif;
}

/* Submit Button — USDT→XMR gradient */
.mix-submit {
  display: block;
  width: 100%;
  background: linear-gradient(90deg,
    #26a17b 0%,
    #2ecc9e 25%,
    #a0c060 50%,
    #e07020 75%,
    #ff6600 100%
  );
  background-size: 200% 100%;
  color: #ffffff;
  border: none;
  padding: 17px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 24px;
  transition: all 0.4s;
  box-shadow:
    0 4px 28px rgba(38,161,123,0.35),
    0 4px 28px rgba(255,102,0,0.15);
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep */
.mix-submit::before {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-15deg);
  transition: left 0.6s;
}

.mix-submit:hover::before { left: 140%; }

.mix-submit:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow:
    0 8px 36px rgba(38,161,123,0.5),
    0 8px 36px rgba(255,102,0,0.25);
}

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

/* SEO Section */
.seo-section {
  max-width: 800px;
  margin: 36px auto 0;
  padding: 28px;
  background: var(--card2);
  border: 1px solid rgba(38,161,123,0.12);
  border-right-color: rgba(255,102,0,0.1);
  border-radius: 14px;
  color: var(--dim);
}

.seo-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 11px;
  background: linear-gradient(90deg, #2ecc9e, #ff8c3a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.2px;
}

.seo-section h2:first-child { margin-top: 0; }
.seo-section p  { margin-bottom: 12px; line-height: 1.8; font-size: 14px; }
.seo-section ul { margin: 12px 0 12px 0; list-style: none; padding: 0; }
.seo-section li { margin-bottom: 8px; font-size: 14px; line-height: 1.65; }
.seo-section li::before { content: '→ '; color: #26a17b; }

/* Info Block */
.info-block {
  max-width: 800px;
  margin: 14px auto 0;
  padding: 20px 28px;
  background: var(--card2);
  border: 1px solid rgba(38,161,123,0.12);
  border-radius: 14px;
  color: var(--text);
}

.info-block .label {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-family: 'JetBrains Mono', monospace;
}

.info-block .value p { margin: 0; font-size: 14px; }

.info-block .value a {
  background: linear-gradient(90deg, #2ecc9e, #ff8c3a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.info-block .value a:hover { opacity: 0.75; }

/* Loader */
.loader {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(38,161,123,0.15);
  border-top-color: #26a17b;
  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: 26px 16px; border-radius: 14px; }
  .mix-title { font-size: 20px; }
  .mix-header::before { font-size: 9px; letter-spacing: 1.5px; }
  .mix-header::after  { font-size: 10px; letter-spacing: 3px; }

  .exchange-panel { flex-direction: column; gap: 0; position: relative; }
  .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: 28px; max-width: 100%; text-align: center; letter-spacing: -1px; }

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

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

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

@media (max-width: 480px) {
  body { padding: 18px 10px; }
  .mix-container { padding: 20px 14px; border-radius: 12px; }
  .mix-logo { width: 56px; height: 56px; margin-bottom: 12px; }
  .mix-title { font-size: 18px; }
  .panel-label { padding: 10px 14px 5px; font-size: 9px; }
  .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; }
  .mix-swap { width: 40px; height: 40px; margin: -20px auto; }
  .mix-form input[type="text"] { padding: 11px 13px; }
  .mix-submit { padding: 13px 16px; margin-top: 18px; }
}

/* Validation */
.wallet-error { color: #ff6070; font-size: 11px; margin-top: 5px; display: none; font-family: 'JetBrains Mono', monospace; }
.wallet-input.error { border-color: #ff6070 !important; }
.wallet-validation-status { display: inline-block; margin-left: 8px; font-size: 14px; }
.wallet-validation-status.valid   { color: #2ecc9e; }
.wallet-validation-status.invalid { color: #ff6070; }
.amount-error { color: #ff6070; font-size: 11px; margin-top: 5px; }
#amount.error { color: #ff6070; }
