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

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #f0f4ff;
  color: #0a1628;
  padding: 40px 20px;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 30% 0%, rgba(39,117,255,0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 80%, rgba(0,170,255,0.07) 0%, transparent 55%),
    linear-gradient(180deg, #eef2ff 0%, #f5f8ff 100%);
}

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

/* Container */
.mix-container {
  width: 100%;
  max-width: 1000px;
  background: #ffffff;
  border: 1px solid #d6e2ff;
  border-radius: 20px;
  padding: 48px;
  box-shadow:
    0 1px 2px rgba(39,117,255,0.06),
    0 8px 40px rgba(39,117,255,0.1),
    0 32px 64px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

/* Subtle top gradient line */
.mix-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2775ff, #00aaff, #2775ff);
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
  border-radius: 20px 20px 0 0;
}

/* Decorative circle — USDC brand element */
.mix-container::after {
  content: '';
  position: absolute;
  top: -160px;
  right: -160px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 60px solid rgba(39,117,255,0.04);
  pointer-events: none;
}

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

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

.mix-logo {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto 18px;
  filter: drop-shadow(0 4px 16px rgba(39,117,255,0.3));
}

.mix-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.3;
  color: #0a1628;
  letter-spacing: -0.6px;
}

/* Form */
.mix-form {
  width: 100%;
}

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

/* Panel */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f6f9ff;
  border: 1.5px solid #d6e2ff;
  border-radius: 14px;
  overflow: visible;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.panel:hover {
  border-color: #2775ff;
  box-shadow: 0 0 0 4px rgba(39,117,255,0.06);
}

/* Panel Label */
.panel-label {
  padding: 11px 18px;
  font-size: 11px;
  font-weight: 700;
  color: #7a9acc;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  border-bottom: 1px solid #e8efff;
}

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

/* Amount Input */
.from-panel .panel-header input {
  width: 100%;
  max-width: 280px;
  padding: 8px 12px;
  font-size: 36px;
  font-weight: 800;
  text-align: right;
  border: none;
  background: transparent;
  color: #2775ff;
  outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -1.5px;
}

.from-panel .panel-header input::placeholder {
  color: #c0d0ee;
}

/* Receive Amount */
.to-panel .panel-header .receive-big {
  width: 100%;
  max-width: 280px;
  padding: 8px 12px;
  font-size: 36px;
  font-weight: 800;
  text-align: right;
  color: #0a1628;
  background: transparent;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -1.5px;
}

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

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

.select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid #d6e2ff;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  color: #0a1628;
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(39,117,255,0.06);
}

.select-trigger:hover {
  border-color: #2775ff;
  box-shadow: 0 0 0 3px rgba(39,117,255,0.08);
}

.select-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: 0 1px 6px rgba(39,117,255,0.2);
}

.select-value {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0a1628;
}

.arrow {
  font-size: 11px;
  color: #2775ff;
  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: #ffffff;
  padding: 0;
  border: 1.5px solid #d6e2ff;
  border-radius: 12px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 10000 !important;
  box-shadow: 0 16px 48px rgba(39,117,255,0.15), 0 4px 12px rgba(0,0,0,0.06);
}

.options::-webkit-scrollbar { width: 6px; }
.options::-webkit-scrollbar-track { background: #f6f9ff; }
.options::-webkit-scrollbar-thumb { background: #b0c8ff; border-radius: 4px; }
.options::-webkit-scrollbar-thumb:hover { background: #2775ff; }

/* Search Input */
.search-input {
  position: sticky;
  top: 0;
  width: 100%;
  height: 46px;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #e8efff;
  background: #f6f9ff;
  color: #0a1628;
  font-size: 14px;
  outline: none;
  border-radius: 12px 12px 0 0;
  z-index: 2;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.search-input::placeholder { color: #9ab4dd; }

/* Option Group */
.opt-group {
  padding: 9px 14px;
  font-size: 10px;
  font-weight: 700;
  color: #2775ff;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  background: #f6f9ff;
  position: sticky;
  top: 46px;
  z-index: 1;
}

/* Option Item */
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  color: #3a4a6a;
  transition: all 0.15s ease;
  border: none;
  box-shadow: inset 0 -1px 0 #f0f4ff;
}

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

.option:hover {
  background: #f0f6ff;
  color: #0a1628;
}

.option.selected {
  background: #eef4ff;
  color: #2775ff;
  box-shadow: inset 3px 0 0 #2775ff, inset 0 -1px 0 #f0f4ff;
}

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

.option span {
  white-space: nowrap;
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Swap Button */
.mix-swap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #d6e2ff;
  color: #2775ff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.25s;
  box-shadow: 0 2px 12px rgba(39,117,255,0.15);
}

.mix-swap:hover {
  background: #2775ff;
  border-color: #2775ff;
  color: #ffffff;
  transform: translate(-50%, -50%) rotate(180deg);
  box-shadow: 0 4px 20px rgba(39,117,255,0.4);
}

/* Wallet Input */
.mix-form label {
  display: block;
  margin: 22px 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #7a9acc;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.mix-form input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #d6e2ff;
  border-radius: 12px;
  background: #f6f9ff;
  color: #0a1628;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.mix-form input[type="text"]:focus {
  border-color: #2775ff;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(39,117,255,0.1);
}

.mix-form input[type="text"]::placeholder { color: #9ab4dd; }

/* Submit Button */
.mix-submit {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #2775ff 0%, #1a5ce0 100%);
  color: #ffffff;
  border: none;
  padding: 18px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 28px;
  transition: all 0.2s;
  box-shadow:
    0 4px 20px rgba(39,117,255,0.35),
    0 1px 0 rgba(255,255,255,0.15) inset;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.mix-submit:hover {
  background: linear-gradient(135deg, #1a65ee 0%, #0d4ecc 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(39,117,255,0.45);
}

.mix-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(39,117,255,0.25);
}

/* SEO Section */
.seo-section {
  max-width: 800px;
  margin: 40px auto 0;
  padding: 32px;
  background: #ffffff;
  border: 1px solid #d6e2ff;
  border-radius: 16px;
  color: #5a7099;
  box-shadow: 0 4px 20px rgba(39,117,255,0.06);
}

.seo-section h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 24px 0 14px;
  color: #0a1628;
  letter-spacing: -0.3px;
}

.seo-section h2:first-child { margin-top: 0; }
.seo-section p  { margin-bottom: 14px; line-height: 1.75; font-size: 14px; }
.seo-section ul { margin: 14px 0 14px 22px; }
.seo-section li { margin-bottom: 8px; font-size: 14px; line-height: 1.6; }

/* Info Block */
.info-block {
  max-width: 800px;
  margin: 20px auto 0;
  padding: 22px 32px;
  background: #ffffff;
  border: 1px solid #d6e2ff;
  border-radius: 16px;
  color: #0a1628;
  box-shadow: 0 4px 20px rgba(39,117,255,0.06);
}

.info-block .label {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 11px;
  color: #7a9acc;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

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

.info-block .value a {
  color: #2775ff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

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

/* Loader */
.loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #d6e2ff;
  border-top-color: #2775ff;
  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: 28px 20px; }
  .mix-title { font-size: 22px; }

  .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: 28px; max-width: 100%; text-align: center; }

  .mix-swap {
    position: relative; left: auto; top: auto; transform: none;
    margin: -21px auto; z-index: 20; order: 1;
    width: 42px; height: 42px; border-radius: 50%;
  }

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

  .mix-submit { padding: 14px 20px; font-size: 14px; margin-top: 24px; }
  .seo-section, .info-block { padding: 22px 18px; margin-top: 32px; }
  .seo-section h2 { font-size: 17px; }
  .seo-section p, .seo-section li { font-size: 13px; }
}

@media (max-width: 480px) {
  body { padding: 20px 12px; }
  .mix-container { padding: 22px 16px; border-radius: 16px; }
  .mix-logo { width: 60px; height: 60px; margin-bottom: 14px; }
  .mix-title { font-size: 20px; }
  .panel-label { padding: 10px 14px; font-size: 10px; }
  .panel-header { padding: 14px; }
  .from-panel .panel-header input,
  .to-panel .panel-header .receive-big { font-size: 24px; }
  .panel-select { padding: 8px 14px 14px; }
  .select-trigger { padding: 10px 12px; }
  .mix-swap { width: 38px; height: 38px; margin: -19px auto; }
  .mix-form input[type="text"] { padding: 12px 14px; }
  .mix-submit { padding: 14px 18px; margin-top: 22px; }
}

/* Validation */
.wallet-error { color: #e03030; font-size: 12px; margin-top: 5px; display: none; }
.wallet-input.error { border-color: #e03030 !important; }
.wallet-validation-status { display: inline-block; margin-left: 8px; font-size: 14px; }
.wallet-validation-status.valid   { color: #1a9950; }
.wallet-validation-status.invalid { color: #e03030; }
.amount-error { color: #e03030; font-size: 12px; margin-top: 5px; }
#amount.error { color: #e03030; }

/* ───────────────────────────────────────
   PAGE HERO — обёртка для H1
   (вне .seo-section, над ним)
─────────────────────────────────────── */
.page-hero {
  max-width: 800px;
  margin: 0 auto 20px;
  background: #ffffff;
  border: 1px solid #d6e2ff;
  border-radius: 20px;
  padding: 40px 32px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(39,117,255,0.06),
    0 8px 40px rgba(39,117,255,0.1),
    0 32px 64px rgba(0,0,0,0.04);
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2775ff, #00aaff, #2775ff);
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
  border-radius: 20px 20px 0 0;
}

.page-hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.6px;
  color: #0a1628;
  margin-bottom: 14px;
}

.page-hero h1 span { color: #2775ff; }

.page-hero p.hero-sub {
  font-size: 14px;
  color: #7a9acc;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}


/* ───────────────────────────────────────
   DIVIDER
─────────────────────────────────────── */
.seo-section .divider {
  border: none;
  border-top: 1px solid #e8efff;
  margin: 28px 0;
}


/* ───────────────────────────────────────
   H2 OVERRIDE — accent left border
─────────────────────────────────────── */
.seo-section h2 {
  padding-left: 14px;
  border-left: 3px solid #2775ff;
  margin: 32px 0 12px;
}

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

.seo-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: #2775ff;
  margin: 24px 0 8px;
}

.seo-section strong {
  color: #0a1628;
  font-weight: 600;
}


/* ───────────────────────────────────────
   1. COIN GRID — теги монет
─────────────────────────────────────── */
.coin-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 22px;
}

.coin-tag {
  background: #f6f9ff;
  border: 1.5px solid #d6e2ff;
  border-radius: 8px;
  padding: 5px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #3a4a6a;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  cursor: default;
}

.coin-tag:hover {
  border-color: #2775ff;
  color: #2775ff;
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(39,117,255,0.07);
}


/* ───────────────────────────────────────
   2. STEPS — шаги 1-2-3-4
─────────────────────────────────────── */
.steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
  margin: 14px 0 22px;
}

.step-card {
  counter-increment: step;
  background: #f6f9ff;
  border: 1.5px solid #d6e2ff;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.step-card:hover {
  border-color: #2775ff;
  box-shadow: 0 0 0 4px rgba(39,117,255,0.06);
}

.step-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #2775ff;
  line-height: 1;
  min-width: 30px;
  padding-top: 2px;
}

.step-num::before { content: counter(step); }

.step-body strong {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0a1628;
  margin-bottom: 4px;
}

.step-body p {
  font-size: 13px;
  color: #7a9acc;
  line-height: 1.6;
  margin: 0;
}


/* ───────────────────────────────────────
   3. TRUST BADGES — иконки с фичами
─────────────────────────────────────── */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 22px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f6f9ff;
  border: 1.5px solid #d6e2ff;
  border-radius: 10px;
  padding: 9px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #0a1628;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.badge:hover {
  border-color: #2775ff;
  box-shadow: 0 0 0 4px rgba(39,117,255,0.07);
}

.badge .icon { font-size: 15px; line-height: 1; }


/* ───────────────────────────────────────
   4. FAQ — details / summary
─────────────────────────────────────── */
.faq-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 22px;
}

.faq-list details {
  background: #f6f9ff;
  border: 1.5px solid #d6e2ff;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-list details[open] {
  border-color: #2775ff;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(39,117,255,0.06);
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 18px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0a1628;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  transition: background 0.15s;
}

.faq-list summary:hover { background: #eef4ff; }

.faq-list summary::after {
  content: '+';
  color: #2775ff;
  font-size: 20px;
  font-weight: 300;
  flex-shrink: 0;
  line-height: 1;
}

.faq-list details[open] summary::after { content: '−'; }
.faq-list summary::-webkit-details-marker { display: none; }

.faq-answer {
  padding: 14px 18px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: #5a7099;
  line-height: 1.75;
  border-top: 1px solid #e8efff;
}


/* ───────────────────────────────────────
   5. CTA BLOCK
─────────────────────────────────────── */
.cta-block {
  background: linear-gradient(135deg, #f0f6ff 0%, #eef2ff 100%);
  border: 1.5px solid #2775ff;
  border-radius: 14px;
  padding: 32px 28px;
  text-align: center;
  margin-top: 32px;
  box-shadow: 0 4px 20px rgba(39,117,255,0.1);
}

.cta-block p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: #5a7099;
  margin-bottom: 20px;
  line-height: 1.7;
}

.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #2775ff 0%, #1a5ce0 100%);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 16px 38px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow:
    0 4px 20px rgba(39,117,255,0.35),
    0 1px 0 rgba(255,255,255,0.15) inset;
}

.cta-btn:hover {
  background: linear-gradient(135deg, #1a65ee 0%, #0d4ecc 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(39,117,255,0.45);
}

.cta-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(39,117,255,0.25);
}


/* ───────────────────────────────────────
   RESPONSIVE
─────────────────────────────────────── */
@media (max-width: 768px) {
  .page-hero          { padding: 24px 18px; border-radius: 16px; }
  .page-hero h1       { font-size: 1.2rem; }

  .coin-grid          { gap: 6px; }
  .coin-tag           { font-size: 11px; padding: 4px 11px; }

  .step-card          { padding: 14px 16px; gap: 12px; border-radius: 12px; }
  .step-num           { font-size: 18px; }
  .step-body strong   { font-size: 13px; }
  .step-body p        { font-size: 12px; }

  .badge-row          { gap: 6px; }
  .badge              { font-size: 12px; padding: 8px 12px; border-radius: 8px; }

  .faq-list summary   { font-size: 13px; padding: 13px 16px; }
  .faq-answer         { font-size: 12px; }

  .cta-block          { padding: 24px 18px; border-radius: 12px; }
  .cta-btn            { padding: 14px 28px; font-size: 13px; }
}

@media (max-width: 480px) {
  .badge-row          { flex-direction: column; }
  .badge              { width: 100%; }
  .cta-block          { padding: 20px 14px; }
  .page-hero          { border-radius: 14px; }
}
