countdowngen/static/css/styles.css

181 lines
3.5 KiB
CSS

:root {
--accent: #8b5cf6;
--bg: #0b0b10;
--fg: #e5e7eb;
--radius: 16px;
--font: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
}
html {
font-family: var(--font);
}
html, body {
height: 100%;
}
html[data-scheme="dark"] body {
background: var(--bg);
color: var(--fg);
}
html[data-scheme="light"] body {
background: var(--bg);
color: var(--fg);
}
.container {
min-height: 100%;
display: grid;
place-items: center;
padding: 2rem;
}
.card {
width: min(900px, 95vw);
background: color-mix(in oklab, var(--bg), white 7%);
border: 1px solid color-mix(in oklab, var(--bg), white 15%);
border-radius: var(--radius);
padding: 1.5rem;
}
.shadow-sm { box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.shadow-md { box-shadow: 0 10px 25px rgba(0,0,0,.2); }
.shadow-lg { box-shadow: 0 30px 60px rgba(0,0,0,.25); }
h1.title {
font-family: inherit;
font-size: clamp(2rem, 4vw + 1rem, 4rem);
line-height: 1.1;
margin: 0 0 0.5rem 0;
}
.subtitle {
margin-top: 0;
opacity: .8;
}
.countdown {
display: grid;
grid-auto-flow: column;
grid-auto-columns: minmax(0, 1fr);
gap: 1rem;
margin: 1.5rem 0;
}
.countdown .unit {
display: grid;
place-items: center;
padding: 1rem;
border-radius: calc(var(--radius) - 6px);
border: 1px solid color-mix(in oklab, var(--bg), white 15%);
background: color-mix(in oklab, var(--bg), white 5%);
}
.countdown .unit span {
font-family: inherit;
font-size: clamp(1.8rem, 5vw + 0.5rem, 4rem);
font-variant-numeric: tabular-nums;
}
.countdown .unit label {
font-family: inherit;
opacity: .7;
font-size: 0.9rem;
}
.grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem 1.25rem;
}
.field {
display: grid;
gap: 0.5rem;
}
.field input[type="text"],
.field input[type="datetime-local"],
.field input[type="number"],
.field select,
.field input[type="color"] {
padding: 0.6rem 0.75rem;
border-radius: calc(var(--radius) - 10px);
border: 1px solid color-mix(in oklab, var(--bg), white 20%);
background: color-mix(in oklab, var(--bg), white 7%);
color: inherit;
font-family: var(--font);
}
.actions {
grid-column: 1 / -1;
margin-top: 0.5rem;
}
button, .actions button, .share a, .share button {
font-size: inherit;
appearance: none;
border: 0;
padding: 0.75rem 1rem;
border-radius: calc(var(--radius) - 8px);
background: var(--accent);
color: var(--fg);
font-weight: 600;
cursor: pointer;
text-decoration: none;
display: inline-block;
}
button:hover, .share a:hover, .share button:hover {
filter: brightness(1.05);
}
.muted {
opacity: .8;
font-size: 0.95rem;
}
.share {
display: flex;
gap: 0.75rem;
align-items: center;
margin-top: 0.5rem;
}
.language-selector {
display: flex;
gap: 0.5rem;
justify-content: flex-end;
margin-bottom: 1rem;
}
.language-selector a {
padding: 0.4rem 0.75rem;
border-radius: calc(var(--radius) - 10px);
border: 1px solid color-mix(in oklab, var(--bg), white 20%);
background: color-mix(in oklab, var(--bg), white 7%);
color: inherit;
text-decoration: none;
font-size: 0.85rem;
font-weight: 500;
opacity: 0.7;
transition: opacity 0.2s, border-color 0.2s;
}
.language-selector a:hover {
opacity: 1;
}
.language-selector a.active {
opacity: 1;
border-color: var(--accent);
background: color-mix(in oklab, var(--accent), transparent 90%);
}
@media (max-width: 720px) {
.grid { grid-template-columns: 1fr; }
.countdown { grid-template-columns: repeat(2, minmax(0,1fr)); }
}