/* Arbitreads FIX Toolkit — Shared Styles */

:root {
  --bg: #f8f9fa;
  --text: #212529;
  --card-bg: rgba(255,255,255,0.7);
  --accent: #6e56cf;
  --accent2: #4f9cf9;
  --gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --border: rgba(0,0,0,0.08);
  --muted: #6c757d;
}

:root.dark {
  --bg: #121212;
  --text: #e0e0e0;
  --card-bg: rgba(30,30,30,0.7);
  --gradient: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
  --border: rgba(255,255,255,0.08);
  --muted: #999;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
}

/* ── Header ─────────────────────────────────── */
header {
  background: var(--gradient);
  padding: 4rem 2rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(110,86,207,0.12) 0%, transparent 65%);
  pointer-events: none;
}

header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.85rem;
  position: relative;
  letter-spacing: -0.02em;
}

header .subtitle {
  font-size: 1.15rem;
  opacity: 0.78;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

/* ── Dark mode toggle ──────────────────────── */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  transition: all 0.2s;
  white-space: nowrap;
}

.theme-toggle:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,0.16); }

/* ── Main layout ────────────────────────────── */
main {
  max-width: 900px;
  margin: 3.5rem auto;
  padding: 0 1.5rem 4rem;
}

section { margin-bottom: 4rem; }

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: transform 0.2s;
}

/* ── Section headings ───────────────────────── */
h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

p { margin-bottom: 0.9rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent2); }

/* ── Code ───────────────────────────────────── */
pre {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: 4px;
}

code:not(pre code) {
  background: rgba(110,86,207,0.12);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #5a44b0;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(110,86,207,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
}

/* ── Alert / notice card ─────────────────────── */
.notice {
  border-left: 3px solid var(--accent2);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ── Footer ──────────────────────────────────── */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.82rem;
  opacity: 0.65;
  border-top: 1px solid var(--border);
  line-height: 1.7;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 640px) {
  header { padding: 2.5rem 1.25rem; }
  main { margin-top: 2rem; padding: 0 1rem 3rem; }
  .card { padding: 1.25rem; }
}
