:root{
  --bg: #0b0d10;
  --panel: #111418;
  --muted: #98a2b3;
  --text: #e6e9ef;
  --accent: #7c9cff;
  --accent-2: #22c55e;
  --border: #1f242b;
  --code-bg: #0f1317;
  --chip: #1a1f26;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.3);
}
@media (prefers-color-scheme: light) {
  :root{
    --bg: #f7f9fc;
    --panel: #ffffff;
    --muted: #6b7280;
    --text: #0f172a;
    --accent: #335dff;
    --accent-2: #16a34a;
    --border: #e5e7eb;
    --code-bg: #f3f4f6;
    --chip: #f3f4ff;
    --warning: #b45309;
    --danger: #b91c1c;
    --shadow: 0 10px 30px rgba(2,6,23,0.08), 0 2px 6px rgba(2,6,23,0.06);
  }
}
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0; font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: linear-gradient(180deg, var(--bg), #0b0d10 300px);
  color: var(--text);
}

/* === Retro terminal header === */
header{
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: none;
  background: #000; /* pure black */
  border-bottom: 2px solid #00ff00; /* neon line */
  box-shadow: 0 2px 8px rgba(0,255,0,0.25);
}
.wrap{ max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.brand{ display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.logo{
  width: 42px; height: 42px; border-radius: 6px; display: grid; place-items: center;
  background: #000;
  color: #00ff00;
  border: 1px solid #00ff00;
  font-weight: 800; letter-spacing: -0.02em;
  font-family: "Courier New", Courier, monospace;
  box-shadow: 0 0 6px #00ff00 inset, 0 0 6px rgba(0,255,0,0.6);
}
.title{ font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: #00ff00; text-shadow: 0 0 6px rgba(0,255,0,0.8); font-family: "Courier New", Courier, monospace; }
.subtitle{ color: #66ff66; margin-top: 2px; font-size: 14px; font-family: "Courier New", Courier, monospace; }
.toolbar{ display: grid; grid-template-columns: 1fr auto auto; gap: 12px; margin-top: 14px; }
.search{ display: flex; align-items: center; gap: 10px; background: #0b0d0b; border: 1px solid #00aa00; border-radius: 10px; padding: 8px 10px; box-shadow: inset 0 0 0 1px rgba(0,255,0,0.2); }
.search input{ width: 100%; background: transparent; border: none; outline: none; color: #ccffcc; font-size: 15px; font-family: "Courier New", Courier, monospace; }
.kbd{ padding: 2px 6px; border: 1px solid #00aa00; border-bottom-width: 2px; border-radius: 6px; background: #001900; font-size: 12px; color: #66ff66; font-family: "Courier New", Courier, monospace; }
.toggle, .help{ border: 1px solid #00aa00; border-radius: 10px; background: #001900; padding: 8px 12px; display: inline-flex; align-items: center; gap: 8px; color: #66ff66; text-decoration: none; font-family: "Courier New", Courier, monospace; }
.toggle:hover, .help:hover{ box-shadow: 0 0 8px rgba(0,255,0,0.25); }

/* === Main content styles remain modern === */
.syntax, .note, .panel{ background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.syntax code{ background: var(--chip); padding: 4px 8px; border-radius: 8px; }
.note{ display: grid; grid-template-columns: 1fr; gap: 8px; color: var(--muted); }
.grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 950px){ .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px){ .grid{ grid-template-columns: 1fr; } }
.card{ display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(180deg, var(--panel), rgba(0,0,0,0.04)); padding: 14px; position: relative; }
.card h3{ margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.chips{ display: flex; flex-wrap: wrap; gap: 8px; }
.chip{ font-size: 12px; color: var(--muted); background: var(--chip); border: 1px solid var(--border); padding: 3px 8px; border-radius: 999px; }
pre{ margin: 0; background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 13px; }
code.block{ display: block; white-space: pre; }
.actions{ display: flex; gap: 8px; }
.btn{ cursor: pointer; border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.btn:active{ transform: translateY(1px); }
.section{ margin-top: 28px; }
.section h2{ margin: 0 0 8px; letter-spacing: -0.01em; }
.footer{ color: var(--muted); font-size: 13px; margin-top: 18px; }
.highlight{ color: var(--accent); font-weight: 600; }
.warning{ color: var(--warning); }
.danger{ color: var(--danger); }
.kbd-help{ color: var(--muted); font-size: 13px; }
