Files
tokenresearch/app/static/style.css
2026-06-04 14:09:16 +08:00

385 lines
6.1 KiB
CSS

:root {
color-scheme: dark;
--bg: #0c1017;
--panel: #151b26;
--panel-2: #101722;
--text: #eef4ff;
--muted: #8f9db3;
--line: #273246;
--green: #2ee887;
--yellow: #f7c948;
--red: #ff6b6b;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
background: radial-gradient(circle at top left, #182235, var(--bg) 45%);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
padding: 22px 28px;
border-bottom: 1px solid var(--line);
background: rgba(12, 16, 23, 0.82);
backdrop-filter: blur(14px);
}
h1,
h2,
p {
margin: 0;
}
h1 {
font-size: 24px;
letter-spacing: 0.02em;
}
h2 {
margin-bottom: 14px;
font-size: 18px;
}
p {
margin-top: 8px;
color: var(--muted);
}
.badge {
min-width: 86px;
padding: 8px 12px;
border: 1px solid var(--line);
border-radius: 999px;
color: var(--yellow);
text-align: center;
background: var(--panel);
}
.badge.online {
color: var(--green);
}
.badge.offline {
color: var(--red);
}
.topbar-actions {
display: flex;
align-items: center;
gap: 12px;
}
.button-link {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 36px;
padding: 8px 14px;
border: 1px solid var(--line);
border-radius: 999px;
color: var(--text);
text-decoration: none;
background: var(--panel);
}
.button-link:hover {
border-color: var(--green);
color: var(--green);
}
.layout {
display: grid;
grid-template-columns: minmax(0, 1fr) 360px;
gap: 18px;
padding: 18px;
}
.video-card,
.side-card {
border: 1px solid var(--line);
border-radius: 18px;
background: rgba(21, 27, 38, 0.9);
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.video-card {
overflow: hidden;
}
.video-wrap {
display: grid;
place-items: center;
min-height: 420px;
background: #05070b;
}
#video,
.grid-video {
display: block;
width: 100%;
height: auto;
max-height: calc(100vh - 190px);
object-fit: contain;
}
.video-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
padding: 14px;
background: #05070b;
}
.video-grid-item {
overflow: hidden;
border: 1px solid var(--line);
border-radius: 14px;
background: var(--panel-2);
}
.video-grid-title {
padding: 10px 12px;
border-bottom: 1px solid var(--line);
color: var(--muted);
font-size: 13px;
}
.video-grid-wrap {
min-height: 240px;
}
.grid-video {
max-height: calc((100vh - 260px) / 2);
}
.side-card {
display: flex;
flex-direction: column;
gap: 22px;
padding: 18px;
}
.status-grid {
display: grid;
grid-template-columns: 72px minmax(0, 1fr);
gap: 10px 12px;
margin: 0;
}
.status-grid dt {
color: var(--muted);
}
.status-grid dd {
margin: 0;
word-break: break-all;
}
.device-select {
width: 100%;
min-height: 34px;
border: 1px solid var(--line);
border-radius: 8px;
color: var(--text);
background: var(--panel-2);
}
.detections-panel {
padding: 16px;
border-top: 1px solid var(--line);
}
.detections {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 10px;
}
.detections.empty {
display: block;
color: var(--muted);
}
.det-item {
padding: 12px;
border: 1px solid var(--line);
border-radius: 12px;
background: var(--panel-2);
}
.det-title {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
color: var(--green);
font-weight: 700;
}
.det-box {
color: var(--muted);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
}
.tokenizer-page .tokenizer-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
grid-template-areas: "flow side";
align-items: start;
width: 100%;
gap: 18px;
padding: 18px;
}
.tokenizer-page .tokenizer-side {
display: grid;
grid-area: side;
min-width: 0;
gap: 18px;
}
.tokenizer-page .tokenizer-flow-card {
grid-area: flow;
min-width: 0;
min-height: calc(100vh - 122px);
}
.tokenizer-page .tokenizer-side .detections {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tokenizer-card {
border: 1px solid var(--line);
border-radius: 18px;
padding: 18px;
background: rgba(21, 27, 38, 0.9);
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.pipeline-steps {
display: grid;
gap: 10px;
}
.pipeline-step {
display: grid;
grid-template-columns: 34px minmax(0, 1fr);
gap: 10px;
align-items: start;
padding: 12px;
border: 1px solid var(--line);
border-radius: 12px;
background: var(--panel-2);
}
.step-index {
display: grid;
place-items: center;
width: 28px;
height: 28px;
border-radius: 999px;
color: #06100b;
font-weight: 700;
background: var(--green);
}
.step-title {
margin-bottom: 5px;
font-weight: 700;
}
.step-value,
.token-summary,
.selected-token {
color: var(--muted);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 13px;
word-break: break-all;
}
.token-sequence {
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
gap: 8px;
margin-top: 14px;
}
.token-cell {
min-height: 50px;
border: 1px solid var(--line);
border-radius: 10px;
color: var(--text);
cursor: pointer;
background: var(--panel-2);
}
.token-cell span,
.token-cell small {
display: block;
}
.token-cell small {
margin-top: 3px;
color: var(--muted);
}
.token-cell.selected,
.token-cell:hover {
border-color: var(--green);
color: var(--green);
}
.token-detail-title {
margin-bottom: 10px;
color: var(--green);
font-weight: 700;
}
.token-vector {
padding: 12px;
border: 1px solid var(--line);
border-radius: 12px;
background: var(--panel-2);
}
@media (max-width: 1280px) {
.detections {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
@media (max-width: 980px) {
.layout {
grid-template-columns: 1fr;
}
.topbar {
align-items: flex-start;
flex-direction: column;
}
.detections {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 640px) {
.video-grid {
grid-template-columns: 1fr;
}
.detections {
grid-template-columns: 1fr;
}
}