Estazz commited on
Commit
bb5286d
·
verified ·
1 Parent(s): ac65721

Update styles.py

Browse files
Files changed (1) hide show
  1. styles.py +370 -113
styles.py CHANGED
@@ -1,200 +1,457 @@
1
  """
2
- 样式文件 - 集中管理 CSS 样式
3
  """
4
 
5
  POKER_THEME_CSS = """
6
-
7
  @media (prefers-color-scheme: light) {
8
  :root {
9
  color-scheme: dark !important;
10
  }
11
  }
12
 
13
-
14
- :root{
15
  color-scheme: dark !important;
16
- /* 桌面与通用色,不变 */
17
- --felt:#0e6b3d; /* 绿色绒面 */
18
- --felt-2:#0b5a34;
19
- --wood:#72451d;
20
- --wood-2:#5e3717;
21
- --ink:#f3f4f6;
22
- --muted:#cbd5e1;
23
 
24
- /* ===== HERO 渐变预设(左深 → 右浅)===== */
25
- /* 预设 A:Emerald → Soft Rouge(推荐,赌场绿+柔和红,左侧白字对比最佳) */
26
- --hero-left:#081813; /* 深黑绿 */
27
- --hero-mid:#0e6b3d; /* 翡翠绿 */
28
- --hero-right:#ff8a80; /* 浅柔红 */
29
 
30
- /* 预设 B:Rouge Noir(更偏红黑风) */
31
- /* --hero-left:#0b0b0b; --hero-mid:#7a0c0c; --hero-right:#ff6b6b; */
 
 
 
 
32
 
33
- /* 预设 C:Emerald Noir(绿黑→薄荷) */
34
- /* --hero-left:#071510; --hero-mid:#075e3a; --hero-right:#5bd1a8; */
 
 
 
 
 
 
 
 
 
35
  }
36
 
37
- body, .gradio-container{
38
- background: radial-gradient(1200px 800px at 20% -10%, #1b4731 0%, #0b2b1d 35%, #081f16 100%) !important;
 
 
39
  }
40
 
41
  /* 顶部 HERO:左深右浅的线性渐变,白字清晰 */
42
- .hero{
43
- position:relative;
44
- background: linear-gradient(90deg, var(--hero-left) 0%, var(--hero-mid) 48%, var(--hero-right) 100%);
45
- color:#fff; /* 固定白字 */
46
- text-shadow: 0 2px 6px rgba(0,0,0,.35);
47
- border-radius:20px;
48
- padding:18px 16px;
49
- box-shadow: 0 10px 28px rgba(0,0,0,.25), inset 0 -3px 0 rgba(255,255,255,.25);
50
- margin-bottom: 10px;
51
  }
52
 
53
  /* 花色水印略深一点但更透明,避免抢左侧文字注意力 */
54
- .hero:after{
55
- color:#fff;
56
- content:"♠ ♣ ♥ ♦";
57
- position:absolute; right:16px; top:10px; font-weight:700; font-size:28px; letter-spacing:6px;
 
 
 
 
 
58
  }
59
 
60
  /* 左侧设置卡片(半透明) */
61
- .side-card{
62
- background: rgba(255,255,255,.06);
63
- border: 1px solid rgba(255,255,255,.12);
64
- border-radius:16px; padding:14px;
65
- box-shadow: 0 4px 14px rgba(0,0,0,.18);
66
- backdrop-filter: blur(3px);
67
- color:var(--ink);
 
 
 
 
68
  }
69
- .side-card h3{ margin:0 0 8px 0; }
70
 
71
  /* 扑克桌容器:木框 + 绿色绒面 + 暗纹 */
72
- .table{
73
- position:relative;
74
- background: radial-gradient(1200px 800px at 35% 10%, var(--felt) 0%, var(--felt-2) 55%, #083c25 100%);
75
- border-radius:22px;
76
- border: 12px solid transparent;
77
- background-clip: padding-box;
78
- box-shadow:
79
- inset 0 0 50px rgba(0,0,0,.35),
80
- 0 20px 60px rgba(0,0,0,.35);
81
- }
82
- .table:before{ /* 木质外框 */
83
- content:"";
84
- position:absolute; inset:-14px;
85
- border-radius:28px;
86
- background: linear-gradient(90deg, var(--wood), var(--wood-2));
87
- z-index:-1;
88
- box-shadow: 0 8px 28px rgba(0,0,0,.45), inset 0 0 8px rgba(255,255,255,.1);
89
- }
90
- .table:after{ /* 低透水印:花色散点 */
91
- content:"";
92
- position:absolute; inset:0;
93
- background-image:
94
- radial-gradient(12px 12px at 12% 16%, rgba(255,255,255,.06) 0 40%, transparent 45%),
95
- radial-gradient(10px 10px at 78% 24%, rgba(255,255,255,.05) 0 40%, transparent 45%),
96
- radial-gradient(12px 12px at 30% 70%, rgba(0,0,0,.10) 0 40%, transparent 45%),
97
- radial-gradient(8px 8px at 64% 82%, rgba(0,0,0,.09) 0 40%, transparent 45%);
98
- pointer-events:none;
99
  }
100
 
101
  /* 聊天组件细节:头像更小、气泡更易读 */
102
-
103
- .custom-chatbot .message{ font-size:16px; line-height:1.6; color:var(--ink); word-break:break-word; }
104
- .custom-chatbot .message.user{ background: rgba(255,255,255,.08) !important; }
105
- .custom-chatbot .message.bot{ background: rgba(0,0,0,.20) !important; }
 
 
 
 
 
 
 
 
106
 
107
  /* 按钮:筹码风格 */
108
- .gradio-container button.gr-button{
109
- border:none; color:#fff; font-weight:700; letter-spacing:.3px;
110
- background: radial-gradient(circle at 50% 38%, #ff6b6b 0%, #e53935 60%, #b71c1c 100%);
111
- border-radius:999px;
112
- box-shadow: 0 8px 0 #7f1010, inset 0 0 0 5px #fff, inset 0 0 0 10px rgba(255,255,255,.35);
113
- padding:10px 18px;
114
- transition: transform .08s ease, box-shadow .08s ease;
 
 
 
 
 
 
115
  }
116
- .gradio-container button.gr-button:hover{ transform: translateY(-1px); }
117
- .gradio-container button.gr-button:active{
118
- transform: translateY(2px);
119
- box-shadow: 0 4px 0 #7f1010, inset 0 0 0 5px #fff, inset 0 0 0 10px rgba(255,255,255,.35);
120
  }
121
 
122
  /* 输入框在桌面里更融洽 */
123
- .table .gr-textbox textarea{
124
- background: rgba(0,0,0,.20) !important; color:#e5e7eb !important;
125
- border-radius:12px !important;
126
- border:1px solid rgba(255,255,255,.18) !important;
 
127
  }
128
 
129
  /* 小提示文字颜色 */
130
- .hint{ color:var(--muted); font-size:12px; }
 
 
 
131
 
132
- @media (max-width: 820px){
133
- .custom-chatbot .avatar-image{ width:30px !important; height:30px !important; }
 
 
 
134
  }
 
135
  /* === 修复 ChatInterface 内嵌发送/停止按钮在深色主题下不可见的问题 === */
136
  :where(.gradio-container) button[aria-label="submit"],
137
- :where(.gradio-container) button[aria-label="stop"]{
138
  display: inline-flex !important;
139
  align-items: center;
140
  justify-content: center;
141
  opacity: 1 !important;
142
  visibility: visible !important;
143
  pointer-events: auto !important;
144
- border: 1px solid rgba(255,255,255,.22) !important;
145
- background: rgba(255,255,255,.09) !important;
146
  color: #fff !important;
147
  border-radius: 10px !important;
148
  height: 36px !important;
149
- width: 36px !important; /* 也可以设成 auto,保持圆角小按钮风格 */
150
  cursor: pointer !important;
151
  }
152
 
153
  /* 保证输入框容器能正确容纳右侧内嵌按钮 */
154
- :where(.gradio-container) .gr-chat-interface .gr-textbox{
155
- position: relative;
156
  }
157
- :where(.gradio-container) .gr-chat-interface .gr-textbox textarea{
158
- padding-right: 48px !important; /* 给右侧按钮留点空间,避免遮盖 */
159
  }
160
 
161
-
162
  /* === Chatbot 头像尺寸 & 对齐(稳定版)=== */
163
-
164
  /* 放大 Chatbot 头像(统一设置) */
165
  .custom-chatbot .avatar,
166
- .custom-chatbot .message .avatar{
167
- width: 88px !important; /* ← 改这里:56/64/72 都可以 */
168
  height: 88px !important;
169
  min-width: 88px !important;
170
  min-height: 88px !important;
171
  border-radius: 9999px !important;
172
  overflow: hidden !important;
173
- border: 2px solid #ffffffcc !important; /* 可选描边 */
174
- box-shadow: 0 2px 6px rgba(0,0,0,.25) !important;
175
  flex-shrink: 0 !important;
176
- align-self: flex-start !important; /* 与气泡顶部对齐 */
177
  }
178
 
179
  /* 头像图片填充容器,不变形 */
180
  .custom-chatbot .avatar > img,
181
- .custom-chatbot .avatar-image{
182
  width: 100% !important;
183
  height: 100% !important;
184
- object-fit: cover !important; /* ▶ 若想完整显示头像不裁剪,改为 contain */
185
  object-position: 50% 50% !important;
186
  display: block !important;
187
  border: 0 !important;
188
  background: transparent !important;
189
  }
190
 
191
- /* 头像与气泡的间距与对齐(可选) */
192
- .custom-chatbot .message{ gap: 12px !important; align-items: flex-start !important; }
193
- .custom-chatbot .message .message-content{ margin-top: 2px !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
 
 
 
 
 
195
 
196
- """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
 
 
 
 
 
198
 
 
 
 
 
199
 
 
 
 
 
 
 
 
 
 
200
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  """
2
+ 样式文件 - 集中管理 CSS 样式 (强制深色主题)
3
  """
4
 
5
  POKER_THEME_CSS = """
6
+ /* ===== 强制深色主题的核心代码 ===== */
7
  @media (prefers-color-scheme: light) {
8
  :root {
9
  color-scheme: dark !important;
10
  }
11
  }
12
 
13
+ :root {
 
14
  color-scheme: dark !important;
15
+ /* 桌面与通用色,不变 */
16
+ --felt: #0e6b3d; /* 绿色绒面 */
17
+ --felt-2: #0b5a34;
18
+ --wood: #72451d;
19
+ --wood-2: #5e3717;
20
+ --ink: #f3f4f6;
21
+ --muted: #cbd5e1;
22
 
23
+ /* ===== HERO 渐变预设(左深 → 右浅)===== */
24
+ /* 预设 A:Emerald → Soft Rouge(推荐,赌场绿+柔和红,左侧白字对比最佳) */
25
+ --hero-left: #081813; /* 深黑绿 */
26
+ --hero-mid: #0e6b3d; /* 翡翠绿 */
27
+ --hero-right: #ff8a80; /* 浅柔红 */
28
 
29
+ /* 预设 B:Rouge Noir(更偏红黑风) */
30
+ /* --hero-left:#0b0b0b; --hero-mid:#7a0c0c; --hero-right:#ff6b6b; */
31
+
32
+ /* 预设 C:Emerald Noir(绿黑→薄荷) */
33
+ /* --hero-left:#071510; --hero-mid:#075e3a; --hero-right:#5bd1a8; */
34
+ }
35
 
36
+ /* 强制所有元素使用深色模式 */
37
+ * {
38
+ background-color: transparent !important;
39
+ color: #f3f4f6 !important;
40
+ }
41
+
42
+ body, .gradio-container {
43
+ background: radial-gradient(1200px 800px at 20% -10%, #1b4731 0%, #0b2b1d 35%, #081f16 100%) !important;
44
+ color-scheme: dark !important;
45
+ filter: none !important;
46
+ overflow-x: hidden !important;
47
  }
48
 
49
+ /* 修复HuggingFace默认样式覆盖问题 */
50
+ .gradio-container {
51
+ background: radial-gradient(1200px 800px at 20% -10%, #1b4731 0%, #0b2b1d 35%, #081f16 100%) !important;
52
+ color: #f3f4f6 !important;
53
  }
54
 
55
  /* 顶部 HERO:左深右浅的线性渐变,白字清晰 */
56
+ .hero {
57
+ position: relative;
58
+ background: linear-gradient(90deg, var(--hero-left) 0%, var(--hero-mid) 48%, var(--hero-right) 100%) !important;
59
+ color: #fff !important;
60
+ text-shadow: 0 2px 6px rgba(0, 0, 0, .35) !important;
61
+ border-radius: 20px !important;
62
+ padding: 18px 16px !important;
63
+ box-shadow: 0 10px 28px rgba(0, 0, 0, .25), inset 0 -3px 0 rgba(255, 255, 255, .25) !important;
64
+ margin-bottom: 10px !important;
65
  }
66
 
67
  /* 花色水印略深一点但更透明,避免抢左侧文字注意力 */
68
+ .hero:after {
69
+ color: #fff !important;
70
+ content: "♠ ♣ ♥ ♦" !important;
71
+ position: absolute !important;
72
+ right: 16px !important;
73
+ top: 10px !important;
74
+ font-weight: 700 !important;
75
+ font-size: 28px !important;
76
+ letter-spacing: 6px !important;
77
  }
78
 
79
  /* 左侧设置卡片(半透明) */
80
+ .side-card {
81
+ background: rgba(255, 255, 255, .06) !important;
82
+ border: 1px solid rgba(255, 255, 255, .12) !important;
83
+ border-radius: 16px !important;
84
+ padding: 14px !important;
85
+ box-shadow: 0 4px 14px rgba(0, 0, 0, .18) !important;
86
+ backdrop-filter: blur(3px) !important;
87
+ color: var(--ink) !important;
88
+ }
89
+ .side-card h3 {
90
+ margin: 0 0 8px 0 !important;
91
  }
 
92
 
93
  /* 扑克桌容器:木框 + 绿色绒面 + 暗纹 */
94
+ .table {
95
+ position: relative !important;
96
+ background: radial-gradient(1200px 800px at 35% 10%, var(--felt) 0%, var(--felt-2) 55%, #083c25 100%) !important;
97
+ border-radius: 22px !important;
98
+ border: 12px solid transparent !important;
99
+ background-clip: padding-box !important;
100
+ box-shadow: inset 0 0 50px rgba(0, 0, 0, .35), 0 20px 60px rgba(0, 0, 0, .35) !important;
101
+ }
102
+ .table:before { /* 木质外框 */
103
+ content: "" !important;
104
+ position: absolute !important;
105
+ inset: -14px !important;
106
+ border-radius: 28px !important;
107
+ background: linear-gradient(90deg, var(--wood), var(--wood-2)) !important;
108
+ z-index: -1 !important;
109
+ box-shadow: 0 8px 28px rgba(0, 0, 0, .45), inset 0 0 8px rgba(255, 255, 255, .1) !important;
110
+ }
111
+ .table:after { /* 低透水印:花色散点 */
112
+ content: "" !important;
113
+ position: absolute !important;
114
+ inset: 0 !important;
115
+ background-image: radial-gradient(12px 12px at 12% 16%, rgba(255, 255, 255, .06) 0 40%, transparent 45%),
116
+ radial-gradient(10px 10px at 78% 24%, rgba(255, 255, 255, .05) 0 40%, transparent 45%),
117
+ radial-gradient(12px 12px at 30% 70%, rgba(0, 0, 0, .10) 0 40%, transparent 45%),
118
+ radial-gradient(8px 8px at 64% 82%, rgba(0, 0, 0, .09) 0 40%, transparent 45%) !important;
119
+ pointer-events: none !important;
 
120
  }
121
 
122
  /* 聊天组件细节:头像更小、气泡更易读 */
123
+ .custom-chatbot .message {
124
+ font-size: 16px !important;
125
+ line-height: 1.6 !important;
126
+ color: var(--ink) !important;
127
+ word-break: break-word !important;
128
+ }
129
+ .custom-chatbot .message.user {
130
+ background: rgba(255, 255, 255, .08) !important;
131
+ }
132
+ .custom-chatbot .message.bot {
133
+ background: rgba(0, 0, 0, .20) !important;
134
+ }
135
 
136
  /* 按钮:筹码风格 */
137
+ .gradio-container button.gr-button {
138
+ border: none !important;
139
+ color: #fff !important;
140
+ font-weight: 700 !important;
141
+ letter-spacing: .3px !important;
142
+ background: radial-gradient(circle at 50% 38%, #ff6b6b 0%, #e53935 60%, #b71c1c 100%) !important;
143
+ border-radius: 999px !important;
144
+ box-shadow: 0 8px 0 #7f1010, inset 0 0 0 5px #fff, inset 0 0 0 10px rgba(255, 255, 255, .35) !important;
145
+ padding: 10px 18px !important;
146
+ transition: transform .08s ease, box-shadow .08s ease !important;
147
+ }
148
+ .gradio-container button.gr-button:hover {
149
+ transform: translateY(-1px) !important;
150
  }
151
+ .gradio-container button.gr-button:active {
152
+ transform: translateY(2px) !important;
153
+ box-shadow: 0 4px 0 #7f1010, inset 0 0 0 5px #fff, inset 0 0 0 10px rgba(255, 255, 255, .35) !important;
 
154
  }
155
 
156
  /* 输入框在桌面里更融洽 */
157
+ .table .gr-textbox textarea {
158
+ background: rgba(0, 0, 0, .20) !important;
159
+ color: #e5e7eb !important;
160
+ border-radius: 12px !important;
161
+ border: 1px solid rgba(255, 255, 255, .18) !important;
162
  }
163
 
164
  /* 小提示文字颜色 */
165
+ .hint {
166
+ color: var(--muted) !important;
167
+ font-size: 12px !important;
168
+ }
169
 
170
+ @media (max-width: 820px) {
171
+ .custom-chatbot .avatar-image {
172
+ width: 30px !important;
173
+ height: 30px !important;
174
+ }
175
  }
176
+
177
  /* === 修复 ChatInterface 内嵌发送/停止按钮在深色主题下不可见的问题 === */
178
  :where(.gradio-container) button[aria-label="submit"],
179
+ :where(.gradio-container) button[aria-label="stop"] {
180
  display: inline-flex !important;
181
  align-items: center;
182
  justify-content: center;
183
  opacity: 1 !important;
184
  visibility: visible !important;
185
  pointer-events: auto !important;
186
+ border: 1px solid rgba(255, 255, 255, .22) !important;
187
+ background: rgba(255, 255, 255, .09) !important;
188
  color: #fff !important;
189
  border-radius: 10px !important;
190
  height: 36px !important;
191
+ width: 36px !important;
192
  cursor: pointer !important;
193
  }
194
 
195
  /* 保证输入框容器能正确容纳右侧内嵌按钮 */
196
+ :where(.gradio-container) .gr-chat-interface .gr-textbox {
197
+ position: relative !important;
198
  }
199
+ :where(.gradio-container) .gr-chat-interface .gr-textbox textarea {
200
+ padding-right: 48px !important;
201
  }
202
 
 
203
  /* === Chatbot 头像尺寸 & 对齐(稳定版)=== */
 
204
  /* 放大 Chatbot 头像(统一设置) */
205
  .custom-chatbot .avatar,
206
+ .custom-chatbot .message .avatar {
207
+ width: 88px !important;
208
  height: 88px !important;
209
  min-width: 88px !important;
210
  min-height: 88px !important;
211
  border-radius: 9999px !important;
212
  overflow: hidden !important;
213
+ border: 2px solid #ffffffcc !important;
214
+ box-shadow: 0 2px 6px rgba(0, 0, 0, .25) !important;
215
  flex-shrink: 0 !important;
216
+ align-self: flex-start !important;
217
  }
218
 
219
  /* 头像图片填充容器,不变形 */
220
  .custom-chatbot .avatar > img,
221
+ .custom-chatbot .avatar-image {
222
  width: 100% !important;
223
  height: 100% !important;
224
+ object-fit: cover !important;
225
  object-position: 50% 50% !important;
226
  display: block !important;
227
  border: 0 !important;
228
  background: transparent !important;
229
  }
230
 
231
+ /* 头像与气泡的间距与对齐 */
232
+ .custom-chatbot .message {
233
+ gap: 12px !important;
234
+ align-items: flex-start !important;
235
+ }
236
+ .custom-chatbot .message .message-content {
237
+ margin-top: 2px !important;
238
+ }
239
+
240
+ /* ===== 关键修复:覆盖HuggingFace默认样式 ===== */
241
+ /* 按钮样式修复 */
242
+ .button {
243
+ background: rgba(255, 255, 255, 0.1) !important;
244
+ border: 1px solid rgba(255, 255, 255, 0.2) !important;
245
+ color: white !important;
246
+ transition: all 0.3s ease !important;
247
+ }
248
 
249
+ .button:hover {
250
+ background: rgba(255, 255, 255, 0.2) !important;
251
+ transform: translateY(-2px) !important;
252
+ }
253
 
254
+ /* 输入框修复 */
255
+ input, textarea, select {
256
+ background: rgba(0, 0, 0, 0.2) !important;
257
+ border: 1px solid rgba(255, 255, 255, 0.15) !important;
258
+ color: white !important;
259
+ }
260
+
261
+ /* Gradio组件修复 */
262
+ .gradio-container .prose h1,
263
+ .gradio-container .prose h2,
264
+ .gradio-container .prose h3,
265
+ .gradio-container .prose h4,
266
+ .gradio-container .prose h5,
267
+ .gradio-container .prose p {
268
+ color: #f3f4f6 !important;
269
+ }
270
+
271
+ /* 移除可能的滤镜效果(HuggingFace有时会添加) */
272
+ .gradio-container {
273
+ filter: none !important;
274
+ -webkit-filter: none !important;
275
+ }
276
+
277
+ /* 强制所有文本颜色为浅色 */
278
+ * {
279
+ color: #f3f4f6 !important;
280
+ }
281
+
282
+ /* 修复可能的背景覆盖问题 */
283
+ body, .gradio-container, .container {
284
+ background-color: #081f16 !important;
285
+ background-image: radial-gradient(1200px 800px at 20% -10%, #1b4731 0%, #0b2b1d 35%, #081f16 100%) !important;
286
+ }
287
+
288
+ /* 确保滚动条也是深色 */
289
+ ::-webkit-scrollbar {
290
+ width: 10px;
291
+ }
292
+
293
+ ::-webkit-scrollbar-track {
294
+ background: #0b2b1d;
295
+ }
296
+
297
+ ::-webkit-scrollbar-thumb {
298
+ background: #0e6b3d;
299
+ border-radius: 5px;
300
+ }
301
+
302
+ ::-webkit-scrollbar-thumb:hover {
303
+ background: #1e8b5d;
304
+ }
305
+
306
+ /* 修复Gradio默认样式覆盖 */
307
+ .gradio-container .block {
308
+ background: transparent !important;
309
+ }
310
+ .gradio-container .block-label {
311
+ color: #f3f4f6 !important;
312
+ }
313
+ .gradio-container .block-title {
314
+ color: #f3f4f6 !important;
315
+ }
316
+ .gradio-container .block-subtitle {
317
+ color: #cbd5e1 !important;
318
+ }
319
 
320
+ /* 修复可能的透明度问题 */
321
+ .gradio-container .block.svelte-1gfkn6j {
322
+ background: rgba(0, 0, 0, 0.2) !important;
323
+ }
324
 
325
+ /* 修复可能的边框问题 */
326
+ .gradio-container .block-border {
327
+ border-color: rgba(255, 255, 255, 0.1) !important;
328
+ }
329
 
330
+ /* 修复可能的阴影问题 */
331
+ .gradio-container .block-shadow {
332
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
333
+ }
334
+
335
+ /* 修复可能的悬停效果 */
336
+ .gradio-container .block:hover {
337
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
338
+ }
339
 
340
+ /* 修复可能的焦点效果 */
341
+ .gradio-container .block:focus-within {
342
+ box-shadow: 0 0 0 2px #0e6b3d, 0 0 0 4px rgba(14, 107, 61, 0.5) !important;
343
+ }
344
+
345
+ /* 修复可能的禁用状态 */
346
+ .gradio-container .block:disabled {
347
+ opacity: 0.6 !important;
348
+ }
349
+
350
+ /* 修复可能的错误状态 */
351
+ .gradio-container .block-error {
352
+ border-color: #e53935 !important;
353
+ box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.3) !important;
354
+ }
355
+
356
+ /* 修复可能的警告状态 */
357
+ .gradio-container .block-warning {
358
+ border-color: #ff9800 !important;
359
+ box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.3) !important;
360
+ }
361
+
362
+ /* 修复可能的成功状态 */
363
+ .gradio-container .block-success {
364
+ border-color: #4caf50 !important;
365
+ box-shadow: 0 0 0 2px rgba(76, 175, 76, 0.3) !important;
366
+ }
367
+
368
+ /* 修复可能的加载状态 */
369
+ .gradio-container .block-loading {
370
+ opacity: 0.8 !important;
371
+ }
372
+
373
+ /* 修复可能的分割线 */
374
+ .gradio-container .block-divider {
375
+ border-color: rgba(255, 255, 255, 0.1) !important;
376
+ }
377
+
378
+ /* 修复可能的分隔线 */
379
+ .gradio-container .block-separator {
380
+ border-color: rgba(255, 255, 255, 0.1) !important;
381
+ }
382
+
383
+ /* 修复可能的页脚 */
384
+ .gradio-container .block-footer {
385
+ background: rgba(0, 0, 0, 0.2) !important;
386
+ color: #f3f4f6 !important;
387
+ }
388
+
389
+ /* 修复可能的标题 */
390
+ .gradio-container .block-header {
391
+ background: rgba(0, 0, 0, 0.2) !important;
392
+ color: #f3f4f6 !important;
393
+ }
394
+
395
+ /* 修复可能的副标题 */
396
+ .gradio-container .block-subheader {
397
+ color: #cbd5e1 !important;
398
+ }
399
+
400
+ /* 修复可能的提示文本 */
401
+ .gradio-container .block-hint {
402
+ color: #94a3b8 !important;
403
+ }
404
+
405
+ /* 修复可能的链接 */
406
+ .gradio-container .block-link {
407
+ color: #60a5fa !important;
408
+ }
409
+ .gradio-container .block-link:hover {
410
+ color: #3b82f6 !important;
411
+ text-decoration: underline !important;
412
+ }
413
+
414
+ /* 修复可能的下拉菜单 */
415
+ .gradio-container .block-dropdown {
416
+ background: rgba(0, 0, 0, 0.2) !important;
417
+ border-color: rgba(255, 255, 255, 0.1) !important;
418
+ color: #f3f4f6 !important;
419
+ }
420
+ .gradio-container .block-dropdown:hover {
421
+ border-color: rgba(255, 255, 255, 0.3) !important;
422
+ }
423
+ .gradio-container .block-dropdown:focus {
424
+ border-color: #0e6b3d !important;
425
+ box-shadow: 0 0 0 2px rgba(14, 107, 61, 0.5) !important;
426
+ }
427
+
428
+ /* 修复可能的复选框 */
429
+ .gradio-container .block-checkbox {
430
+ border-color: rgba(255, 255, 255, 0.3) !important;
431
+ background: rgba(0, 0, 0, 0.2) !important;
432
+ }
433
+ .gradio-container .block-checkbox:checked {
434
+ background: #0e6b3d !important;
435
+ border-color: #0e6b3d !important;
436
+ }
437
+
438
+ /* 修复可能的单选按钮 */
439
+ .gradio-container .block-radio {
440
+ border-color: rgba(255, 255, 255, 0.3) !important;
441
+ background: rgba(0, 0, 0, 0.2) !important;
442
+ }
443
+ .gradio-container .block-radio:checked {
444
+ background: #0e6b3d !important;
445
+ border-color: #0e6b3d !important;
446
+ }
447
+
448
+ /* 修复可能的滑块 */
449
+ .gradio-container .block-slider {
450
+ background: rgba(0, 0, 0, 0.2) !important;
451
+ border-color: rgba(255, 255, 255, 0.1) !important;
452
+ }
453
+ .gradio-container .block-slider-thumb {
454
+ background: #0e6b3d !important;
455
+ border-color: #0e6b3d !important;
456
+ }
457
+ """