/* Theme definitions — CSS custom properties per data-theme attribute.
   Three themes: grimoire (default dark), parchment (light), void (OLED). */

:root {
    --font-display: 'Cinzel', serif;
    --font-body: 'Crimson Pro', serif;
}

/* Grimoire — deep indigo/slate, amber accents, parchment-tinted text */
[data-theme="grimoire"] {
    --bg-primary: #0f1219;
    --bg-secondary: #161b26;
    --bg-surface: #1c2333;
    --bg-input: #1a2030;
    --border-primary: #2a3348;
    --border-input: #2e3a50;
    --text-primary: #e8dcc8;
    --text-secondary: #b8a99a;
    --text-muted: #7a7068;
    --accent-primary: #d4a44a;
    --accent-hover: #e0b85c;
    --accent-muted: rgba(212, 164, 74, 0.15);
    --user-bubble-bg: rgba(140, 90, 20, 0.25);
    --user-bubble-text: #f0e0c8;
    --assistant-bubble-bg: rgba(28, 35, 51, 0.85);
    --assistant-bubble-text: #d8cec0;
    --code-block-bg: #111620;
    --code-block-text: #cdd6f4;
    --ring-color: rgba(212, 164, 74, 0.4);
    --shadow-glow: 0 0 12px rgba(212, 164, 74, 0.08);
    --danger: #c44;
    --danger-hover: #d55;
    --toast-bg: #1c2333;
    --toast-text: #e8dcc8;
    --toast-border: #2a3348;

    --noise-opacity: 0.03;
    --sidebar-bg: #10141c;
    --sidebar-header-bg: #141924;
    --sidebar-divider: #232d42;
    --sidebar-node-hover: rgba(212, 164, 74, 0.07);
    --sidebar-node-active: rgba(212, 164, 74, 0.14);
    --sidebar-die-bg: rgba(212, 164, 74, 0.12);
    --sidebar-die-border: rgba(212, 164, 74, 0.3);
}

/* Parchment — warm cream/ivory, dark ink text, burnt amber accents */
[data-theme="parchment"] {
    --bg-primary: #f4ece0;
    --bg-secondary: #ebe2d4;
    --bg-surface: #e2d8c8;
    --bg-input: #f8f2e8;
    --border-primary: #c8b898;
    --border-input: #d0c0a0;
    --text-primary: #2c2418;
    --text-secondary: #4a3e30;
    --text-muted: #8a7a68;
    --accent-primary: #b07820;
    --accent-hover: #c88a30;
    --accent-muted: rgba(176, 120, 32, 0.12);
    --user-bubble-bg: rgba(176, 120, 32, 0.15);
    --user-bubble-text: #2c2418;
    --assistant-bubble-bg: rgba(226, 216, 200, 0.7);
    --assistant-bubble-text: #2c2418;
    --code-block-bg: #ddd2c0;
    --code-block-text: #2c2418;
    --ring-color: rgba(176, 120, 32, 0.35);
    --shadow-glow: 0 0 8px rgba(176, 120, 32, 0.06);
    --danger: #a03030;
    --danger-hover: #b84040;
    --toast-bg: #ebe2d4;
    --toast-text: #2c2418;
    --toast-border: #c8b898;

    --noise-opacity: 0.02;
    --sidebar-bg: #e8dfcf;
    --sidebar-header-bg: #e2d8c8;
    --sidebar-divider: #c8b898;
    --sidebar-node-hover: rgba(176, 120, 32, 0.08);
    --sidebar-node-active: rgba(176, 120, 32, 0.15);
    --sidebar-die-bg: rgba(176, 120, 32, 0.1);
    --sidebar-die-border: rgba(176, 120, 32, 0.3);
}

/* Void — pure black, green-tinged terminal aesthetic */
[data-theme="void"] {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-surface: #111111;
    --bg-input: #0a0a0a;
    --border-primary: #1a1a1a;
    --border-input: #222;
    --text-primary: #c0ccb0;
    --text-secondary: #88a070;
    --text-muted: #506040;
    --accent-primary: #50b040;
    --accent-hover: #60c850;
    --accent-muted: rgba(80, 176, 64, 0.1);
    --user-bubble-bg: rgba(80, 176, 64, 0.1);
    --user-bubble-text: #b0ccb0;
    --assistant-bubble-bg: rgba(17, 17, 17, 0.9);
    --assistant-bubble-text: #a0b890;
    --code-block-bg: #080808;
    --code-block-text: #90b870;
    --ring-color: rgba(80, 176, 64, 0.3);
    --shadow-glow: 0 0 10px rgba(80, 176, 64, 0.06);
    --danger: #c04040;
    --danger-hover: #d05050;
    --toast-bg: #111;
    --toast-text: #c0ccb0;
    --toast-border: #222;

    --noise-opacity: 0.02;
    --font-display: 'Courier New', monospace;
    --font-body: 'Courier New', monospace;
    --sidebar-bg: #050505;
    --sidebar-header-bg: #0a0a0a;
    --sidebar-divider: #1a1a1a;
    --sidebar-node-hover: rgba(80, 176, 64, 0.06);
    --sidebar-node-active: rgba(80, 176, 64, 0.12);
    --sidebar-die-bg: rgba(80, 176, 64, 0.08);
    --sidebar-die-border: rgba(80, 176, 64, 0.25);
}