@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/outfit-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --font-sans: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --background: #f5f5f8;
  --foreground: #15161c;
  --card: #ffffff;
  --card-foreground: #15161c;
  --primary: #5d5cf4;
  --primary-foreground: #fdfdff;
  --primary-hover: #4f4de3;
  --primary-accent: #9b5bff;
  --primary-glow: rgba(93, 92, 244, 0.25);
  --secondary: #ececf1;
  --secondary-foreground: #2a2b34;
  --muted: #ececf1;
  --muted-foreground: #747788;
  --accent: #ececff;
  --accent-foreground: #4f4de3;
  --destructive: #c95762;
  --border: #e2e3eb;
  --input: #e2e3eb;
  --ring: #5d5cf4;
  --radius: 0.75rem;
  --hover: rgba(0, 0, 0, 0.05);
  --code-bg: #f0f0f4;
  --footer-bg: #0b0b10;
  --footer-border: rgba(255, 255, 255, 0.1);
  --footer-text: rgba(255, 255, 255, 0.7);
  --footer-text-faint: rgba(255, 255, 255, 0.4);
}

.dark {
  color-scheme: dark;
  --background: #0f1015;
  --foreground: #f5f5f7;
  --card: #191b24;
  --card-foreground: #f5f5f7;
  --primary: #7773ff;
  --primary-foreground: #ffffff;
  --primary-hover: #8a87ff;
  --primary-accent: #a78bfa;
  --primary-glow: rgba(119, 115, 255, 0.22);
  --secondary: #252832;
  --secondary-foreground: #f5f5f7;
  --muted: #252832;
  --muted-foreground: #a1a4b2;
  --accent: #292850;
  --accent-foreground: #d8d7ff;
  --destructive: #ef7882;
  --border: #2d303b;
  --input: #2d303b;
  --ring: #7773ff;
  --hover: rgba(255, 255, 255, 0.06);
  --code-bg: #252832;
  --footer-bg: #0a0b0f;
  --footer-border: rgba(255, 255, 255, 0.08);
  --footer-text: rgba(255, 255, 255, 0.6);
  --footer-text-faint: rgba(255, 255, 255, 0.38);
}

html { font-family: var(--font-sans); }

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  transition: background-color 0.2s, color 0.2s;
}

.site-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.site-theme-toggle:hover { background: var(--hover); color: var(--foreground); }
.site-theme-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.site-theme-toggle .icon-sun { display: none; }
.dark .site-theme-toggle .icon-sun { display: block; }
.dark .site-theme-toggle .icon-moon { display: none; }

::selection { background: var(--primary); color: var(--primary-foreground); }
