33@tailwind utilities;
44
55/* Prevent theme flash on page load - set default background */
6- html {
7- background-color : # 000000 ; /* safe default for dark/mono to avoid white flash */
6+ html , body , # __next , : root {
7+ background-color : transparent ; /* allow theme to control actual color */
88 color-scheme : light; /* default */
9+ min-height : 100% ;
910}
1011
1112/* Match browser chrome/overscroll color to theme by default */
12- @media (prefers-color-scheme : light) {
13- html { background-color : # f9fafb ; }
14- }
15- @media (prefers-color-scheme : dark) {
16- html { background-color : # 111827 ; color-scheme : dark; }
17- }
13+ @media (prefers-color-scheme : light) { html { background-color : # f9fafb ; } }
14+ @media (prefers-color-scheme : dark) { html { background-color : # 111827 ; color-scheme : dark; } }
1815
1916/* Themed scrollbars (WebKit + Firefox) */
2017/* Base (light) */
3936
4037/* Dark */
4138.dark html , .modern-dark html , .mono html { scrollbar-color : # 0f172a transparent; }
42- .dark html , .modern-dark html , .mono html { color-scheme : dark; }
39+ .dark html , .modern-dark html , .mono html { color-scheme : dark; }
40+ .mono html { background-color : # 000000 ; }
4341.dark * ::-webkit-scrollbar-track ,
4442.modern-dark * ::-webkit-scrollbar-track ,
4543.mono * ::-webkit-scrollbar-track { background : transparent; }
@@ -98,8 +96,20 @@ body.theme-loaded {
9896 .light html , .light body {
9997 @apply bg-gray-50;
10098 }
101- .dark html , .dark body {
102- @apply bg-gray-900;
99+ .dark html , .dark body { @apply bg-gray-900; }
100+ .light html , .light body { @apply bg-gray-50; }
101+ .dark html , .dark body { @apply bg-gray-900; }
102+ .mono html , .mono body { @apply bg-black; }
103+ .light html , .light body , .dark html , .dark body , .mono html , .mono body { min-height : 100% ; }
104+
105+ /* Force overscroll/out-of-bounds to match active theme */
106+ .light html , .light body , .light : root , .light # __next { background-color : # f9fafb !important ; }
107+ .dark html , .dark body , .dark : root , .dark # __next { background-color : # 111827 !important ; }
108+ .mono html , .mono body , .mono : root , .mono # __next { background-color : # 000000 !important ; }
109+
110+ /* Ensure the viewport/out-of-bounds rubber-band area inherits theme color */
111+ html , body {
112+ background-color : inherit;
103113 }
104114
105115 /* Override body background for modern themes */
@@ -174,8 +184,14 @@ body.theme-loaded {
174184
175185 .mono .card ,
176186 .mono .bg-white ,
177- .mono .bg-gray-50 ,
178- .mono .bg-gray-800 {
187+ .mono .bg-gray-50 {
188+ @apply bg-black border border-white/20 rounded-lg shadow-[inset_0_1px_0_rgba (255 , 255 , 255 , 0.03 ), 0_8px _30px _rgba(0 , 0 , 0 , 0.6 )];
189+ }
190+
191+ /* Override gray-800 only for cards and containers, not for color indicators */
192+ .mono .card .bg-gray-800 ,
193+ .mono .bg-white .bg-gray-800 ,
194+ .mono .bg-gray-50 .bg-gray-800 {
179195 @apply bg-black border border-white/20 rounded-lg shadow-[inset_0_1px_0_rgba (255 , 255 , 255 , 0.03 ), 0_8px _30px _rgba(0 , 0 , 0 , 0.6 )];
180196 }
181197
@@ -242,18 +258,31 @@ body.theme-loaded {
242258 .mono .from- * ,
243259 .mono .to- * { /* no-op to avoid gradients */ }
244260
245- .mono .bg-blue-600 ,
246- .mono .bg-red-600 ,
247- .mono .bg-green-600 ,
248- .mono .bg-purple-600 ,
249- .mono .bg-blue-700 ,
250- .mono .bg-red-700 ,
251- .mono .bg-green-700 ,
252- .mono .bg-purple-700 ,
253- .mono .bg-blue-800 ,
254- .mono .bg-red-800 ,
255- .mono .bg-green-800 ,
256- .mono .bg-purple-800 {
261+ /* Override colored backgrounds only for UI elements, not for group color indicators */
262+ .mono .card .bg-blue-600 ,
263+ .mono .card .bg-red-600 ,
264+ .mono .card .bg-green-600 ,
265+ .mono .card .bg-purple-600 ,
266+ .mono .card .bg-blue-700 ,
267+ .mono .card .bg-red-700 ,
268+ .mono .card .bg-green-700 ,
269+ .mono .card .bg-purple-700 ,
270+ .mono .card .bg-blue-800 ,
271+ .mono .card .bg-red-800 ,
272+ .mono .card .bg-green-800 ,
273+ .mono .card .bg-purple-800 ,
274+ .mono .bg-white .bg-blue-600 ,
275+ .mono .bg-white .bg-red-600 ,
276+ .mono .bg-white .bg-green-600 ,
277+ .mono .bg-white .bg-purple-600 ,
278+ .mono .bg-white .bg-blue-700 ,
279+ .mono .bg-white .bg-red-700 ,
280+ .mono .bg-white .bg-green-700 ,
281+ .mono .bg-white .bg-purple-700 ,
282+ .mono .bg-white .bg-blue-800 ,
283+ .mono .bg-white .bg-red-800 ,
284+ .mono .bg-white .bg-green-800 ,
285+ .mono .bg-white .bg-purple-800 {
257286 @apply bg-black;
258287 }
259288
@@ -499,7 +528,8 @@ body.theme-loaded {
499528 background-color : # 1f1f1f !important ;
500529 border : 1px solid rgba (255 , 255 , 255 , 0.2 ) !important ;
501530 }
502- .mono [class *= "inline-flex" ][class *= "h-5" ][class *= "w-9" ][class *= "rounded-full" ][class *= "bg-" ] {
531+ /* Override toggle switches only, not group color indicators */
532+ .mono [class *= "inline-flex" ][class *= "h-5" ][class *= "w-9" ][class *= "rounded-full" ][class *= "bg-" ]: not ([class *= "w-10" ][class *= "h-10" ]) {
503533 background-color : # 1f1f1f !important ;
504534 border : 1px solid rgba (255 , 255 , 255 , 0.2 ) !important ;
505535 }
@@ -509,7 +539,8 @@ body.theme-loaded {
509539 background-color : # 1f1f1f !important ;
510540 border : 1px solid rgba (255 , 255 , 255 , 0.2 ) !important ;
511541 }
512- .mono [class *= "inline-flex" ][class *= "h-6" ][class *= "w-11" ][class *= "rounded-full" ][class *= "bg-" ] {
542+ /* Override toggle switches only, not group color indicators */
543+ .mono [class *= "inline-flex" ][class *= "h-6" ][class *= "w-11" ][class *= "rounded-full" ][class *= "bg-" ]: not ([class *= "w-10" ][class *= "h-10" ]) {
513544 background-color : # 1f1f1f !important ;
514545 border : 1px solid rgba (255 , 255 , 255 , 0.2 ) !important ;
515546 }
@@ -652,6 +683,15 @@ body.theme-loaded {
652683}
653684
654685@layer components {
686+ /* When a modal overlay is present, dim all fixed headers/buttons except the modal */
687+ .modal-open .fixed ,
688+ .modal-open [class *= "z-" ] {
689+ filter : brightness (0.8 );
690+ }
691+ .modal-open .modal-root ,
692+ .modal-open .modal-root * {
693+ filter : none !important ;
694+ }
655695 .btn {
656696 @apply inline-flex items-center justify-center px-4 py-2 text-sm font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed;
657697 }
0 commit comments