返回 JoyAI-Echo
globals.css
1 @tailwind base;
2 @tailwind components;
3 @tailwind utilities;
4
5 @font-face {
6 font-family: "Cormorant Garamond";
7 src: url("/fonts/font.woff2") format("truetype");
8 font-weight: 300;
9 font-style: normal;
10 }
11
12 /* Design tokens — HSL form, sourced from shadcn/ui's "neutral" palette. */
13 @layer base {
14 :root {
15 --background: 0 0% 100%;
16 --foreground: 240 3% 12%;
17 --card: 0 0% 100%;
18 --card-foreground: 240 3% 12%;
19 --popover: 0 0% 100%;
20 --popover-foreground: 240 3% 12%;
21 --primary: 240 4% 16%;
22 --primary-foreground: 0 0% 98%;
23 --secondary: 0 0% 96.1%;
24 --secondary-foreground: 0 0% 9%;
25 --muted: 0 0% 96.1%;
26 --muted-foreground: 0 0% 45.1%;
27 --accent: 0 0% 96.1%;
28 --accent-foreground: 0 0% 9%;
29 --destructive: 0 84.2% 60.2%;
30 --destructive-foreground: 0 0% 98%;
31 --border: 0 0% 89.8%;
32 --input: 0 0% 89.8%;
33 --ring: 0 0% 3.9%;
34 --radius: 0.4375rem;
35 --sidebar: 0 0% 98%;
36 --sidebar-foreground: 0 0% 3.9%;
37 --sidebar-accent: 0 0% 96.1%;
38 --sidebar-accent-foreground: 0 0% 9%;
39 --sidebar-border: 0 0% 89.8%;
40 }
41
42 .dark {
43 --background: 0 0% 10%;
44 --foreground: 240 4% 96%;
45 --card: 0 0% 12%;
46 --card-foreground: 240 4% 96%;
47 --popover: 0 0% 12%;
48 --popover-foreground: 240 4% 96%;
49 --primary: 240 5% 98%;
50 --primary-foreground: 0 0% 9%;
51 --secondary: 0 0% 12%;
52 --secondary-foreground: 0 0% 98%;
53 --muted: 0 0% 13%;
54 --muted-foreground: 0 0% 60%;
55 --accent: 0 0% 15%;
56 --accent-foreground: 0 0% 98%;
57 --destructive: 0 62.8% 30.6%;
58 --destructive-foreground: 0 0% 98%;
59 --border: 0 0% 18%;
60 --input: 0 0% 18%;
61 --ring: 0 0% 83.1%;
62 --sidebar: 0 0% 12%;
63 --sidebar-foreground: 0 0% 98%;
64 --sidebar-accent: 0 0% 16%;
65 --sidebar-accent-foreground: 0 0% 98%;
66 --sidebar-border: 0 0% 18%;
67 }
68 }
69
70 @layer base {
71 * {
72 @apply border-border;
73 }
74
75 html,
76 body,
77 #root {
78 @apply h-full;
79 }
80
81 body {
82 @apply bg-background text-foreground font-sans antialiased;
83 }
84
85 ::selection {
86 @apply bg-primary/15;
87 }
88 }
89
90 @layer utilities {
91 @keyframes workplace-glass-sweep {
92 0% {
93 transform: translateX(-120%) skewX(-18deg);
94 opacity: 0;
95 }
96 20% {
97 opacity: 0.8;
98 }
99 55% {
100 opacity: 0.95;
101 }
102 100% {
103 transform: translateX(220%) skewX(-18deg);
104 opacity: 0;
105 }
106 }
107
108 .workplace-glass-loading::before {
109 content: "";
110 position: absolute;
111 inset: -30% auto -30% -45%;
112 z-index: 1;
113 width: 38%;
114 border-radius: 9999px;
115 background: linear-gradient(
116 90deg,
117 transparent,
118 rgb(255 255 255 / 0.16),
119 rgb(255 255 255 / 0.72),
120 rgb(255 255 255 / 0.18),
121 transparent
122 );
123 filter: blur(10px);
124 animation: workplace-glass-sweep 1.85s ease-in-out infinite;
125 pointer-events: none;
126 }
127
128 .shadow-inner-right {
129 box-shadow: inset -9px 0 6px -1px rgb(0 0 0 / 0.02);
130 }
131
132 /* Markdown body styles, ported from agent-chat-ui's markdown-styles.css. */
133 .markdown-content > :first-child {
134 @apply mt-0;
135 }
136 .markdown-content > :last-child {
137 @apply mb-0;
138 }
139
140 /* Override Tailwind Typography's built-in colors with our design tokens
141 so assistant messages use the same --foreground as user messages. */
142 .markdown-content {
143 --tw-prose-body: hsl(var(--foreground));
144 --tw-prose-headings: hsl(var(--foreground));
145 --tw-prose-bold: hsl(var(--foreground));
146 --tw-prose-lead: hsl(var(--foreground));
147 }
148
149 /* CJK-friendly line-height: prose paragraphs default to 1.625 which is
150 tight for Chinese/Japanese/Korean characters. Bump to 1.8 for better
151 readability when the browser detects a CJK primary font. */
152 :lang(zh),
153 :lang(zh-CN),
154 :lang(zh-TW),
155 :lang(zh-HK),
156 :lang(ja),
157 :lang(ko) {
158 --cjk-line-height: 1.8;
159 }
160 :root {
161 --cjk-line-height: 1.625;
162 }
163
164 /* Subtle scrollbar that doesn't fight the dark background. */
165 .scrollbar-thin {
166 scrollbar-width: thin;
167 scrollbar-color: hsl(var(--muted-foreground) / 0.4) transparent;
168 }
169 .scrollbar-thin::-webkit-scrollbar {
170 width: 6px;
171 height: 6px;
172 }
173 .scrollbar-thin::-webkit-scrollbar-thumb {
174 background-color: hsl(var(--muted-foreground) / 0.4);
175 border-radius: 9999px;
176 }
177 }
178
178 lines CSS