index.css 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. /*
  2. InkOS Studio — Atmospheric Literary Workbench
  3. Fonts: Instrument Serif (Headings/Literary), DM Sans (UI), JetBrains Mono (Data)
  4. */
  5. @import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');
  6. @import "tailwindcss";
  7. @import "tw-animate-css";
  8. @import "shadcn/tailwind.css";
  9. @custom-variant dark (&:is(.dark *));
  10. @theme inline {
  11. --color-background: var(--background);
  12. --color-foreground: var(--foreground);
  13. --color-card: var(--card);
  14. --color-card-foreground: var(--card-foreground);
  15. --color-popover: var(--popover);
  16. --color-popover-foreground: var(--popover-foreground);
  17. --color-primary: var(--primary);
  18. --color-primary-foreground: var(--primary-foreground);
  19. --color-secondary: var(--secondary);
  20. --color-secondary-foreground: var(--secondary-foreground);
  21. --color-muted: var(--muted);
  22. --color-muted-foreground: var(--muted-foreground);
  23. --color-accent: var(--accent);
  24. --color-accent-foreground: var(--accent-foreground);
  25. --color-destructive: var(--destructive);
  26. --color-destructive-foreground: var(--destructive-foreground);
  27. --color-border: var(--border);
  28. --color-input: var(--input);
  29. --color-ring: var(--ring);
  30. --radius-sm: calc(var(--radius) - 4px);
  31. --radius-md: calc(var(--radius) - 2px);
  32. --radius-lg: var(--radius);
  33. --radius-xl: calc(var(--radius) + 4px);
  34. --font-serif: 'Instrument Serif', Georgia, serif;
  35. --font-sans: 'DM Sans', system-ui, sans-serif;
  36. --font-mono: 'JetBrains Mono', monospace;
  37. --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  38. --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  39. --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  40. --shadow-soft: 0 2px 15px -3px oklch(0 0 0 / 0.07), 0 4px 6px -4px oklch(0 0 0 / 0.05);
  41. --shadow-3d: 0 10px 30px -10px oklch(0 0 0 / 0.15), 0 4px 10px -5px oklch(0 0 0 / 0.1);
  42. --shadow-3d-hover: 0 20px 40px -15px oklch(0 0 0 / 0.2), 0 8px 16px -8px oklch(0 0 0 / 0.15);
  43. }
  44. /* ── Light Mode: Warm Parchment & Ink ── */
  45. :root {
  46. --radius: 0.6rem;
  47. /* Background: Warm, aged paper with subtle radial light */
  48. --background: oklch(0.985 0.005 80);
  49. --background-radial: radial-gradient(circle at 50% 0%, oklch(0.995 0.002 85) 0%, oklch(0.985 0.005 80) 100%);
  50. --foreground: oklch(0.13 0.02 60);
  51. /* Cards: Crisp sheets on paper */
  52. --card: oklch(1 0 0);
  53. --card-foreground: oklch(0.15 0.015 60);
  54. --popover: oklch(1 0 0);
  55. --popover-foreground: oklch(0.15 0.015 60);
  56. /* Primary: Deep Oxblood / Ink */
  57. --primary: oklch(0.45 0.12 25);
  58. --primary-foreground: oklch(0.98 0.006 76);
  59. /* Secondary: Soft paper shadow */
  60. --secondary: oklch(0.94 0.01 76);
  61. --secondary-foreground: oklch(0.25 0.015 60);
  62. /* Muted: Faded ink */
  63. --muted: oklch(0.94 0.008 76);
  64. --muted-foreground: oklch(0.38 0.02 60);
  65. /* Accent: Subtle gold leaf */
  66. --accent: oklch(0.92 0.02 85);
  67. --accent-foreground: oklch(0.25 0.05 60);
  68. --destructive: oklch(0.55 0.18 25);
  69. --destructive-foreground: oklch(0.98 0 0);
  70. --border: oklch(0.84 0.01 76);
  71. --input: oklch(0.92 0.005 76);
  72. --ring: oklch(0.45 0.12 25);
  73. }
  74. /* ── Dark Mode: Obsidian & Candlelight ── */
  75. .dark {
  76. /* Background: Deep obsidian with soft top glow */
  77. --background: oklch(0.12 0.01 250);
  78. --background-radial: radial-gradient(circle at 50% 0%, oklch(0.16 0.015 250) 0%, oklch(0.12 0.01 250) 100%);
  79. --foreground: oklch(0.97 0.005 250);
  80. /* Cards: Floating graphite */
  81. --card: oklch(0.18 0.015 250);
  82. --card-foreground: oklch(0.95 0.005 250);
  83. --popover: oklch(0.18 0.015 250);
  84. --popover-foreground: oklch(0.95 0.005 250);
  85. /* Primary: Warm Amber / Candlelight */
  86. --primary: oklch(0.78 0.14 85);
  87. --primary-foreground: oklch(0.12 0.01 250);
  88. /* Secondary: Dark slate */
  89. --secondary: oklch(0.22 0.02 250);
  90. --secondary-foreground: oklch(0.92 0.005 250);
  91. /* Muted: Dimmed graphite */
  92. --muted: oklch(0.22 0.015 250);
  93. --muted-foreground: oklch(0.78 0.005 250);
  94. /* Accent: Muted gold */
  95. --accent: oklch(0.28 0.04 85);
  96. --accent-foreground: oklch(0.95 0.06 85);
  97. --destructive: oklch(0.55 0.2 25);
  98. --destructive-foreground: oklch(0.98 0 0);
  99. --border: oklch(0.30 0.02 250);
  100. --input: oklch(0.25 0.02 250);
  101. --ring: oklch(0.78 0.14 85);
  102. }
  103. body {
  104. font-family: var(--font-sans);
  105. font-size: 15px;
  106. font-weight: 450;
  107. line-height: 1.6;
  108. -webkit-font-smoothing: antialiased;
  109. -moz-osx-font-smoothing: grayscale;
  110. background: var(--background-radial);
  111. background-attachment: fixed;
  112. color: var(--foreground);
  113. transition: background 0.5s ease, color 0.5s ease;
  114. }
  115. /* ── Cursor interaction rules ── */
  116. button, [role="button"], a, select, label[for], summary { cursor: pointer; }
  117. button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
  118. input[type="text"], input[type="number"], input[type="email"], input[type="password"], textarea { cursor: text; }
  119. input[type="checkbox"], input[type="radio"] { cursor: pointer; }
  120. /* Button hover micro-feedback */
  121. button:not(:disabled):active {
  122. transform: scale(0.97);
  123. transition: transform 0.1s ease;
  124. }
  125. /* Subtle grain texture for physical feel */
  126. body::before {
  127. content: '';
  128. position: fixed;
  129. inset: 0;
  130. pointer-events: none;
  131. z-index: 50;
  132. opacity: 0.035;
  133. background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  134. mix-blend-mode: overlay;
  135. }
  136. /* Serif headings with literary character */
  137. h1, h2, h3, h4 {
  138. font-family: var(--font-serif);
  139. letter-spacing: -0.02em;
  140. font-weight: 500;
  141. }
  142. h1 { font-size: 2.25rem; font-style: italic; }
  143. h2 { font-size: 1.75rem; }
  144. h3 { font-size: 1.25rem; }
  145. /* Focus indicator */
  146. :focus-visible {
  147. outline: 2px solid var(--ring);
  148. outline-offset: 2px;
  149. }
  150. /* Custom Scrollbar */
  151. ::-webkit-scrollbar {
  152. width: 6px;
  153. height: 6px;
  154. }
  155. ::-webkit-scrollbar-track {
  156. background: transparent;
  157. }
  158. ::-webkit-scrollbar-thumb {
  159. background: var(--border);
  160. border-radius: 10px;
  161. }
  162. ::-webkit-scrollbar-thumb:hover {
  163. background: var(--muted-foreground);
  164. }
  165. /* ── Animation Classes ── */
  166. .fade-in {
  167. animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  168. }
  169. .stagger-1 { animation-delay: 0.05s; opacity: 0; }
  170. .stagger-2 { animation-delay: 0.1s; opacity: 0; }
  171. .stagger-3 { animation-delay: 0.15s; opacity: 0; }
  172. .stagger-4 { animation-delay: 0.2s; opacity: 0; }
  173. .stagger-5 { animation-delay: 0.25s; opacity: 0; }
  174. @keyframes fadeIn {
  175. from { opacity: 0; transform: translateY(8px); }
  176. to { opacity: 1; transform: translateY(0); }
  177. }
  178. /* ── Premium Layout Utilities ── */
  179. .glass-panel {
  180. backdrop-blur: 16px;
  181. background-color: color-mix(in oklch, var(--card) 70%, transparent);
  182. border: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
  183. box-shadow: var(--shadow-3d);
  184. }
  185. .paper-sheet {
  186. background-color: var(--card);
  187. border: 1px solid var(--border);
  188. box-shadow: var(--shadow-md);
  189. transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
  190. border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  191. }
  192. .paper-sheet:hover {
  193. box-shadow: var(--shadow-3d-hover);
  194. border-color: var(--primary);
  195. }
  196. /* ── ChatPanel Animations ── */
  197. /* Header sparkle glow pulse */
  198. @keyframes iconGlow {
  199. 0%, 100% { filter: drop-shadow(0 0 0px transparent); }
  200. 50% { filter: drop-shadow(0 0 6px oklch(0.78 0.14 85 / 0.4)); }
  201. }
  202. .chat-icon-glow { animation: iconGlow 2s ease-in-out infinite; }
  203. /* Writing pen gentle bobbing */
  204. @keyframes iconWrite {
  205. 0%, 100% { transform: translateY(0) rotate(0deg); }
  206. 25% { transform: translateY(-1px) rotate(-3deg); }
  207. 75% { transform: translateY(1px) rotate(3deg); }
  208. }
  209. .chat-icon-write { animation: iconWrite 1.2s ease-in-out infinite; }
  210. /* Slow spin for revision/wrench */
  211. @keyframes spinSlow {
  212. from { transform: rotate(0deg); }
  213. to { transform: rotate(360deg); }
  214. }
  215. .chat-icon-spin-slow { animation: spinSlow 3s linear infinite; }
  216. /* Pop-in for success checkmark */
  217. @keyframes iconPop {
  218. 0% { transform: scale(0); opacity: 0; }
  219. 60% { transform: scale(1.2); }
  220. 100% { transform: scale(1); opacity: 1; }
  221. }
  222. .chat-icon-pop { animation: iconPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  223. /* Shake for trash icon hover */
  224. @keyframes shake {
  225. 0%, 100% { transform: translateX(0); }
  226. 25% { transform: translateX(-2px) rotate(-5deg); }
  227. 75% { transform: translateX(2px) rotate(5deg); }
  228. }
  229. /* Message slide-in from right (user) */
  230. @keyframes msgSlideRight {
  231. from { opacity: 0; transform: translateX(12px); }
  232. to { opacity: 1; transform: translateX(0); }
  233. }
  234. .chat-msg-user { animation: msgSlideRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  235. /* Message slide-in from left (assistant) */
  236. @keyframes msgSlideLeft {
  237. from { opacity: 0; transform: translateX(-12px); }
  238. to { opacity: 1; transform: translateX(0); }
  239. }
  240. .chat-msg-assistant { animation: msgSlideLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  241. /* Thinking breathing glow */
  242. @keyframes thinkGlow {
  243. 0%, 100% { box-shadow: 0 0 0 0 oklch(0.78 0.14 85 / 0); }
  244. 50% { box-shadow: 0 0 12px 2px oklch(0.78 0.14 85 / 0.15); }
  245. }
  246. .chat-thinking-glow { animation: thinkGlow 2s ease-in-out infinite; }
  247. /* Typing wave for dots */
  248. @keyframes typingWave {
  249. 0%, 60%, 100% { transform: translateY(0); }
  250. 30% { transform: translateY(-6px); }
  251. }
  252. .chat-typing-dot { animation: typingWave 1.4s ease-in-out infinite; }
  253. .chat-typing-dot:nth-child(2) { animation-delay: 0.15s; }
  254. .chat-typing-dot:nth-child(3) { animation-delay: 0.3s; }
  255. /* Panel slide transition */
  256. .chat-panel-enter {
  257. transition: width 300ms cubic-bezier(0.16, 1, 0.3, 1),
  258. opacity 200ms ease-out;
  259. }
  260. /* ── Streamdown overrides ── */
  261. [data-streamdown="table-wrapper"] {
  262. border: none;
  263. background: transparent;
  264. padding: 0;
  265. }
  266. [data-streamdown="table-wrapper"] > .flex.items-center.justify-end {
  267. display: none;
  268. }