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

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

body {
  font-family: 'DM Sans', sans-serif;
  background: #f0ece8;
  color: #1a1a1a;
  padding: 40px 20px;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 0% 100%, rgba(255,102,0,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 0%, rgba(180,100,40,0.05) 0%, transparent 55%);
}

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

/* Container */
.mix-container {
  width: 100%;
  max-width: 1000px;
  background: #faf8f5;
  border: 1px solid #ddd8d0;
  border-radius: 8px;
  padding: 48px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 4px 32px rgba(0,0,0,0.08),
    0 1px 4px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.mix-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6600, #cc4400, #ff6600);
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

@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 2px 8px rgba(255,102,0,0.25));
}

.mix-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.3;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}

/* 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: #ffffff;
  border: 1px solid #ddd8d0;
  border-radius: 6px;
  overflow: visible;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.panel:hover {
  border-color: #b8b0a6;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Panel Label */
.panel-label {
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 600;
  color: #999086;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-bottom: 1px solid #ede9e3;
}

/* 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: 34px;
  font-weight: 700;
  text-align: right;
  border: none;
  background: transparent;
  color: #ff6600;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -1px;
}

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

/* Receive Amount */
.to-panel .panel-header .receive-big {
  width: 100%;
  max-width: 280px;
  padding: 8px 12px;
  font-size: 34px;
  font-weight: 700;
  text-align: right;
  color: #1a1a1a;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -1px;
}

/* 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: 1px solid #ddd8d0;
  border-radius: 6px;
  background: #f5f1ec;
  cursor: pointer;
  color: #1a1a1a;
  transition: all 0.2s;
}

.select-trigger:hover {
  border-color: #ff6600;
  background: #fff8f4;
}

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

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

.arrow {
  font-size: 11px;
  color: #ff6600;
  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: 1px solid #ddd8d0;
  border-radius: 6px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 10000 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

.options::-webkit-scrollbar { width: 6px; }
.options::-webkit-scrollbar-track { background: #f5f1ec; }
.options::-webkit-scrollbar-thumb { background: #c8bfb5; border-radius: 4px; }
.options::-webkit-scrollbar-thumb:hover { background: #ff6600; }

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

.search-input::placeholder { color: #aaa29a; }

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

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

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

.option:hover {
  background: #fff8f4;
  color: #1a1a1a;
}

.option.selected {
  background: #fff3ec;
  color: #ff6600;
  box-shadow: inset 3px 0 0 #ff6600, inset 0 -1px 0 #f0ece8;
}

.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: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #ddd8d0;
  color: #ff6600;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mix-swap:hover {
  background: #ff6600;
  border-color: #ff6600;
  color: #ffffff;
  transform: translate(-50%, -50%) rotate(180deg);
  box-shadow: 0 4px 16px rgba(255,102,0,0.35);
}

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

.mix-form input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #ddd8d0;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  font-family: 'DM Mono', monospace;
}

.mix-form input[type="text"]:focus {
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255,102,0,0.1);
}

.mix-form input[type="text"]::placeholder {
  color: #bdb5ab;
  font-family: 'DM Sans', sans-serif;
}

/* Submit Button */
.mix-submit {
  display: block;
  width: 100%;
  background: #ff6600;
  color: #ffffff;
  border: none;
  padding: 16px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 28px;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(255,102,0,0.25), 0 1px 0 rgba(255,255,255,0.2) inset;
  font-family: 'DM Sans', sans-serif;
}

.mix-submit:hover {
  background: #e55a00;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,102,0,0.35);
}

.mix-submit:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(255,102,0,0.2);
}

/* SEO Section */
.seo-section {
  max-width: 800px;
  margin: 40px auto 0;
  padding: 32px;
  background: #faf8f5;
  border: 1px solid #ddd8d0;
  border-radius: 8px;
  color: #666660;
}

.seo-section h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 24px 0 14px;
  color: #1a1a1a;
  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: #faf8f5;
  border: 1px solid #ddd8d0;
  border-radius: 8px;
  color: #1a1a1a;
}

.info-block .label {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 11px;
  color: #999086;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

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

.info-block .value a {
  color: #ff6600;
  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 #ddd8d0;
  border-top-color: #ff6600;
  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; max-width: 100%; }
  .mix-title { font-size: 22px; }

  .exchange-panel { flex-direction: column; gap: 0; position: relative; }
  .panel { border-radius: 6px; 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: -20px auto; z-index: 20; order: 1;
    width: 40px; height: 40px; 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: 6px; }
  .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 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: 36px; height: 36px; margin: -18px auto; }
  .mix-form input[type="text"] { padding: 12px 14px; }
  .mix-submit { padding: 14px 18px; margin-top: 22px; }
}

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

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

.coin-tag {
  background: #ffffff;
  border: 1px solid #ddd8d0;
  border-radius: 5px;
  padding: 5px 13px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: #1a1a1a;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: default;
  white-space: nowrap;
}

.coin-tag:hover {
  border-color: #ff6600;
  color: #ff6600;
  background: #fff8f4;
}


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

.step-card {
  counter-increment: step;
  background: #ffffff;
  border: 1px solid #ddd8d0;
  border-radius: 6px;
  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: #ff6600;
  box-shadow: 0 2px 12px rgba(255,102,0,0.08);
}

.step-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #ff6600;
  line-height: 1;
  min-width: 28px;
  padding-top: 2px;
}

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

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

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


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

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #ddd8d0;
  border-radius: 6px;
  padding: 9px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.badge:hover {
  border-color: #ff6600;
  box-shadow: 0 2px 8px rgba(255,102,0,0.08);
}

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


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

.faq-list details {
  background: #ffffff;
  border: 1px solid #ddd8d0;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-list details[open] {
  border-color: #ff6600;
  box-shadow: 0 2px 12px rgba(255,102,0,0.08);
}

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

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

.faq-list summary::after {
  content: '+';
  color: #ff6600;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s;
}

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

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding: 0 18px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #666660;
  line-height: 1.75;
  border-top: 1px solid #ede9e3;
  padding-top: 14px;
}


/* ───────────────────────────────────────
   5. CTA BLOCK — призыв к действию
─────────────────────────────────────── */
.cta-block {
  background: #ffffff;
  border: 1px solid #ff6600;
  border-radius: 6px;
  padding: 32px 28px;
  text-align: center;
  margin-top: 32px;
  box-shadow: 0 2px 16px rgba(255,102,0,0.08);
}

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

.cta-btn {
  display: inline-block;
  background: #ff6600;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 14px 36px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(255,102,0,0.25);
}

.cta-btn:hover {
  background: #e55a00;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,102,0,0.35);
}

.cta-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(255,102,0,0.2);
}


/* ───────────────────────────────────────
   RESPONSIVE — все блоки
─────────────────────────────────────── */
@media (max-width: 768px) {
  .coin-grid  { gap: 6px; }
  .coin-tag   { font-size: 11px; padding: 4px 10px; }

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

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

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

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

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