/* ========================================================
   OloSwap Decentralized Exchange — Stylesheet
   ======================================================== */

:root {
  --primary: #f0b90b;
  --primary-glow: rgba(240, 185, 11, 0.35);
  --primary-hover: #d8a609;
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.3);
  --purple: #8a2be2;
  --purple-glow: rgba(138, 43, 226, 0.3);
  --bg-dark: #07090e;
  --bg-card: rgba(18, 23, 33, 0.82);
  --bg-input: rgba(10, 14, 22, 0.9);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(240, 185, 11, 0.5);
  --text: #f0f3f6;
  --text-muted: #8b949e;
  --accent-green: #0ecb81;
  --accent-red: #f6465d;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Ambient glow backgrounds */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}
.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--cyan-glow) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
}
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ========================================================
   HEADER & NAVIGATION
   ======================================================== */
.dex-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 9, 14, 0.85);
  border-bottom: 1px solid var(--border);
  height: 72px;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.logo-symbol {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(240, 185, 11, 0.2), rgba(0, 240, 255, 0.2));
  border: 1px solid var(--border-focus);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 15px var(--primary-glow);
}

.brand-title {
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  letter-spacing: 0.5px;
  margin-left: 6px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn, .nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover, .nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: var(--primary);
  background: rgba(240, 185, 11, 0.1);
  border: 1px solid rgba(240, 185, 11, 0.25);
}

.ext-arrow {
  font-size: 0.8rem;
  opacity: 0.7;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(14, 203, 129, 0.1);
  border: 1px solid rgba(14, 203, 129, 0.25);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-green);
}

.network-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(14, 203, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(14, 203, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(14, 203, 129, 0); }
}

.btn-add-chain {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}

.btn-add-chain:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-connect {
  background: linear-gradient(135deg, var(--primary) 0%, #e5a400 100%);
  color: #07090e;
  border: none;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--primary-glow);
  min-height: 42px;
}

.btn-connect:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(240, 185, 11, 0.5);
}

.btn-connect.connected {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========================================================
   MOBILE DRAWER
   ======================================================== */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: rgba(14, 18, 26, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid var(--border);
  z-index: 200;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
}

.mobile-drawer.open {
  right: 0;
}

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

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.drawer-btn, .drawer-link {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.drawer-btn.active {
  background: rgba(240, 185, 11, 0.15);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* ========================================================
   MAIN CONTENT & TABS
   ======================================================== */
.dex-main {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.tab-content {
  animation: fadeIn 0.25s ease-out;
}

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

/* Glass Card */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ========================================================
   SWAP INTERFACE
   ======================================================== */
.swap-card-container {
  max-width: 480px;
  margin: 0 auto;
}

.swap-card {
  padding: 24px;
  position: relative;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.card-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Slippage Panel */
.slippage-panel {
  background: rgba(10, 14, 22, 0.95);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease-out;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.panel-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.slippage-options {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.slip-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  min-height: 40px;
}

.slip-btn.active, .slip-btn:hover {
  background: rgba(240, 185, 11, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

.custom-slip-wrap {
  flex: 1.2;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
}

.custom-slip-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
}

.deadline-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.deadline-wrap input {
  width: 60px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--text);
  text-align: center;
  outline: none;
}

/* Token Input Box */
.token-input-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}

.token-input-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 15px rgba(240, 185, 11, 0.15);
}

.box-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.box-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.balance-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bal-value {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-mono);
}

.btn-percent {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--cyan);
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  min-height: 22px;
}

.btn-percent:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyan);
}

.btn-max {
  color: var(--primary);
}
.btn-max:hover {
  background: rgba(240, 185, 11, 0.15);
  border-color: var(--primary);
}

.box-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-amount-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 1.75rem;
  font-weight: 700;
  outline: none;
  min-width: 0;
}

/* Ensure no iOS auto-zoom on inputs */
@media screen and (max-width: 768px) {
  .token-amount-input {
    font-size: 1.5rem;
  }
}

.token-select-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
  min-height: 44px;
}

.token-select-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.token-logo {
  font-size: 1.25rem;
}

.chevron-down {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: 2px;
}

.box-bottom {
  margin-top: 6px;
}

.usd-estimate {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Swap Direction Flip Button */
.swap-divider {
  display: flex;
  justify-content: center;
  margin: -10px 0;
  position: relative;
  z-index: 2;
}

.btn-flip-swap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.btn-flip-swap:hover {
  background: rgba(240, 185, 11, 0.2);
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(180deg);
}

/* Swap Details Accordion */
.swap-details-card {
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-label {
  color: var(--text-muted);
}

.detail-value {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-mono);
}

.route-badge {
  background: rgba(0, 240, 255, 0.12);
  color: var(--cyan);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Primary Action Button */
.btn-action-primary {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, #e5a400 100%);
  color: #07090e;
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px var(--primary-glow);
  min-height: 54px;
}

.btn-action-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(240, 185, 11, 0.5);
}

.btn-action-primary:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.action-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: #07090e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Quick Stats Row */
.quick-stats-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: space-between;
}

.quick-stat-pill {
  flex: 1;
  background: rgba(18, 23, 33, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qs-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.qs-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
}

/* ========================================================
   POOLS & LIQUIDITY
   ======================================================== */
.pools-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pools-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.btn-action-accent {
  background: linear-gradient(135deg, var(--cyan) 0%, #00b4d8 100%);
  color: #07090e;
  border: none;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px var(--cyan-glow);
  min-height: 44px;
}

.btn-action-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.my-pools-card, .all-pools-card {
  padding: 24px;
}

.badge-accent {
  background: rgba(0, 240, 255, 0.12);
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-icon {
  font-size: 2.5rem;
  opacity: 0.6;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-main);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  min-height: 40px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

.table-responsive {
  overflow-x: auto;
  margin-top: 12px;
}

.pools-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.pools-table th {
  padding: 12px 16px;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pools-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  vertical-align: middle;
}

.pool-pair-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pair-logos {
  display: flex;
  font-size: 1.25rem;
}
.pair-logos span:last-child {
  margin-left: -8px;
}

.pair-names {
  display: flex;
  flex-direction: column;
}

.pair-title {
  font-weight: 700;
  color: var(--text);
}

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

.tbl-actions {
  display: flex;
  gap: 8px;
}

.btn-tbl-add {
  background: rgba(240, 185, 11, 0.15);
  border: 1px solid rgba(240, 185, 11, 0.3);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  min-height: 36px;
}
.btn-tbl-add:hover {
  background: var(--primary);
  color: #07090e;
}

/* ========================================================
   FAUCET INTERFACE
   ======================================================== */
.faucet-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.faucet-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.faucet-badge {
  display: inline-block;
  background: rgba(14, 203, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(14, 203, 129, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.faucet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.faucet-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.faucet-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 185, 11, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.fc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.fc-logo {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.fc-symbol {
  font-size: 1.25rem;
  font-weight: 800;
}

.fc-name {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fc-amount {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  margin-bottom: 16px;
}

.fc-amt-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cyan);
  font-family: var(--font-mono);
}

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

.fc-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-claim-faucet {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-green) 0%, #0ab06f 100%);
  color: #07090e;
  border: none;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
}

.btn-claim-faucet:hover:not(:disabled) {
  box-shadow: 0 4px 15px rgba(14, 203, 129, 0.4);
}

.btn-claim-faucet:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-add-metamask {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  min-height: 38px;
}

.btn-add-metamask:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.helper-banner {
  padding: 20px 24px;
}

.helper-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.helper-icon {
  font-size: 2rem;
}

.helper-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.helper-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================================================
   ANALYTICS INTERFACE
   ======================================================== */
.analytics-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.kpi-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
}

.kpi-change {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.kpi-change.positive {
  color: var(--accent-green);
}

.contracts-card {
  padding: 24px;
}

.text-accent {
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.contracts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.contract-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(10, 14, 22, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ci-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.ci-addr {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  text-decoration: none;
}

/* ========================================================
   MODALS & BACKDROPS
   ======================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.modal-card.modal-lg {
  max-width: 520px;
}

.modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.modal-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-plus-sign {
  text-align: center;
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 8px 0;
}

/* Token Selector Modal Elements */
.modal-search-wrap {
  padding: 16px 20px 8px;
}

.modal-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
}

.modal-search-input:focus {
  border-color: var(--primary);
}

.token-quick-chips {
  padding: 8px 20px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-chip:hover {
  background: rgba(240, 185, 11, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

.token-list-wrap {
  flex: 1;
  overflow-y: auto;
  max-height: 340px;
  padding: 0 12px 16px;
}

.token-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.token-row-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.token-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-row-logo {
  font-size: 1.5rem;
}

.token-row-names {
  display: flex;
  flex-direction: column;
}

.token-row-sym {
  font-weight: 700;
  font-size: 0.95rem;
}

.token-row-full {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.token-row-right {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Pool Ratio Card in Add Liquidity Modal */
.pool-ratio-card {
  display: flex;
  gap: 8px;
  background: rgba(10, 14, 22, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 16px 0;
  text-align: center;
}

.ratio-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ratio-val {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cyan);
  font-family: var(--font-mono);
}

.ratio-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Remove Liquidity Modal Elements */
.remove-percent-box {
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.remove-pct-val {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.remove-slider {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  margin-bottom: 16px;
  accent-color: var(--primary);
}

.pct-quick-buttons {
  display: flex;
  gap: 8px;
}

.remove-preview-box {
  background: rgba(10, 14, 22, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.prev-val {
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--cyan);
}

/* ========================================================
   TOAST NOTIFICATIONS
   ======================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: calc(100vw - 48px);
  pointer-events: none;
}

.toast {
  background: rgba(14, 18, 26, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

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

.toast.toast-success {
  border-color: rgba(14, 203, 129, 0.5);
}
.toast.toast-error {
  border-color: rgba(246, 70, 93, 0.5);
}
.toast.toast-info {
  border-color: rgba(0, 240, 255, 0.5);
}

.toast-icon {
  font-size: 1.25rem;
}

.toast-body {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-all;
}

.toast-link {
  color: var(--cyan);
  text-decoration: underline;
  margin-top: 4px;
  display: inline-block;
  font-size: 0.78rem;
}

/* ========================================================
   RESPONSIVE DESIGN (MOBILE FIRST OVERRIDES)
   ======================================================== */
@media screen and (max-width: 900px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .header-inner {
    padding: 0 16px;
  }
  .btn-add-chain {
    display: none;
  }
  .dex-main {
    padding: 20px 14px 60px;
  }
  .pools-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .pools-header-bar .btn-action-accent {
    width: 100%;
  }
}

@media screen and (max-width: 480px) {
  .header-right .network-badge {
    display: none;
  }
  .swap-card {
    padding: 16px;
  }
  .token-input-box {
    padding: 12px;
  }
  .card-title {
    font-size: 1.2rem;
  }
  .quick-stats-row {
    flex-direction: column;
    gap: 6px;
  }
  .quick-stat-pill {
    flex-direction: row;
    justify-content: space-between;
    padding: 6px 12px;
  }
  .modal-card {
    max-width: 100%;
    border-radius: var(--radius-md);
  }
  .modal-body {
    padding: 16px;
  }
}
