Files
drawit/src/app/globals.css
T
2026-06-20 20:45:05 -05:00

188 lines
7.1 KiB
CSS

:root {
/* Friendly, kid-pleasing palette */
--bg: #fef9f3;
--surface: #ffffff;
--ink: #2b2440;
--ink-soft: #6b6480;
--primary: #4f7cff;
--primary-dark: #3a63d6;
--accent: #ff7eb6;
--sun: #ffc843;
--sea: #34c6c6;
--leaf: #58c777;
--danger: #e85a5a;
--line: #ece6f0;
--shadow: 0 8px 24px rgba(60, 40, 90, 0.10);
--radius: 18px;
--radius-sm: 12px;
--maxw: 1040px;
--font: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
/* Dark theme — applied when data-theme="dark" is set on <html> (by the no-flash script / toggle). */
:root[data-theme="dark"] {
--bg: #17141f;
--surface: #221d31;
--ink: #f2eefb;
--ink-soft: #aaa2c0;
--primary: #7b9bff;
--primary-dark: #9db4ff;
--accent: #ff8ec0;
--sun: #ffce5b;
--sea: #43d3d3;
--leaf: #5fd083;
--danger: #ff7a7a;
--line: #36304a;
--shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
/* No-JS / pre-hydration fallback to the system preference */
@media (prefers-color-scheme: dark) {
:root:not([data-theme]) {
--bg: #17141f;
--surface: #221d31;
--ink: #f2eefb;
--ink-soft: #aaa2c0;
--primary: #7b9bff;
--primary-dark: #9db4ff;
--accent: #ff8ec0;
--sun: #ffce5b;
--sea: #43d3d3;
--leaf: #5fd083;
--danger: #ff7a7a;
--line: #36304a;
--shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--ink);
font-family: var(--font);
font-size: 18px;
line-height: 1.55;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
}
/* Prevent accidental zoom/scroll jank while drawing on tablets */
.no-touch-scroll { touch-action: none; }
/* Guide "watch it drawn" reveal */
@keyframes guideReveal {
from { opacity: 0; transform: scale(0.985); }
to { opacity: inherit; transform: scale(1); }
}
.guide-reveal { animation: guideReveal 0.45s ease-out; }
/* Grip/pressure demo: the shading scribble "draws in" then fades and loops */
@keyframes shadeDraw {
0% { stroke-dashoffset: 440; opacity: 0; }
12% { opacity: 1; }
55% { stroke-dashoffset: 0; opacity: 1; }
88% { stroke-dashoffset: 0; opacity: 1; }
100% { stroke-dashoffset: 0; opacity: 0; }
}
.shade-scribble { stroke-dasharray: 440; animation: shadeDraw 3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .shade-scribble { animation: none; stroke-dashoffset: 0; } }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); }
p { margin: 0 0 1em; }
a { color: var(--primary-dark); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
/* Buttons */
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
font: inherit; font-weight: 700; cursor: pointer;
padding: 14px 22px; min-height: 52px;
border: none; border-radius: 999px;
background: var(--primary); color: #fff;
box-shadow: var(--shadow); text-decoration: none;
transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:hover { filter: brightness(1.04); }
.btn.secondary { background: var(--surface); color: var(--primary-dark); border: 2px solid var(--line); box-shadow: none; }
.btn.accent { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn.danger { background: var(--danger); }
.btn.big { font-size: 1.2rem; padding: 18px 30px; min-height: 60px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
/* Cards */
.card {
background: var(--surface); border-radius: var(--radius);
box-shadow: var(--shadow); padding: 24px;
}
/* Top navigation */
.nav {
position: sticky; top: 0; z-index: 20;
background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; max-width: var(--maxw); margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand .logo { font-size: 1.5rem; }
.nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 2px solid transparent; }
.nav-links a:hover { background: var(--surface); color: var(--ink); }
/* Current page: lighter fill, darker bold text for clear, readable contrast */
.nav-links a.active { background: #eaf0ff; color: var(--ink); font-weight: 800; }
/* Sign-up call-to-action: outlined so it doesn't read as the active page */
.nav-links a.cta { color: var(--primary-dark); border-color: var(--primary); }
.nav-links a.cta:hover { background: var(--primary); color: #fff; }
.nav-links a.cta.active { background: var(--primary); color: #fff; border-color: var(--primary); }
/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field input, .field select, .field textarea {
font: inherit; padding: 14px 16px; min-height: 52px;
border: 2px solid var(--line); border-radius: var(--radius-sm);
background: var(--surface); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field textarea { min-height: 110px; resize: vertical; }
.form-narrow { max-width: 440px; margin: 0 auto; }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; }
.notice.ok { background: #e8f7ee; color: #1f7a45; }
.notice.err { background: #fdecec; color: #b13838; }
.notice.info { background: #eaf0ff; color: #2f4dbb; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: 14px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.pill.pending { background: #fff1d6; color: #9a6b00; }
.pill.active { background: #e8f7ee; color: #1f7a45; }
.pill.suspended { background: #fdecec; color: #b13838; }
.pill.admin { background: #eae4ff; color: #5b3fd6; }
.pill.role { background: #e7f6f6; color: #1d8d8d; }
/* Tables (admin) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; }
table.data th, table.data td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 0.95rem; vertical-align: middle; }
table.data th { color: var(--ink-soft); font-size: 0.8rem; text-transform: uppercase; letter-spacing: .04em; }
footer.site { padding: 40px 20px; text-align: center; color: var(--ink-soft); font-size: 0.9rem; }
/* Generic page section spacing */
.section { padding: 40px 0; }
.page { padding: 28px 0 60px; }
@media (max-width: 600px) {
body { font-size: 17px; }
.card { padding: 18px; }
}