更新项目格式及部分ui细节
This commit is contained in:
@@ -0,0 +1,337 @@
|
||||
/* ==================== 全局样式 ==================== */
|
||||
* {
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.gradio-container {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%) !important;
|
||||
}
|
||||
|
||||
/* ==================== Emoji 显示修复 ==================== */
|
||||
* {
|
||||
font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.gr-markdown code {
|
||||
background: transparent !important; padding: 0 !important; font-family: inherit !important;
|
||||
}
|
||||
.gr-html * {
|
||||
background-clip: border-box !important; -webkit-background-clip: border-box !important; -webkit-text-fill-color: initial !important;
|
||||
}
|
||||
|
||||
/* ==================== 标题区域 ==================== */
|
||||
.main-title {
|
||||
text-align: center; font-size: 3em !important; font-weight: 900 !important; margin-bottom: 0.3em; letter-spacing: -1px; animation: titleGlow 3s ease-in-out infinite; color: #333;
|
||||
}
|
||||
h1.main-title {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
|
||||
-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
|
||||
}
|
||||
@keyframes titleGlow {
|
||||
0%, 100% { filter: brightness(1); }
|
||||
50% { filter: brightness(1.2); }
|
||||
}
|
||||
.subtitle {
|
||||
text-align: center; color: #555; font-size: 1.2em; font-weight: 500; margin-bottom: 1.5em; letter-spacing: 0.5px;
|
||||
}
|
||||
p.subtitle { color: #555 !important; }
|
||||
|
||||
/* ==================== 项目信息横幅 ==================== */
|
||||
.project-info-banner {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 25px 30px;
|
||||
border-radius: 20px;
|
||||
margin-bottom: 30px;
|
||||
box-shadow: 0 10px 40px rgba(102, 126, 234, 0.35);
|
||||
animation: bannerSlide 0.6s ease-out;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.project-info-banner::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -50%;
|
||||
right: -50%;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
|
||||
animation: shimmer 8s infinite linear;
|
||||
}
|
||||
|
||||
@keyframes shimmer {
|
||||
0% { transform: translate(-100%, -100%) rotate(0deg); }
|
||||
100% { transform: translate(100%, 100%) rotate(360deg); }
|
||||
}
|
||||
|
||||
@keyframes bannerSlide {
|
||||
from { transform: translateY(-30px); opacity: 0; }
|
||||
to { transform: translateY(0); opacity: 1; }
|
||||
}
|
||||
|
||||
/* ==================== 标签页样式 ==================== */
|
||||
.tab-nav {
|
||||
background: white; border-radius: 12px; padding: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); margin-bottom: 20px;
|
||||
}
|
||||
.tab-nav button {
|
||||
font-weight: 600 !important; font-size: 1.1em !important; padding: 12px 24px !important; border-radius: 8px !important; border: none !important; transition: all 0.3s ease !important;
|
||||
}
|
||||
.tab-nav button:hover {
|
||||
background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%) !important; transform: translateY(-2px) !important;
|
||||
}
|
||||
.tab-nav button.selected {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; color: white !important; box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
|
||||
}
|
||||
|
||||
/* ==================== 卡片和分组样式 ==================== */
|
||||
.gr-group {
|
||||
background: white !important;
|
||||
border-radius: 20px !important;
|
||||
padding: 28px !important;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
|
||||
border: 1px solid rgba(102, 126, 234, 0.08) !important;
|
||||
margin-bottom: 20px !important;
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease !important;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
.gr-group:hover {
|
||||
transform: translateY(-6px) !important;
|
||||
box-shadow: 0 12px 48px rgba(102, 126, 234, 0.12), 0 4px 16px rgba(102, 126, 234, 0.08) !important;
|
||||
}
|
||||
.card-title {
|
||||
font-size: 1.5em;
|
||||
font-weight: 700;
|
||||
color: #333 !important;
|
||||
margin-bottom: 18px;
|
||||
border-bottom: 3px solid;
|
||||
border-image: linear-gradient(90deg, #667eea, #764ba2) 1;
|
||||
padding-bottom: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
|
||||
/* ==================== 输入框样式 ==================== */
|
||||
.gr-textbox input, .gr-textbox textarea {
|
||||
border: 2px solid #e0e7ff !important; border-radius: 10px !important; padding: 12px 16px !important; font-size: 1em !important; transition: all 0.3s ease !important; background: #fafbff !important;
|
||||
}
|
||||
.gr-textbox input:focus, .gr-textbox textarea:focus {
|
||||
border-color: #667eea !important; box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important; background: white !important; transform: translateY(-2px);
|
||||
}
|
||||
.gr-textbox label {
|
||||
font-weight: 600 !important; color: #4a5568 !important; margin-bottom: 8px !important;
|
||||
}
|
||||
|
||||
/* ==================== 按钮样式 ==================== */
|
||||
button {
|
||||
border-radius: 12px !important;
|
||||
font-weight: 600 !important;
|
||||
padding: 14px 28px !important;
|
||||
font-size: 1.05em !important;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
||||
border: none !important;
|
||||
cursor: pointer !important;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
.primary-btn, button[variant="primary"] {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
||||
color: white !important;
|
||||
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.primary-btn::before, button[variant="primary"]::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
transform: translate(-50%, -50%);
|
||||
transition: width 0.6s, height 0.6s;
|
||||
}
|
||||
.primary-btn:hover::before, button[variant="primary"]:hover::before {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
}
|
||||
.primary-btn:hover, button[variant="primary"]:hover {
|
||||
transform: translateY(-4px) scale(1.03) !important;
|
||||
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5) !important;
|
||||
}
|
||||
button[variant="secondary"] {
|
||||
background-color: white !important;
|
||||
color: #667eea !important;
|
||||
border: 2px solid #667eea !important;
|
||||
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15) !important;
|
||||
}
|
||||
button[variant="secondary"]:hover {
|
||||
background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%) !important;
|
||||
transform: translateY(-3px) !important;
|
||||
box-shadow: 0 6px 18px rgba(102, 126, 234, 0.25) !important;
|
||||
}
|
||||
|
||||
/* ==================== 滑块样式 ==================== */
|
||||
.gr-slider { padding: 20px 10px !important; }
|
||||
.gr-slider input[type="range"] {
|
||||
height: 8px !important; border-radius: 4px !important; background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
|
||||
}
|
||||
|
||||
/* ==================== 聊天机器人样式 ==================== */
|
||||
.modern-chatbot {
|
||||
background: white !important;
|
||||
border-radius: 20px !important;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
|
||||
border: 1px solid rgba(102, 126, 234, 0.1) !important;
|
||||
}
|
||||
.message.user {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
||||
color: white !important;
|
||||
border-radius: 20px 20px 4px 20px !important;
|
||||
padding: 14px 18px !important;
|
||||
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25) !important;
|
||||
animation: messageSlideIn 0.3s ease-out;
|
||||
}
|
||||
.message.user * {
|
||||
color: white !important;
|
||||
}
|
||||
.message.bot {
|
||||
background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
|
||||
border: 1px solid #e0e7ff !important;
|
||||
border-radius: 20px 20px 20px 4px !important;
|
||||
color: #2d3748 !important;
|
||||
padding: 14px 18px !important;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
|
||||
animation: messageSlideIn 0.3s ease-out;
|
||||
}
|
||||
.message.bot * { color: #2d3748 !important; }
|
||||
.message.bot code {
|
||||
background: #f0f4ff !important;
|
||||
color: #667eea !important;
|
||||
padding: 3px 8px !important;
|
||||
border-radius: 6px !important;
|
||||
border: 1px solid #e0e7ff !important;
|
||||
font-family: 'Monaco', 'Menlo', 'Consolas', monospace !important;
|
||||
}
|
||||
|
||||
@keyframes messageSlideIn {
|
||||
from { opacity: 0; transform: translateY(10px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
/* ==================== 知识卡片样式 ==================== */
|
||||
.knowledge-card {
|
||||
background: white !important;
|
||||
border-radius: 16px !important;
|
||||
padding: 24px !important;
|
||||
box-shadow: 0 6px 24px rgba(102, 126, 234, 0.1) !important;
|
||||
border: 1px solid rgba(102, 126, 234, 0.12) !important;
|
||||
margin: 15px 0 !important;
|
||||
}
|
||||
|
||||
.knowledge-card h3 {
|
||||
margin-top: 0 !important;
|
||||
padding-bottom: 15px !important;
|
||||
border-bottom: 2px solid;
|
||||
border-image: linear-gradient(90deg, #667eea, #764ba2) 1;
|
||||
}
|
||||
|
||||
.knowledge-card h4 {
|
||||
margin-top: 18px !important;
|
||||
margin-bottom: 12px !important;
|
||||
font-size: 1.1em !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
.knowledge-card details {
|
||||
margin: 12px 0 !important;
|
||||
transition: all 0.3s ease !important;
|
||||
}
|
||||
|
||||
.knowledge-card details[open] {
|
||||
margin-bottom: 18px !important;
|
||||
}
|
||||
|
||||
.knowledge-card details summary {
|
||||
cursor: pointer !important;
|
||||
user-select: none !important;
|
||||
outline: none !important;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
.knowledge-card details summary:hover {
|
||||
transform: translateX(5px) !important;
|
||||
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15) !important;
|
||||
}
|
||||
|
||||
.knowledge-card details summary::marker {
|
||||
font-size: 1.2em !important;
|
||||
}
|
||||
|
||||
.knowledge-card details[open] summary {
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
|
||||
.knowledge-card table {
|
||||
border-collapse: collapse !important;
|
||||
width: 100% !important;
|
||||
margin: 15px 0 !important;
|
||||
font-size: 0.95em !important;
|
||||
}
|
||||
|
||||
.knowledge-card table td,
|
||||
.knowledge-card table th {
|
||||
padding: 12px !important;
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.knowledge-card ul {
|
||||
margin: 10px 0 !important;
|
||||
padding-left: 25px !important;
|
||||
}
|
||||
|
||||
.knowledge-card li {
|
||||
margin: 6px 0 !important;
|
||||
line-height: 1.6 !important;
|
||||
}
|
||||
|
||||
.knowledge-card p {
|
||||
margin: 10px 0 !important;
|
||||
line-height: 1.7 !important;
|
||||
}
|
||||
|
||||
.knowledge-card strong {
|
||||
color: #667eea !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
/* 滚动条美化 */
|
||||
.knowledge-card::-webkit-scrollbar,
|
||||
div[style*="overflow-y: auto"]::-webkit-scrollbar {
|
||||
width: 8px !important;
|
||||
}
|
||||
|
||||
.knowledge-card::-webkit-scrollbar-track,
|
||||
div[style*="overflow-y: auto"]::-webkit-scrollbar-track {
|
||||
background: #f1f1f1 !important;
|
||||
border-radius: 4px !important;
|
||||
}
|
||||
|
||||
.knowledge-card::-webkit-scrollbar-thumb,
|
||||
div[style*="overflow-y: auto"]::-webkit-scrollbar-thumb {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
||||
border-radius: 4px !important;
|
||||
}
|
||||
|
||||
.knowledge-card::-webkit-scrollbar-thumb:hover,
|
||||
div[style*="overflow-y: auto"]::-webkit-scrollbar-thumb:hover {
|
||||
background: linear-gradient(135deg, #5568d3 0%, #6a3f8a 100%) !important;
|
||||
}
|
||||
|
||||
/* ... 其他CSS规则可以从原文件复制过来 ... */
|
||||
Reference in New Issue
Block a user