:root {
  --card-bg: #120f24;
  --text-primary: #ffffff;
  --text-secondary: #a0a0c0;
  --text-on-fire: #150f26;
  --neon-orange: #ff7b00;
  --neon-red: #ff0f5b;
  --gradient-fire: linear-gradient(135deg, var(--neon-orange), var(--neon-red));
  --ada-color: #4285f4;
  --vault-color: #fcd34d;
  --vault-badge-border: rgba(252, 211, 77, 0.35);
  --vault-badge-bg: rgba(252, 211, 77, 0.12);
  --badge-vyfi-bg: rgba(139, 92, 246, 0.15);
  --badge-vyfi-text: #a78bfa;
  --badge-min-bg: rgba(137, 170, 255, 0.15);
  --badge-min-text: #89aaff;
  --crater-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.17'/%3E%3C/svg%3E");
  --dashboard-bg:
    radial-gradient(1200px 620px at 15% -10%, rgba(78, 78, 86, 0.18), transparent 62%),
    radial-gradient(1000px 520px at 85% 0%, rgba(44, 44, 52, 0.22), transparent 58%),
    linear-gradient(180deg, #08080a 0%, #101014 50%, #15151b 100%);
  --z-index-dragging: 200;
  --drag-glow: rgba(255, 123, 0, 0.25);
  --drag-border-glow: rgba(255, 123, 0, 0.45);
  --placeholder-bg: rgba(255, 123, 0, 0.07);
  --placeholder-border: rgba(255, 123, 0, 0.55);
}
body { font-family: var(--font-geist-sans), sans-serif; background: var(--dashboard-bg);
  background-attachment: fixed;
  color: var(--text-primary);
  margin: 0;
  padding: 20px 20px;
  min-height: 100vh;
  overflow-x: hidden;
}
.clickable-optimal { cursor: pointer; border-bottom: 1px dashed var(--neon-orange); color: var(--neon-orange); transition: 0.2s; font-weight: 800;} .clickable-optimal:hover { text-shadow: 0 0 10px var(--neon-orange); background: rgba(255,123,0,0.15); padding: 2px 4px; border-radius: 4px; }

.header-btn { transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important; } .header-btn:hover { background: rgba(255,255,255,0.1) !important; border-color: rgba(255,255,255,0.25) !important; box-shadow: 0 0 10px rgba(255,123,0,0.2) !important; }

.tab-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-secondary); padding: 6px 15px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.3s; display: flex; align-items: center; gap: 5px; font-size: 0.85rem;} 
.tab-btn:hover { background: rgba(255,255,255,0.1); color: white; } 
.tab-btn-summary.active { background: rgba(66, 133, 244, 0.2) !important; border-color: #4285f4 !important; color: white !important; box-shadow: 0 0 15px rgba(66, 133, 244, 0.3) !important; }
.tab-btn-oracle.active { background: rgb(51, 51, 51) !important; border-color: #ffffff !important; color: white !important; box-shadow: 0 0 15px rgba(255, 255, 255, 0.2) !important; }

.grid-container { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(7, 130px); gap: 10px; max-width: 1800px; margin: 0 auto; opacity: 0; transition: opacity 0.3s ease-in-out; } 

.card { border-radius: 20px; padding: 20px 25px; position: absolute; top: 0; left: 0; right: 0; bottom: 0; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.05) !important; transition: background 0.3s ease, box-shadow 0.3s ease; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; } 
.card-blue { box-shadow: 0 4px 20px rgba(0,0,0,0.5); background: var(--crater-texture), rgba(11, 17, 33, 0.98) !important; background-blend-mode: soft-light, normal !important; }
.card-chart-bg { box-shadow: inset 0 0 20px rgba(0,0,0,0.5); background: var(--crater-texture), rgba(8, 13, 28, 0.98) !important; background-blend-mode: soft-light, normal !important; }
.card-vault { box-shadow: 0 0 44px rgba(0, 0, 0, 0.88); background: var(--crater-texture), rgba(13, 11, 8, 0.98); background-blend-mode: soft-light, normal; } 
.card-white-dark { box-shadow: 0 0 44px rgba(0, 0, 0, 0.88); background: var(--crater-texture), rgba(255, 255, 255, 0.03); background-blend-mode: soft-light, normal; } 
.card-orange { box-shadow: 0 0 44px rgba(0, 0, 0, 0.88); background: var(--crater-texture), rgba(14, 8, 6, 0.98); background-blend-mode: soft-light, normal; } 
.card-green { box-shadow: 0 0 44px rgba(0, 0, 0, 0.88); background: var(--crater-texture), rgba(8, 14, 10, 0.98); background-blend-mode: soft-light, normal; } 
.card-red { box-shadow: 0 0 44px rgba(0, 0, 0, 0.88); background: var(--crater-texture), rgba(16, 8, 10, 0.98); background-blend-mode: soft-light, normal; } 
.card-gray { box-shadow: 0 0 44px rgba(0, 0, 0, 0.88); background: var(--crater-texture), rgba(14, 14, 14, 0.98) !important; background-blend-mode: soft-light, normal !important; } 
.card-ada { box-shadow: 0 0 44px rgba(66, 133, 244, 0.12); background: var(--crater-texture), rgba(6, 10, 26, 0.98); background-blend-mode: soft-light, normal; } 

.action-btn { border-radius: 20px !important; font-weight: 800; font-size: 0.85rem; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); cursor: pointer; display: flex; justify-content: center; align-items: center; border: 1px solid transparent; padding: 10px; }
.action-btn:hover { transform: translateY(-2px); }
.exec-idle { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.05); cursor: not-allowed; }
.exec-active { background: linear-gradient(135deg, rgba(255,123,0,0.6), rgba(255,15,91,0.6)); color: rgba(255,255,255,0.9); box-shadow: 0 4px 10px rgba(255, 15, 91, 0.2); border-color: transparent; }
.exec-active:hover { box-shadow: 0 4px 18px rgba(255, 15, 91, 0.4); }
.exec-active-buy { background: linear-gradient(135deg, rgba(5,110,75,0.95) 0%, rgba(2,80,55,0.95) 100%); color: #ffffff; border-color: rgba(5,110,75,0.7); }
.exec-active-buy:hover { box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45); border-color: rgba(16,185,129,0.8); }
.exec-active-sell { background: linear-gradient(135deg, rgba(140,10,20,0.95) 0%, rgba(100,5,25,0.95) 100%); color: #ffffff; border-color: rgba(140,10,20,0.7); }
.exec-active-sell:hover { box-shadow: 0 4px 14px rgba(180, 20, 30, 0.45); border-color: rgba(180,20,30,0.9); }

@keyframes greenAlertPulse { 0% { box-shadow: 0 0 40px rgba(16, 185, 129, 0.3), inset 0 0 10px rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.4); } 100% { box-shadow: 0 0 60px rgba(16, 185, 129, 0.9), inset 0 0 20px rgba(16, 185, 129, 0.3); border-color: rgba(16, 185, 129, 0.9); } } .glow-active { animation: greenAlertPulse 1.5s infinite alternate ease-in-out !important; border-color: rgba(16, 185, 129, 0.8) !important; background: rgba(10, 15, 15, 0.98) !important; }
.spark-wrapper { position: relative; width: 100%; display: block; overflow: hidden; flex-shrink: 0; min-height: 45px;} .spark-wrapper canvas { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; display: block; }
.card-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; color: var(--neon-orange); display: flex; justify-content: space-between; align-items: center;} .card-title.ada-title { color: var(--ada-color); text-shadow: 0 0 10px rgba(66, 133, 244, 0.3);}
.data-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 1rem; } .data-label { color: var(--text-secondary); font-weight: 500; } .data-value { font-weight: 800; font-size: 1.25rem; color: var(--text-primary); display: flex; align-items: center; gap: 8px;} .change-badge { font-size: 0.8rem; font-weight: 800; } .badge { font-size: 0.75rem; padding: 4px 10px; border-radius: 20px; font-weight: 700; text-transform: uppercase; border: 1px solid transparent; transition: 0.2s; } .bg-vyfi { background: var(--badge-vyfi-bg); color: var(--badge-vyfi-text); border-color: transparent; } .bg-minswap { background: var(--badge-min-bg); color: var(--badge-min-text); border-color: var(--badge-min-text); }
.arbitrage-label { color: rgba(255, 255, 255, 0.75); font-size: 0.85rem; text-transform: uppercase; font-weight: 800; margin-bottom: 5px; letter-spacing: 0.5px;} .arbitrage-big-value { font-size: 2rem; font-weight: 900; color: #ffffff; text-shadow: 0 2px 10px rgba(0,0,0,0.5); transition: none; } .loading { color: inherit; opacity: 0.6; font-style: italic; font-weight: normal; font-size: 0.9rem;} .badge-dark { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.2); font-size: 0.85rem; padding: 5px 12px; border-radius: 20px; font-weight: 700; display: inline-block; margin: 0 2px; text-decoration: none; transition: 0.2s ease; } a.badge-dark:hover { transform: translateY(-2px); background: var(--neon-orange); border-color: var(--neon-orange); color: var(--text-on-fire); box-shadow: 0 0 15px rgba(255, 123, 0, 0.4);}
input[type="number"].sim-input::-webkit-outer-spin-button, input[type="number"].sim-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input[type="number"].sim-input { -moz-appearance: textfield; } .sim-input { width: 100px; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2); color: white; border-radius: 10px; font-weight: bold; text-align: center; margin-right: 5px; font-family: var(--font-geist-sans), sans-serif; font-size: 1.15rem; padding: 6px 10px; position: relative; z-index: 1; } .sim-input:focus { outline: none; border-color: var(--neon-orange); box-shadow: 0 0 10px rgba(255, 123, 0, 0.2);}
.sim-range { -webkit-appearance: none; width: 100px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 5px; outline: none; margin-top: 8px; margin-bottom: 2px; display: block; position: relative; z-index: 1;} .sim-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--neon-orange); cursor: pointer; box-shadow: 0 0 10px var(--neon-orange); }
.profit-positive { color: #10b981; text-shadow: 0 2px 10px rgba(0,0,0,0.8); } .profit-negative { color: var(--neon-red); text-shadow: 0 2px 10px rgba(0,0,0,0.8); } .optimizer-text { font-size: 0.9rem; color: var(--text-secondary); font-weight: 600;} .usd-profit { font-size: 0.95rem; color: rgba(255,255,255,0.6); font-weight: 600; text-shadow: none; display: inline-block; margin-left: 8px;}
.slippage-container { width: 100%; height: 8px; background: rgba(0,0,0,0.4); border-radius: 4px; overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,0.1);} .slippage-bar { height: 100%; width: 0%; border-radius: 4px; transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); box-shadow: 0 0 10px currentColor;} .slippage-label { font-size: 0.8rem; color: var(--text-secondary); text-align: right; font-weight: 600;}
.route-active { color: #10b981; transition: 0.3s; } .route-active .route-dot { background: #10b981; box-shadow: 0 0 10px #10b981; } .route-inactive { color: var(--text-secondary); opacity: 0.5; transition: 0.3s; } .route-inactive .route-dot { background: rgba(255,255,255,0.2); box-shadow: none; } .route-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; transition: all 0.3s ease; }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); z-index: 1000; justify-content: center; align-items: center; padding: 20px; box-sizing: border-box;} .modal-content { background: var(--card-bg); padding: 25px; border-radius: 20px; border: 2px solid var(--neon-orange); width: 100%; max-width: 340px; box-shadow: 0 10px 40px rgba(0,0,0,0.8); max-height: 90vh; overflow-y: auto;} .modal-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 15px; color: white; display: flex; justify-content: space-between;} .setting-section-title { font-size: 0.75rem; color: var(--neon-orange); margin: 15px 0 10px 0; font-weight: bold; letter-spacing: 1px;} .setting-row { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem;} .setting-input { width: 60px; padding: 5px; border-radius: 5px; border: none; background: rgba(255,255,255,0.1); color: white; text-align: center; font-family: var(--font-geist-sans), sans-serif;} .btn-save { background: var(--gradient-fire); color: white; border: none; padding: 12px; width: 100%; border-radius: 10px; font-weight: bold; cursor: pointer; margin-top: 15px; transition: transform 0.2s;} .btn-reset { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); border: 1px solid rgba(255,255,255,0.1); padding: 10px; width: 100%; box-sizing: border-box; border-radius: 10px; font-weight: bold; cursor: pointer; margin-top: 10px; transition: 0.2s; font-size: 0.85rem;}
h3.dex-subtitle { margin: 0; font-size: 1.1rem; display: inline-block; } .footer-disclaimer { text-align: center; color: rgba(255,255,255,0.4); font-size: 0.75rem; padding: 20px 20px; font-style: italic; margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); max-width: 1800px; margin-left: auto; margin-right: auto;}

/* ── Card accent tokens (used by Share Panel) ──────────────────────────────── */
.card-gray   { --card-accent: rgba(255,255,255,0.8);  --card-accent-muted: rgba(255,255,255,0.12); }
.card-orange { --card-accent: var(--neon-orange);      --card-accent-muted: rgba(255,123,0,0.15); }
.card-vault  { --card-accent: var(--vault-color);      --card-accent-muted: rgba(252,211,77,0.14); }
.card-red    { --card-accent: var(--neon-red);         --card-accent-muted: rgba(255,15,91,0.15); }
.card-green  { --card-accent: #10b981;                 --card-accent-muted: rgba(16,185,129,0.15); }
.card-ada    { --card-accent: var(--ada-color);        --card-accent-muted: rgba(66,133,244,0.15); }

/* ── Share Panel ────────────────────────────────────────────────────────────── */
.share-panel { position: relative; }

.share-toggle-btn { display: flex; align-items: center; gap: 4px; background: var(--card-accent-muted, rgba(255,255,255,0.08)); border: 1px solid var(--card-accent, rgba(255,255,255,0.2)); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; font-family: var(--font-geist-sans), sans-serif; padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: all 0.2s; white-space: nowrap; line-height: 1; }
.share-toggle-btn:hover { background: var(--card-accent-muted, rgba(255,255,255,0.14)); color: var(--text-primary); }
.share-panel.is-open .share-toggle-btn { color: var(--text-primary); background: var(--card-accent-muted, rgba(255,255,255,0.12)); border-color: var(--card-accent, rgba(255,255,255,0.35)); }

.share-caret { display: inline-block; transition: transform 0.2s ease; font-style: normal; }
.share-panel.is-open .share-caret { transform: rotate(180deg); }

/* Dropdown body — absolutely positioned overlay, hidden until .is-open */
.share-body { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 100; min-width: 260px; flex-direction: column; gap: 7px; padding: 12px; background: rgba(10,8,20,0.97); backdrop-filter: blur(12px); border: 1px solid var(--card-accent, rgba(255,255,255,0.15)); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04); }
.share-panel.is-open .share-body { display: flex; }

/* Format & DEX chips row */
.share-chips { display: flex; gap: 5px; flex-wrap: wrap; }

.share-chip { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: var(--text-secondary); border-radius: 20px; padding: 3px 10px; height: 24px; font-size: 0.72rem; font-weight: 600; font-family: var(--font-geist-sans), sans-serif; cursor: pointer; transition: all 0.15s ease; display: flex; align-items: center; }
.share-chip:hover { border-color: rgba(255,255,255,0.3); color: var(--text-primary); transform: translateY(-1px); }
.share-chip.is-active { background: var(--card-accent-muted, rgba(255,255,255,0.12)); border-color: var(--card-accent, rgba(255,255,255,0.4)); color: var(--text-primary); }

/* Plain-text preview */
.share-preview { background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 7px 10px; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.55; min-height: 44px; max-height: 150px; overflow-y: auto; white-space: pre-line; word-break: break-all; }

/* Action buttons */
.share-actions { display: flex; gap: 6px; }

.share-btn-primary { flex: 1; background: var(--card-accent-muted, rgba(255,255,255,0.08)); border: 1px solid var(--card-accent, rgba(255,255,255,0.25)); color: var(--text-primary); border-radius: 8px; padding: 7px 10px; font-size: 0.78rem; font-weight: 700; font-family: var(--font-geist-sans), sans-serif; cursor: pointer; transition: all 0.2s ease; }
.share-btn-primary:hover { filter: brightness(1.25); transform: translateY(-1px); }
.share-btn-primary.is-copied { background: rgba(16,185,129,0.18); border-color: rgba(16,185,129,0.5); color: #10b981; }

.share-btn-secondary { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-secondary); border-radius: 8px; padding: 7px 10px; font-size: 0.78rem; font-weight: 600; font-family: var(--font-geist-sans), sans-serif; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; }
.share-btn-secondary:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); transform: translateY(-1px); }
.share-btn-secondary.is-copied { color: #10b981; border-color: rgba(16,185,129,0.4); }

/* Error feedback */
.share-error { display: none; font-size: 0.72rem; color: var(--neon-red); line-height: 1.4; padding: 2px 0; }

/* ── Mobile: full-width buttons in share panel ──────────────────────────────── */

/* ── Zoom wrapper (desktop: 0.9 zoom; mobile: reset to 1) ────────────────── */
.dashboard-zoom-wrapper { zoom: 0.9; }

/* ── Mobile responsive ────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  body { padding: 10px; }
  .dashboard-zoom-wrapper { zoom: 1; }

  /* Header: hide disclaimer & scale down title */
  .header-unofficial { display: none !important; }
  header h1 { font-size: 1.2rem !important; letter-spacing: -0.5px !important; }
  .brand-logo { font-size: 1.8rem !important; }

  /* Tab buttons */
  .tab-btn { font-size: 0.75rem !important; padding: 5px 8px !important; gap: 3px !important; }
  .tabs-container { gap: 5px !important; }

  /* Grid: single-column stacked layout on mobile */
  .grid-container { grid-template-columns: 1fr !important; grid-template-rows: none !important; gap: 8px !important; max-width: 100% !important; }
  .grid-container > div { grid-column: auto !important; grid-row: auto !important; min-height: 400px; }

  /* Cards: reduce padding and corner radius */
  .card { padding: 10px 12px !important; border-radius: 12px !important; }

  /* Card titles */
  .card-title { font-size: 0.72rem !important; margin-bottom: 4px !important; }

  /* Data rows */
  .data-row { margin-bottom: 4px !important; font-size: 0.70rem !important; }
  .data-label { font-size: 0.67rem !important; }
  .data-value { font-size: 0.76rem !important; gap: 3px !important; }

  /* Large metric numbers */
  .arbitrage-big-value { font-size: 0.95rem !important; }
  .arbitrage-label { font-size: 0.64rem !important; }

  /* Badges */
  .badge { font-size: 0.58rem !important; padding: 2px 5px !important; }
  .badge-dark { font-size: 0.64rem !important; padding: 3px 7px !important; }

  /* Simulator inputs */
  .sim-input { width: 65px !important; font-size: 0.74rem !important; padding: 4px 5px !important; }
  .sim-range { width: 70px !important; }

  /* Optimizer / profit text */
  .optimizer-text { font-size: 0.65rem !important; }
  .usd-profit { font-size: 0.68rem !important; margin-left: 3px !important; }
  .slippage-label { font-size: 0.62rem !important; }

  /* Action buttons */
  .action-btn { font-size: 0.75rem !important; padding: 8px 6px !important; border-radius: 12px !important; }

  /* Spark charts: slightly shorter on mobile */
  .spark-wrapper { min-height: 38px !important; }

  /* Settings modal */
  .modal-content { padding: 18px !important; }
  .setting-row { font-size: 0.8rem !important; }

  /* Footer */
  .footer-disclaimer { font-size: 0.68rem !important; padding: 12px 8px !important; }

  /* Share Panel */
  .share-body { min-width: 200px !important; right: 0 !important; }
  .share-actions { flex-direction: column !important; }
  .share-btn-primary, .share-btn-secondary { width: 100% !important; text-align: center; }
  .share-chip { font-size: 0.68rem !important; padding: 2px 7px !important; }
}
