:root {
  color-scheme: dark;
  --bg: #080704;
  --bg-2: #11100b;
  --panel: rgba(20, 18, 13, 0.78);
  --panel-strong: rgba(29, 25, 17, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(246, 190, 91, 0.32);
  --text: #fffaf0;
  --muted: #a7a094;
  --subtle: #756f64;
  --gold: #f6c35b;
  --gold-2: #ffd98a;
  --green: #35d690;
  --red: #ff667a;
  --blue: #8ca7ff;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background:
    radial-gradient(circle at 12% 4%, rgba(246, 195, 91, 0.22), transparent 30rem),
    radial-gradient(circle at 86% 12%, rgba(140, 167, 255, 0.14), transparent 28rem),
    linear-gradient(180deg, #100f0a 0%, #080704 55%, #030302 100%);
  color: var(--text);
  padding-bottom: env(safe-area-inset-bottom);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.background-glow {
  position: fixed;
  inset: auto 8% -18rem auto;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(246,195,91,.18), transparent 68%);
  filter: blur(8px);
}

.app-shell {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 14px 96px;
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(8, 7, 4, 0.68);
  backdrop-filter: blur(20px);
}

.brand, .topbar-actions, .hero-actions, .bot-status-card, .section-heading, .quote-meta {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #171006;
  font-weight: 900;
  letter-spacing: -0.07em;
  background: radial-gradient(circle at 30% 25%, #fff4bf, var(--gold) 45%, #a76614 100%);
  box-shadow: 0 0 34px rgba(246,195,91,.28), inset 0 -8px 16px rgba(74,40,0,.26);
}
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -0.03em; }
.brand small { color: var(--muted); font-size: 12px; }
.topbar-actions { gap: 8px; }

.ghost-link, .primary-button, .secondary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}
.ghost-link {
  padding: 0 14px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255,255,255,.045);
}
.primary-button {
  padding: 0 18px;
  color: #1a1104;
  background: linear-gradient(135deg, #ffe6a1, var(--gold));
  box-shadow: 0 15px 40px rgba(246,195,91,.22);
}
.secondary-button {
  padding: 0 18px;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.055);
}

.pill, .count-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255,255,255,.055);
  color: #efe8d8;
  font-size: 12px;
  font-weight: 800;
}
.pill span, .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px currentColor;
}
.pill.live span, .status-dot.live { background: var(--green); }
.pill.offline span, .status-dot.offline { background: var(--red); }

.dashboard-layout { display: grid; gap: 14px; }
.panel, .panel-soft {
  position: relative;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}
.panel {
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(31,27,18,.88), rgba(10,9,6,.82));
}
.panel-soft {
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
}

.hero-card { overflow: hidden; padding: 18px; }
.hero-card::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 290px;
  height: 290px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(246,195,91,.27), transparent 68%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 18px; }
.hero-copy { padding: 22px 2px 4px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-2);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: 11px;
  font-weight: 900;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(38px, 11vw, 82px);
  line-height: .90;
  letter-spacing: -0.075em;
}
h2 { margin: 0; font-size: clamp(24px, 5vw, 34px); letter-spacing: -0.05em; }
h3 { margin-bottom: 8px; letter-spacing: -0.03em; }
p { color: #d6cfc1; line-height: 1.6; }
.hero-copy p { max-width: 660px; font-size: 16px; }
.hero-actions { gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.gold-card {
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  padding: 18px;
  min-height: 250px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,216,138,.22), transparent 11rem),
    linear-gradient(145deg, rgba(69,47,16,.68), rgba(11,10,7,.82));
}
.asset-chip {
  width: max-content;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--gold-2);
  font-weight: 900;
  letter-spacing: .08em;
}
.gold-orbit { position: relative; height: 104px; display: grid; place-items: center; }
.gold-orbit::before, .gold-orbit::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 52px;
  border: 1px solid rgba(255,220,145,.24);
  border-radius: 50%;
  transform: rotate(-18deg);
}
.gold-orbit::after { transform: rotate(24deg); width: 118px; }
.gold-orbit span {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 22%, #fff7cc, #f6c35b 46%, #9e5d12 100%);
  box-shadow: 0 0 55px rgba(246,195,91,.36);
}
.quote-row { display: grid; gap: 5px; }
.quote-row span, .label, .metric-card span, .metric-card small, .strategy-grid small, .bot-status-card span { color: var(--muted); font-size: 12px; }
.quote-row strong { font-size: 22px; letter-spacing: -0.045em; }
.quote-meta { justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.quote-meta b { color: var(--text); }

.account-panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}
.money-big {
  display: block;
  font-size: clamp(42px, 12vw, 68px);
  letter-spacing: -0.08em;
  line-height: .98;
}
#accountLine { color: var(--muted); }
.bot-status-card {
  gap: 12px;
  justify-content: flex-start;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--border);
}
.bot-status-card strong { display: block; margin-top: 3px; }

.metrics-grid, .strategy-grid, .split-grid { display: grid; gap: 12px; }
.metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-card { padding: 17px; }
.metric-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: clamp(23px, 7vw, 32px);
  letter-spacing: -0.06em;
}
.positive { color: var(--green); }
.negative { color: var(--red); }

.strategy-panel { padding: 18px; }
.section-heading {
  justify-content: space-between;
  gap: 14px;
  margin: 24px 2px 12px;
}
.section-heading.compact { margin: 0 0 16px; }
.strategy-grid { grid-template-columns: 1fr; }
.strategy-grid article {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.052);
  border: 1px solid var(--border);
}
.strategy-grid strong { display: block; margin: 7px 0 6px; font-size: 22px; letter-spacing: -0.04em; }
.strategy-grid p { margin-bottom: 0; color: var(--muted); }

.stack, .timeline { display: grid; gap: 10px; }
.position-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 18px;
}
.position-card .side {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(53,214,144,.12);
  color: var(--green);
}
.position-card .side.sell { background: rgba(255,102,122,.12); color: var(--red); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }

.empty-state { text-align: center; padding: 34px 22px; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: #201404;
  font-weight: 900;
  background: radial-gradient(circle at 30% 25%, #fff4bf, var(--gold) 45%, #a76614 100%);
}
.empty-state p { margin-bottom: 0; color: var(--muted); }

.event-card {
  padding: 16px 16px 16px 42px;
  position: relative;
}
.event-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--gold);
  box-shadow: 0 0 20px var(--gold);
}
.event-card small { color: var(--muted); }
.event-card p { margin-bottom: 0; color: #d8d0c1; }

.mobile-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(8,7,4,.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 22px 58px rgba(0,0,0,.46);
}
.mobile-nav a {
  text-align: center;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  padding: 11px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}

@media (min-width: 760px) {
  .app-shell { padding: 26px 24px 64px; }
  .topbar { margin-bottom: 18px; }
  .hero-card { padding: 28px; }
  .hero-grid { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .72fr); align-items: stretch; }
  .hero-copy { padding: 52px 8px 38px; }
  .account-panel { grid-template-columns: 1fr auto; align-items: end; padding: 22px; }
  .bot-status-card { min-width: 280px; }
  .metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .strategy-panel { padding: 22px; }
  .strategy-grid { grid-template-columns: 1.45fr .75fr .75fr; }
  .split-grid { grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: 18px; }
  .mobile-nav { display: none; }
}

@media (max-width: 430px) {
  .topbar { align-items: stretch; border-radius: 24px; }
  .topbar-actions { flex-direction: column; align-items: flex-end; }
  .ghost-link { display: none; }
  .pill { padding: 9px 10px; font-size: 11px; }
  .brand-mark { width: 38px; height: 38px; }
  .metrics-grid { gap: 9px; }
  .metric-card { padding: 14px; }
  .section-heading { align-items: flex-end; }
}
