/* Rotifer.ai — Shared Design Tokens */
/* Linked by all HTML pages. Per-page styles keep page-specific layout rules. */

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

:root {
  /* Colors */
  --bg: #09090b;
  --surface: #111113;
  --surface-2: #1a1a1f;
  --border: #1c1c22;
  --border-focus: #6366f1;
  --text: #fafafa;
  --text-dim: #a1a1aa;
  --text-muted: #52525b;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --green: #10b981;
  --green-dim: rgba(16, 185, 129, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --yellow: #eab308;
  --yellow-dim: rgba(234, 179, 8, 0.15);

  /* Typography */
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.16), 0 8px 24px rgba(0,0,0,0.12);

  /* Motion */
  --duration-fast: 0.15s;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text-dim); text-decoration: none; transition: color var(--duration-fast); }
a:hover { color: var(--text); }

/* ── Shared background grid ── */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none; z-index: 0;
}

/* ── Shared nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(9,9,11,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.9rem; color: var(--text);
}
.nav-brand img { border-radius: var(--radius-xs); }

.nav-links {
  display: flex; gap: 20px; list-style: none; align-items: center;
}
.nav-links a {
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  transition: color var(--duration-fast);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 700; }

/* ── Auth nav element (neutral by default, indigo only on hover) ── */
#nav-auth a {
  font-size: 0.8rem; font-weight: 500;
}
#nav-auth a.nav-login {
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}
#nav-auth a.nav-login:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: rgba(255,255,255,0.04);
}
#nav-auth { display: inline-flex; align-items: center; gap: 8px; }
#nav-auth a.nav-username {
  color: var(--text-dim);
}
#nav-auth a.nav-username:hover { color: var(--text); }
#nav-auth a.nav-settings {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: var(--radius-md, 6px);
  transition: color var(--duration-fast), background var(--duration-fast);
}
#nav-auth a.nav-settings:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* Gene card cursor (applies to React-rendered .gene-card elements) */
.gene-card { cursor: pointer; }

@media (max-width: 640px) {
  .nav-links { gap: 12px; }
  nav { padding: 12px 16px; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
}
