* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --border: #222222;
  --text: #e0e0e0;
  --text-muted: #777777;
  --accent: #c8a000;
  --positive: #22c55e;
  --negative: #ef4444;
  --danger: #dc2626;
  --font: "SF Mono", "Fira Code", "Consolas", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--text-muted);
  text-decoration: none;
}

a:hover {
  color: var(--text);
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
}

code {
  font-family: var(--font);
  font-size: 12px;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 3px;
  word-break: break-all;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.hero-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 24px;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  font-size: 13px;
}

/* BUTTONS */

.btn {
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.85;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  font-weight: 600;
}

.btn-large {
  padding: 12px 32px;
  font-size: 14px;
}

.btn-small {
  padding: 4px 10px;
  font-size: 11px;
}

/* HERO */

.hero {
  max-width: 700px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

/* SECTIONS */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* STEPS */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
}

.step-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.step h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* DASHBOARD / PANELS */

.dashboard-locked {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 48px;
  text-align: center;
  color: var(--text-muted);
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 16px;
}

.panel-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* JUDAH WALLET */

.judah-wallet-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.wallet-address-row,
.wallet-balance-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 60px;
}

#judah-balance {
  font-weight: 700;
  font-size: 16px;
}

/* MODE SELECTOR */

.mode-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.mode-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.mode-option:has(input:checked) {
  border-color: var(--accent);
}

.mode-option input {
  display: none;
}

.mode-option span:first-of-type {
  font-weight: 600;
}

.mode-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* TARGET INPUT */

.target-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.target-input-row input {
  flex: 1;
  font-family: var(--font);
  font-size: 13px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  outline: none;
}

.target-input-row input:focus {
  border-color: var(--accent);
}

.target-input-row input::placeholder {
  color: var(--text-muted);
}

#target-preview-trades {
  max-height: 200px;
  overflow-y: auto;
  font-size: 12px;
  margin-top: 8px;
}

#target-preview-trades .preview-trade {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

/* CONFIG */

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.config-item label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.config-item input {
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  outline: none;
}

.config-item input:focus {
  border-color: var(--accent);
}

/* CONTROLS */

.controls-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bot-status {
  font-size: 13px;
  font-weight: 600;
}

.bot-status.active {
  color: var(--positive);
}

.bot-status.paused {
  color: var(--negative);
}

.bot-status.inactive {
  color: var(--text-muted);
}

/* LIVE FEED */

.feed-log {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.8;
}

.feed-entry {
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.feed-entry:last-child {
  border-bottom: none;
}

.feed-time {
  color: var(--text-muted);
  margin-right: 8px;
}

.feed-type-swap { color: var(--accent); }
.feed-type-analyzing { color: var(--text-muted); }
.feed-type-execute { color: var(--positive); }
.feed-type-skip { color: var(--text-muted); }
.feed-type-fail { color: var(--negative); }
.feed-type-wait { color: var(--accent); }

/* TABLES */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:hover {
  background: var(--surface);
}

td.positive { color: var(--positive); }
td.negative { color: var(--negative); }

td a {
  color: var(--text-muted);
  font-size: 11px;
}

td a:hover {
  color: var(--accent);
}

/* FAQ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
}

.faq-item h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* FOOTER */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* RESPONSIVE */

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; }
  nav { order: 3; width: 100%; justify-content: center; gap: 16px; }
  .hero h1 { font-size: 24px; }
  .mode-selector { flex-direction: column; }
  .config-grid { grid-template-columns: 1fr; }
  .controls-card { flex-wrap: wrap; }
  table { font-size: 11px; }
  thead th, tbody td { padding: 8px 6px; }
}
