styles.css 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. @import url("./styles/animations.css");
  2. @import url("./styles/fonts.css");
  3. :root {
  4. --bg-color: #1a1a24;
  5. --panel-bg: rgba(30, 30, 40, 0.6);
  6. --panel-border: rgba(255, 255, 255, 0.1);
  7. --text-color: #eee;
  8. --accent-color: #4f46e5;
  9. --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  10. --glass-blur: blur(12px);
  11. }
  12. * {
  13. box-sizing: border-box;
  14. margin: 0;
  15. padding: 0;
  16. }
  17. body {
  18. font-family: 'Inter', 'Roboto', sans-serif;
  19. background: radial-gradient(circle at top right, #2b1055, #000000);
  20. background-attachment: fixed;
  21. color: var(--text-color);
  22. display: flex;
  23. align-items: center;
  24. justify-content: center;
  25. min-height: 100vh;
  26. margin: 0;
  27. transition: background 0.5s ease, color 0.5s ease;
  28. }
  29. body.light-mode {
  30. --bg-color: #f0f0f5;
  31. --panel-bg: rgba(255, 255, 255, 0.85);
  32. --panel-border: rgba(0, 0, 0, 0.1);
  33. --text-color: #333;
  34. --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  35. background: radial-gradient(circle at top right, #e0eaf5, #ffffff);
  36. }
  37. body.light-mode button {
  38. background: rgba(0, 0, 0, 0.05);
  39. color: #333;
  40. }
  41. body.light-mode button:hover {
  42. background: rgba(0, 0, 0, 0.1);
  43. }
  44. body.light-mode .message-box {
  45. background: rgba(255, 255, 255, 0.95);
  46. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  47. }
  48. body.light-mode .message-header {
  49. background: rgba(0, 0, 0, 0.03);
  50. }
  51. body.light-mode #toolbar {
  52. background: rgba(0, 0, 0, 0.05);
  53. }
  54. body.light-mode .toolbar-divider {
  55. background: rgba(0, 0, 0, 0.1);
  56. }
  57. body.light-mode #toolbar button img {
  58. filter: invert(0);
  59. }
  60. body.light-mode .system-message-box {
  61. background: rgba(0, 0, 0, 0.05);
  62. border: 1px solid rgba(0, 0, 0, 0.1);
  63. color: #555;
  64. }
  65. body.light-mode .swatch {
  66. border: 2px solid rgba(0,0,0,0.2);
  67. }
  68. body.light-mode .swatch.active-swatch {
  69. border-color: black;
  70. box-shadow: 0 0 8px rgba(0,0,0,0.5);
  71. }
  72. body.light-mode input[type="color"]::-webkit-color-swatch {
  73. border: 2px solid rgba(0,0,0,0.2);
  74. }
  75. /* Stream mode for OBS */
  76. body.stream-mode {
  77. background: transparent !important;
  78. }
  79. body.stream-mode .container {
  80. width: 100vw;
  81. height: 100vh;
  82. margin: 0;
  83. padding: 0;
  84. border: none;
  85. background: transparent;
  86. }
  87. body.stream-mode #user-message-form {
  88. display: none !important;
  89. }
  90. body.stream-mode #chat-log {
  91. flex: 1;
  92. background: transparent !important;
  93. border: none !important;
  94. box-shadow: none !important;
  95. backdrop-filter: none !important;
  96. -webkit-backdrop-filter: none !important;
  97. }
  98. body.stream-mode #chat-log::-webkit-scrollbar {
  99. display: none; /* Hide scrollbar for clean stream output */
  100. }
  101. .container {
  102. display: flex;
  103. flex-direction: column-reverse;
  104. width: 90vw;
  105. height: 90vh;
  106. padding: 10px;
  107. gap: 15px;
  108. }
  109. @media (min-width: 768px) {
  110. .container {
  111. flex-direction: row;
  112. padding: 20px;
  113. }
  114. }
  115. /* Glassmorphism panels */
  116. #chat-log, #user-message-form {
  117. background: var(--panel-bg);
  118. backdrop-filter: var(--glass-blur);
  119. -webkit-backdrop-filter: var(--glass-blur);
  120. border: 1px solid var(--panel-border);
  121. border-radius: 16px;
  122. box-shadow: var(--glass-shadow);
  123. padding: 15px;
  124. }
  125. #chat-log {
  126. flex: 1;
  127. display: flex;
  128. flex-direction: column-reverse;
  129. gap: 15px;
  130. overflow-y: auto;
  131. }
  132. #user-message-form {
  133. display: flex;
  134. flex-direction: column;
  135. gap: 15px;
  136. transition: all 0.3s ease;
  137. }
  138. @media (min-width: 768px) {
  139. #user-message-form {
  140. flex: 2; /* Take up more space */
  141. max-width: 800px;
  142. }
  143. }
  144. /* Fullscreen mode for drawing */
  145. body.fullscreen-mode #user-message-form {
  146. position: fixed;
  147. top: 5vh;
  148. left: 5vw;
  149. width: 90vw;
  150. height: 90vh;
  151. max-width: none;
  152. z-index: 1000;
  153. box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  154. }
  155. body.fullscreen-mode #chat-log {
  156. opacity: 0.2;
  157. }
  158. .form-main {
  159. display: flex;
  160. flex-direction: column;
  161. gap: 15px;
  162. flex: 1;
  163. }
  164. #toolbar {
  165. display: flex;
  166. flex-direction: row;
  167. justify-content: center;
  168. align-items: center;
  169. gap: 10px;
  170. background: rgba(0,0,0,0.2);
  171. padding: 10px;
  172. border-radius: 12px;
  173. flex-shrink: 0;
  174. position: relative;
  175. }
  176. .toolbar-divider {
  177. height: 24px;
  178. width: 1px;
  179. background: rgba(255, 255, 255, 0.2);
  180. margin: 0 5px;
  181. }
  182. button {
  183. background: rgba(255, 255, 255, 0.05);
  184. border: 1px solid var(--panel-border);
  185. border-radius: 8px;
  186. color: var(--text-color);
  187. padding: 8px 16px;
  188. cursor: pointer;
  189. transition: all 0.2s ease;
  190. font-weight: 500;
  191. font-family: inherit;
  192. }
  193. button:hover {
  194. background: rgba(255, 255, 255, 0.1);
  195. transform: translateY(-2px);
  196. }
  197. button:active {
  198. transform: translateY(0);
  199. }
  200. button.active-tool {
  201. background: var(--accent-color);
  202. border-color: #6366f1;
  203. box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  204. }
  205. #toolbar button {
  206. width: 40px;
  207. height: 40px;
  208. padding: 5px;
  209. display: flex;
  210. align-items: center;
  211. justify-content: center;
  212. }
  213. #toolbar button img {
  214. width: 24px;
  215. height: 24px;
  216. filter: invert(1);
  217. }
  218. .palette-container {
  219. position: relative;
  220. display: flex;
  221. align-items: center;
  222. }
  223. #palette-toggle {
  224. display: none;
  225. }
  226. #color-palette {
  227. display: flex;
  228. flex-wrap: wrap;
  229. gap: 5px;
  230. justify-content: center;
  231. align-items: center;
  232. }
  233. @media (max-aspect-ratio: 1/1) {
  234. #palette-toggle {
  235. display: flex;
  236. }
  237. #color-palette {
  238. display: none;
  239. position: absolute;
  240. top: 110%;
  241. left: 50%;
  242. transform: translateX(-50%);
  243. background: var(--panel-bg);
  244. backdrop-filter: var(--glass-blur);
  245. padding: 10px;
  246. border-radius: 12px;
  247. border: 1px solid var(--panel-border);
  248. box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  249. z-index: 100;
  250. width: 140px;
  251. }
  252. #color-palette.show-palette {
  253. display: flex;
  254. }
  255. body.light-mode #color-palette {
  256. background: rgba(255, 255, 255, 0.95);
  257. }
  258. }
  259. .swatch {
  260. width: 24px;
  261. height: 24px;
  262. border-radius: 50%;
  263. border: 2px solid rgba(255,255,255,0.2);
  264. cursor: pointer;
  265. transition: transform 0.2s, border-color 0.2s;
  266. padding: 0;
  267. }
  268. .swatch:hover {
  269. transform: scale(1.1);
  270. }
  271. .swatch.active-swatch {
  272. border-color: white;
  273. transform: scale(1.2);
  274. box-shadow: 0 0 8px rgba(255,255,255,0.8);
  275. }
  276. .swatch-picker-container {
  277. display: inline-flex;
  278. align-items: center;
  279. justify-content: center;
  280. }
  281. #form-button-row {
  282. display: flex;
  283. gap: 10px;
  284. margin-top: auto;
  285. }
  286. #form-button-row button {
  287. flex: 1;
  288. font-size: 16px;
  289. padding: 12px;
  290. }
  291. /* User Message Box (The canvas container) */
  292. .message-box {
  293. background: rgba(20, 20, 25, 0.8);
  294. border: 1px solid var(--panel-border);
  295. border-radius: 12px;
  296. overflow: hidden;
  297. display: flex;
  298. flex-direction: column;
  299. transition: transform 0.3s ease;
  300. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  301. flex-shrink: 0;
  302. }
  303. .message-header {
  304. background: rgba(255, 255, 255, 0.05);
  305. padding: 8px 12px;
  306. font-size: 0.9em;
  307. font-weight: 600;
  308. border-bottom: 1px solid var(--panel-border);
  309. color: var(--user-custom-color, var(--accent-color));
  310. }
  311. .canvas {
  312. position: relative;
  313. width: 100%;
  314. aspect-ratio: 856 / 312;
  315. background: #ffffff;
  316. cursor: crosshair;
  317. }
  318. .canvas canvas, .canvas img {
  319. position: absolute;
  320. top: 0;
  321. left: 0;
  322. width: 100%;
  323. height: 100%;
  324. object-fit: contain;
  325. image-rendering: pixelated;
  326. }
  327. .chat-canvas {
  328. position: relative;
  329. width: 100%;
  330. background: #ffffff;
  331. }
  332. .chat-canvas img {
  333. display: block;
  334. width: 100%;
  335. height: auto;
  336. image-rendering: pixelated;
  337. }
  338. .message-text {
  339. position: absolute;
  340. top: 0;
  341. left: 0;
  342. width: 100%;
  343. height: 100%;
  344. padding: 10px;
  345. color: #000;
  346. font-family: 'Inter', sans-serif;
  347. font-size: 16px;
  348. pointer-events: none;
  349. z-index: 10;
  350. word-wrap: break-word;
  351. }
  352. .system-message-box {
  353. background: rgba(255, 215, 0, 0.1);
  354. border: 1px solid rgba(255, 215, 0, 0.3);
  355. color: #ffd700;
  356. padding: 10px 15px;
  357. border-radius: 8px;
  358. font-size: 0.9em;
  359. text-align: center;
  360. align-self: center;
  361. flex-shrink: 0;
  362. }
  363. input[type="color"] {
  364. -webkit-appearance: none;
  365. border: none;
  366. width: 24px;
  367. height: 24px;
  368. border-radius: 50%;
  369. cursor: pointer;
  370. background: transparent;
  371. padding: 0;
  372. }
  373. input[type="color"]::-webkit-color-swatch-wrapper {
  374. padding: 0;
  375. }
  376. input[type="color"]::-webkit-color-swatch {
  377. border: 2px solid rgba(255,255,255,0.2);
  378. border-radius: 50%;
  379. box-shadow: 0 0 5px rgba(0,0,0,0.5);
  380. }
  381. #chat-log .message-box {
  382. animation: message-appear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  383. }
  384. @keyframes message-appear {
  385. from { opacity: 0; transform: translateY(20px) scale(0.95); }
  386. to { opacity: 1; transform: translateY(0) scale(1); }
  387. }
  388. /* Custom scrollbar for chat log */
  389. #chat-log::-webkit-scrollbar {
  390. width: 8px;
  391. }
  392. #chat-log::-webkit-scrollbar-track {
  393. background: rgba(0,0,0,0.1);
  394. border-radius: 4px;
  395. }
  396. #chat-log::-webkit-scrollbar-thumb {
  397. background: rgba(255,255,255,0.2);
  398. border-radius: 4px;
  399. }
  400. #chat-log::-webkit-scrollbar-thumb:hover {
  401. background: rgba(255,255,255,0.3);
  402. }
  403. /* Auth page tweaks */
  404. .login.container {
  405. flex-direction: column;
  406. height: initial;
  407. max-width: 400px;
  408. padding: 20px;
  409. background: var(--panel-bg);
  410. backdrop-filter: var(--glass-blur);
  411. border-radius: 16px;
  412. }
  413. h1 {
  414. text-align: center;
  415. font-size: 24px;
  416. margin-bottom: 20px;
  417. }
  418. form {
  419. display: flex;
  420. flex-direction: column;
  421. gap: 15px;
  422. }
  423. input[type="text"] {
  424. background: rgba(0,0,0,0.2);
  425. border: 1px solid var(--panel-border);
  426. color: var(--text-color);
  427. border-radius: 8px;
  428. padding: 10px 15px;
  429. font-size: 16px;
  430. }
  431. form > button {
  432. padding: 10px;
  433. font-size: 16px;
  434. }