512 lines
14 KiB
CSS
512 lines
14 KiB
CSS
|
|
:root {
|
|
--ink: #eaf0ff;
|
|
--muted: #9caed1;
|
|
--surface: #111a31;
|
|
--surface-2: #17223e;
|
|
--line: #2a3a61;
|
|
--blue: #6aa8ff;
|
|
--violet: #a78bfa;
|
|
--fire: #ffb454;
|
|
--danger: #ff727c;
|
|
--success: #6ee7b7;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
min-width: 320px;
|
|
min-height: 100vh;
|
|
margin: 0;
|
|
color: var(--ink);
|
|
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
background: radial-gradient(circle at 10% 0%, #263a76 0, transparent 30rem), radial-gradient(circle at 90% 20%, #4d236c 0, transparent 28rem), #090e1d;
|
|
}
|
|
|
|
.shell {
|
|
width: min(100% - 2.5rem, 70rem);
|
|
margin: 0 auto;
|
|
padding: clamp(2rem, 6vw, 5rem) 0;
|
|
}
|
|
|
|
.brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: .75rem;
|
|
/* margin-bottom: clamp(2.5rem, 6vw, 5rem); */
|
|
font-size: .9rem;
|
|
font-weight: 800;
|
|
letter-spacing: .11em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.brand-mark {
|
|
display: grid;
|
|
width: 2.25rem;
|
|
aspect-ratio: 1;
|
|
place-items: center;
|
|
border-radius: .75rem;
|
|
color: #141022;
|
|
background: linear-gradient(135deg, #fcd34d, #fb7185);
|
|
box-shadow: 0 .5rem 1.5rem #fb718550;
|
|
}
|
|
|
|
.intro {
|
|
max-width: 45rem;
|
|
}
|
|
|
|
.kicker {
|
|
margin: 0 0 .8rem;
|
|
color: #bfdbfe;
|
|
font-size: .78rem;
|
|
font-weight: 800;
|
|
letter-spacing: .15em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
h1 {
|
|
max-width: 12ch;
|
|
margin: 0;
|
|
font-size: clamp(2.6rem, 7vw, 5.75rem);
|
|
line-height: .96;
|
|
letter-spacing: -.065em;
|
|
}
|
|
|
|
.lede {
|
|
max-width: 38rem;
|
|
margin: 1.5rem 0 2.5rem;
|
|
color: var(--muted);
|
|
font-size: clamp(1rem, 2vw, 1.18rem);
|
|
line-height: 1.65;
|
|
}
|
|
|
|
.upload-card,
|
|
.results-card {
|
|
border: 1px solid var(--line);
|
|
border-radius: 1.5rem;
|
|
background: linear-gradient(145deg, #162240d9, #0e162bdd);
|
|
box-shadow: 0 1.5rem 4rem #02061680;
|
|
backdrop-filter: blur(16px);
|
|
}
|
|
|
|
.upload-card {
|
|
padding: clamp(1rem, 3vw, 1.5rem);
|
|
}
|
|
|
|
.drop-zone {
|
|
display: grid;
|
|
min-height: 16rem;
|
|
place-items: center;
|
|
padding: 2rem;
|
|
border: 1.5px dashed #5d75aa;
|
|
border-radius: 1rem;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
background: linear-gradient(135deg, #1b2a4e80, #291c4b66);
|
|
transition: .2s ease;
|
|
}
|
|
|
|
.drop-zone:hover,
|
|
.drop-zone.dragging {
|
|
border-color: var(--blue);
|
|
transform: translateY(-2px);
|
|
background: #203360a8;
|
|
}
|
|
|
|
.drop-zone:focus-within {
|
|
outline: 3px solid #6aa8ff66;
|
|
outline-offset: 3px;
|
|
}
|
|
|
|
.file-input {
|
|
width: .1px;
|
|
height: .1px;
|
|
position: absolute;
|
|
opacity: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.drop-zone .upload-icon {
|
|
display: grid;
|
|
width: 4rem;
|
|
aspect-ratio: 1;
|
|
place-items: center;
|
|
margin: 0 auto 1rem;
|
|
border-radius: 50%;
|
|
color: #dbeafe;
|
|
font-size: 1.8rem;
|
|
background: #4777c94d;
|
|
}
|
|
|
|
.drop-zone .upload-icon__content { position: relative; z-index: 1; margin: 0; color: inherit; font-size: inherit; font-weight: 850; }
|
|
.audio-upload--uploading .upload-icon,
|
|
.audio-upload--processing .upload-icon,
|
|
.audio-upload--success .upload-icon,
|
|
.audio-upload--error .upload-icon { position: relative; width: 5.5rem; margin-bottom: .25rem; color: #fff; font-size: 1.25rem; box-shadow: 0 0 0 .35rem #334e8d70, 0 .6rem 2rem #101a3fa6; }
|
|
.audio-upload--uploading .upload-icon { background: conic-gradient(#91baff var(--upload-progress, 0%), #334b82 0); }
|
|
.audio-upload--processing .upload-icon { background: #405caa; }
|
|
.audio-upload--processing .upload-icon::after { content: ""; position: absolute; inset: -.42rem; border: 3px solid #9fc5ff; border-right-color: transparent; border-radius: 50%; animation: spin 1.5s linear infinite; }
|
|
.audio-upload--success .upload-icon { background: #147d6c; }
|
|
.audio-upload--error .upload-icon { background: #9d385b; }
|
|
.audio-upload--uploading .drop-zone,
|
|
.audio-upload--processing .drop-zone { border-color: #7296d5; background: linear-gradient(135deg, #18284c, #242046); }
|
|
.audio-upload--uploading .drop-zone strong,
|
|
.audio-upload--processing .drop-zone strong,
|
|
.audio-upload--uploading .drop-zone > span > span:not(.upload-icon),
|
|
.audio-upload--processing .drop-zone > span > span:not(.upload-icon),
|
|
.audio-upload--uploading .file-name,
|
|
.audio-upload--processing .file-name { opacity: .35; }
|
|
.audio-upload--uploading .drop-zone,
|
|
.audio-upload--processing .drop-zone { cursor: default; }
|
|
.audio-upload--uploading .drop-zone:hover,
|
|
.audio-upload--processing .drop-zone:hover { transform: none; }
|
|
.upload-cancel[hidden] { display: none; }
|
|
#classification-results { scroll-margin-top: 1.5rem; }
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.audio-upload--processing .upload-icon::after { animation: none; }
|
|
.audio-upload--uploading .drop-zone,
|
|
.audio-upload--processing .drop-zone,
|
|
.audio-upload--uploading .upload-icon,
|
|
.audio-upload--processing .upload-icon { transition: none; }
|
|
}
|
|
|
|
.drop-zone strong {
|
|
display: block;
|
|
font-size: 1.15rem;
|
|
}
|
|
|
|
.drop-zone span {
|
|
display: block;
|
|
margin-top: .4rem;
|
|
color: var(--muted);
|
|
font-size: .92rem;
|
|
}
|
|
|
|
.file-name {
|
|
min-height: 1.3rem;
|
|
margin: 1rem 0 0;
|
|
color: #c7d2fe;
|
|
font-size: .9rem;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.form-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 1rem;
|
|
padding: .9rem .25rem 0;
|
|
}
|
|
|
|
.file-note {
|
|
margin: 0;
|
|
color: var(--muted);
|
|
font-size: .8rem;
|
|
}
|
|
|
|
button,
|
|
.button {
|
|
text-decoration: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: .6rem;
|
|
border: 0;
|
|
border-radius: .8rem;
|
|
padding: .85rem 1.15rem;
|
|
cursor: pointer;
|
|
color: #10172c;
|
|
font: inherit;
|
|
font-weight: 800;
|
|
background: linear-gradient(135deg, #93c5fd, #c4b5fd);
|
|
box-shadow: 0 .5rem 1.25rem #8b5cf640;
|
|
transition: transform .2s ease, filter .2s ease;
|
|
}
|
|
|
|
button:hover,
|
|
.button:hover {
|
|
transform: translateY(-1px);
|
|
filter: brightness(1.08);
|
|
}
|
|
|
|
button:disabled {
|
|
cursor: wait;
|
|
filter: saturate(.4);
|
|
transform: none;
|
|
}
|
|
|
|
.spinner {
|
|
width: 1rem;
|
|
height: 1rem;
|
|
border: 2px solid #263253;
|
|
border-top-color: currentColor;
|
|
border-radius: 50%;
|
|
animation: spin .75s linear infinite;
|
|
}
|
|
|
|
.htmx-indicator {
|
|
display: none;
|
|
}
|
|
|
|
.htmx-request.htmx-indicator {
|
|
display: inline-block;
|
|
}
|
|
|
|
.upload-form.htmx-request button {
|
|
pointer-events: none;
|
|
}
|
|
|
|
#upload-status {
|
|
min-height: 1.4rem;
|
|
margin: 1rem .25rem 0;
|
|
color: #c7d2fe;
|
|
font-size: .9rem;
|
|
}
|
|
|
|
.upload-form.htmx-request+#upload-status {
|
|
color: #fcd34d;
|
|
}
|
|
|
|
#classification-results {
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
.results-card {
|
|
padding: clamp(1.25rem, 3vw, 2rem);
|
|
animation: reveal .35s ease-out;
|
|
}
|
|
|
|
.result-heading {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.result-heading h2 {
|
|
margin: 0;
|
|
font-size: clamp(1.4rem, 3vw, 2rem);
|
|
letter-spacing: -.04em;
|
|
}
|
|
|
|
.result-heading p {
|
|
margin: .3rem 0 0;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.result-status {
|
|
padding: .4rem .65rem;
|
|
border-radius: 999px;
|
|
color: #a7f3d0;
|
|
font-size: .75rem;
|
|
font-weight: 800;
|
|
white-space: nowrap;
|
|
background: #065f464d;
|
|
}
|
|
|
|
.meta {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: .6rem;
|
|
margin: 1.5rem 0;
|
|
}
|
|
|
|
.meta span,
|
|
.legend span {
|
|
padding: .4rem .65rem;
|
|
border: 1px solid var(--line);
|
|
border-radius: 999px;
|
|
color: #bdc9e5;
|
|
font-size: .8rem;
|
|
background: #101a31;
|
|
}
|
|
|
|
.legend {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: .5rem;
|
|
margin: 0 0 1.25rem;
|
|
}
|
|
|
|
.legend .firework {
|
|
color: #ffd18c;
|
|
border-color: #c7721e80;
|
|
}
|
|
|
|
.legend .speech {
|
|
color: #ffadb4;
|
|
border-color: #d5485880;
|
|
}
|
|
.topbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:3.5rem; }.brand { display:flex; align-items:center; gap:.7rem; color:var(--ink); font-size:.9rem; font-weight:800; letter-spacing:.1em; text-decoration:none; text-transform:uppercase; }.brand-mark { display:grid; width:2.25rem; aspect-ratio:1; place-items:center; border-radius:.75rem; color:#141022; background:linear-gradient(135deg,#fcd34d,#fb7185); box-shadow:0 .5rem 1.5rem #fb718550; }.nav { display:flex; gap:.35rem; padding:.25rem; border:1px solid var(--line); border-radius:.75rem; background:#111a31a6; }.nav a { padding:.5rem .75rem; border-radius:.5rem; color:var(--muted); font-size:.86rem; font-weight:700; text-decoration:none; }.nav a[aria-current="page"] { color:var(--ink); background:#2a3b67; }
|
|
|
|
.result-grid {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr);
|
|
gap: 1.25rem;
|
|
}
|
|
|
|
.result-group {
|
|
padding: 1.1rem;
|
|
border: 1px solid var(--line);
|
|
border-radius: 1rem;
|
|
background: #0b1225a8;
|
|
}
|
|
|
|
.result-group h3 {
|
|
margin: 0 0 1rem;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.prediction-list {
|
|
display: grid;
|
|
gap: .75rem;
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.prediction {
|
|
--accent-color: #7799dd;
|
|
position: relative;
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
gap: .45rem .75rem;
|
|
align-items: center;
|
|
padding: .7rem .75rem;
|
|
overflow: hidden;
|
|
border: 1px solid #26365b;
|
|
border-left: 3px solid var(--accent-color);
|
|
border-radius: .7rem;
|
|
background: #121c34;
|
|
}
|
|
|
|
.prediction--firework {
|
|
--accent-color: var(--fire);
|
|
background: linear-gradient(90deg, #7a421d55, #121c34);
|
|
}
|
|
|
|
.prediction--speech {
|
|
--accent-color: var(--danger);
|
|
background: linear-gradient(90deg, #6c213055, #121c34);
|
|
}
|
|
|
|
.prediction-label {
|
|
min-width: 0;
|
|
font-weight: 700;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.prediction-score {
|
|
color: #c4d1ed;
|
|
font-size: .85rem;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.score-bar {
|
|
grid-column: 1/-1;
|
|
height: .3rem;
|
|
overflow: hidden;
|
|
border-radius: 999px;
|
|
background: #263657;
|
|
}
|
|
|
|
.score-bar i {
|
|
display: block;
|
|
width: calc(var(--score) * 1%);
|
|
height: 100%;
|
|
border-radius: inherit;
|
|
background: var(--accent-color);
|
|
}
|
|
|
|
.peak-list {
|
|
display: grid;
|
|
gap: .7rem;
|
|
}
|
|
|
|
.peak-item {
|
|
padding-bottom: .7rem;
|
|
border-bottom: 1px solid #253453;
|
|
}
|
|
|
|
.peak-item:last-child {
|
|
padding-bottom: 0;
|
|
border-bottom: 0;
|
|
}
|
|
|
|
.peak-time {
|
|
color: #a9bce0;
|
|
font-size: .78rem;
|
|
}
|
|
|
|
.peak-item .prediction {
|
|
margin-top: .35rem;
|
|
}
|
|
|
|
.empty {
|
|
margin: 0;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.error-card {
|
|
border-color: #a43d4d;
|
|
background: linear-gradient(135deg, #4b1724dd, #1a1427dd);
|
|
}
|
|
|
|
.error-card h2 {
|
|
color: #fecdd3;
|
|
}
|
|
|
|
.error-card p {
|
|
color: #fecdd3;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
@keyframes reveal {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(.75rem);
|
|
}
|
|
}
|
|
|
|
@media (max-width:42rem) {
|
|
.shell {
|
|
width: min(100% - 1.25rem, 70rem);
|
|
}
|
|
|
|
.form-footer,
|
|
.result-heading {
|
|
align-items: stretch;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.form-footer button {
|
|
width: 100%;
|
|
}
|
|
|
|
.result-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.result-status {
|
|
align-self: flex-start;
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion:reduce) {
|
|
|
|
*,
|
|
::before,
|
|
::after {
|
|
scroll-behavior: auto !important;
|
|
animation-duration: .01ms !important;
|
|
transition-duration: .01ms !important;
|
|
}
|
|
}
|