/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #050508;
  --surface: #0c0c16;
  --surface2: #111120;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.12);
  --green: #00FF88;
  --gold: #f59e0b;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --red: #ef4444;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── Ambient Blobs ── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
.blob-1 { width: 600px; height: 600px; background: var(--green); top: -200px; left: -200px; }
.blob-2 { width: 500px; height: 500px; background: var(--purple); bottom: -150px; right: -150px; }
.blob-3 { width: 400px; height: 400px; background: var(--blue); top: 50%; left: 60%; }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(5,5,8,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--green); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--green); }

/* ── Container ── */
.container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ── Hero ── */
.hero { text-align: center; margin-bottom: 40px; }
.hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 12px; }
.hero h1 span { color: var(--green); }
.hero p { color: var(--text-dim); font-size: 1.1rem; max-width: 540px; margin: 0 auto; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s;
}
.card:hover { border-color: var(--border2); }
.card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

/* ── Calculator Grid ── */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* ── Form Fields ── */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.field select,
.field input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}
.field select:focus,
.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,255,136,0.1);
}
.field select option { background: var(--surface); color: var(--text); }

/* ── Quick Buttons ── */
.quick-btns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.quick-btns button {
  flex: 1;
  min-width: 50px;
  padding: 8px 4px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-btns button:hover { border-color: var(--green); color: var(--green); }
.quick-btns button.active {
  background: rgba(0,255,136,0.1);
  border-color: var(--green);
  color: var(--green);
}

/* ── Pip Value Display ── */
.pip-value-display {
  text-align: center;
  padding: 24px 0 20px;
}
.pip-value-display .currency-sign {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  color: var(--green);
  vertical-align: super;
  margin-right: 2px;
}
#pipValue {
  font-family: 'JetBrains Mono', monospace;
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 30px rgba(0,255,136,0.3);
  transition: all 0.3s;
}
.per-pip {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Instrument Info ── */
.instrument-info {
  background: var(--surface2);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}
.info-row + .info-row { border-top: 1px solid var(--border); }
.info-label { color: var(--text-muted); font-size: 0.85rem; }
.info-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text);
}

/* ── Breakdown Table ── */
.breakdown-table { margin-top: 8px; }
.breakdown-table h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.breakdown-table table { width: 100%; border-collapse: collapse; }
.breakdown-table th {
  text-align: left;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0;
  border-bottom: 1px solid var(--border2);
}
.breakdown-table th:last-child { text-align: right; }
.breakdown-table td {
  padding: 10px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.breakdown-table td:first-child { color: var(--text-dim); }
.breakdown-table td:last-child {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--text);
}

.disclaimer {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Expandable Card ── */
.expandable-card { margin-bottom: 24px; padding: 0; overflow: hidden; }
.expand-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: none;
  border: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}
.expand-toggle:hover { color: var(--green); }
.chevron { transition: transform 0.3s; color: var(--text-dim); }
.expand-toggle.open .chevron { transform: rotate(180deg); }
.expand-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  padding: 0 28px;
}
.expand-content.open {
  max-height: 600px;
  padding: 0 28px 24px;
}
.expand-content p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 12px; }
.expand-content ul { list-style: none; padding: 0; margin-bottom: 12px; }
.expand-content li {
  padding: 8px 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.expand-content li strong { color: var(--text); }

/* ── CTA Section ── */
.cta-section {
  text-align: center;
  padding: 48px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cta-section h2 { font-size: 1.8rem; margin-bottom: 12px; }
.cta-section h2 span { color: var(--green); }
.cta-section p { color: var(--text-dim); margin-bottom: 24px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--green);
  color: #000;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(0,255,136,0.2);
}
.cta-btn:hover {
  box-shadow: 0 0 40px rgba(0,255,136,0.4);
  transform: translateY(-2px);
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .calculator-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  #pipValue { font-size: 2.4rem; }
  .navbar { padding: 14px 16px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.82rem; }
  .container { padding: 24px 16px 40px; }
}

@media (max-width: 480px) {
  .nav-links a:first-child { display: none; }
  .quick-btns button { min-width: 40px; padding: 7px 2px; font-size: 0.75rem; }
}
