/* ============================================================================
   PRRR launch tool — app shell + launch experience.
   A clean, dark, Bags-forward theme. Loaded AFTER base.css + launch.css so its
   token overrides + form overrides win. Scoped form tweaks live under
   .lx-form-mount so they only apply on the launch page.
   ========================================================================== */

:root {
  /* SOAR-style light theme: airy blue-tinted ground, white cards, vivid green. */
  --bg:          #eaf1f8;   /* light blue-gray page */
  --bg-2:        #ffffff;   /* cards / panels */
  --bg-elev:     #ffffff;   /* elevated surfaces (dropdowns) — white + shadow */
  --bg-input:    #f1f4f8;   /* inputs */
  --text:        #0f1419;   /* near-black */
  --muted:       #5b6472;
  --faint:       #909aa8;
  --border:      rgba(15, 23, 42, 0.09);
  --border-2:    rgba(15, 23, 42, 0.16);
  --hover:       rgba(15, 23, 42, 0.045);
  --hover-faint: rgba(15, 23, 42, 0.03);  /* override base.css (was a white tint for dark) */
  --green:       #16c784;   /* positive / gains / up (charts, +%, buy side) — NOT the brand */
  --text-2:      #5b6472;   /* muted text used by some shared components */
  --accent:      #2ba8f0;   /* ice blue — the BRRR brand color */
  --accent-2:    #1f97de;   /* ice blue hover */
  --accent-dim:  rgba(43, 168, 240, 0.14);
  --accent-ink:  #ffffff;   /* white text on ice blue */
  --danger:      #f0405a;
  --blue:        #2ba8f0;   /* secondary accent — aligned to the ice-blue brand */
  --r:           18px;
  --r-sm:        12px;
  --shadow:      0 14px 40px -18px rgba(15, 23, 42, 0.22);
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Inter", sans-serif;
}

html, body { background: var(--bg); }
body {
  color: var(--text);
  min-height: 100vh;
  /* airy blue wash toward the top, like the SOAR hero */
  background:
    radial-gradient(1200px 620px at 50% -220px, rgba(56, 152, 255, 0.16), transparent 62%),
    linear-gradient(180deg, #eaf1f8 0%, #f4f7fb 100%);
  background-attachment: fixed;
}

.app-shell { display: block; max-width: none; }

/* ---------------- top bar ---------------- */
.lx-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.lx-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.lx-brand-mark {
  width: 28px; height: 28px; flex: none; display: block;
  filter: drop-shadow(0 4px 10px rgba(63, 155, 239, 0.35));
}
.lx-brand-name { font-weight: 800; font-size: 19px; letter-spacing: 0.02em; }

.lx-topbar-right { display: flex; align-items: center; gap: 12px; }
.lx-connect-sm {
  height: 38px; padding: 0 18px; border-radius: 999px;
  font-weight: 700; font-size: 14px; color: var(--accent-ink);
  background: var(--accent);
}
.lx-connect-sm:hover { background: var(--accent-2); }

.lx-account { display: flex; align-items: center; gap: 10px; }
.lx-mylaunches {
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border-2); color: var(--muted);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.lx-mylaunches:hover { color: var(--text); border-color: var(--accent); }
.lx-wallet {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border-2); color: var(--muted);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.lx-wallet:hover { color: var(--text); border-color: var(--accent); }
.lx-wallet.copied { color: var(--accent); border-color: var(--accent); }
.lx-wallet-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.lx-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-2); }
.lx-avatar-ph { display: grid; place-items: center; background: var(--bg-elev); color: var(--muted); font-weight: 700; font-size: 14px; }
.lx-logout { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--faint); border: 1px solid transparent; }
.lx-logout:hover { color: var(--danger); background: rgba(255,90,95,0.1); }

/* ---------------- main ---------------- */
.lx-main { display: block; width: 100%; }
.lx { width: 100%; }

/* ---------------- gate (logged out) ---------------- */
.lx-gate { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 40px 20px 80px; }
.lx-gate-inner { max-width: 640px; text-align: center; }
.lx-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 26px;
  border: 1px solid var(--border-2); background: var(--bg-elev);
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.lx-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: lx-pulse 2.4s ease-in-out infinite; }
@keyframes lx-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.lx-gate-title {
  font-size: clamp(38px, 7vw, 66px); line-height: 1.02; font-weight: 850;
  letter-spacing: -0.03em; margin: 0 0 20px;
  background: linear-gradient(180deg, #0f1419, #45505f);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lx-gate-sub { font-size: clamp(16px, 2.4vw, 19px); line-height: 1.55; color: var(--muted); margin: 0 auto 34px; max-width: 520px; }
.lx-connect-btn {
  display: inline-flex; align-items: center; gap: 11px;
  height: 56px; padding: 0 34px; border-radius: 999px;
  font-size: 17px; font-weight: 800; color: var(--accent-ink);
  background: var(--accent); box-shadow: 0 14px 40px -12px var(--accent);
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.lx-connect-btn:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 18px 48px -12px var(--accent); }
.lx-connect-btn:active { transform: translateY(0); }
.lx-gate-feats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.lx-feat {
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2);
}
.lx-feat::before { content: "✓ "; color: var(--accent); font-weight: 800; }

/* ---------------- launch page (logged in) ---------------- */
.lx-launch {
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px;
  max-width: 1080px; margin: 0 auto; padding: 44px clamp(16px, 4vw, 40px) 80px;
  align-items: start;
}
.lx-form-head { margin-bottom: 24px; }
.lx-h1 { font-size: 30px; font-weight: 820; letter-spacing: -0.02em; margin: 0 0 6px; }
.lx-sub { color: var(--muted); font-size: 15px; margin: 0; }

/* ---- form container overrides (reused .lc form, page context) ---- */
.lx-form-mount .lc { width: 100%; max-width: none; padding: 0; }
.lx-form-mount .lc-title { display: none; } /* header lives in .lx-form-head */
.lx-form-mount .lc-body { display: flex; flex-direction: column; gap: 20px; }
.lx-form-mount .lc-input,
.lx-form-mount .lc-quote-btn,
.lx-form-mount .lc-feemode {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lx-form-mount .lc-input:focus,
.lx-form-mount .lc-quote-btn:focus,
.lx-form-mount .lc-input:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); outline: none;
}
.lx-form-mount .lc-label { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: .01em; }

/* contain absolutely-positioned unit glyphs (%, SOL) so they can't escape to
   the viewport edge at the wider page width */
.lx-form-mount .lc-fs-row,
.lx-form-mount .lc-buy-wrap,
.lx-form-mount .lc-num-wrap { position: relative; }

/* Bags options: turn the <details> into a clean card */
.lx-form-mount .lc-bags {
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg-2); padding: 4px 16px;
}
.lx-form-mount .lc-bags[open] { padding-bottom: 16px; }
.lx-form-mount .lc-bags-summary {
  padding: 14px 0; font-weight: 700; font-size: 14px; color: var(--text);
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
}
.lx-form-mount .lc-bags-summary::-webkit-details-marker { display: none; }
.lx-form-mount .lc-bags-summary::after { content: "▾"; color: var(--faint); transition: transform .15s ease; }
.lx-form-mount .lc-bags[open] .lc-bags-summary::after { transform: rotate(180deg); }

/* action row: sticky launch bar — solid bar with a short fade above so content
   recedes cleanly under it instead of peeking through. */
.lx-form-mount .lc-actions {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; gap: 12px; margin: 8px -4px 0; padding: 14px 4px 18px;
  background: var(--bg);
}
.lx-form-mount .lc-actions::before {
  content: ""; position: absolute; left: 0; right: 0; top: -26px; height: 26px;
  background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none;
}
.lx-form-mount .lc-intent { flex: 0 0 auto; border-color: var(--border-2); color: var(--muted); border-radius: 999px; }
.lx-form-mount .lc-intent:hover { color: var(--text); border-color: var(--text); background: transparent; }
.lx-form-mount .lc-launch {
  flex: 1; height: 52px; font-size: 16px; font-weight: 800; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 12px 34px -14px var(--accent);
}
.lx-form-mount .lc-launch:hover:not(:disabled) { background: var(--accent-2); }

/* success state */
.lx-form-mount .lc-done { background: var(--accent); color: var(--accent-ink); }

/* ---------------- live preview ---------------- */
.lx-preview-col { position: sticky; top: 84px; }
.lxp { display: flex; flex-direction: column; gap: 0; }
.lxp-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.lxp-card {
  border: 1px solid var(--border); border-radius: var(--r);
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-2));
  padding: 22px; box-shadow: var(--shadow);
}
.lxp-img {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; margin-bottom: 18px;
  background: repeating-conic-gradient(from 0deg, #eef2f7 0deg 90deg, #f7f9fc 90deg 180deg) 0 0 / 28px 28px;
  border: 1px solid var(--border);
}
.lxp-img.has-img { background: var(--bg); }
.lxp-img-real { width: 100%; height: 100%; object-fit: cover; }
.lxp-img-ph { font-size: 54px; font-weight: 800; color: var(--faint); text-transform: uppercase; }
.lxp-symbol { font-size: 26px; font-weight: 850; letter-spacing: -0.02em; line-height: 1.1; }
.lxp-name { font-size: 16px; color: var(--muted); margin-top: 2px; }
.lxp-desc { font-size: 14px; line-height: 1.5; color: var(--text); margin-top: 12px; word-break: break-word; }
.lxp-desc.is-muted { color: var(--faint); }

.lxp-rows { margin-top: 16px; border-top: 1px solid var(--border); }
.lxp-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.lxp-row-k { font-size: 13px; color: var(--muted); }
.lxp-row-v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lxp-market.is-stock { color: var(--accent); }
.lxp-hint { font-size: 12.5px; line-height: 1.5; color: var(--faint); margin: 14px 0 0; }

/* ---------------- right-column tabs (Preview | Pons) ---------------- */
.lx-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-2); }
.lx-tab {
  flex: 1; height: 34px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted);
  transition: color .15s ease, background .15s ease;
}
.lx-tab:hover { color: var(--text); }
.lx-tab.active { color: var(--accent-ink); background: var(--accent); }
.lx-pane.hidden { display: none; }

/* ---------------- Pons stream ---------------- */
.lx-pons { display: flex; flex-direction: column; }
.lx-pons-head { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.lx-pons-head span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); }
.lx-pons-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 4px; }
.lx-pons-list::-webkit-scrollbar { width: 8px; }
.lx-pons-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
.lx-pons-card {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-elev);
  transition: border-color .15s ease;
}
.lx-pons-card:hover { border-color: var(--border-2); }
.lx-pons-img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: var(--bg-2); border: 1px solid var(--border); }
.lx-pons-img.broken { visibility: hidden; }
.lx-pons-meta { flex: 1; min-width: 0; }
.lx-pons-sym { font-size: 14px; font-weight: 800; line-height: 1.2; }
.lx-pons-name { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-pons-stats { font-size: 11.5px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.lx-pons-copy {
  flex: 0 0 auto; height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  color: var(--accent); border: 1px solid var(--accent-dim); background: transparent; transition: all .13s ease;
}
.lx-pons-copy:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.lx-pons-state { color: var(--faint); font-size: 14px; padding: 24px 8px; text-align: center; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .lx-launch { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .lx-preview-col { position: static; order: -1; }
  .lxp-card { padding: 18px; }
  .lxp-img { max-width: 200px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 560px) {
  .lx-gate-title { font-size: 40px; }
  .lx-form-mount .lc-launch { height: 50px; }
}

/* ---------------- "Launch on" chain toggle (Solana | Robinhood Chain) ---------------- */
.lc-chain-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lc-chain-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 14px; text-align: left; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg-input); color: var(--muted);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.lc-chain-btn:hover { border-color: var(--border-2); color: var(--text); }
.lc-chain-btn.active { border-color: var(--accent); background: var(--accent-dim); color: var(--text); box-shadow: 0 0 0 1px var(--accent) inset; }
.lc-chain-name { font-size: 14px; font-weight: 800; }
.lc-chain-sub { font-size: 12px; color: var(--faint); }
.lc-chain-btn.active .lc-chain-sub { color: var(--muted); }
@media (max-width: 480px) { .lc-chain-toggle { grid-template-columns: 1fr; } }

/* ---------------- "Fund with SOL" panel (Robinhood Chain gas) ---------------- */
.lc-fund {
  border: 1px solid rgba(62, 232, 127, 0.35); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(62, 232, 127, 0.08), var(--bg-2));
  padding: 16px 18px; margin: 4px 0 8px;
}
.lc-fund.hidden { display: none; }
.lc-fund-head { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.lc-fund-sub { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin: 0 0 12px; }
.lc-fund-sub b { color: var(--text); font-variant-numeric: tabular-nums; }
.lc-fund-addr { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.lc-fund-addr-k { color: var(--faint); font-weight: 600; }
.lc-fund-copy {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border-2); color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
}
.lc-fund-copy:hover { border-color: var(--accent); }
.lc-fund-copy-hint { font-family: var(--font); font-size: 11px; color: var(--faint); }
.lc-fund-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lc-fund-btn {
  border-radius: 999px; font-weight: 800; color: var(--accent-ink); background: var(--accent);
  box-shadow: 0 10px 28px -12px var(--accent);
}
.lc-fund-btn:hover:not(:disabled) { background: var(--accent-2); }
.lc-fund-alt { font-size: 13px; color: var(--muted); }
.lc-fund-alt:hover { color: var(--accent); }
.lc-fund-status { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.lc-fund-status.hidden { display: none; }

/* EVM wallet chip in the top bar (second dot = Robinhood Chain) */
.lx-wallet-dot-evm { background: #b48cff; box-shadow: 0 0 8px #b48cff; }

/* ---------------- top-bar nav (Launch | Discover) ---------------- */
.lx-nav { display: flex; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); }
.lx-nav a { height: 30px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; }
.lx-nav a:hover { color: var(--text); }
.lx-nav a.active { color: var(--accent-ink); background: var(--accent); }
@media (max-width: 560px) { .lx-nav a { padding: 0 10px; font-size: 12px; } }

/* ---------------- one-screen shell: Discover rail | launch stage ---------------- */
.lx-shell { display: grid; grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); align-items: start; }
/* Logged-out landing: hide the coin list, gate takes the full width. */
.lx-shell.lx-solo { grid-template-columns: 1fr; }
.lx-shell.lx-solo .dv-rail-launch { display: none; }
.lx-stage { min-width: 0; }
.lx-stage .lx-launch { max-width: 980px; margin: 0 auto; padding: 30px clamp(16px, 3vw, 40px) 72px; grid-template-columns: minmax(0, 560px) 340px; gap: 28px; justify-content: center; }
.lx-stage .lx-gate { min-height: calc(100vh - 60px); }
@media (max-width: 1180px) {
  .lx-stage .lx-launch { grid-template-columns: minmax(0, 1fr); }
  .lx-stage .lx-preview-col { order: -1; }
}
@media (max-width: 900px) {
  .lx-shell { grid-template-columns: 1fr; }
}
