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

body { padding: 0 0 80px; }
.page-wrap { position: relative; z-index: 1; }

/* HERO */
.hero {
  text-align: center;
  padding: 52px 24px 20px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-green);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 5px 14px;
  background: var(--c-green-dim);
  border: 1px solid rgba(10,124,92,0.22);
  border-radius: 100px;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-green);
  animation: blink 2.8s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity:1; }
  50%      { opacity:0.25; }
}

.hero h1 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--c-text);
  margin-bottom: 14px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 em { font-style: normal; color: var(--c-green); }

.hero-sub {
  font-size: 15px;
  color: var(--c-mid);
  max-width: 420px;
  margin: 0 auto 28px;
  line-height: 1.7;
  font-family: var(--f-mono);
}

.hero-stats {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--c-border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
}
.stat { padding: 12px 24px; text-align: center; border-right: 1px solid var(--c-border2); }
.stat:last-child { border-right: none; }
.stat-value { font-family: var(--f-mono); font-size: 15px; font-weight: 600; color: var(--c-text); }
.stat-label { font-family: var(--f-mono); font-size: 10px; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 3px; }

/* SWAP WIDGET */
.swap-section {
  padding: 24px 16px 0;
  display: flex;
  justify-content: center;
}

.swap-card {
  width: 100%;
  max-width: 490px;
  background: var(--c-surface);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg);
}

.swap-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
}
.swap-card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: var(--f-mono);
}
.swap-card-rate {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-green);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.swap-card-rate::before { content: '●'; font-size: 7px; animation: blink 2.8s infinite; }

/* swap fields */
.swap-field {
  margin: 12px 16px 0;
  background: var(--c-bg2);
  border: 1.5px solid var(--c-border2);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.swap-field:focus-within {
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(10,124,92,0.09);
  background: var(--c-surface);
}

.swap-field-label {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.swap-field-row { display: flex; align-items: center; gap: 12px; }

.swap-amount {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--f-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--c-text);
  caret-color: var(--c-green);
  width: 100%;
  min-width: 0;
}
.swap-amount::placeholder { color: var(--c-muted); opacity: 0.45; }
.swap-amount.error { color: var(--c-red); }

.receive-display {
  flex: 1;
  font-family: var(--f-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--c-green);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* token selector */
.token-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border2);
  border-radius: var(--r-md);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  white-space: nowrap;
  transition: border-color var(--transition), background var(--transition);
}
.token-selector:hover { border-color: rgba(10,124,92,0.40); background: var(--c-surface2); }
.token-selector img { width: 20px; height: 20px; border-radius: 50%; }
.token-selector-name { font-size: 14px; font-weight: 700; color: var(--c-text); font-family: var(--f-mono); }
.token-selector-arrow { font-size: 10px; color: var(--c-muted); transition: transform 0.2s; }
.custom-select.active .token-selector-arrow { transform: rotate(180deg); }

.swap-field-hint { margin-top: 8px; font-family: var(--f-mono); font-size: 10px; color: var(--c-muted); min-height: 14px; }

/* swap direction button */
.swap-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  position: relative;
  z-index: 5;
}
.swap-direction-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border2);
  color: var(--c-muted);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s;
  box-shadow: var(--shadow-sm);
}
.swap-direction-btn:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  background: var(--c-green-dim);
  transform: rotate(180deg);
}

/* wallet block */
.wallet-block {
  margin: 10px 16px 0;
  background: var(--c-bg2);
  border: 1.5px solid var(--c-border2);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.wallet-block:focus-within {
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(10,124,92,0.09);
  background: var(--c-surface);
}
.wallet-block-label {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wallet-input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--c-text);
  caret-color: var(--c-green);
}
.wallet-input::placeholder { color: var(--c-muted); opacity: 0.55; }
.wallet-input.error { color: var(--c-red); }
.wallet-error { font-family: var(--f-mono); font-size: 11px; color: var(--c-red); margin-top: 8px; display: none; }
.wallet-validation-status { font-size: 11px; font-family: var(--f-mono); }
.wallet-validation-status.valid { color: var(--c-green); font-weight: 600; }
.wallet-validation-status.invalid { color: var(--c-red); }
.amount-error { font-family: var(--f-mono); font-size: 11px; color: var(--c-red); margin-top: 6px; }

/* submit */
.swap-submit-wrap { padding: 14px 16px; }
.swap-submit {
  width: 100%;
  padding: 16px;
  background: var(--c-green);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(10,124,92,0.22);
}
.swap-submit:hover { background: var(--c-green2); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(10,124,92,0.32); }

/* disclaimer */
.swap-disclaimer {
  padding: 0 16px 16px;
  font-size: 11px;
  color: var(--c-muted);
  text-align: center;
  line-height: 1.55;
  font-family: var(--f-mono);
}
.swap-disclaimer a { color: var(--c-muted); text-decoration: underline; }
.swap-disclaimer a:hover { color: var(--c-green); }

/* DROPDOWN */
.custom-select { position: relative; }
.options-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 290px;
  max-height: 310px;
  overflow-y: auto;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: none;
}
.options-dropdown::-webkit-scrollbar { width: 4px; }
.options-dropdown::-webkit-scrollbar-thumb { background: var(--c-border3); border-radius: 4px; }
.dropdown-search {
  position: sticky; top: 0;
  width: 100%; height: 44px;
  padding: 0 15px;
  background: var(--c-surface);
  border: none;
  border-bottom: 1px solid var(--c-border2);
  color: var(--c-text);
  font-family: var(--f-mono);
  font-size: 13px;
  outline: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.dropdown-search::placeholder { color: var(--c-muted); }
.opt-group {
  padding: 8px 15px 4px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--c-muted);
  text-transform: uppercase;
  position: sticky; top: 44px;
  background: var(--c-surface); z-index: 1;
}
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  transition: background 0.12s;
  font-family: var(--f-mono);
}
.option:hover { background: var(--c-surface2); }
.option.selected { background: var(--c-green-dim); color: var(--c-green); font-weight: 700; }
.option img { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* FEATURES ROW */
.features-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--c-mid);
  font-weight: 500;
  font-family: var(--f-mono);
}
.feat-item::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-green);
  flex-shrink: 0;
}

/* HOW IT WORKS */
.how-section {
  max-width: 1020px;
  margin: 80px auto 0;
  padding: 0 24px;
}
.section-label {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-green);
  font-weight: 600;
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--c-text);
  margin-bottom: 40px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.step-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-xl);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.step-card:hover { border-color: rgba(10,124,92,0.28); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.step-num { font-family: var(--f-mono); font-size: 11px; color: var(--c-green); font-weight: 600; letter-spacing: 0.08em; margin-bottom: 14px; }
.step-card h2, .step-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; color: var(--c-text); }
.step-card p { font-size: 13px; color: var(--c-muted); line-height: 1.7; font-family: var(--f-mono); }

/* SEO SECTION */
.seo-section { max-width: 840px; margin: 64px auto 0; padding: 0 24px; }
.seo-section h2 { font-size: 18px; font-weight: 700; color: var(--c-text); margin: 32px 0 10px; }
.seo-section h2:first-child { margin-top: 0; }
.seo-section p { font-size: 13px; color: var(--c-muted); line-height: 1.85; margin-bottom: 12px; font-family: var(--f-mono); }
.seo-section ul, .seo-section ol { margin: 8px 0 12px 20px; }
.seo-section li { font-size: 13px; color: var(--c-muted); line-height: 1.75; margin-bottom: 4px; font-family: var(--f-mono); }
.seo-section strong { color: var(--c-mid); font-weight: 600; }
.seo-section table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.seo-section td { padding: 8px 14px; font-family: var(--f-mono); font-size: 12px; color: var(--c-muted); border: 1px solid var(--c-border2); }

/* INFO BLOCK */
.info-block { max-width: 840px; margin: 20px auto 0; padding: 0 24px; }
.info-block .label { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-muted); margin-bottom: 4px; }
.info-block .value { font-size: 13px; color: var(--c-mid); font-family: var(--f-mono); }
.info-block a { color: var(--c-green); font-weight: 600; }

/* RESPONSIVE */
@media (max-width: 680px) {
  .hero { padding: 40px 16px 28px; }
  .hero-stats { flex-direction: column; border-radius: var(--r-md); }
  .stat { border-right: none; border-bottom: 1px solid var(--c-border2); }
  .stat:last-child { border-bottom: none; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .swap-amount, .receive-display { font-size: 24px; }
}
@media (max-width: 420px) {
  .steps-grid { grid-template-columns: 1fr; }
  .swap-amount, .receive-display { font-size: 20px; }
  .token-selector-name { display: none; }
}

/* REFUND ADDRESS BLOCK */
.refund-block { border-style: dashed; }
.refund-block:focus-within { border-color: var(--c-green); border-style: solid; box-shadow: 0 0 0 3px rgba(10,124,92,0.08); }
.refund-optional {
  font-family: var(--f-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  background: var(--c-surface2);
  border: 1px solid var(--c-border2);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 4px;
}
.refund-hint { margin-top: 6px; font-family: var(--f-mono); font-size: 10px; color: var(--c-muted); line-height: 1.5; }
