
:root {
  --bg-base: #0a0b0f;
  --bg-elevated: #12141c;
  --bg-glass: rgba(18, 20, 28, 0.65);
  --bg-glass-hover: rgba(24, 27, 38, 0.8);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #f0f2f5;
  --text-secondary: #8b92a5;
  --text-muted: #5a6178;
  --accent-green: #00e8a8;
  --accent-green-dim: rgba(0, 232, 168, 0.15);
  --accent-green-glow: rgba(0, 232, 168, 0.4);
  --accent-blue: #3b82f6;
  --accent-blue-dim: rgba(59, 130, 246, 0.15);
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  --gradient-primary: linear-gradient(135deg, #00e8a8 0%, #3b82f6 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(0, 232, 168, 0.08), transparent 50%);
  --gradient-card: linear-gradient(145deg, rgba(18, 20, 28, 0.9), rgba(12, 14, 20, 0.95));
  --shadow-glow: 0 0 40px rgba(0, 232, 168, 0.12);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 25px 80px rgba(0, 0, 0, 0.6);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated background gradient */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 232, 168, 0.06), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(59, 130, 246, 0.05), transparent),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(139, 92, 246, 0.04), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── Navbar ─────────────────────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 11, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text-primary);
}

.navbar-logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #0a0b0f;
  box-shadow: 0 0 20px var(--accent-green-glow);
  transition: var(--transition-spring);
}

.navbar-logo:hover .navbar-logo-icon {
  transform: rotate(-8deg) scale(1.05);
}

.navbar-logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.navbar-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.navbar-user {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background: var(--accent-green-dim);
  border: 1px solid rgba(0, 232, 168, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-green);
  margin-right: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #0a0b0f;
  box-shadow: 0 4px 20px rgba(0, 232, 168, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 232, 168, 0.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
}

.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Glass Card ─────────────────────────────────────────────────── */

.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
}

/* ── Hero Section ───────────────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem 1rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--accent-green-dim);
  border: 1px solid rgba(0, 232, 168, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-green);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease;
}

.hero-badge-dot {
  width: 8px; height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  animation: fadeInUp 0.7s ease;
}

.hero h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease;
}

/* ── Smart Swap Wizard ──────────────────────────────────────────── */

.swap-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 1rem 1.5rem 3rem;
}

.swap-card {
  width: 100%;
  max-width: 500px;
  padding: 0;
  animation: fadeInUp 0.9s ease;
  overflow: hidden;
  position: relative;
}

/* ── Stepper Header ─────────────────────────────────────────────── */

.stepper-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.5rem 1.5rem 1rem;
  position: relative;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.stepper-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--bg-elevated);
  border: 2px solid var(--border-glass);
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.stepper-dot.active {
  background: var(--gradient-primary);
  border-color: var(--accent-green);
  color: #0a0b0f;
  box-shadow: 0 0 20px var(--accent-green-glow);
  transform: scale(1.1);
}

.stepper-dot.done {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #0a0b0f;
}

.stepper-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.stepper-step.active .stepper-label { color: var(--accent-green); }
.stepper-step.done .stepper-label { color: var(--text-secondary); }

.stepper-line {
  width: 40px;
  height: 2px;
  background: var(--border-glass);
  margin: 0 0.4rem;
  border-radius: 2px;
  transition: background 0.4s ease;
  flex-shrink: 0;
}

.stepper-line.done {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green-glow);
}

/* ── Step Container ─────────────────────────────────────────────── */

.step-container {
  position: relative;
  padding: 0.5rem 1.75rem 1.75rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.step-track {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.step-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: stepIn 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-panel.active {
  display: flex;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes stepInReverse {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-panel.reverse.active {
  animation: stepInReverse 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Step 1: Currency Pair ──────────────────────────────────────── */

.step-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  text-align: center;
}

.currency-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}

.currency-box {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.currency-box:hover {
  border-color: var(--border-glass-hover);
  background: rgba(255, 255, 255, 0.04);
}

.currency-box:focus-within {
  border-color: var(--accent-green);
  background: rgba(0, 232, 168, 0.03);
  box-shadow: 0 0 0 3px rgba(0, 232, 168, 0.08), 0 0 25px rgba(0, 232, 168, 0.1);
}

.currency-box-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.currency-box-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.currency-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.currency-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  min-width: 100px;
}

.currency-select:hover {
  border-color: var(--accent-green);
  box-shadow: 0 0 15px rgba(0, 232, 168, 0.1);
}

.currency-select:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0, 232, 168, 0.1);
}

.currency-select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 0.5rem;
}

/* Swap flip button — between the two currency boxes */
.swap-flip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: -24px 0;
  position: relative;
  z-index: 3;
  background: var(--bg-elevated);
  border: 2px solid var(--border-glass);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--accent-green);
  flex-shrink: 0;
}

.swap-flip-btn:hover {
  border-color: var(--accent-green);
  box-shadow: 0 0 25px var(--accent-green-glow);
  transform: scale(1.15);
  color: var(--accent-green);
}

.swap-flip-btn.flipping {
  animation: flipSpin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.swap-flip-btn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

/* ── Step 1: Corridor List ──────────────────────────────────────── */

.corridor-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 0.5rem;
}

.corridor-list::-webkit-scrollbar { width: 6px; }
.corridor-list::-webkit-scrollbar-track { background: transparent; }
.corridor-list::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 3px; }

.corridor-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: corridorIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
  position: relative;
  overflow: hidden;
}

@keyframes corridorIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.corridor-item:hover {
  border-color: var(--border-glass-hover);
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(2px);
}

.corridor-item.selected {
  border-color: var(--accent-green);
  background: rgba(0, 232, 168, 0.06);
  box-shadow: 0 0 0 2px rgba(0, 232, 168, 0.15), 0 0 25px rgba(0, 232, 168, 0.1);
}

.corridor-item.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
}

.corridor-item.unavailable:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.02);
}

.corridor-rail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.corridor-currency {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.corridor-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.corridor-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.corridor-rate {
  font-size: 0.85rem;
  color: var(--accent-green);
  font-weight: 600;
}

.corridor-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.corridor-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.corridor-badge.active {
  background: rgba(0, 232, 168, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0, 232, 168, 0.2);
}

.corridor-badge.out {
  background: rgba(255, 100, 100, 0.1);
  color: #ff6464;
  border: 1px solid rgba(255, 100, 100, 0.2);
}

.corridor-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner-lg {
  width: 24px;
  height: 24px;
  border-width: 3px;
}

.corridor-empty {
  text-align: center;
  padding: 2rem 1rem;
}

.corridor-empty-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.corridor-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.corridor-empty-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Step 2: Amount + Live Calc ─────────────────────────────────── */

.amount-input-wrapper {
  position: relative;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.amount-input-wrapper:focus-within {
  border-color: var(--accent-green);
  background: rgba(0, 232, 168, 0.03);
  box-shadow: 0 0 0 3px rgba(0, 232, 168, 0.08), 0 0 30px rgba(0, 232, 168, 0.12);
}

.amount-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.amount-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 2.5rem;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: -0.03em;
  min-width: 0;
}

.amount-input::placeholder { color: var(--text-muted); font-weight: 400; }

/* Hide number input arrows */
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-input[type=number] { -moz-appearance: textfield; }

/* Live calculation display */
.calc-display {
  margin-top: 1rem;
  padding: 1.25rem;
  background: rgba(0, 232, 168, 0.04);
  border: 1px solid rgba(0, 232, 168, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.calc-display.visible {
  opacity: 1;
  max-height: 300px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.calc-row .calc-label { color: var(--text-secondary); }
.calc-row .calc-value { color: var(--text-primary); font-weight: 600; }
.calc-row .calc-value.green { color: var(--accent-green); font-size: 1.1rem; font-weight: 800; }
.calc-row .calc-value.muted { color: var(--text-muted); }

.calc-divider {
  height: 1px;
  background: rgba(0, 232, 168, 0.1);
  margin: 0.2rem 0;
}

.calc-you-get {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding-top: 0.5rem;
}

.calc-you-get-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calc-you-get-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: -0.02em;
}

/* ── Step 3: Payout Method ──────────────────────────────────────── */

.payout-selector {
  position: relative;
}

.payout-dropdown {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
}

.payout-dropdown:hover {
  border-color: var(--border-glass-hover);
  background: rgba(255, 255, 255, 0.04);
}

.payout-dropdown.open {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0, 232, 168, 0.08), 0 0 25px rgba(0, 232, 168, 0.1);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.payout-dropdown-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.payout-dropdown-icon { font-size: 1.3rem; }

.payout-dropdown-arrow {
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.payout-dropdown.open .payout-dropdown-arrow {
  transform: rotate(180deg);
  color: var(--accent-green);
}

.payout-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-green);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  z-index: 10;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.payout-dropdown-menu.open {
  max-height: 400px;
  opacity: 1;
}

.payout-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--border-glass);
}

.payout-option:last-child { border-bottom: none; }

.payout-option:hover {
  background: rgba(0, 232, 168, 0.06);
}

.payout-option-icon { font-size: 1.2rem; flex-shrink: 0; }

.payout-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.payout-option-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.payout-option-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Dynamic payout fields — smooth expand */
.payout-fields-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}

.payout-fields-container.visible {
  max-height: 400px;
  opacity: 1;
  margin-top: 1rem;
}

.payout-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  animation: fieldSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.payout-field:nth-child(1) { animation-delay: 0.05s; }
.payout-field:nth-child(2) { animation-delay: 0.12s; }
.payout-field:nth-child(3) { animation-delay: 0.19s; }

@keyframes fieldSlideIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.payout-field label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.payout-field input {
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.payout-field input:focus {
  border-color: var(--accent-green);
  background: rgba(0, 232, 168, 0.03);
  box-shadow: 0 0 0 3px rgba(0, 232, 168, 0.1), 0 0 20px rgba(0, 232, 168, 0.08);
}

.payout-field input::placeholder { color: var(--text-muted); }

/* ── Form Field (shared) ────────────────────────────────────────── */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-input {
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
  border-color: var(--accent-green);
  background: rgba(0, 232, 168, 0.03);
  box-shadow: 0 0 0 3px rgba(0, 232, 168, 0.1), 0 0 20px rgba(0, 232, 168, 0.08);
}

.form-input::placeholder { color: var(--text-muted); }

/* ── Step Navigation ────────────────────────────────────────────── */

.step-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-glass);
}

.btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  background: transparent;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  flex-shrink: 0;
}

.btn-back:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
  border-color: var(--border-glass-hover);
}

.btn-next {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #0a0b0f;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(0, 232, 168, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 35px rgba(0, 232, 168, 0.4);
}

.btn-next:active:not(:disabled) {
  transform: translateY(0);
}

.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-next .btn-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease;
}

.btn-next.loading .btn-content {
  opacity: 0;
}

.btn-next .btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-next.loading .btn-spinner {
  opacity: 1;
}

/* ── Swap Summary (kept for compatibility) ──────────────────────── */

.swap-summary {
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.swap-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.swap-summary-row .label { color: var(--text-secondary); }
.swap-summary-row .value { color: var(--text-primary); font-weight: 600; }
.swap-summary-row .value.green { color: var(--accent-green); }

.swap-summary-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 0.25rem 0;
}

/* ── Features Grid ──────────────────────────────────────────────── */

.features {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.feature-card {
  padding: 1.75rem;
  animation: fadeInUp 1s ease backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

.feature-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-icon.green { background: var(--accent-green-dim); }
.feature-icon.blue { background: var(--accent-blue-dim); }
.feature-icon.purple { background: rgba(139, 92, 246, 0.15); }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Modal ──────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  transform: scale(0.9) translateY(20px);
  transition: var(--transition-spring);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.modal-body { display: flex; flex-direction: column; gap: 1rem; }

.modal-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* OTP Input */
.otp-input-group {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.otp-input {
  width: 48px; height: 56px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  transition: var(--transition-fast);
}

.otp-input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0, 232, 168, 0.1);
  transform: scale(1.05);
}

/* Phone input */
.phone-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  overflow: hidden;
}

.phone-input-wrapper:focus-within {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0, 232, 168, 0.1);
}

.phone-prefix {
  padding: 0 0.8rem;
  color: var(--text-secondary);
  font-size: 1rem;
  border-right: 1px solid var(--border-glass);
  height: 100%;
  display: flex;
  align-items: center;
}

.phone-input {
  flex: 1;
  padding: 0.8rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
}

/* ── Toast ──────────────────────────────────────────────────────── */

.toast-container {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  padding: 0.9rem 1.2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 360px;
}

.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent-blue); }

.toast.removing { animation: toastOut 0.3s ease forwards; }

/* ── LP Dashboard ───────────────────────────────────────────────── */

.lp-layout {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.lp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.lp-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

.lp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

.lp-status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.lp-status-badge.active {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border: 1px solid rgba(0, 232, 168, 0.3);
}

.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.lp-card {
  padding: 1.5rem;
}

.lp-card-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.lp-balance {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lp-balance .currency {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 0.3rem;
}

.lp-balance-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.lp-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0;
}

.lp-tab {
  padding: 0.7rem 1.2rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
  font-family: inherit;
}

.lp-tab:hover { color: var(--text-primary); }

.lp-tab.active {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}

.lp-tab-content { display: none; }
.lp-tab-content.active { display: block; animation: fadeInUp 0.3s ease; }

.lp-table {
  width: 100%;
  border-collapse: collapse;
}

.lp-table th, .lp-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.85rem;
}

.lp-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.lp-table td { color: var(--text-primary); }

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pill.pending { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.status-pill.approved { background: var(--accent-green-dim); color: var(--accent-green); }
.status-pill.rejected { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.status-pill.escrow_frozen { background: var(--accent-blue-dim); color: var(--accent-blue); }
.status-pill.completed { background: var(--accent-green-dim); color: var(--accent-green); }
.status-pill.disputed { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

/* ── Order Track Page ───────────────────────────────────────────── */

.track-container {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.track-card { padding: 2rem; text-align: center; }

.track-status-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
}

.track-status-icon.escrow_frozen { background: var(--accent-blue-dim); }
.track-status-icon.awaiting_confirmation { background: rgba(245, 158, 11, 0.15); }
.track-status-icon.completed { background: var(--accent-green-dim); }
.track-status-icon.disputed { background: rgba(239, 68, 68, 0.15); }
.track-status-icon.cancelled { background: rgba(90, 97, 120, 0.2); }

.track-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0;
  text-align: left;
}

.track-timeline-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  position: relative;
}

.track-timeline-item::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: var(--border-glass);
}

.track-timeline-item:last-child::before { display: none; }

.track-timeline-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-glass);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  z-index: 1;
}

.track-timeline-item.done .track-timeline-dot {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #0a0b0f;
}

.track-timeline-content { flex: 1; padding-top: 0.1rem; }
.track-timeline-title { font-size: 0.9rem; font-weight: 600; }
.track-timeline-time { font-size: 0.8rem; color: var(--text-muted); }

/* ── Footer ─────────────────────────────────────────────────────── */

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
}

.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--accent-green); }

/* ── Animations ─────────────────────────────────────────────────── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes flipSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(90deg) scale(1.15); }
  100% { transform: rotate(180deg) scale(1); }
}

@keyframes expandDown {
  from { max-height: 0; opacity: 0; transform: translateY(-8px); }
  to { max-height: 500px; opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(100px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .navbar { padding: 0.8rem 1rem; }
  .navbar-links { gap: 0.25rem; }
  .navbar-link { padding: 0.4rem 0.7rem; font-size: 0.85rem; }
  .hero { padding: 2rem 1rem 0.5rem; }
  .swap-card { padding: 1.25rem; }
  .swap-amount { font-size: 1.4rem; }
  .features { padding: 0 1rem; }
  .otp-input { width: 40px; height: 48px; font-size: 1.2rem; }
  .toast-container { right: 0.5rem; left: 0.5rem; }
  .toast { max-width: none; }
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
