@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
/* Design tokens — Discord Activity companion panel */
:root {
  /* Base surfaces */
  --bg-deep: #1a1b1e;
  --bg-base: #1e1f22;
  --bg-surface: #2b2d31;
  --bg-elevated: #313338;
  --bg-hover: #35373c;
  --bg-active: #404249;
  --bg-input: #1e1f22;

  /* Text */
  --text-primary: #f2f3f5;
  --text-secondary: #dbdee1;
  --text-muted: #b5bac1;
  --text-subtle: #80848e;
  --text-dim: #5c5e66;

  /* Borders */
  --border-subtle: #2e3035;
  --border: #3f4147;
  --border-strong: #4e5058;

  /* Accents */
  --accent: #5865f2;            /* blurple — primary */
  --accent-hover: #4752c4;
  --accent-soft: rgba(88, 101, 242, 0.12);
  --accent-softer: rgba(88, 101, 242, 0.06);

  --ai: oklch(0.68 0.18 295);   /* purple — AI artifacts */
  --ai-soft: oklch(0.68 0.18 295 / 0.14);
  --ai-dim: oklch(0.68 0.18 295 / 0.35);

  --live: oklch(0.74 0.16 145); /* green — streaming/active */
  --live-soft: oklch(0.74 0.16 145 / 0.14);

  --warn: oklch(0.78 0.14 75);
  --danger: oklch(0.64 0.20 25);

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 6px;
  --sp-3: 8px;
  --sp-4: 12px;
  --sp-5: 16px;
  --sp-6: 20px;
  --sp-7: 24px;
  --sp-8: 32px;
  --sp-9: 48px;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Type */
  --font-ui: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 28px;

  /* Shadows */
  --sh-sm: 0 1px 0 rgba(0,0,0,0.2);
  --sh-md: 0 4px 12px rgba(0,0,0,0.3);
  --sh-lg: 0 8px 24px rgba(0,0,0,0.4);

  /* Sidebar width modes */
  --sidebar-icons: 56px;
  --sidebar-labels: 200px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
/* Thin scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #202225;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #2a2c30; }
/* Shared utility classes */
.mono { font-family: var(--font-mono); font-feature-settings: normal; }
.dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  vertical-align: middle;
}
.dot.live { background: var(--live); box-shadow: 0 0 0 3px var(--live-soft); }
.dot.idle { background: var(--text-dim); }
.dot.ai   { background: var(--ai); box-shadow: 0 0 0 3px var(--ai-soft); }
/* Pulse used for live streaming */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 var(--live-soft); }
  70%  { box-shadow: 0 0 0 6px rgba(0,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}
.pulse { animation: pulse-ring 1.8s cubic-bezier(0.4,0,0.6,1) infinite; }
/* caret blink */
@keyframes caret-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.caret { animation: caret-blink 1s steps(1) infinite; }
/* Stripe placeholder (for image placeholders in AI artifacts) */
.stripe-placeholder {
  background-image: repeating-linear-gradient(
    45deg,
    #2e3035 0, #2e3035 8px,
    #26272b 8px, #26272b 16px
  );
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
/* Focus rings */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
/* Pokemon battle sprite animations */
@keyframes pk-shake {
  0%, 100% { transform: translateX(0); }
  15%      { transform: translateX(-6px) rotate(-1deg); }
  30%      { transform: translateX(5px)  rotate(1deg); }
  45%      { transform: translateX(-4px); }
  60%      { transform: translateX(3px); }
  75%      { transform: translateX(-2px); }
}
.pk-shake { animation: pk-shake 520ms cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes pk-flash {
  0%, 100% { filter: drop-shadow(0 8px 12px rgba(0,0,0,0.3)); }
  25%      { filter: brightness(2.2) drop-shadow(0 0 16px #fff); }
  50%      { filter: brightness(0.4); }
  75%      { filter: brightness(1.8) drop-shadow(0 0 12px #fff); }
}
.pk-flash { animation: pk-flash 520ms ease-out; }
