/* ProjectBob.xyz — Design System */

:root {
  --accent: #3B7DD8;
  --accent-hover: #2C63B0;
  --accent-light: rgba(59,125,216,0.08);
  --bg: #f5f7fa;
  --surface: #fff;
  --text: #1a2233;
  --text-secondary: #6b7a8d;
  --text-muted: #a0aab5;
  --border: rgba(0,0,0,0.07);
  --border-subtle: rgba(0,0,0,0.04);
  --shadow-card: 0 1px 4px rgba(0,40,80,0.06);
  --shadow-hover: 0 3px 12px rgba(0,40,80,0.10);
  --shadow-modal: 0 20px 60px rgba(0,20,60,0.22);
  --glass-bg: rgba(255,255,255,0.90);
  --glass-blur: blur(20px);
  --nav-height: 52px;
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  --day-1: #3B7DD8;
  --day-2: #2E9E8F;
  --day-3: #5B98D4;
  --day-4: #3DAA7F;
  --day-5: #7B8EC2;
  --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;
  --color-code-bg: #141422;
  --color-code-text: #e2e2ef;
  --color-success: #22c55e;
  --color-success-hover: #16a34a;
  --color-error: #dc2626;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); z-index: 1000;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 24px;
}
.nav-brand {
  font-size: 18px; font-weight: 700; color: var(--text); text-decoration: none;
  white-space: nowrap; display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.3px;
}
.nav-logo { height: 32px; width: auto; }
.nav-tld { color: var(--accent); font-weight: 700; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none; transition: all 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(0,0,0,0.03); }
.nav-link.active { color: var(--accent); background: var(--accent-light); }

/* ── Connection warning pill ── */
.conn-pill {
  padding: 4px 10px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: #fef3cd; color: #856404; border: 1px solid #ffc107;
  cursor: help; white-space: nowrap;
}
.conn-pill.error { background: #f8d7da; color: #721c24; border-color: #dc3545; }

/* ── Data toggle ── */
.data-toggle {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 12px; color: var(--text-secondary); user-select: none; white-space: nowrap;
}
.data-toggle input { display: none; }
.toggle-track {
  position: relative; width: 34px; height: 18px; border-radius: 9px;
  background: #ccc; transition: background 0.2s;
}
.data-toggle input:checked + .toggle-track { background: var(--accent); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.data-toggle input:checked + .toggle-track .toggle-thumb { left: 18px; }
.toggle-label { font-weight: 500; min-width: 32px; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 500; z-index: 3000; max-width: 420px; text-align: center;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; }
.toast.warning { background: #d97706; }
.toast.error { background: #dc2626; }

/* ── Utility ── */
.page-body { padding-top: var(--nav-height); }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* ── Shared components ── */
.filter-pill {
  display: flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 12px; font-size: 12px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); color: var(--text-muted); transition: all 0.2s;
  user-select: none;
}
.filter-pill input { display: none; }
.filter-pill.active { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.video-badge {
  position: absolute; top: 8px; left: 8px; padding: 2px 8px;
  border-radius: 4px; background: rgba(0,0,0,0.6); color: #fff;
  font-size: 10px; font-weight: 600; letter-spacing: 0.3px; z-index: 5;
}
.play-icon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 4;
  pointer-events: none;
}
.play-icon::after {
  content: ''; display: block; width: 0; height: 0;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  border-left: 14px solid #fff; margin-left: 2px;
}

@keyframes spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

/* ── Mobile nav ── */
@media (max-width: 768px) {
  .nav { padding: 0 12px; gap: 10px; }
  .nav-brand { font-size: 15px; gap: 6px; }
  .nav-logo { height: 26px; }
  .nav-link { padding: 6px 8px; font-size: 11px; line-height: 1; display: flex; align-items: center; }
  .nav-links { gap: 2px; align-items: center; }
  .data-toggle { font-size: 11px; }
  .toggle-label { display: none; }
}
