kvyb commited on
Commit
253c5ce
·
verified ·
1 Parent(s): 99b0206

Add automatic dark mode

Browse files
Files changed (1) hide show
  1. index.html +13 -0
index.html CHANGED
@@ -38,6 +38,19 @@
38
  animation: spin 0.8s linear infinite;
39
  }
40
  @keyframes spin { to { transform: rotate(360deg); } }
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  @media (max-width: 600px) {
42
  form { grid-template-columns: 1fr; }
43
  .controls { flex-direction: row; align-items: end; justify-content: space-between; }
 
38
  animation: spin 0.8s linear infinite;
39
  }
40
  @keyframes spin { to { transform: rotate(360deg); } }
41
+ @media (prefers-color-scheme: dark) {
42
+ :root { color-scheme: dark; }
43
+ body { color: #f3f4f6; background: #111827; }
44
+ .endpoint { color: #9ca3af; background: #0f172a; border-color: #374151; }
45
+ code { color: #d1d5db; }
46
+ .assistant { background: #1f2937; }
47
+ .error { color: #fecaca; background: #450a0a; }
48
+ form { border-color: #374151; }
49
+ textarea, input { color: #f3f4f6; background: #1f2937; border-color: #4b5563; }
50
+ label, #status { color: #9ca3af; }
51
+ textarea:focus, input:focus, button:focus-visible { outline-color: #818cf8; }
52
+ #status.loading::before { border-color: #4b5563; border-top-color: #818cf8; }
53
+ }
54
  @media (max-width: 600px) {
55
  form { grid-template-columns: 1fr; }
56
  .controls { flex-direction: row; align-items: end; justify-content: space-between; }