:root {
--bg: #f4f6fb;
--card: #ffffff;
--text: #1a2233;
--muted: #5c6b82;
--line: #e2e8f3;
--primary: #3b5bdb;
--primary-soft: #edf2ff;
--a: #e03131;
--a-soft: #fff5f5;
--b: #1971c2;
--b-soft: #e7f5ff;
--c: #2f9e44;
--c-soft: #ebfbee;
--ok: #2b8a3e;
--bad: #c92a2a;
--shadow: 0 10px 30px rgba(26, 34, 51, 0.08);
--radius: 16px;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 220px);
color: var(--text);
line-height: 1.6;
}
.page {
max-width: 1280px;
margin: 0 auto;
padding: 32px 20px 64px;
}
.hero { margin-bottom: 24px; }
.eyebrow {
color: var(--primary);
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
font-size: 12px;
}
.hero h1 {
margin: 8px 0 12px;
font-size: clamp(2rem, 4vw, 3rem);
line-height: 1.15;
}
.hero h1 span { color: var(--primary); }
.lead { max-width: 760px; color: var(--muted); font-size: 1.05rem; }
.card {
background: var(--card);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 24px;
margin-bottom: 20px;
box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 16px; font-size: 1.2rem; }
.runtime-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 12px;
}
.runtime-item {
background: var(--primary-soft);
border-radius: 12px;
padding: 12px 14px;
}
.runtime-item span {
display: block;
font-size: 12px;
color: var(--muted);
}
.runtime-item strong { font-size: 14px; }
.control-row {
display: flex;
flex-wrap: wrap;
gap: 12px;
align-items: center;
}
.control-row label { font-weight: 600; }
.control-row select {
min-width: 280px;
padding: 10px 12px;
border-radius: 10px;
border: 1px solid var(--line);
font-size: 15px;
}
.btn-primary {
background: var(--primary);
color: #fff;
border: none;
border-radius: 10px;
padding: 10px 20px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.question-detail {
margin-top: 16px;
padding: 16px;
background: #f8f9fc;
border-radius: 12px;
border-left: 4px solid var(--primary);
}
.question-detail p { margin: 6px 0; }
.question-detail strong { color: var(--text); }
.progress { margin-top: 18px; }
.progress-bar {
height: 8px;
background: #e9ecef;
border-radius: 999px;
overflow: hidden;
}
.progress-fill {
height: 100%;
width: 0%;
background: linear-gradient(90deg, var(--primary), #748ffc);
transition: width 0.35s ease;
}
#progress-text { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.flow-steps {
list-style: none;
padding: 0;
margin: 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
}
.flow-steps li {
border: 1px solid var(--line);
border-radius: 12px;
padding: 14px;
background: #fafbfe;
}
.flow-steps li span { display: block; font-weight: 700; }
.flow-steps li em {
display: block;
margin-top: 6px;
font-style: normal;
font-size: 13px;
color: var(--muted);
}
.flow-steps li.running {
border-color: var(--primary);
background: var(--primary-soft);
}
.flow-steps li.done {
border-color: var(--ok);
background: #ebfbee;
}
.flow-steps li.done em { color: var(--ok); }
.compare-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
margin-bottom: 20px;
}
.mode-card {
background: var(--card);
border: 1px solid var(--line);
border-radius: var(--radius);
overflow: hidden;
box-shadow: var(--shadow);
display: flex;
flex-direction: column;
min-height: 420px;
}
.mode-card[data-mode="direct"] .mode-head { background: var(--a-soft); border-bottom-color: #ffc9c9; }
.mode-card[data-mode="zero_shot"] .mode-head { background: var(--b-soft); border-bottom-color: #a5d8ff; }
.mode-card[data-mode="few_shot"] .mode-head { background: var(--c-soft); border-bottom-color: #b2f2bb; }
.mode-head {
padding: 16px 18px;
border-bottom: 1px solid var(--line);
}
.mode-head h3 { margin: 0; font-size: 1.05rem; }
.mode-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.badges { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
font-size: 12px;
padding: 4px 8px;
border-radius: 999px;
background: #edf2f7;
color: var(--muted);
}
.badge.ok { background: #d3f9d8; color: var(--ok); }
.badge.bad { background: #ffe3e3; color: var(--bad); }
.badge.info { background: #d0ebff; color: #1864ab; }
.mode-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.section-title {
font-size: 12px;
font-weight: 700;
letter-spacing: 0.06em;
color: var(--muted);
text-transform: uppercase;
}
.prompt-summary {
font-size: 13px;
color: var(--muted);
background: #f8f9fc;
padding: 10px 12px;
border-radius: 10px;
}
.message-list { display: flex; flex-direction: column; gap: 8px; }
.message-item {
border: 1px solid var(--line);
border-radius: 10px;
overflow: hidden;
}
.message-item summary {
cursor: pointer;
padding: 10px 12px;
font-weight: 600;
font-size: 13px;
background: #f8f9fc;
list-style: none;
}
.message-item summary::-webkit-details-marker { display: none; }
.message-item pre {
margin: 0;
padding: 12px;
white-space: pre-wrap;
word-break: break-word;
font-family: Consolas, "Courier New", monospace;
font-size: 12px;
line-height: 1.5;
background: #fff;
max-height: 220px;
overflow: auto;
}
.reply-box {
background: #111827;
color: #f3f4f6;
border-radius: 10px;
padding: 12px;
font-family: Consolas, "Courier New", monospace;
font-size: 12px;
white-space: pre-wrap;
word-break: break-word;
max-height: 280px;
overflow: auto;
flex: 1;
}
.mode-card.placeholder .mode-body {
align-items: center;
justify-content: center;
color: var(--muted);
min-height: 300px;
}
.mode-card.loading .mode-body::after {
content: "正在调用百炼 API…";
color: var(--primary);
font-weight: 600;
}
.summary-tables {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.summary h3 { margin: 0 0 10px; font-size: 1rem; }
table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
th, td {
border: 1px solid var(--line);
padding: 10px 12px;
text-align: left;
vertical-align: top;
}
th { background: #f8f9fc; }
.tips {
margin-top: 18px;
padding: 16px;
background: #f8f9fc;
border-radius: 12px;
}
.tips ul { margin: 8px 0 0; padding-left: 20px; }
@media (max-width: 1024px) {
.compare-grid { grid-template-columns: 1fr; }
.flow-steps { grid-template-columns: 1fr; }
.summary-tables { grid-template-columns: 1fr; }
}