/* ═══════════════════════════════════════════════════════════════════════
   main.css — Shared styles for all LLM-sim pages
   (reset, CSS variables, body, header/nav, footer, scrollbar,
    language switcher)
═══════════════════════════════════════════════════════════════════════ */

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

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #21262d;
  --border:    #30363d;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --accent:    #58a6ff;
  --green:     #3fb950;
  --yellow:    #d29922;
  --red:       #f85149;
  --purple:    #bc8cff;
  --orange:    #ffa657;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --radius:    8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 13px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}

header a.logo {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  flex: 1;
}
header a.logo:hover { text-decoration: underline; }

nav { display: flex; gap: 6px; }
nav a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
nav a:hover, nav a.active { color: var(--text); border-color: var(--border); }
nav a.active { background: var(--surface2); color: var(--accent); }

/* ── Language switcher ───────────────────────────────────────────────── */
.lang-switcher {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.lang-switcher button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: color .15s, border-color .15s, background .15s;
}
.lang-switcher button:hover { color: var(--text); border-color: var(--accent); }
.lang-switcher button.active {
  background: var(--surface2);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Footer ──────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
footer a { color: var(--muted); text-decoration: none; transition: color .15s; }
footer a:hover { color: var(--accent); }
.footer-sep { margin: 0 8px; }

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
