/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0A0E1A;
  --bg-card:   #111827;
  --bg-input:  #0D1424;
  --border:    #1E2A40;
  --accent:    #F7B731;
  --accent-h:  #FFCA57;
  --text:      #E8EAED;
  --muted:     #6B7280;
  --green:     #22C55E;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 24px 64px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.logo svg { flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 16px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0A0E1A;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent-h);
  transform: translateY(-1px);
}

.nav-btn { padding: 8px 18px; font-size: 0.85rem; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  background: rgba(10, 14, 26, 0.97);
  border-top: 1px solid var(--border);
}

.mobile-menu.open { display: flex; }

.mob-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 1rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mob-link:hover { color: var(--text); }
.mob-btn { margin-top: 12px; text-align: center; justify-content: center; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}

.blob-1 {
  width: 600px; height: 600px;
  background: #F7B731;
  top: -100px; right: -100px;
  animation: float 8s ease-in-out infinite;
}

.blob-2 {
  width: 400px; height: 400px;
  background: #3B82F6;
  bottom: -50px; left: -50px;
  animation: float 10s ease-in-out infinite reverse;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.hero-inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-text {
  max-width: 680px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(247, 183, 49, 0.12);
  border: 1px solid rgba(247, 183, 49, 0.3);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  margin: 0 auto 20px;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.accent { color: var(--accent); }

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ===== CALCULATOR ===== */
.calculator {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.calc-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.rate-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 4px 10px;
  border-radius: 50px;
}

.rate-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.calc-body { display: flex; flex-direction: column; gap: 4px; }

.calc-field { display: flex; flex-direction: column; gap: 8px; }

.calc-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input-row {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.input-row:focus-within { border-color: var(--accent); }

.input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  font-family: inherit;
  padding: 14px 16px;
  min-width: 0;
}

.input-row input::placeholder { color: var(--muted); font-weight: 400; }
.input-row input[readonly] { cursor: default; color: var(--accent); }

.currency-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-left: 1px solid var(--border);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.2s;
  user-select: none;
}

.currency-btn:hover { background: rgba(255,255,255,0.04); }

.coin-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #1E2A40;
}

.chevron { color: var(--muted); transition: transform 0.2s; }
.currency-select.open .chevron { transform: rotate(180deg); }

.currency-select { position: relative; }

.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #161E30;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
}

.currency-select.open .dropdown { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s;
}

.dropdown-item:hover { background: rgba(255,255,255,0.06); }
.dropdown-item.active { color: var(--accent); }

.dropdown-item img {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #1E2A40;
}

.dropdown-item .coin-name { color: var(--muted); font-size: 0.78rem; font-weight: 400; }

.swap-btn {
  align-self: center;
  background: rgba(247, 183, 49, 0.1);
  border: 1px solid rgba(247, 183, 49, 0.3);
  color: var(--accent);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.3s;
  margin: 4px auto;
}

.swap-btn:hover { background: rgba(247, 183, 49, 0.2); transform: rotate(180deg); }

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0 4px;
}

.rate-line {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(247, 183, 49, 0.06);
  border: 1px solid rgba(247, 183, 49, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  margin: 16px 0;
}

.btn-exchange {
  width: 100%;
  justify-content: center;
  padding: 15px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.calc-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--muted);
  font-size: 1rem;
}

/* ===== BENEFITS ===== */
.benefits { background: #0C1020; }

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.3s;
}

.benefit-card:hover {
  border-color: rgba(247, 183, 49, 0.3);
  transform: translateY(-4px);
}

.benefit-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.benefit-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.benefit-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.3s;
}

.step:hover {
  border-color: rgba(247, 183, 49, 0.3);
  transform: translateY(-4px);
}

.step-num {
  width: 40px; height: 40px;
  background: var(--accent);
  color: #0A0E1A;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-content p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.step-arrow {
  color: var(--accent);
  font-size: 1.5rem;
  margin-top: 32px;
  flex-shrink: 0;
  opacity: 0.5;
}

/* ===== PAIRS ===== */
.pairs { background: #0C1020; }

.pairs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pair-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.3s, transform 0.3s;
  cursor: pointer;
  text-decoration: none;
}

.pair-card:hover {
  border-color: rgba(247, 183, 49, 0.4);
  transform: translateY(-2px);
}

.pair-coins {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pair-icons {
  display: flex;
}

.pair-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  border: 2px solid var(--bg-card);
}

.pair-icon:last-child { margin-left: -10px; }

.pair-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.pair-rate {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.pair-btn {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(247, 183, 49, 0.1);
  border: 1px solid rgba(247, 183, 49, 0.25);
  padding: 6px 14px;
  border-radius: 50px;
}

/* ===== CTA ===== */
.cta-section { padding: 80px 0; }

.cta-box {
  background: linear-gradient(135deg, rgba(247,183,49,0.08), rgba(59,130,246,0.06));
  border: 1px solid rgba(247, 183, 49, 0.2);
  border-radius: 24px;
  padding: 64px;
  text-align: center;
}

.cta-box h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 32px;
}

.btn-large { padding: 16px 40px; font-size: 1.05rem; border-radius: 12px; }

/* ===== FOOTER ===== */
.footer {
  background: #080C16;
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .logo { margin-bottom: 14px; }

.footer-brand p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.social-links { display: flex; gap: 10px; }

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.social-btn:hover { border-color: var(--accent); color: var(--accent); }

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-links h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }
.footer-note { color: var(--green); font-size: 0.82rem; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .pairs-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { flex-wrap: wrap; }
  .step-arrow { display: none; }
  .step { min-width: calc(50% - 12px); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-text { max-width: 100%; }
  .badge { margin: 0 auto 20px; }
  .nav-links { display: none; }
  .burger { display: flex; }
  .benefits-grid { grid-template-columns: 1fr; }
  .pairs-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .step { min-width: 100%; }
  .cta-box { padding: 40px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom .container { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 90px 0 60px; }
  .section { padding: 70px 0; }
  .hero-stats { gap: 16px; }
  .calc-footer { flex-direction: column; gap: 4px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ===== EXCHANGE WIDGET ===== */
.exchange-section { background: #0C1020; }

.exchange-widget {
  display: grid;
  grid-template-columns: 1fr 360px;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.exch-panels-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  border-right: 1px solid var(--border);
}

.exch-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  min-height: 480px;
}

.exch-panel:first-child {
  border-right: 1px solid var(--border);
}

.exch-top {
  padding: 22px 20px 14px;
}

.exch-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 10px;
}

.exch-input-row {
  display: flex;
  align-items: stretch;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.exch-input-row:focus-within { border-color: var(--accent); }

.exch-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
  font-family: inherit;
  padding: 12px 14px;
  min-width: 0;
}

.exch-input-row input::placeholder { color: var(--muted); font-weight: 400; font-size: 1rem; }
.exch-input-row input[readonly] { cursor: default; color: var(--accent); }

.exch-cur-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-left: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  background: rgba(255,255,255,0.02);
}

.coin-icon-circle {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.exch-hint {
  font-size: 0.72rem;
  color: var(--muted);
}

/* Tabs */
.exch-tabs {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.exch-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 6px;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  font-family: inherit;
  letter-spacing: 0.03em;
}

.exch-tab:last-child { border-right: none; }
.exch-tab.active { color: var(--accent); background: rgba(247,183,49,0.05); }
.exch-tab:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.03); }

.exch-tab span {
  font-size: 0.68rem;
  background: rgba(255,255,255,0.07);
  color: var(--muted);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 500;
  min-width: 16px;
  text-align: center;
}

.exch-tab.active span {
  background: rgba(247,183,49,0.15);
  color: var(--accent);
}

/* Search */
.exch-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}

.exch-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.83rem;
  font-family: inherit;
}

.exch-search input::placeholder { color: var(--muted); }

/* Currency list */
.exch-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.exch-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.exch-list-item:hover { background: rgba(255,255,255,0.04); }

.exch-list-item.active {
  background: rgba(247,183,49,0.07);
}

.exch-list-item.active .exch-item-code { color: var(--accent); }

.exch-list-item.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.exch-item-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.exch-item-code {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.exch-item-name {
  font-size: 0.7rem;
  color: var(--muted);
}

.exch-list-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.83rem;
}

/* Swap button — absolute between panels */
.exch-swap {
  position: absolute;
  left: 50%;
  top: 70px;
  transform: translateX(-50%);
  z-index: 10;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.35s;
}

.exch-swap:hover {
  background: rgba(247,183,49,0.1);
  border-color: rgba(247,183,49,0.5);
  transform: translateX(-50%) rotate(180deg);
}

/* Order Form */
.exch-order {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px;
  background: var(--bg-card);
}

.order-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.order-rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247,183,49,0.06);
  border: 1px solid rgba(247,183,49,0.15);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  gap: 8px;
}

#orderRateText {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
}

.rate-countdown {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
  background: var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.order-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.order-sum-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.sum-amount {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sum-code {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.order-arrow { flex-shrink: 0; }

.order-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s;
}

.order-input::placeholder { color: var(--muted); }
.order-input:focus { border-color: var(--accent); }

.btn-exchange {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  margin-top: 2px;
}

.order-footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--muted);
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Exchange responsive */
@media (max-width: 1100px) {
  .exchange-widget {
    grid-template-columns: 1fr 320px;
  }
}

@media (max-width: 900px) {
  .exchange-widget {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .exch-panels-wrap {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .exch-order {
    border-radius: 0 0 20px 20px;
  }
}

@media (max-width: 640px) {
  .exch-panels-wrap {
    grid-template-columns: 1fr;
  }

  .exch-panel:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .exch-swap {
    display: none;
  }
}
