/* ------------------------------------------------------------------ *
 * HoodRally launchpad - shared styles
 * ------------------------------------------------------------------ */

:root {
  --bg: #06080b;
  --bg-elev: #0d1116;
  --bg-elev-2: #131922;
  --line: #1e2733;
  --line-soft: #172029;
  --text: #e8eef6;
  --text-dim: #8b9bad;
  --text-faint: #5d6b7c;
  --accent: #00d95f;
  --accent-dim: #00a94a;
  --accent-glow: rgba(0, 217, 95, 0.12);
  --danger: #ff5c5c;
  --warn: #ffb020;
  --purple: #9b7bff;
  --radius: 14px;
  --radius-sm: 9px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 520px at 50% -240px, rgba(0, 217, 95, 0.10), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.02em; }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.up { color: var(--accent); }
.down { color: var(--danger); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrapflex { flex-wrap: wrap; }

/* ----------------------------- header ----------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(6, 8, 11, 0.82);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 18px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.03em; font-size: 18px; }
/* One flex item, so the flex gap can never open a space inside the name. */
.brand-word { white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  display: block; object-fit: contain; flex: 0 0 30px;
}
.brand em { font-style: normal; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 7px 12px; border-radius: 8px; color: var(--text-dim);
  font-size: 14px; font-weight: 500; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--bg-elev); }
.nav a.active { color: var(--text); background: var(--bg-elev-2); }

/* ----------------------------- buttons ---------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 560; cursor: pointer;
  transition: border-color .15s, background .15s, transform .08s;
}
.btn:hover { border-color: #2c3949; background: var(--bg-elev-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #032d15; font-weight: 680;
}
.btn-primary:hover { background: #14e972; border-color: #14e972; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ------------------------------ cards ----------------------------- */

.card {
  background: linear-gradient(180deg, var(--bg-elev) 0%, #0a0e13 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.card-pad { padding: 20px; }

.section { margin: 34px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 14px; }
.section-head h2 { font-size: 17px; }
.section-head .hint { font-size: 13px; color: var(--text-faint); }

.eyebrow {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 620;
}

/* ------------------------------ hero ------------------------------ */

.hero { padding: 62px 0 34px; }
.hero > h1:first-child { margin-top: 6px; }
.hero h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.06; max-width: 16ch; }
.hero p.lead { color: var(--text-dim); font-size: 17px; max-width: 62ch; margin: 16px 0 26px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-elev);
  font-size: 12.5px; color: var(--text-dim);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ------------------------------ stats ----------------------------- */

.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.stat {
  background: linear-gradient(180deg, var(--bg-elev) 0%, #0a0e13 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; inset: 0 auto auto 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent), transparent 65%); opacity: .5;
}
.stat.accent::after { opacity: 1; }
.stat .label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat .value { font-family: var(--mono); font-size: 26px; font-weight: 600; margin-top: 8px; letter-spacing: -0.02em; }
.stat .sub { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; font-family: var(--mono); }

/* ------------------------- strategy cards ------------------------- */

.strategy-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.strategy-card {
  display: block; padding: 18px;
  background: linear-gradient(180deg, var(--bg-elev) 0%, #0a0e13 100%);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  transition: border-color .16s, transform .16s;
}
.strategy-card:hover { border-color: #2a3a4a; transform: translateY(-2px); }

.token-id { display: flex; align-items: center; gap: 12px; }
.token-address {
  display: block; font-size: 12.5px; color: var(--text-faint);
  margin: 3px 0 2px; word-break: break-all; line-height: 1.35;
}
a.token-address:hover { color: var(--accent); }
.token-avatar {
  width: 42px; height: 42px; border-radius: 11px; flex: 0 0 42px;
  background: linear-gradient(140deg, #1b2531, #0e141b);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent);
  object-fit: cover;
}
.token-avatar.lg { width: 60px; height: 60px; flex-basis: 60px; border-radius: 15px; font-size: 17px; }
/* The image lies on top of the lettered placeholder, so a failing gateway
   degrades to the letters instead of a broken-image icon. */
.token-avatar { position: relative; overflow: hidden; }
.token-avatar .avatar-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border: none; border-radius: inherit;
}
.ticker { font-family: var(--mono); font-weight: 640; font-size: 15px; }
.arrow { color: var(--text-faint); margin: 0 6px; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.mini-stats div .k { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .07em; }
.mini-stats div .v { font-family: var(--mono); font-size: 15px; margin-top: 2px; }

.tag {
  display: inline-block; padding: 3px 8px; border-radius: 6px;
  font-size: 11.5px; font-family: var(--mono);
  background: var(--bg-elev-2); border: 1px solid var(--line); color: var(--text-dim);
}
.tag.green { color: var(--accent); border-color: rgba(0,217,95,.3); background: var(--accent-glow); }
.tag.purple { color: var(--purple); border-color: rgba(155,123,255,.3); background: rgba(155,123,255,.1); }

/* ------------------------------ tables ---------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
thead th {
  text-align: left; padding: 11px 16px; background: var(--bg-elev-2);
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 620; white-space: nowrap;
}
tbody td { padding: 12px 16px; border-top: 1px solid var(--line-soft); white-space: nowrap; }
tbody tr:hover { background: rgba(255,255,255,.015); }
td.num, th.num { text-align: right; font-family: var(--mono); }

/* ------------------------------ forms ----------------------------- */

.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 580; }
.field .help { font-size: 12.5px; color: var(--text-faint); }
.field input, .field select, .field textarea {
  background: #080b0f; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; color: var(--text); font: inherit; font-size: 14px;
  font-family: var(--mono);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent-dim); box-shadow: 0 0 0 3px var(--accent-glow);
}
.field input[readonly] { color: var(--text-dim); background: #0b0f14; }
.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix input { width: 100%; padding-right: 46px; }
.input-suffix span { position: absolute; right: 12px; color: var(--text-faint); font-family: var(--mono); font-size: 13px; }

.note {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--bg-elev); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: 13.5px; color: var(--text-dim);
}
.note.warn { border-left-color: var(--warn); }
.note.danger { border-left-color: var(--danger); }

/* ------------------------------ trade row ------------------------- */

.trade-row {
  display: grid; gap: 12px; align-items: end;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
}
.trade-row .btn { height: 40px; padding-inline: 22px; }
@media (max-width: 720px) {
  .trade-row { grid-template-columns: 1fr; align-items: stretch; }
  .trade-row .btn { width: 100%; }
}

/* ------------------------- panels & details ----------------------- */

.panel-title { font-size: 15px; margin: 8px 0 6px; }
.panel-note { font-size: 13px; margin: 0 0 14px; line-height: 1.5; }
.panel-note.note { margin-bottom: 0; }

.checklist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
/* The marker and the text are the only two flex items; the text must stay in a
   single <span>, otherwise the flex gap swallows the spaces around <strong>. */
.checklist li { display: flex; gap: 9px; font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.checklist li::before {
  content: "✓"; color: var(--accent); font-weight: 700;
  flex: 0 0 12px; width: 12px; text-align: center; /* fixed, so every row's text lines up */
}
.checklist li.warn::before { content: "!"; color: var(--warn); }
.checklist li > span { min-width: 0; }
.checklist strong { color: var(--text); font-weight: 600; }
.checklist code {
  font-family: var(--mono); font-size: 12px; padding: 1px 5px; border-radius: 5px;
  background: var(--bg-elev-2); border: 1px solid var(--line); color: var(--text-dim);
}

.kv { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; font-size: 13px; }
.kv .kv-row { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.kv .kv-row .k { color: var(--text-faint); white-space: nowrap; }
.kv .kv-row .v { font-family: var(--mono); text-align: right; word-break: break-all; }
.kv .kv-row a.v:hover { color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--bg-elev-2); color: var(--text-dim);
}
.badge.ok { color: var(--accent); border-color: rgba(0,217,95,.32); background: var(--accent-glow); }
.badge.warn { color: var(--warn); border-color: rgba(255,176,32,.32); background: rgba(255,176,32,.1); }

.field input[type="checkbox"] { accent-color: var(--accent); height: 15px; }

/* ---------------------------- activity ---------------------------- */

.feed { display: flex; flex-direction: column; }
.feed-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 14px;
}
.feed-item:first-child { border-top: none; }
.feed-icon {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px; display: grid; place-items: center;
  font-size: 12px; background: var(--bg-elev-2); border: 1px solid var(--line);
}
.feed-item .when { margin-left: auto; color: var(--text-faint); font-size: 12.5px; font-family: var(--mono); }

/* ----------------------------- banners ---------------------------- */

.banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(255, 176, 32, .08); border: 1px solid rgba(255, 176, 32, .28);
  color: #f6d190; font-size: 13.5px; margin: 16px 0;
}

.empty { padding: 46px 20px; text-align: center; color: var(--text-faint); }
.skeleton {
  background: linear-gradient(90deg, #10151c 25%, #171e27 50%, #10151c 75%);
  background-size: 200% 100%; animation: sh 1.3s infinite; border-radius: 6px; color: transparent;
}
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ----------------------------- footer ----------------------------- */

.site-footer {
  border-top: 1px solid var(--line-soft); margin-top: 60px; padding: 26px 0 40px;
  color: var(--text-faint); font-size: 13px;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--text-dim); }

/* --------------------------- responsive --------------------------- */

@media (max-width: 720px) {
  .nav a { padding: 7px 9px; font-size: 13px; }
  .hero { padding: 40px 0 24px; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .stat .value { font-size: 22px; }
}

/* Below this the brand, the nav and the wallet button stop fitting on one row,
   so the nav drops to a second line rather than pushing the button off-screen. */
@media (max-width: 560px) {
  .site-header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-block: 10px;
    row-gap: 8px;
  }
  .site-header .brand { order: 1; }
  .site-header #connect { order: 2; margin-left: auto; }
  .site-header .nav { order: 3; width: 100%; justify-content: center; }
  .brand { font-size: 17px; }
}

/* One-click-copy address. Reads as text until hovered, so it does not compete
   with the real buttons around it. */
.copy {
  display: inline-flex; align-items: center; gap: 7px;
  max-width: 100%; padding: 3px 7px; margin: -3px -7px;
  font-family: var(--mono); font-size: 13px; line-height: 1.35;
  color: var(--text-faint); text-align: left; word-break: break-all;
  background: none; border: 1px solid transparent; border-radius: 7px;
  cursor: pointer; transition: color .12s, background .12s, border-color .12s;
}
.copy:hover { color: var(--text); background: var(--bg-elev-2); border-color: var(--line); }
.copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.copy-icon::before { content: "⧉"; font-size: 12px; opacity: .75; }
.copy.copied { color: var(--accent); border-color: rgba(0,217,95,.32); background: var(--accent-glow); }
.copy.copied .copy-icon::before { content: "✓ copied"; font-family: var(--sans); opacity: 1; }
.copy.copyfail { color: var(--warn); }
.copy.copyfail .copy-icon::before { content: "copy failed"; font-family: var(--sans); }
