/**
 * variables.css - 디자인 토큰 및 테마 변수 정의
 * LM Studio / Codex 스타일의 개발자 도구 톤을 충실히 반영한 듀얼 테마 시스템
 */

:root {
  /* 시스템 폰트 스택 */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Cascadia Mono", Menlo, Consolas, "Courier New", monospace;

  /* 애니메이션 및 전환 */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* 라운드 반경 */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* 그림자 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-popover: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);

  /* 레이아웃 규격 */
  --sidebar-width: 280px;
  --settings-width: 340px;
  --header-height: 54px;
  --input-max-height: 220px;
}

/* ==========================================================================
   다크 테마 (LM Studio / Codex 딥 슬레이트 개발자 도구 톤)
   ========================================================================== */
[data-theme="dark"] {
  --bg-app: #0c0f17;
  --bg-sidebar: #111520;
  --bg-header: #111520;
  --bg-surface: #151a27;
  --bg-surface-elevated: #1a2030;
  --bg-hover: #20273a;
  --bg-active: #273047;
  --bg-input: #121622;
  --bg-tooltip: #1f2638;

  --border-subtle: #1e2536;
  --border-normal: #2a334a;
  --border-focus: #3b82f6;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-subtle: rgba(59, 130, 246, 0.15);
  --accent-text: #60a5fa;

  --danger-primary: #ef4444;
  --danger-hover: #dc2626;
  --danger-subtle: rgba(239, 68, 68, 0.15);
  --danger-text: #f87171;

  --success-primary: #10b981;
  --success-subtle: rgba(16, 185, 129, 0.15);
  --success-text: #34d399;

  --warning-primary: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.15);
  --warning-text: #fbbf24;

  /* 메시지 버블 스타일 */
  --user-msg-bg: #182030;
  --user-msg-border: #26334d;
  --user-msg-text: #f8fafc;

  --assistant-msg-bg: #121622;
  --assistant-msg-border: #1c2333;
  --assistant-msg-text: #e2e8f0;

  /* 코드 블록 스타일 */
  --code-block-bg: #090c13;
  --code-header-bg: #131824;
  --code-header-border: #1d2435;
  --code-text: #e2e8f0;
  --code-inline-bg: #1a2030;
  --code-inline-border: #2a3348;
  --code-inline-text: #93c5fd;

  --scrollbar-thumb: #232b3e;
  --scrollbar-thumb-hover: #323d57;
  --backdrop-color: rgba(6, 8, 13, 0.7);
}

/* ==========================================================================
   라이트 테마 (Codex / Clean Studio 개발자 도구 톤 - 독립적 팔레트)
   ========================================================================== */
[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-sidebar: #f1f5f9;
  --bg-header: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-hover: #e2e8f0;
  --bg-active: #cbd5e1;
  --bg-input: #ffffff;
  --bg-tooltip: #0f172a;

  --border-subtle: #e2e8f0;
  --border-normal: #cbd5e1;
  --border-focus: #2563eb;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-subtle: rgba(37, 99, 235, 0.08);
  --accent-text: #1d4ed8;

  --danger-primary: #dc2626;
  --danger-hover: #b91c1c;
  --danger-subtle: rgba(220, 38, 38, 0.08);
  --danger-text: #b91c1c;

  --success-primary: #059669;
  --success-subtle: rgba(5, 150, 105, 0.08);
  --success-text: #047857;

  --warning-primary: #d97706;
  --warning-subtle: rgba(217, 119, 6, 0.08);
  --warning-text: #b45309;

  /* 메시지 버블 스타일 */
  --user-msg-bg: #eff6ff;
  --user-msg-border: #bfdbfe;
  --user-msg-text: #0f172a;

  --assistant-msg-bg: #ffffff;
  --assistant-msg-border: #e2e8f0;
  --assistant-msg-text: #1e293b;

  /* 코드 블록 스타일 */
  --code-block-bg: #f8fafc;
  --code-header-bg: #eef2f6;
  --code-header-border: #cbd5e1;
  --code-text: #0f172a;
  --code-inline-bg: #f1f5f9;
  --code-inline-border: #e2e8f0;
  --code-inline-text: #1e40af;

  --scrollbar-thumb: #cbd5e1;
  --scrollbar-thumb-hover: #94a3b8;
  --backdrop-color: rgba(15, 23, 42, 0.4);
}
