Spaces:
Running

get / public /styles.css
Sean Hayes
Improve scoring loading state and copy
339ca04
Raw History Blame Contribute Delete
9.9 kB
:root {
color-scheme: dark;
--bg: #08090c;
--panel: rgba(17, 19, 26, 0.86);
--panel-solid: #11131a;
--text: #f7f8fb;
--muted: #9ba1ad;
--muted-2: #707684;
--line: rgba(255, 255, 255, 0.1);
--line-strong: rgba(255, 255, 255, 0.17);
--accent: #8a8cff;
--accent-2: #5e6ad2;
}
* {
box-sizing: border-box;
}
body {
min-height: 100vh;
margin: 0;
color: var(--text);
background:
radial-gradient(circle at 50% -16%, rgba(96, 106, 210, 0.3), transparent 34rem),
linear-gradient(180deg, #0f1118 0%, var(--bg) 48%, #07080b 100%);
font-family:
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
position: fixed;
inset: 0;
pointer-events: none;
content: "";
background-image:
linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
background-size: 64px 64px;
-webkit-mask-image: linear-gradient(to bottom, black, transparent 72%);
mask-image: linear-gradient(to bottom, black, transparent 72%);
}
button,
input {
font: inherit;
}
[hidden] {
display: none !important;
}
.app-shell {
width: min(1180px, calc(100% - 32px));
margin: 0 auto;
padding: 20px 0 44px;
}
.topbar {
height: 48px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid var(--line);
}
.brand {
display: inline-flex;
align-items: center;
gap: 10px;
color: var(--text);
text-decoration: none;
font-size: 0.92rem;
font-weight: 650;
}
.brand-mark {
width: 18px;
aspect-ratio: 1;
border-radius: 5px;
background:
linear-gradient(135deg, transparent 0 38%, rgba(255, 255, 255, 0.95) 39% 51%, transparent 52%),
var(--accent-2);
box-shadow: 0 0 24px rgba(94, 106, 210, 0.65);
}
.nav-pill {
padding: 6px 10px;
border: 1px solid var(--line);
border-radius: 999px;
color: var(--muted);
background: rgba(255, 255, 255, 0.03);
font-size: 0.78rem;
}
.hero {
padding: 74px 0 40px;
}
.hero-copy {
width: 100%;
display: grid;
justify-items: center;
text-align: center;
}
.eyebrow {
margin: 0 0 16px;
color: #c8cbff;
font-size: 0.82rem;
font-weight: 600;
}
h1 {
max-width: 960px;
margin: 0;
font-size: clamp(3.4rem, 7.2vw, 6.8rem);
font-weight: 680;
line-height: 0.96;
letter-spacing: 0;
}
.subhead {
max-width: 620px;
margin: 28px 0 0;
color: var(--muted);
font-size: 1.08rem;
line-height: 1.65;
}
.workbench {
width: min(820px, 100%);
margin: 0 auto;
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 14px;
padding: 16px;
border: 1px solid var(--line);
border-radius: 8px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
rgba(11, 12, 17, 0.86);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.08),
0 28px 90px rgba(0, 0, 0, 0.32);
}
.workbench.has-score {
width: min(1080px, 100%);
grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
align-items: stretch;
}
.workbench.has-score .photo-review {
grid-column: 1 / -1;
}
.upload-zone {
display: grid;
grid-template-rows: 1fr auto;
gap: 14px;
}
#photoInput {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
}
#dropZone {
position: relative;
min-height: 390px;
display: grid;
place-items: center;
align-content: center;
gap: 14px;
padding: 42px 28px;
border: 1px dashed var(--line-strong);
border-radius: 8px;
background:
radial-gradient(circle at 50% 0%, rgba(94, 106, 210, 0.18), transparent 26rem),
var(--panel-solid);
cursor: pointer;
overflow: hidden;
transition:
border-color 160ms ease,
background 160ms ease,
transform 160ms ease;
}
#dropZone.has-photo {
padding: 0;
border-style: solid;
background: var(--panel-solid);
}
#dropZone:hover,
#dropZone.is-dragging {
border-color: rgba(138, 140, 255, 0.72);
background:
radial-gradient(circle at 50% 0%, rgba(94, 106, 210, 0.25), transparent 26rem),
var(--panel-solid);
transform: translateY(-1px);
}
.upload-copy {
display: grid;
justify-items: center;
gap: 14px;
}
.upload-icon {
width: 58px;
aspect-ratio: 1;
display: grid;
place-items: center;
border: 1px solid var(--line-strong);
border-radius: 8px;
color: #dfe1ff;
background: rgba(255, 255, 255, 0.045);
font-size: 1.85rem;
font-weight: 400;
line-height: 1;
}
.upload-title {
font-size: 1.2rem;
font-weight: 650;
}
.upload-meta {
max-width: 430px;
color: var(--muted-2);
font-size: 0.95rem;
line-height: 1.5;
text-align: center;
}
.form-actions {
display: grid;
grid-template-columns: 1fr auto;
gap: 10px;
}
button {
min-height: 52px;
display: inline-grid;
grid-auto-flow: column;
align-items: center;
justify-content: center;
gap: 9px;
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 8px;
color: #ffffff;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
var(--accent-2);
font-size: 0.98rem;
font-weight: 650;
cursor: pointer;
box-shadow: 0 10px 30px rgba(94, 106, 210, 0.26);
}
button.is-loading::before {
width: 16px;
aspect-ratio: 1;
border: 2px solid rgba(255, 255, 255, 0.36);
border-top-color: #ffffff;
border-radius: 50%;
content: "";
animation: spin 800ms linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
button:disabled {
cursor: not-allowed;
color: var(--muted-2);
background: rgba(255, 255, 255, 0.055);
box-shadow: none;
}
.secondary-button {
min-width: 180px;
color: var(--text);
background: rgba(255, 255, 255, 0.055);
box-shadow: none;
}
.secondary-button:hover {
background: rgba(255, 255, 255, 0.085);
}
.score-result {
display: grid;
align-content: center;
justify-items: center;
gap: 10px;
padding: 28px 20px;
border: 1px solid var(--line);
border-radius: 8px;
background:
radial-gradient(circle at 50% 0%, rgba(94, 106, 210, 0.28), transparent 18rem),
var(--panel);
text-align: center;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.photo-review {
display: grid;
gap: 14px;
margin-top: 14px;
}
.photo-frame {
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
border-radius: inherit;
background: var(--panel-solid);
}
.photo-frame img {
width: 100%;
height: 100%;
max-height: min(58vh, 560px);
display: block;
object-fit: contain;
}
.person-overlays {
position: absolute;
inset: 0;
}
.person-box {
position: absolute;
min-width: 34px;
min-height: 34px;
padding: 0;
border: 2px solid rgba(138, 140, 255, 0.92);
border-radius: 6px;
background: rgba(94, 106, 210, 0.12);
box-shadow: 0 0 0 9999px transparent;
}
.person-box.is-selected {
border-color: #ffffff;
background: rgba(94, 106, 210, 0.3);
box-shadow: 0 0 0 2px rgba(94, 106, 210, 0.6);
}
.person-picker {
display: grid;
gap: 12px;
padding: 14px;
border: 1px solid var(--line);
border-radius: 8px;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
var(--panel);
}
.picker-title {
margin: 0;
font-size: 1rem;
font-weight: 650;
}
#personSearch {
width: 100%;
min-height: 44px;
padding: 0 12px;
border: 1px solid var(--line-strong);
border-radius: 8px;
color: var(--text);
background: rgba(255, 255, 255, 0.045);
outline: none;
}
#personSearch:focus {
border-color: rgba(138, 140, 255, 0.78);
}
.person-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
gap: 8px;
}
.person-option {
min-height: 44px;
color: var(--text);
background: rgba(255, 255, 255, 0.055);
box-shadow: none;
}
.person-option.is-selected {
border-color: rgba(255, 255, 255, 0.82);
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
var(--accent-2);
}
.score-number {
display: grid;
place-items: center;
min-height: 172px;
width: min(100%, 260px);
border: 1px solid rgba(138, 140, 255, 0.42);
border-radius: 8px;
color: #ffffff;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent),
rgba(94, 106, 210, 0.32);
font-size: clamp(5rem, 10vw, 8rem);
font-weight: 720;
line-height: 1;
}
.score-kicker {
margin: 0;
color: #c8cbff;
font-size: 0.82rem;
font-weight: 650;
}
.score-label {
margin: 4px 0 0;
font-size: 1.2rem;
font-weight: 650;
}
.score-verdict {
margin: 0;
color: var(--muted);
font-size: 0.94rem;
line-height: 1.5;
}
@media (max-width: 860px) {
.app-shell {
width: min(100% - 24px, 680px);
padding: 14px 0 32px;
}
.hero {
padding: 56px 0 30px;
}
h1 {
max-width: 650px;
font-size: clamp(3rem, 12.5vw, 5.3rem);
line-height: 0.98;
}
#dropZone {
min-height: 320px;
}
}
@media (max-width: 480px) {
.app-shell {
width: min(100% - 20px, 440px);
padding-top: 10px;
}
.topbar {
height: 44px;
}
.nav-pill {
display: none;
}
.hero {
padding: 42px 0 24px;
}
h1 {
max-width: 390px;
font-size: clamp(2.7rem, 11.8vw, 3.45rem);
line-height: 1;
}
.subhead {
margin-top: 18px;
font-size: 1rem;
line-height: 1.55;
}
.workbench {
padding: 12px;
}
.workbench.has-score {
grid-template-columns: 1fr;
}
#dropZone {
min-height: 292px;
padding: 32px 18px;
}
button {
min-height: 54px;
}
.form-actions {
grid-template-columns: 1fr;
}
.secondary-button {
min-width: 0;
}
.score-result {
gap: 8px;
padding: 18px 14px;
}
.score-number {
min-height: 128px;
width: min(100%, 220px);
font-size: 4.5rem;
}
.photo-frame img {
max-height: 48vh;
}
.person-list {
grid-template-columns: 1fr;
}
}