:root {
  --bg: #070b12;
  --bg-card: #0e1520;
  --bg-elevated: #141e2e;
  --border: #1f2d42;
  --text: #e8eef7;
  --muted: #8fa3bf;
  --gold: #d4a853;
  --gold-dim: #9a7b3c;
  --cyan: #3dd6c6;
  --green: #3ecf8e;
  --red: #f07178;
  --radius: 12px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 214, 198, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(212, 168, 83, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: var(--bg);
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(212, 168, 83, 0.25);
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  text-align: center;
}

.stat-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--cyan);
}

.stat-card .value.gold {
  color: var(--gold);
}

.stat-card .value.green {
  color: var(--green);
}

.stat-card .label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* Sections */
section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.section-sub {
  color: var(--muted);
  margin: 0 0 2rem;
  font-size: 0.95rem;
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: rgba(61, 214, 198, 0.35);
}

.feature-card .icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Symbol mapping */
.symbol-map {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.symbol-pair {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.symbol-pair .base {
  color: var(--gold);
}

.symbol-pair .arrow {
  color: var(--muted);
}

.symbol-pair .broker {
  color: var(--cyan);
}

.resolve-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.75rem 0 0;
}

/* Pipeline */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.pipeline span {
  color: var(--muted);
}

.pipeline .step {
  padding: 0.4rem 0.75rem;
  background: var(--bg-elevated);
  border-radius: 6px;
  color: var(--cyan);
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
}

.panel-header .live {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 500;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.log-view {
  margin: 0;
  padding: 1rem 1.1rem;
  max-height: 280px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th,
td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.win {
  color: var(--green);
}

.loss {
  color: var(--red);
}

/* Code block */
.code-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  overflow-x: auto;
}

.code-block .cmd {
  color: var(--cyan);
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer strong {
  color: var(--gold);
}
