:root {
  --bg: #06080f;
  --surface: #0d1117;
  --surface-2: #161b22;
  --border: #1c2333;
  --fg: #e6edf3;
  --fg-muted: #8b949e;
  --accent: #00E5FF;
  --accent-dim: rgba(0, 229, 255, 0.12);
  --positive: #2dd4a0;
  --font-mono: 'DM Mono', 'Fira Mono', monospace;
  --font-display: 'Syne', 'Space Grotesk', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
.nav {
  border-bottom: 1px solid var(--border);
  padding: 20px 40px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.5px;
}
.nav-status {
  font-size: 11px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 6px var(--positive);
}
.nav-links { display: flex; gap: 24px; }
.nav-link { font-size: 12px; color: var(--fg-muted); text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--accent); }

/* HERO */
.hero {
  padding: 80px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-label { margin-bottom: 20px; }
.pill {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(0,229,255,0.3);
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--accent-dim);
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(52px, 6vw, 80px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -3px;
  color: var(--fg);
  margin-bottom: 28px;
}
.accent { color: var(--accent); }
.hero-sub {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 440px;
}

/* TICKER */
.hero-visual { display: flex; flex-direction: column; gap: 16px; }
.ticker-wrap {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 0;
  background: var(--surface);
}
.ticker {
  display: flex;
  gap: 24px;
  white-space: nowrap;
  font-size: 12px;
  animation: scroll 30s linear infinite;
  color: var(--fg-muted);
}
.ticker span { display: inline-block; }
.sep { color: var(--border); }
.positive { color: var(--positive); font-weight: 500; }
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* CARD */
.hero-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card-live {
  font-size: 10px;
  color: var(--positive);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}
.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--positive);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.card-rows { padding: 8px 0; }
.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  padding: 10px 18px;
  font-size: 12px;
  border-bottom: 1px solid rgba(28,35,51,0.5);
}
.card-row:last-child { border-bottom: none; }
.pair { color: var(--fg); font-weight: 500; }
.exchange { color: var(--fg-muted); font-size: 11px; }
.spread { font-weight: 500; text-align: right; }

/* SECTION SHARED */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 60px;
  align-items: start;
}
.section-inner.reverse { direction: rtl; }
.section-inner.reverse > * { direction: ltr; }
.section-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
}
.section-num {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}
.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--fg);
  line-height: 1.1;
}
.scanner-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  color: var(--fg);
  margin-bottom: 16px;
}
.scanner-desc {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 32px;
}

/* FEATURES GRID */
.scanner-features { display: flex; flex-direction: column; gap: 20px; }
.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature-icon { flex-shrink: 0; margin-top: 2px; }
.feature-title { font-size: 14px; font-weight: 500; color: var(--fg); margin-bottom: 4px; }
.feature-desc { font-size: 13px; color: var(--fg-muted); line-height: 1.5; }

/* SIMULATOR PARAMS */
.simulator-params {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.param {
  background: var(--surface);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.param-label { font-size: 10px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.param-value { font-size: 15px; font-weight: 500; color: var(--fg); }
.param-value.accent { color: var(--positive); }
.param.result { grid-column: 1 / -1; background: rgba(0,229,255,0.05); }

/* CODE BLOCK */
.code-block {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.code-title { font-size: 12px; color: var(--fg); font-weight: 500; }
.code-badge {
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0,229,255,0.2);
}
.code-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: #8b949e;
  overflow-x: auto;
  white-space: pre;
}
.k { color: #ff7b72; }
.fn { color: #d2a8ff; }
.c { color: #8b949e; font-style: italic; }
.v { color: #79c0ff; }

/* SCANNER SECTION */
.scanner { border-top: 1px solid var(--border); }

/* SCANNER HERO */
.scanner-hero {
  border-bottom: 1px solid var(--border);
  padding: 60px 40px 48px;
  background: linear-gradient(180deg, rgba(0,229,255,0.03) 0%, transparent 100%);
}
.sh-inner { max-width: 1200px; margin: 0 auto; }
.sh-label { margin-bottom: 20px; }
.sh-headline {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -2px;
  color: var(--fg);
  margin-bottom: 20px;
}
.sh-sub { font-size: 15px; color: var(--fg-muted); line-height: 1.7; max-width: 540px; }

/* SCANNER LIVE DASHBOARD */
.scanner-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}
.scanner-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.control-group { display: flex; flex-direction: column; gap: 4px; }
.ctrl-label { font-size: 10px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ctrl-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  width: 120px;
}
.ctrl-input:focus { border-color: var(--accent); }
.scan-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: opacity 0.2s;
}
.scan-btn:hover { opacity: 0.85; }
.scan-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.scan-status {
  font-size: 11px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.live-dot-sm {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--positive);
  animation: pulse 2s ease-in-out infinite;
}
.gas-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 12px;
}
.gas-label { color: var(--fg-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; min-width: 30px; }
.gas-values { display: flex; gap: 10px; flex: 1; }
.gas-chip { background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 4px; color: var(--fg-muted); }
.gas-chip b { color: var(--fg); }
.gas-chip.accent { border-color: rgba(0,229,255,0.3); background: var(--accent-dim); }
.gas-chip.accent b { color: var(--accent); }
.eth-price { color: var(--fg-muted); margin-left: auto; }
.table-wrap { overflow-x: auto; }
.arb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.arb-table thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.arb-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(28,35,51,0.5);
  color: var(--fg-muted);
}
.arb-table tbody tr:hover td { background: var(--surface-2); }
.row-hot td { background: rgba(45,212,160,0.04); }
.pair-cell { color: var(--fg); font-weight: 600; }
.spread-cell { font-weight: 600; }
.spread-cell.positive { color: var(--positive); }
.spread-cell.neutral { color: var(--fg-muted); }
.profit-cell { color: var(--positive); font-weight: 600; }
.neutral { color: var(--fg-muted); }
.loading-row td { text-align: center; color: var(--fg-muted); padding: 40px; }
.no-opps {
  text-align: center;
  padding: 40px;
  color: var(--fg-muted);
  font-size: 13px;
}

/* SIMULATOR SECTION */
.simulator { border-top: 1px solid var(--border); background: var(--surface); }

/* CONTRACTS SECTION */
.contracts { border-top: 1px solid var(--border); }

/* CLOSING */
.closing {
  border-top: 1px solid var(--border);
  padding: 80px 40px;
}
.closing-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.closing-statement {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
  max-width: 680px;
  letter-spacing: -0.5px;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
}
.footer-note { font-size: 11px; color: var(--fg-muted); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 24px 40px;
    gap: 40px;
  }
  .hero-headline { font-size: 52px; letter-spacing: -1.5px; }
  .section-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 60px 24px;
  }
  .section-inner.reverse { direction: ltr; }
  .simulator-params { grid-template-columns: 1fr 1fr; }
  .param.result { grid-column: 1 / -1; }
  .closing { padding: 60px 24px; }
  .nav { padding: 16px 24px; }
  .footer { padding: 20px 24px; }
}
@media (max-width: 480px) {
  .simulator-params { grid-template-columns: 1fr; }
  .hero-headline { font-size: 42px; }
}