/* ============================================================
   macOS Tahoe (Web Edition) — base
   Design values per Apple HIG + macOS design system:
   - font 13px body, -apple-system stack
   - radii: window 10px, card 8px, button/input 6px
   - 8px spacing grid, animations 150/250ms
   - vibrancy: backdrop blur + saturate(180%)
   ============================================================ */

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

:root {
  /* Golden Gate (macOS 27) opens the window corners a touch wider */
  --win-radius: 12px;
  --card-radius: 8px;
  --btn-radius: 6px;
  --dur-fast: 150ms;
  --dur: 250ms;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
  --mb-h: 25px;
  --font: -apple-system, BlinkMacSystemFont, "Vazirmatn", "Segoe UI", "SF Pro Text", "SF Pro Display", "Helvetica Neue", Roboto, system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "Menlo", "Consolas", monospace;
}

/* ---------- Light theme (macOS values) ---------- */
html[data-theme="light"] {
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --win-bg: rgba(245, 245, 247, 0.88);
  --win-solid: #f5f5f7;
  --titlebar: rgba(248, 248, 250, 0.72);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 18px 50px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.12);
  --hover: rgba(0,0,0,0.06);
  --hover-2: rgba(0,0,0,0.10);
  --sel: rgba(0,122,255,0.85);
  --field: rgba(0,0,0,0.045);
  --field-focus: rgba(0,0,0,0.08);
  --sidebar: rgba(245,245,247,0.55);
  --row-alt: rgba(0,0,0,0.025);
  --divider: rgba(0,0,0,0.10);
  --shadow-win: 0 0 0 0.5px rgba(0,0,0,0.18), 0 24px 60px rgba(0,0,0,0.30), 0 4px 14px rgba(0,0,0,0.12);
  --accent: #0a84ff;
  --traffic-off: rgba(0,0,0,0.25);
  --menubar-text: rgba(0,0,0,0.85);
  --menu-bg: rgba(246,246,248,0.78);
}

/* ---------- Dark theme (more differentiation, not inverted) ---------- */
html[data-theme="dark"] {
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --win-bg: rgba(44, 44, 46, 0.82);
  --win-solid: #2c2c2e;
  --titlebar: rgba(44, 44, 46, 0.66);
  --glass: rgba(38, 38, 42, 0.60);
  --glass-strong: rgba(44, 44, 46, 0.80);
  --glass-border: rgba(255,255,255,0.14);
  --glass-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.4);
  --hover: rgba(255,255,255,0.08);
  --hover-2: rgba(255,255,255,0.13);
  --sel: rgba(10,132,255,0.9);
  --field: rgba(255,255,255,0.08);
  --field-focus: rgba(255,255,255,0.12);
  --sidebar: rgba(32, 32, 36, 0.5);
  --row-alt: rgba(255,255,255,0.03);
  --divider: rgba(255,255,255,0.12);
  --shadow-win: 0 0 0 0.5px rgba(255,255,255,0.12), 0 24px 60px rgba(0,0,0,0.6), 0 4px 14px rgba(0,0,0,0.45);
  --accent: #0a84ff;
  --traffic-off: rgba(255,255,255,0.3);
  --menubar-text: rgba(255,255,255,0.9);
  --menu-bg: rgba(40, 40, 44, 0.78);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background: #000;
  user-select: none;
  cursor: default;
}

button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: default; }
input, textarea { font-family: inherit; font-size: inherit; color: var(--text); }
img { display: block; }
::selection { background: rgba(10,132,255,0.3); }

/* macOS style scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(128,128,132,0.5); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(128,128,132,0.75); background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }

.hidden { display: none !important; }

.kbd {
  font-size: 10px; color: var(--text-3);
  background: var(--field); border-radius: 4px; padding: 1px 5px; margin-left: 8px;
}

svg { display: block; }
