/* =========================================
   BRIDGE PAGE — STRIPE LIGHT THEME
   ========================================= */

:root {
  --bg:               #ffffff;
  --bg-subtle:        #f7f7f8;
  --bg-section:       #f3f4f6;
  --border:           #e5e7eb;
  --border-strong:    #d1d5db;
  --primary:          #5046e5;
  --primary-hover:    #4338ca;
  --primary-bg:       #eef2ff;
  --primary-border:   #c7d2fe;
  --text:             #111827;
  --text-2:           #374151;
  --text-3:           #6b7280;
  --text-4:           #9ca3af;
  --success:          #16a34a;
  --success-bg:       #f0fdf4;
  --success-border:   #bbf7d0;
  --error:            #dc2626;
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:        0 12px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);
  --font:             'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:             'JetBrains Mono', 'Fira Code', monospace;
  --radius:           6px;
  --radius-lg:        10px;
  --radius-xl:        14px;
  --transition:       all 0.18s cubic-bezier(0.16,1,0.3,1);
  /* legacy aliases kept for JS refs */
  --stellar-black:    #111827;
  --stellar-yellow:   #5046e5;
  --stellar-yellow-hover: #4338ca;
  --bg-cream:         #f7f7f8;
  --bg-cream-alt:     #f3f4f6;
  --text-muted:       #6b7280;
  --text-light:       #9ca3af;
  --border-light:     #e5e7eb;
  --border-medium:    #d1d5db;
  --shadow-card:      0 4px 12px rgba(0,0,0,0.08);
  --shadow-lift:      0 12px 32px rgba(0,0,0,0.10);
  --shadow-yellow:    0 2px 8px rgba(80,70,229,0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 14px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); overflow-x: hidden; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* =========================================
   NAV
   ========================================= */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 60px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
nav.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.nav-logo { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.logo-orb { width: 24px; height: 24px; background: var(--primary); border-radius: var(--radius); flex-shrink: 0; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--text-3);
  padding: 6px 10px; border-radius: var(--radius); transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-subtle); }
.nav-links a.nav-active { color: var(--primary); background: var(--primary-bg); }

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

.btn-connect {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; transition: var(--transition);
}
.btn-connect:hover { background: var(--primary-hover); box-shadow: 0 2px 8px rgba(80,70,229,0.3); }

.wallet-connected {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; background: var(--bg-subtle);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.wallet-address { font-family: var(--mono); font-size: 12px; color: var(--text); font-weight: 500; }
.wallet-disconnect {
  padding: 4px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 11px; font-weight: 500; color: var(--text-3);
  transition: var(--transition);
}
.wallet-disconnect:hover { border-color: var(--error); color: var(--error); }

.mobile-toggle { display: none; background: transparent; border: none; color: var(--text); font-size: 20px; }

.mobile-menu {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: var(--bg); z-index: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  transform: translateY(-100%); transition: transform 0.35s ease;
}
.mobile-menu.active { transform: translateY(0); }
.mobile-menu a { color: var(--text); font-size: 18px; font-weight: 600; }

/* =========================================
   HERO
   ========================================= */
.hero-section {
  position: relative; margin-top: 60px;
  background: var(--bg-subtle); overflow: hidden;
  padding: 56px 0 44px; border-bottom: 1px solid var(--border);
}
.hero-noise {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(80,70,229,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.hero-section::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 0%, transparent 100%);
  pointer-events: none;
}

.hero-inner { max-width: 1200px; margin: 0 auto; padding: 0 40px; position: relative; z-index: 2; text-align: center; }

.breadcrumb { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 20px; }
.breadcrumb a, .breadcrumb span { font-size: 12px; font-weight: 500; color: var(--text-4); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb svg { color: var(--text-4); flex-shrink: 0; }

.hero-title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 700;
  color: var(--text); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 10px;
}
.hero-desc { font-size: 15px; color: var(--text-3); max-width: 560px; margin: 0 auto; line-height: 1.6; }

/* =========================================
   PAGE BODY
   ========================================= */
.page-body { max-width: 1200px; margin: 0 auto; padding: 48px 40px 80px; }

/* =========================================
   BRIDGE CONTAINER
   ========================================= */
.bridge-container { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 64px; }

/* =========================================
   BRIDGE WIDGET
   ========================================= */
.bridge-widget {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 28px;
  box-shadow: var(--shadow-md); max-width: 520px; margin: 0 auto; width: 100%;
}

.bridge-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.bridge-header h2 { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.bridge-fee-badge {
  font-size: 12px; font-weight: 500; color: var(--text-3);
  background: var(--bg-subtle); padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--border);
}

/* =========================================
   BRIDGE SECTIONS
   ========================================= */
.bridge-section {
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 10px;
}

.section-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-4); letter-spacing: 0.07em; }
.balance-label { font-size: 12px; font-weight: 500; color: var(--text-4); font-family: var(--mono); }

.input-container { position: relative; margin-bottom: 14px; }
.amount-input {
  width: 100%; font-size: 28px; font-weight: 700; color: var(--text);
  background: transparent; border: none; outline: none; padding: 6px 80px 6px 0;
  font-family: var(--font);
}
.amount-input::placeholder { color: var(--text-4); opacity: 0.6; }
.amount-input:read-only { color: var(--text-3); }

.max-btn {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  padding: 6px 12px; background: var(--primary-bg); border: 1px solid var(--primary-border);
  border-radius: var(--radius); font-size: 11px; font-weight: 600; color: var(--primary);
  transition: var(--transition);
}
.max-btn:hover { background: var(--primary); color: #fff; transform: translateY(-50%); }

/* =========================================
   NETWORK SELECTOR
   ========================================= */
.network-selector { cursor: pointer; }
.network-display {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: var(--transition);
}
.network-display:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.network-icon { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); flex-shrink: 0; }
.network-info { flex: 1; }
.network-name { font-size: 14px; font-weight: 600; color: var(--text); }
.network-info .token-name { font-size: 12px; font-weight: 500; color: var(--text-3); font-family: var(--mono); }

/* =========================================
   SWAP BUTTON
   ========================================= */
.swap-button-container { display: flex; justify-content: center; margin: -20px 0; position: relative; z-index: 2; }
.swap-btn {
  width: 40px; height: 40px; background: var(--bg); color: var(--primary);
  border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); box-shadow: var(--shadow-sm);
}
.swap-btn:hover { border-color: var(--primary); background: var(--primary-bg); transform: rotate(180deg); }

/* =========================================
   TRANSACTION DETAILS
   ========================================= */
.transaction-details {
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px; margin-bottom: 20px;
}
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 13px; }
.detail-row span:first-child { color: var(--text-3); font-weight: 500; }
.detail-row span:last-child { color: var(--text); font-weight: 600; font-family: var(--mono); }
.detail-row .highlight { color: var(--success); font-size: 15px; }

/* =========================================
   BRIDGE BUTTON
   ========================================= */
.btn-bridge {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; background: var(--primary); border: none; border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 600; color: #fff; transition: var(--transition);
}
.btn-bridge:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(80,70,229,0.3); }
.btn-bridge:disabled { opacity: 0.5; cursor: not-allowed; }

/* =========================================
   INFO CARDS
   ========================================= */
.info-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.info-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; transition: var(--transition);
}
.info-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.info-icon { font-size: 28px; margin-bottom: 14px; }
.info-card h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.info-card p { font-size: 13px; color: var(--text-3); line-height: 1.6; }

/* =========================================
   SUPPORTED NETWORKS
   ========================================= */
.supported-networks { margin-top: 56px; }
.section-title { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; text-align: center; margin-bottom: 28px; }
.networks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.network-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: var(--transition);
}
.network-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.network-card.highlight { border-color: var(--primary-border); background: var(--primary-bg); }
.network-card img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); }
.network-card-name { font-size: 13px; font-weight: 600; color: var(--text); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .hero-inner { padding: 0 20px; }
  .page-body { padding: 32px 20px 60px; }
  .bridge-widget { padding: 20px; }
  .amount-input { font-size: 22px; }
  .info-cards-grid { grid-template-columns: 1fr; }
  .networks-grid { grid-template-columns: repeat(2, 1fr); }
}
