@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg:        #05050d;
  --surface:   #0b0b18;
  --card:      #0f0f1e;
  --border:    #1a1a30;
  --border2:   #252545;
  --accent:    #7c3aed;
  --accent2:   #a855f7;
  --accent3:   #c084fc;
  --cyan:      #06b6d4;
  --cyan2:     #22d3ee;
  --green:     #10b981;
  --red:       #ef4444;
  --text:      #f1f5f9;
  --muted:     #4a5568;
  --muted2:    #94a3b8;
  --glow-p:    rgba(124,58,237,0.5);
  --glow-c:    rgba(6,182,212,0.4);
  --radius:    14px;
  --transition: .2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ── ANIMATED ORB BACKGROUND ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.orb1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(124,58,237,0.3), transparent 65%);
  top: -180px; left: -180px;
  animation: orbFloat1 9s ease-in-out infinite;
}
.orb2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(6,182,212,0.25), transparent 65%);
  bottom: -150px; right: -150px;
  animation: orbFloat2 11s ease-in-out infinite;
}
.orb3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(236,72,153,0.2), transparent 65%);
  top: 35%; left: 55%;
  animation: orbFloat3 7s ease-in-out infinite;
}
.orb4 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(34,211,238,0.2), transparent 65%);
  top: 15%; right: 10%;
  animation: orbFloat4 13s ease-in-out infinite;
}
.orb5 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(124,58,237,0.18), transparent 65%);
  bottom: 15%; left: 5%;
  animation: orbFloat5 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  25%  { transform: translate(80px,60px) scale(1.15); }
  75%  { transform: translate(-40px,80px) scale(0.9); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  35%  { transform: translate(-90px,-60px) scale(1.2); }
  70%  { transform: translate(50px,-30px) scale(0.9); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%  { transform: translate(-70px,-80px) scale(1.25); }
}
@keyframes orbFloat4 {
  0%, 100% { transform: translate(0,0); }
  30%  { transform: translate(-60px,50px); }
  70%  { transform: translate(50px,-60px); }
}
@keyframes orbFloat5 {
  0%, 100% { transform: translate(0,0) scale(1); }
  45%  { transform: translate(70px,-50px) scale(1.15); }
}

/* ── LAYOUT ── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── RECENT SWAPS ──────────────────────────────── */
.recent-swaps-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 52px 20px 56px;
  border-top: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  margin-top: 20px;
}
.rs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.rs-dot-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
  animation: rsLivePulse 1.8s ease-in-out infinite;
}
@keyframes rsLivePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--green); }
  50%       { opacity: 0.35; box-shadow: none; }
}
.rs-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.rs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(11,11,24,0.75);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 18px;
  transition: border-color 0.2s, background 0.2s;
}
.rs-row:hover { border-color: var(--border2); background: rgba(15,15,35,0.9); }
.rs-row-new {
  animation: rsSlideIn 0.45s cubic-bezier(0.22,1,0.36,1) forwards;
  border-color: rgba(124,58,237,0.45);
  box-shadow: 0 0 18px rgba(124,58,237,0.12);
}
@keyframes rsSlideIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.rs-pair { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.rs-coin { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.rs-coin img { border-radius: 50%; flex-shrink: 0; }
.rs-arrow { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.rs-usd { font-size: 12px; font-weight: 600; color: var(--muted2); white-space: nowrap; min-width: 72px; text-align: right; }
.rs-time { font-size: 11px; color: var(--muted); white-space: nowrap; min-width: 56px; text-align: right; }

/* -- NOTIFICATION BAR -------------------------------------------- */
.notify-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  background: linear-gradient(90deg, rgba(124,58,237,0.07), rgba(6,182,212,0.05), rgba(124,58,237,0.07));
  border-bottom: 1px solid rgba(124,58,237,0.2);
  font-size: 12.5px;
  color: rgba(255,255,255,0.55);
  overflow: hidden;
  max-height: 50px;
  opacity: 1;
  transition: max-height .4s ease, opacity .35s ease, padding .4s ease, border .4s ease;
  position: relative;
}
.notify-bar::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.5) 40%, rgba(6,182,212,0.5) 60%, transparent);
  animation: notifyLine 3.5s ease-in-out infinite;
}
@keyframes notifyLine {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}
.notify-bar.dismissed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  pointer-events: none;
}
.notify-icon { font-size: 14px; flex-shrink: 0; }
.notify-text { flex: 1; text-align: center; letter-spacing: 0.01em; font-weight: 500; }
.notify-text b { color: #e9d5ff; font-weight: 700; }
.notify-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  flex-shrink: 0;
  font-family: inherit;
  line-height: 1;
}
.notify-close:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(124,58,237,0.15);
  background: rgba(5,5,13,0.7);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #fff;
}

.logo-dot {
  background: linear-gradient(135deg, var(--accent2), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-badge {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--accent3);
  box-shadow: 0 0 12px rgba(124,58,237,0.15);
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 12px rgba(124,58,237,0.15); }
  50%       { box-shadow: 0 0 20px rgba(124,58,237,0.35); }
}

/* ── MAIN ── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  gap: 24px;
}

.hero {
  text-align: center;
  margin-bottom: 4px;
  animation: fadeUp .6s ease both;
  padding: 0 16px;
}

.hero-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 20px;
  background: linear-gradient(135deg, rgba(124,58,237,0.13) 0%, rgba(6,182,212,0.07) 100%);
  border: 1px solid rgba(124,58,237,0.32);
  border-radius: 40px;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 32px rgba(124,58,237,0.15), 0 2px 16px rgba(0,0,0,0.35);
  overflow: hidden;
  max-width: 100%;
  max-height: 70px; opacity: 1;
  transition: max-height .45s ease, opacity .35s ease, padding .4s ease, border .4s ease, margin .4s ease;
  animation: fadeUp .6s ease both;
  box-sizing: border-box;
}
.hero-banner.dismissed {
  max-height: 0; opacity: 0;
  padding-top: 0; padding-bottom: 0;
  border-width: 0; margin: 0;
  pointer-events: none;
}
.hero-banner-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.hero-banner-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-banner-sub .hero-xmr, .hero-banner-sub b {
  font-weight: 700; font-style: normal;
  background: linear-gradient(135deg, var(--accent2) 0%, var(--cyan) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 5s ease infinite, textGlowPulse 3s ease-in-out infinite;
}
.hero-banner-close {
  background: none; border: none;
  color: rgba(255,255,255,0.3);
  font-size: 13px; cursor: pointer;
  padding: 3px 7px; border-radius: 50%;
  transition: color .2s, background .2s;
  flex-shrink: 0; font-family: inherit; line-height: 1;
  margin-left: 2px;
}
.hero-banner-close:hover { color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.08); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── SWAP LAYOUT (card + how-it-works side by side) ── */
.swap-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  justify-content: center;
}

/* ── CARD ── */
.card {
  width: 100%;
  flex: 1;
  background: rgba(12,12,24,0.95);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 22px;
  padding: 28px;
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.08),
    0 4px 40px rgba(0,0,0,0.6),
    0 0 60px rgba(124,58,237,0.08),
    inset 0 1px 0 rgba(255,255,255,0.04);
  animation: fadeUp .6s .1s ease both;
  transition: box-shadow .4s ease;
}

.card:hover {
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.15),
    0 4px 40px rgba(0,0,0,0.6),
    0 0 80px rgba(124,58,237,0.12),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ── SWAP SECTION ── */
.swap-section {
  background: rgba(8,8,18,0.8);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .25s, box-shadow .25s;
}

.swap-section:focus-within {
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.1);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.sh-side { color: var(--muted2); font-weight: 600; }
.sh-sep  { color: var(--border2); }

.sh-usd {
  color: var(--accent3);
  font-weight: 500;
  font-size: 13px;
  min-height: 16px;
  transition: color .2s;
}

.section-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.amount-left {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.big-ticker {
  font-size: 22px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: -.5px;
  flex-shrink: 0;
}

.amount-left input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  font-family: inherit;
  min-width: 0;
}

.amount-left input::placeholder { color: var(--border2); font-weight: 400; }
.amount-left input[readonly]    { color: var(--muted2); cursor: default; }
.amount-left input.updating     { animation: flash .3s ease; }


@keyframes flash {
  0%   { opacity: .4; }
  100% { opacity: 1;  }
}

/* ── NETWORK BADGE ── */
.net-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid;
  vertical-align: middle;
  margin-left: 3px;
  letter-spacing: .3px;
}

.btn-sym { vertical-align: middle; }

/* ── QUOTE HINT ── */
.quote-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 10px;
}

/* ── COIN SELECT ── */
.coin-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.coin-select-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20,20,40,0.9);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
  transition: all .2s;
  user-select: none;
  min-width: 160px;
  text-align: left;
}

.coin-select-btn:hover {
  background: rgba(124,58,237,0.12);
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 16px rgba(124,58,237,0.2);
}

.btn-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.btn-name   { font-size: 13px; font-weight: 700; color: var(--text); }
.btn-ticker { font-size: 11px; color: var(--muted2); margin-top: 1px; display: flex; align-items: center; }

.coin-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.caret { font-size: 10px; color: var(--muted); margin-left: 2px; }

/* ── DROPDOWN ── */
.coin-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0d0d20;
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius);
  min-width: 230px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 16px 50px rgba(0,0,0,0.9), 0 0 30px rgba(124,58,237,0.1);
  display: none;
}

.coin-dropdown.open {
  display: block;
  animation: dropIn .15s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.dropdown-search { padding: 10px 12px; border-bottom: 1px solid var(--border); }

.dropdown-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
}

.dropdown-search input:focus { border-color: var(--accent); }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
}

.dropdown-item:hover    { background: rgba(124,58,237,0.12); }
.dropdown-item.selected { background: rgba(124,58,237,0.2); }

.drop-info { display: flex; flex-direction: column; }
.dropdown-item .coin-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.dropdown-item .coin-full { font-size: 11px; color: var(--muted); margin-top: 1px; }

.coin-dropdown::-webkit-scrollbar       { width: 4px; }
.coin-dropdown::-webkit-scrollbar-track { background: transparent; }
.coin-dropdown::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ── SWAP DIRECTION BUTTON ── */
.swap-direction {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px -28px;
  position: relative;
}

.swap-direction::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--border2);
}

.swap-btn {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  background: #0c0c18;
  border: 1px solid var(--border2);
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.swap-btn:hover {
  border-color: rgba(124,58,237,0.5);
  color: var(--accent2);
  box-shadow: 0 0 16px rgba(124,58,237,0.3);
  background: rgba(12,12,24,0.98);
}

@keyframes swapSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(180deg); }
}
.swap-btn.spin { animation: swapSpin 0.32s ease-out forwards; }

.usd-toggle-btn {
  background: none;
  border: 1px solid var(--border2);
  border-radius: 4px;
  color: var(--muted2);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  cursor: pointer;
  margin-left: 4px;
  transition: all .15s;
  outline: none;
  line-height: 1.6;
}
.usd-toggle-btn:hover,
.usd-toggle-btn.active {
  border-color: rgba(124,58,237,0.6);
  color: var(--accent2);
  background: rgba(124,58,237,0.1);
}

/* ── RATE ROW ── */
.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 14px;
  padding: 10px 14px;
  background: rgba(11,11,24,0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted2);
  min-height: 42px;
}

.rate-value { font-weight: 600; color: var(--text); }

.rate-badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
}

.rate-badge.auto {
  background: rgba(16,185,129,0.12);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.3);
  box-shadow: 0 0 10px rgba(16,185,129,0.15);
}

.rate-badge.manual {
  background: rgba(124,58,237,0.12);
  color: var(--accent2);
  border: 1px solid rgba(124,58,237,0.3);
  box-shadow: 0 0 10px rgba(124,58,237,0.2);
}

.rate-badge.fee {
  background: rgba(6,182,212,0.1);
  color: var(--cyan2);
  border: 1px solid rgba(6,182,212,0.25);
}

/* ── MINIMUM ROW ── */
.min-row {
  min-height: 18px;
  margin-top: 4px;
}

.min-text {
  font-size: 12px;
  color: var(--accent2);
  opacity: 0.8;
  letter-spacing: 0.02em;
}

/* ── ADDRESS INPUT ── */
.address-section { margin-top: 4px; }

.address-input {
  width: 100%;
  background: rgba(11,11,24,0.8);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-size: 13px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}

.address-input::placeholder { color: var(--muted); font-family: inherit; }

.address-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12), 0 0 20px rgba(124,58,237,0.08);
}

/* ── CTA BUTTON ── */
.cta-btn {
  width: 100%;
  margin-top: 16px;
  padding: 15px;
  background: linear-gradient(135deg, var(--accent) 0%, #9333ea 50%, var(--accent) 100%);
  background-size: 200% auto;
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .3px;
  transition: all .3s ease;
  box-shadow: 0 4px 24px rgba(124,58,237,0.5), 0 0 40px rgba(124,58,237,0.2);
  animation: btnGlow 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left .5s ease;
}

.cta-btn:hover::before { left: 100%; }

.cta-btn:hover {
  background-position: right center;
  box-shadow: 0 6px 30px rgba(124,58,237,0.7), 0 0 60px rgba(124,58,237,0.3);
  transform: translateY(-1px);
}

.cta-btn:active  { transform: translateY(0); }
.cta-btn:disabled { opacity: 0.5; cursor: not-allowed; animation: none; }

@keyframes btnGlow {
  0%, 100% { box-shadow: 0 4px 24px rgba(124,58,237,0.5), 0 0 40px rgba(124,58,237,0.2); }
  50%       { box-shadow: 0 4px 30px rgba(124,58,237,0.7), 0 0 60px rgba(124,58,237,0.3); }
}

/* ── ERROR / NOTICE ── */
.notice {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
}

.notice.error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
  display: block;
  box-shadow: 0 0 12px rgba(239,68,68,0.1);
}

/* ── ORDER STATUS CARD ── */
#order-card {
  width: 100%;
  max-width: 960px;
  background: rgba(12,12,24,0.95);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.6), 0 0 60px rgba(124,58,237,0.08);
  display: none;
  animation: fadeUp .4s ease;
}

#order-card.visible { display: block; }

.order-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.order-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.order-icon.auto {
  background: rgba(16,185,129,0.15);
  box-shadow: 0 0 20px rgba(16,185,129,0.2);
}

.order-title { font-size: 17px; font-weight: 700; }
.order-sub   { font-size: 13px; color: var(--muted2); margin-top: 2px; }

.order-steps { display: flex; flex-direction: column; gap: 14px; }

.step { display: flex; gap: 14px; align-items: flex-start; }

.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.4);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 0 10px rgba(124,58,237,0.2);
}

.step-content { flex: 1; }
.step-title   { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.step-desc    { font-size: 12px; color: var(--muted2); }

.copy-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(11,11,24,0.8);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}

.copy-box span {
  flex: 1;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
  word-break: break-all;
  color: var(--text);
}

.copy-btn {
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 7px;
  color: var(--accent2);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all .2s;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: rgba(124,58,237,0.3);
  box-shadow: 0 0 12px rgba(124,58,237,0.3);
}

.order-timer {
  text-align: center;
  font-size: 13px;
  color: var(--muted2);
  margin-top: 16px;
}

.order-timer span { color: var(--cyan2); font-weight: 600; text-shadow: 0 0 10px rgba(34,211,238,0.4); }

.btn-secondary {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--muted2);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent2);
  box-shadow: 0 0 16px rgba(124,58,237,0.15);
}

/* ── STATS BAR ── */
.stats-bar {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
  animation: fadeUp .6s .2s ease both;
  position: relative;
  z-index: 0;
}

.stat { text-align: center; }

.stat-val {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(168,85,247,0.3));
}

.stat-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── HOW IT WORKS ── */
.how-section {
  width: 360px;
  flex-shrink: 0;
  background: rgba(12,12,24,0.95);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fadeUp .6s .3s ease both;
}

.how-header {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.how-footer {
  display: flex;
  gap: 0;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  justify-content: space-between;
}

.how-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.how-stat-val {
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.how-stat-lbl {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.how-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  position: relative;
}

.how-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 9px;
  top: 34px;
  bottom: -14px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(124,58,237,0.4), rgba(124,58,237,0.1));
}

.how-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(124,58,237,0.15);
  box-shadow: 0 0 12px rgba(124,58,237,0.3);
  flex-shrink: 0;
  margin-top: 2px;
}

.how-content  { flex: 1; }
.how-title    { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.how-desc     { font-size: 12px; color: var(--muted2); line-height: 1.5; }

/* ── CONFIRMATION MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: #111122;
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 40px rgba(124,58,237,0.15);
  animation: modalIn .2s ease;
}

@keyframes modalIn {
  from { transform: scale(.95) translateY(10px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-warn {
  flex-shrink: 0;
  margin-top: -2px;
  filter: drop-shadow(0 0 8px rgba(234,179,8,0.4));
}

.modal-title { font-size: 18px; font-weight: 800; color: var(--text); }
.modal-sub   { font-size: 13px; color: var(--muted2); margin-top: 3px; }

.confirm-box {
  background: rgba(8,8,20,0.8);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
}

.confirm-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.confirm-coin-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confirm-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.confirm-sym { font-size: 16px; color: var(--muted2); font-weight: 600; margin-left: 4px; }
.confirm-usd { font-size: 12px; color: var(--muted2); margin-top: 2px; }

.confirm-network {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted2);
}

.net-pill {
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent3);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel {
  flex: 1;
  padding: 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border2);
  border-radius: 12px;
  color: var(--muted2);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}

.btn-cancel:hover { background: rgba(255,255,255,0.09); border-color: var(--muted2); }

.btn-confirm {
  flex: 2;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), #9333ea);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.btn-confirm:hover { box-shadow: 0 6px 28px rgba(124,58,237,0.6); transform: translateY(-1px); }
.btn-confirm:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── SPARKLE CANVAS ── */
#sparkle-canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── GLOW TEXT ANIMATIONS ── */
@keyframes textGlowPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(168,85,247,0.15)); }
  50%       { filter: drop-shadow(0 0 10px rgba(168,85,247,0.3)) drop-shadow(0 0 20px rgba(6,182,212,0.1)); }
}
@keyframes gradShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ── LEGAL MODALS ── */
.legal-modal-card {
  max-width: 600px !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
  background: rgba(255,255,255,0.045) !important;
  backdrop-filter: blur(28px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.4) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 8px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06) inset, 0 0 80px rgba(124,58,237,0.12) !important;
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}

.legal-modal-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 20%, var(--accent3) 55%, var(--cyan2) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 4s ease infinite, textGlowPulse 3s ease-in-out infinite;
}

.legal-close-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  flex-shrink: 0;
}
.legal-close-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.legal-modal-body {
  overflow-y: auto;
  padding: 24px 28px 28px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.legal-modal-body::-webkit-scrollbar { width: 5px; }
.legal-modal-body::-webkit-scrollbar-track { background: transparent; }
.legal-modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.legal-modal-body h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 22px 0 8px;
}
.legal-modal-body h3:first-of-type { margin-top: 0; }

.legal-modal-body p {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.75;
  margin-bottom: 6px;
}

.legal-modal-body ul {
  margin: 8px 0 10px 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.75;
}
.legal-modal-body ul li { margin-bottom: 4px; }

.legal-modal-body strong { color: #fff; font-weight: 600; }

.legal-modal-body a {
  color: var(--accent3);
  text-decoration: none;
  transition: color .2s;
}
.legal-modal-body a:hover { color: var(--cyan2); }

/* ── ORDER SCREEN ── */
.order-screen {
  width: 100%;
  max-width: 940px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeUp .4s ease;
}

.order-warn-bar {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.order-warn-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.order-warn-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #fbbf24; }
.order-warn-sub   { font-size: 11px; color: var(--muted2); margin-top: 3px; text-transform: uppercase; letter-spacing: .4px; }

.order-top {
  background: rgba(12,12,24,0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.order-progress-row {
  background: rgba(12,12,24,0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 32px;
}

.order-top-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.order-top-side.right { justify-content: flex-end; text-align: right; }

.order-top-label  { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.order-top-amount { font-size: 22px; font-weight: 800; color: var(--text); }
.order-top-sym    { font-size: 14px; color: var(--muted2); }
.order-top-addr   { font-size: 11px; color: var(--muted2); margin-top: 2px; font-family: monospace; }

.order-progress {
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.progress-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  position: relative;
}

.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border2);
  z-index: 0;
}

.progress-step.done::after  { background: var(--accent); }

.ps-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  background: var(--surface);
  display: grid;
  place-items: center;
  z-index: 1;
  position: relative;
  flex-shrink: 0;
}

.ps-num   { font-size: 11px; font-weight: 700; color: var(--muted2); }
.ps-check { font-size: 12px; font-weight: 700; color: var(--green); }

.ps-spinner {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(168,85,247,0.25);
  border-top-color: var(--accent2);
  animation: psSpinAnim 0.75s linear infinite;
}

@keyframes psSpinAnim {
  to { transform: rotate(360deg); }
}

.progress-step.active .ps-dot { border-color: var(--accent); box-shadow: 0 0 12px rgba(124,58,237,0.5); background: #12112a; }
.progress-step.done  .ps-dot  { border-color: var(--green); background: #0b1a14; }

.ps-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-align: center; white-space: nowrap; }
.progress-step.active .ps-label { color: var(--accent3); font-weight: 600; }
.progress-step.done  .ps-label  { color: var(--green); }

.ps-dots::after {
  content: '';
  animation: psDots 1.4s steps(4, end) infinite;
}
@keyframes psDots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

.order-top-usd { font-size: 12px; color: var(--muted2); margin-top: 1px; }

.order-body {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
}

.order-main {
  background: rgba(12,12,24,0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.order-main-title {
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text);
}

.order-qr-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.order-qr img {
  width: 140px;
  height: 140px;
  border-radius: 10px;
  border: 1px solid var(--border2);
}

.order-qr-id {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
  font-family: monospace;
}

.order-fields { flex: 1; display: flex; flex-direction: column; gap: 16px; }

.order-field-label { font-size: 12px; color: var(--muted2); margin-bottom: 6px; }

.order-field-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.order-field-addr {
  font-size: 11px;
  font-family: monospace;
  color: var(--text);
  word-break: break-all;
  line-height: 1.65;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.order-field-addr span { flex: 1; letter-spacing: 0.02em; }

.order-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-side-box {
  background: rgba(12,12,24,0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.side-label { font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.side-value { font-size: 14px; font-weight: 700; color: var(--text); }
.side-status { font-size: 13px; font-weight: 700; color: var(--cyan2); }

.status-dots::after {
  content: '';
  display: inline-block;
  width: 1.8em;
  text-align: left;
  animation: statusDots 1.2s steps(4, end) infinite;
}
@keyframes statusDots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

.order-details-bar {
  background: rgba(12,12,24,0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
}

.details-title { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.detail-item-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.detail-item-value { font-size: 12px; color: var(--text); font-family: monospace; display: flex; align-items: center; gap: 4px; }
.detail-status { color: #60a5fa; font-weight: 700; font-family: inherit; font-size: 13px; }

/* ── SWAP COMPLETE BANNER ─────────────────────────────────────── */
.order-complete-banner {
  display: none;
  background: linear-gradient(135deg, rgba(16,185,129,0.13) 0%, rgba(6,182,212,0.08) 100%);
  border: 1px solid rgba(16,185,129,0.45);
  border-radius: 16px;
  padding: 18px 28px;
  margin-bottom: 6px;
  text-align: center;
  color: #10b981;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  box-shadow: 0 0 32px rgba(16,185,129,0.18), inset 0 1px 0 rgba(16,185,129,0.25);
  animation: bannerPop 0.55s cubic-bezier(0.175,0.885,0.32,1.275) forwards,
             bannerGlow 2.4s ease-in-out 0.6s infinite;
}

.order-complete-banner .complete-check {
  display: inline-block;
  margin-right: 10px;
  font-size: 20px;
  color: #34d399;
  animation: checkBounce 0.5s cubic-bezier(0.175,0.885,0.32,1.275) 0.3s both;
}

.order-complete-banner .complete-text {
  vertical-align: middle;
}

@keyframes bannerPop {
  0%   { opacity: 0; transform: scale(0.88) translateY(-14px); }
  65%  { opacity: 1; transform: scale(1.025) translateY(3px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes bannerGlow {
  0%, 100% { box-shadow: 0 0 24px rgba(16,185,129,0.15), inset 0 1px 0 rgba(16,185,129,0.2); }
  50%       { box-shadow: 0 0 48px rgba(16,185,129,0.32), inset 0 1px 0 rgba(16,185,129,0.35); }
}

@keyframes checkBounce {
  0%   { opacity: 0; transform: scale(0) rotate(-20deg); }
  70%  { transform: scale(1.3) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.new-swap-btn {
  display: block;
  margin-left: auto;
  padding: 12px 24px;
  background: #fff;
  border: none;
  border-radius: 12px;
  color: #0a0a0f;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.new-swap-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

@media (max-width: 1100px) {
  .swap-layout { flex-direction: column; align-items: center; }
  .how-section { width: 100%; max-width: 700px; }
  .card { max-width: 700px; }
}

@media (max-width: 640px) {
  .order-body { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: repeat(2,1fr); }
  .order-qr-row { flex-direction: column; }
  .order-top { flex-direction: column; gap: 16px; }
}

/* ── FOOTER ── */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid rgba(124,58,237,0.1);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-copy { color: var(--muted); }

.footer-links {
  display: flex;
  gap: 6px;
}

.footer-link {
  color: var(--muted2);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all .2s;
  font-size: 12px;
}

.footer-link:hover {
  color: var(--accent2);
  border-color: rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.06);
}

/* ── LANGUAGE SELECTOR ── */
.lang-wrap { position: relative; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 7px 13px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all .2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.nav-caret { font-size: 9px; color: var(--muted2); }

.flag-img {
  width: 20px;
  height: auto;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}

.lang-flag-img {
  width: 22px;
  height: auto;
  border-radius: 2px;
  flex-shrink: 0;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #12122a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  width: 260px;
  max-height: 380px;
  overflow-y: auto;
  z-index: 10001;
  box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 30px rgba(124,58,237,0.1);
  display: none;
}

.lang-dropdown.open { display: block; animation: dropIn .15s ease; }

.lang-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.lang-search-icon { font-size: 14px; color: var(--muted); flex-shrink: 0; }

.lang-search-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}

.lang-search-wrap input::placeholder { color: var(--muted); }

.lang-popular-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--muted);
  padding: 10px 14px 4px;
  text-transform: uppercase;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
}

.lang-item:hover    { background: rgba(124,58,237,0.12); }
.lang-item.active   { background: rgba(124,58,237,0.2); }

.lang-item-flag { font-size: 20px; flex-shrink: 0; line-height: 1; }

.lang-item-info { flex: 1; }

.lang-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-item-code   { font-size: 11px; color: var(--muted2); }
.lang-item-native { font-size: 11px; color: var(--muted); margin-top: 1px; }
.lang-check       { color: var(--cyan2); font-size: 14px; margin-left: auto; }

.lang-dropdown::-webkit-scrollbar       { width: 4px; }
.lang-dropdown::-webkit-scrollbar-track { background: transparent; }
.lang-dropdown::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ── HAMBURGER ── */
.hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: all .2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

.hamburger-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}

/* ── SIDE PANEL ── */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s;
}

.panel-overlay.open { opacity: 1; pointer-events: all; }

.side-panel {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100dvh;
  background: #0b0b1c;
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 10002;
  transition: right .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
}

.side-panel.open { right: 0; }

.side-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.side-lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 6px 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  transition: all .2s;
}

.side-lang-btn:hover { background: rgba(255,255,255,0.1); }

.side-caret { font-size: 9px; color: var(--muted2); }

.side-close {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--muted2);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  outline: none;
  font-family: inherit;
}

.side-close:hover { background: rgba(255,255,255,0.12); color: var(--text); }

.side-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s;
  cursor: pointer;
}

.side-item-btn {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  outline: none;
}

.side-item:hover { background: rgba(255,255,255,0.06); }

.side-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }

/* ── CURRENCY PANEL ── */
.currency-panel {
  display: none;
  padding: 6px 4px 4px 36px;
}

.currency-panel.open { display: block; }

.currency-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}

.currency-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 7px 4px;
  color: var(--muted2);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
  outline: none;
  line-height: 1.3;
}

.currency-btn:hover { background: rgba(124,58,237,0.12); color: var(--text); }

.currency-btn.active {
  background: rgba(124,58,237,0.2);
  border-color: rgba(124,58,237,0.4);
  color: var(--accent3);
}

/* ── LOADING SPINNER ── */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 520px) {
  nav { padding: 14px 16px; }
  .card, #order-card { padding: 20px 16px; border-radius: 16px; }
  .input-row input   { font-size: 18px; }
  .stats-bar         { gap: 20px; }
}
