SynthScope / interface /frontend /src /styles.css
SMSD75's picture
Update SynthScope Space from the GitHub repository
26a7256 verified
Raw History Blame Contribute Delete
16.5 kB
/* ============================================================================
SynthScope web interface — visual theme
Modern dark "glass dashboard": layered navy gradient, frosted panels, an
indigo→cyan accent, soft shadows, and smooth motion. Class names are kept
stable so App.jsx is untouched.
========================================================================== */
:root {
--bg: #070b16;
--bg2: #0c1326;
--panel: rgba(22, 29, 51, 0.72);
--panel-solid: #161d33;
--panel2: rgba(31, 41, 71, 0.55);
--line: rgba(120, 140, 190, 0.16);
--line-strong: rgba(120, 140, 190, 0.30);
--text: #eef2fb;
--muted: #9aa7c7;
--muted2: #6b7796;
--accent: #7c8cff;
--accent2: #46d6ff;
--accent-grad: linear-gradient(135deg, #7c8cff 0%, #46d6ff 100%);
--real: #34d399;
--fake: #ff6b7d;
--radius: 16px;
--radius-sm: 10px;
--shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.65);
--shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
}
* { box-sizing: border-box; }
body {
margin: 0;
color: var(--text);
font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
-webkit-font-smoothing: antialiased;
background:
radial-gradient(1100px 600px at 85% -10%, rgba(70, 214, 255, 0.10), transparent 60%),
radial-gradient(1000px 700px at -5% 0%, rgba(124, 140, 255, 0.14), transparent 55%),
linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
background-attachment: fixed;
min-height: 100vh;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 40px 22px 80px; }
/* ---- header ---------------------------------------------------------------*/
header { margin-bottom: 6px; }
header h1 {
margin: 0 0 6px; font-size: 34px; font-weight: 800; letter-spacing: -0.02em;
background: var(--accent-grad); -webkit-background-clip: text;
background-clip: text; -webkit-text-fill-color: transparent;
}
header p { margin: 0; color: var(--muted); font-size: 15px; max-width: 720px; line-height: 1.5; }
/* ---- layout ---------------------------------------------------------------*/
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 26px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
.card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 22px;
box-shadow: var(--shadow);
backdrop-filter: blur(14px) saturate(120%);
-webkit-backdrop-filter: blur(14px) saturate(120%);
}
.card h2 {
margin: 0 0 14px; font-size: 12px; color: var(--muted);
text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 7px; font-weight: 500; }
select, input[type=text], input[type=number] {
width: 100%; padding: 11px 12px; border-radius: var(--radius-sm);
background: var(--panel2); color: var(--text); border: 1px solid var(--line-strong);
font-size: 14px; transition: border-color .15s, box-shadow .15s; outline: none;
}
select:focus, input[type=text]:focus, input[type=number]:focus {
border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 140, 255, 0.22);
}
option { background: var(--panel-solid); }
option:disabled { color: #5a647e; }
/* ---- upload / drop --------------------------------------------------------*/
.drop {
border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
padding: 30px; text-align: center; cursor: pointer; color: var(--muted);
transition: border-color .18s, background .18s, color .18s, transform .18s;
}
.drop:hover { border-color: var(--accent); color: var(--text); }
.drop.drag { border-color: var(--accent2); background: rgba(70, 214, 255, 0.08); color: var(--text); transform: scale(1.01); }
.preview {
margin-top: 16px; border-radius: var(--radius-sm); overflow: hidden; background: #000;
max-height: 320px; display: flex; justify-content: center; border: 1px solid var(--line);
}
.preview img, .preview video { max-width: 100%; max-height: 320px; display: block; }
/* ---- buttons --------------------------------------------------------------*/
button.go, button.sm, button.primary {
border: 0; border-radius: var(--radius-sm); background: var(--accent-grad);
color: #06122b; font-weight: 700; cursor: pointer;
box-shadow: 0 8px 20px -8px rgba(124, 140, 255, 0.6);
transition: transform .12s ease, box-shadow .12s ease, opacity .12s;
}
button.go { margin-top: 18px; width: 100%; padding: 13px; font-size: 15px; }
button.sm { padding: 11px 16px; white-space: nowrap; }
button.primary { padding: 9px 18px; }
button.go:hover:not(:disabled), button.sm:hover:not(:disabled), button.primary:hover:not(:disabled) {
transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(70, 214, 255, 0.55);
}
button.go:active, button.sm:active { transform: translateY(0); }
button.go:disabled, button.sm:disabled, button.primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.meta { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.6; }
/* ---- verdict / probability ------------------------------------------------*/
.verdict { font-size: 38px; font-weight: 800; text-align: center; margin: 6px 0 2px; letter-spacing: -0.02em; }
.verdict.real { color: var(--real); text-shadow: 0 0 28px rgba(52, 211, 153, 0.35); }
.verdict.fake { color: var(--fake); text-shadow: 0 0 28px rgba(255, 107, 125, 0.35); }
.bar {
position: relative; height: 28px; border-radius: 9px; overflow: hidden; display: flex;
background: var(--panel2); border: 1px solid var(--line); margin: 16px 0 6px;
}
.bar .fake { background: linear-gradient(90deg, #ff6b7d, #ff8a5d); }
.bar .real { background: linear-gradient(90deg, #34d399, #46d6ff); }
.bar span {
display: flex; align-items: center; justify-content: center;
font-size: 12px; font-weight: 700; color: #07101f; white-space: nowrap; transition: flex-basis .4s ease;
}
.bar .thrline { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.6); }
.row {
display: flex; justify-content: space-between; font-size: 13px;
padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted);
}
.row:last-child { border-bottom: 0; }
.row b { color: var(--text); }
/* ---- per-frame sparkline --------------------------------------------------*/
.frames { margin-top: 14px; }
.spark {
position: relative; display: flex; gap: 2px; align-items: flex-end; height: 64px; margin-top: 8px;
padding: 4px 4px 0; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.spark i { flex: 1; background: var(--accent-grad); border-radius: 3px 3px 0 0; min-height: 3px; opacity: .9; }
.spark .thr50 { position: absolute; left: 6px; right: 6px; top: 50%; height: 0; border-top: 1px dashed #4a5572; pointer-events: none; }
.frame-stats { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 5px; }
.frame-stats b { color: var(--text); }
.err { color: var(--fake); font-size: 13px; margin-top: 12px; white-space: pre-wrap; }
.pill {
display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px;
background: var(--panel2); border: 1px solid var(--line-strong); color: var(--muted); margin-left: 8px;
}
.empty { color: var(--muted2); text-align: center; padding: 48px 0; font-size: 14px; }
/* ---- tabs -----------------------------------------------------------------*/
.tabs { display: flex; gap: 4px; margin-top: 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab {
background: transparent; border: 0; color: var(--muted); padding: 11px 18px;
cursor: pointer; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent;
transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: transparent;
background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
border-bottom: 2px solid var(--accent); }
/* ---- data explorer --------------------------------------------------------*/
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.toolbar > div { flex: 1; min-width: 150px; }
.badge {
display: inline-block; font-size: 10px; padding: 1px 8px; border-radius: 7px;
background: var(--accent-grad); color: #06122b; font-weight: 700; margin-left: 6px; vertical-align: middle;
}
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 11px; margin-top: 18px; }
.thumb {
position: relative; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
border: 2px solid transparent; background: #000; aspect-ratio: 1 / 1; transition: transform .15s, border-color .15s;
}
.thumb:hover { transform: translateY(-2px); }
.thumb.sel { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 140, 255, 0.25); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .tag { position: absolute; top: 5px; left: 5px; font-size: 10px; padding: 1px 7px; border-radius: 6px; font-weight: 700; letter-spacing: .03em; }
.thumb .tag.real { background: var(--real); color: #06210f; }
.thumb .tag.fake { background: var(--fake); color: #2a0707; }
.thumb .pred { position: absolute; bottom: 0; left: 0; right: 0; font-size: 10px; text-align: center; padding: 2px 0; font-weight: 700; }
.thumb .pred.ok { background: rgba(52, 211, 153, .92); color: #06210f; }
.thumb .pred.no { background: rgba(255, 107, 125, .92); color: #fff; }
.thumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; color: rgba(255,255,255,.85); pointer-events: none; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
/* ---- threshold + calibration ----------------------------------------------*/
.thr { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel2); }
.thr input[type=range] { width: 100%; accent-color: var(--accent); }
.thr .lab { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.thr .lab b { color: var(--text); }
.calib { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.calib button { padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel2); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .15s; }
.calib button:hover:not(:disabled) { border-color: var(--accent); }
.calib button:disabled { opacity: .45; cursor: not-allowed; }
.calib input[type=number] { width: 64px; padding: 6px; }
.stat { font-size: 12px; color: var(--muted); margin-top: 8px; }
.stat b { color: var(--text); }
/* ---- per-model paper-vs-reproduced table ----------------------------------*/
table.repro { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
table.repro td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.repro td:first-child { color: var(--muted); width: 92px; white-space: nowrap; }
table.repro td.match-match { color: var(--real); }
table.repro td.match-gap-closed { color: var(--real); font-weight: 600; }
table.repro td.match-below, table.repro td.match-partial, table.repro td.match-ranking-only { color: #ffcf6e; }
table.repro td.match-pending { color: var(--muted); font-style: italic; }
table.repro td.rnote { color: var(--muted); font-size: 11px; font-style: italic; }
/* ---- full per-benchmark results table -------------------------------------*/
.repro-full { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12px; }
.repro-full th { text-align: left; border-bottom: 1px solid var(--line-strong); padding: 4px 7px; color: var(--muted); }
.repro-full td { padding: 4px 7px; border-bottom: 1px solid var(--line); vertical-align: top; }
.status-reproduced { color: var(--real); font-weight: 600; }
.status-official { color: var(--accent); font-weight: 600; }
.status-below { color: #ffb74d; }
.status-missing { color: var(--muted2); }
.status-reference { color: var(--muted2); font-style: italic; }
.repro-wrap { margin: 10px 0 4px; }
.repro-details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel2); overflow: hidden; }
.repro-details > summary { cursor: pointer; list-style: none; padding: 10px 13px; font-size: 12px; color: var(--accent); font-weight: 600; user-select: none; display: flex; align-items: center; gap: 7px; }
.repro-details > summary::-webkit-details-marker { display: none; }
.repro-details > summary::before { content: "▸"; font-size: 10px; transition: transform .15s; }
.repro-details[open] > summary::before { transform: rotate(90deg); }
.repro-scroll { max-height: 360px; overflow: auto; border-top: 1px solid var(--line); }
.repro-full thead th { position: sticky; top: 0; z-index: 1; background: var(--panel-solid); white-space: nowrap; }
.repro-full td:first-child { min-width: 170px; }
.repro-full tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
.repro-full tbody tr:hover { background: rgba(124, 140, 255, .07); }
.repro-legend { color: var(--muted); font-size: 11px; margin: 8px 12px 10px; line-height: 1.55; }
.lead-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin: 6px 0 16px; }
.lead-head .muted { flex: 1; min-width: 280px; color: var(--muted); }
.lead-head label { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.lead-head select { width: auto; min-width: 220px; }
.lead-card { margin-bottom: 18px; }
.card.lead-card h2, .topgen .card h2 { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 17px; color: var(--text); }
.lead-bn { color: var(--muted); font-size: 10px; margin-top: 2px; }
.lb-best { color: var(--accent2); font-weight: 700; }
table.repro-full.lb-gen td { white-space: nowrap; }
table.repro-full.lb-gen td:nth-child(2) { white-space: normal; }
.lb-top td { background: rgba(124, 140, 255, .08); }
.topgen .card { margin-bottom: 18px; }
/* ---- SOTA generator vs detector comparison --------------------------------*/
.sota .sota-controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.sota .sota-controls label { display: flex; gap: 6px; align-items: center; }
.sota .promptline input { width: 320px; }
.sota .upbtn { cursor: pointer; text-decoration: underline; color: var(--accent); }
.sota .detpick { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0; }
.sota .detpick label { display: flex; gap: 4px; align-items: center; font-size: 13px; }
.sota .sota-images { display: flex; gap: 16px; margin: 14px 0; flex-wrap: wrap; }
.sota .sota-images figure { margin: 0; }
.sota .sota-images img { max-width: 320px; max-height: 320px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
/* ---- weight-source badge --------------------------------------------------*/
.wtag { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.wtag-official { background: rgba(46, 125, 82, .22); border-color: #2e7d52; color: #8ee0b0; }
.wtag-synthscope_trained { background: rgba(46, 93, 125, .22); border-color: #2e5d7d; color: #8ec6e0; }
.wtag-training_free { background: rgba(125, 102, 46, .22); border-color: #7d662e; color: #e0cf8e; }
/* links + scrollbars --------------------------------------------------------*/
a { color: var(--accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: padding-box; }
/* ---- interpretability map -------------------------------------------------*/
.interp { margin-top: 16px; }
.interp-row { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.interp-cell { margin: 0; }
.interp-cell figcaption { font-size: 11px; color: #8b93a7; margin-top: 4px; text-align: center; }
.interp-map { display: block; width: 100%; max-width: 240px; border-radius: var(--radius-sm);
border: 1px solid var(--line-strong); box-shadow: var(--shadow); }