Spaces:
Running
Running
Download static/css/style.css from lukehola/opa-traint: direct link, hf CLI and curl.
- Browser
- Download file 11.6 kB
-
https://huggingface.co/spaces/lukehola/opa-traint/resolve/main/static/css/style.css
- Command line
-
hf download hf://spaces/lukehola/opa-traint/static/css/style.css
-
curl -L -o style.css https://huggingface.co/spaces/lukehola/opa-traint/resolve/main/static/css/style.css
11.6 kB
| /* Opa Traint — big, calm, warm UI. | |
| Principles: min tap target 80x80, base font >= 22px, high contrast, | |
| one primary action per screen, no mid-exercise scrolling, warm colors, | |
| color-blind-safe (meaning never by color alone). */ | |
| :root { | |
| --bg: #fdf6ec; | |
| --card: #ffffff; | |
| --ink: #3d332a; | |
| --ink-soft: #6b5d4f; | |
| --accent: #e8a33d; /* warm amber */ | |
| --accent-dark: #c77f1a; | |
| --calm: #7fa8a0; /* soft teal */ | |
| --calm-dark: #5d867e; | |
| --sun-empty: #e8ddcc; | |
| --sun-full: #f6b93b; | |
| --shadow: 0 4px 14px rgba(90, 70, 40, 0.15); | |
| --radius: 22px; | |
| } | |
| * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; } | |
| html, body { | |
| margin: 0; | |
| padding: 0; | |
| background: var(--bg); | |
| color: var(--ink); | |
| font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; | |
| font-size: 22px; | |
| line-height: 1.5; | |
| height: 100%; | |
| overscroll-behavior: none; | |
| } | |
| body { | |
| display: flex; | |
| flex-direction: column; | |
| min-height: 100vh; | |
| min-height: 100dvh; | |
| } | |
| .hidden { display: none ; } | |
| /* ---------- Sun progress bar ---------- */ | |
| #progress-bar { | |
| display: flex; | |
| justify-content: center; | |
| gap: 10px; | |
| padding: 14px 8px 6px; | |
| font-size: 30px; | |
| user-select: none; | |
| } | |
| #progress-bar .sun { opacity: 0.35; filter: grayscale(0.9); transition: all 0.6s ease; } | |
| #progress-bar .sun.filled { opacity: 1; filter: none; transform: scale(1.15); } | |
| /* ---------- Stop door ---------- */ | |
| #stop-btn { | |
| position: fixed; | |
| top: 10px; | |
| right: 12px; | |
| width: 64px; | |
| height: 64px; | |
| font-size: 30px; | |
| border: none; | |
| border-radius: 18px; | |
| background: rgba(255, 255, 255, 0.75); | |
| box-shadow: var(--shadow); | |
| cursor: pointer; | |
| z-index: 50; | |
| } | |
| #stop-btn:active { transform: scale(0.94); } | |
| /* ---------- Skip (next module) button ---------- */ | |
| #skip-btn { | |
| position: fixed; | |
| top: 10px; | |
| right: 88px; | |
| height: 64px; | |
| padding: 0 20px; | |
| font-size: 22px; | |
| font-family: inherit; | |
| color: var(--ink); | |
| border: none; | |
| border-radius: 18px; | |
| background: rgba(255, 255, 255, 0.75); | |
| box-shadow: var(--shadow); | |
| cursor: pointer; | |
| z-index: 50; | |
| } | |
| #skip-btn:active { transform: scale(0.94); } | |
| /* ---------- Screen container ---------- */ | |
| #screen { | |
| flex: 1; | |
| width: 100%; | |
| max-width: 900px; | |
| margin: 0 auto; | |
| padding: 16px 20px 40px; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: flex-start; | |
| text-align: center; | |
| } | |
| h1 { font-size: 42px; margin: 0.4em 0; } | |
| h2 { font-size: 34px; margin: 0.4em 0; } | |
| p { font-size: 24px; margin: 0.5em 0; } | |
| .big-text { font-size: 30px; line-height: 1.55; } | |
| .soft { color: var(--ink-soft); } | |
| /* ---------- Buttons ---------- */ | |
| button { font-family: inherit; color: var(--ink); } | |
| .btn { | |
| min-width: 120px; | |
| min-height: 84px; | |
| padding: 18px 36px; | |
| font-size: 28px; | |
| font-weight: 600; | |
| border: none; | |
| border-radius: var(--radius); | |
| background: var(--card); | |
| box-shadow: var(--shadow); | |
| cursor: pointer; | |
| margin: 10px; | |
| transition: transform 0.12s ease, opacity 0.5s ease; | |
| } | |
| .btn:active { transform: scale(0.96); } | |
| .btn-primary { | |
| background: var(--accent); | |
| color: #fff; | |
| font-size: 34px; | |
| min-height: 96px; | |
| padding: 22px 56px; | |
| } | |
| .btn-primary:active { background: var(--accent-dark); } | |
| .btn-secondary { | |
| background: transparent; | |
| box-shadow: none; | |
| color: var(--ink-soft); | |
| text-decoration: underline; | |
| font-size: 22px; | |
| min-height: 64px; | |
| } | |
| .btn-giant { | |
| font-size: 40px; | |
| min-height: 130px; | |
| padding: 30px 60px; | |
| background: var(--calm); | |
| color: #fff; | |
| } | |
| .btn-giant:active { background: var(--calm-dark); } | |
| .btn.fade-out { | |
| opacity: 0; | |
| pointer-events: none; | |
| } | |
| .btn.wiggle { animation: wiggle 0.5s ease; } | |
| @keyframes wiggle { | |
| 0%, 100% { transform: translateX(0); } | |
| 25% { transform: translateX(-8px); } | |
| 75% { transform: translateX(8px); } | |
| } | |
| .btn.pulse-hint { animation: pulsehint 1.6s ease infinite; } | |
| @keyframes pulsehint { | |
| 0%, 100% { box-shadow: var(--shadow); transform: scale(1); } | |
| 50% { box-shadow: 0 0 24px rgba(232, 163, 61, 0.8); transform: scale(1.05); } | |
| } | |
| /* TTS speaker button */ | |
| .tts-btn { | |
| width: 84px; | |
| height: 84px; | |
| font-size: 38px; | |
| border: none; | |
| border-radius: 50%; | |
| background: var(--card); | |
| box-shadow: var(--shadow); | |
| cursor: pointer; | |
| margin: 8px; | |
| } | |
| .tts-btn:active { transform: scale(0.94); } | |
| /* ---------- Cards / photos ---------- */ | |
| .photo-frame { | |
| width: min(88vw, 480px); | |
| max-height: 46vh; | |
| border-radius: var(--radius); | |
| box-shadow: var(--shadow); | |
| overflow: hidden; | |
| background: var(--card); | |
| margin: 12px auto; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| /* The photo is always shown whole — never cropped. max-height: inherit picks | |
| up the frame's cap (including inline overrides like 34vh in wie_is_dit), | |
| so the image scales down to fit instead of being clipped by the frame. */ | |
| .photo-frame img { | |
| display: block; | |
| width: auto; | |
| height: auto; | |
| max-width: 100%; | |
| max-height: inherit; | |
| object-fit: contain; | |
| } | |
| .video-frame { | |
| width: min(88vw, 720px); | |
| aspect-ratio: 16 / 9; | |
| border-radius: var(--radius); | |
| box-shadow: var(--shadow); | |
| overflow: hidden; | |
| background: #000; | |
| margin: 12px auto; | |
| } | |
| .video-frame iframe { | |
| width: 100%; | |
| height: 100%; | |
| border: 0; | |
| display: block; | |
| } | |
| .choice-row { | |
| display: flex; | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| gap: 8px; | |
| margin-top: 10px; | |
| } | |
| /* ---------- Name letters (type mode) ---------- */ | |
| .letters { | |
| display: flex; | |
| justify-content: center; | |
| gap: 12px; | |
| font-size: 44px; | |
| font-weight: 700; | |
| letter-spacing: 2px; | |
| margin: 18px 0; | |
| min-height: 66px; | |
| flex-wrap: wrap; | |
| } | |
| .letters .slot { | |
| min-width: 44px; | |
| border-bottom: 5px solid var(--accent); | |
| color: var(--ink); | |
| } | |
| .letters .slot.empty { color: transparent; } | |
| /* ---------- On-screen keyboard ---------- */ | |
| .osk { width: 100%; max-width: 860px; margin-top: 8px; user-select: none; } | |
| .osk-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 6px; } | |
| .osk-key { | |
| flex: 1; | |
| max-width: 84px; | |
| min-height: 80px; | |
| font-size: 30px; | |
| font-weight: 600; | |
| border: none; | |
| border-radius: 14px; | |
| background: var(--card); | |
| box-shadow: var(--shadow); | |
| cursor: pointer; | |
| text-transform: uppercase; | |
| } | |
| .osk-key:active { background: var(--accent); color: #fff; } | |
| /* ---------- Stars ---------- */ | |
| #star-float { | |
| position: fixed; | |
| font-size: 70px; | |
| pointer-events: none; | |
| z-index: 90; | |
| animation: starfly 1.2s ease forwards; | |
| } | |
| @keyframes starfly { | |
| 0% { transform: scale(0.4); opacity: 0; } | |
| 30% { transform: scale(1.3); opacity: 1; } | |
| 100% { transform: scale(1) translateY(-120px); opacity: 0; } | |
| } | |
| /* ---------- Snelkijker ---------- */ | |
| .flash-arena { | |
| position: relative; | |
| width: min(86vw, 560px); | |
| height: min(60vh, 560px); | |
| margin: 8px auto; | |
| background: var(--card); | |
| border-radius: var(--radius); | |
| box-shadow: var(--shadow); | |
| } | |
| .flash-center { | |
| position: absolute; | |
| top: 50%; left: 50%; | |
| transform: translate(-50%, -50%); | |
| font-size: 90px; | |
| } | |
| .flash-dot { | |
| position: absolute; | |
| width: 34px; height: 34px; | |
| background: var(--calm-dark); | |
| border-radius: 50%; | |
| } | |
| .grid8 { | |
| position: relative; | |
| width: min(86vw, 560px); | |
| height: min(50vh, 460px); | |
| margin: 8px auto; | |
| } | |
| .grid8 button { | |
| position: absolute; | |
| width: 84px; height: 84px; | |
| font-size: 30px; | |
| border: none; | |
| border-radius: 50%; | |
| background: var(--card); | |
| box-shadow: var(--shadow); | |
| cursor: pointer; | |
| transform: translate(-50%, -50%); | |
| } | |
| .grid8 button:active { background: var(--accent); color: #fff; } | |
| /* ---------- Garden (categorie) ---------- */ | |
| .garden { | |
| display: flex; | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| align-content: flex-start; | |
| gap: 6px; | |
| width: min(90vw, 700px); | |
| min-height: 180px; | |
| margin: 10px auto; | |
| padding: 14px; | |
| background: linear-gradient(#eaf5e2, #d8ecc8); | |
| border-radius: var(--radius); | |
| box-shadow: var(--shadow); | |
| font-size: 44px; | |
| } | |
| .garden .flower { animation: bloom 0.7s ease; } | |
| @keyframes bloom { | |
| 0% { transform: scale(0); } | |
| 70% { transform: scale(1.3); } | |
| 100% { transform: scale(1); } | |
| } | |
| /* ---------- Stappenplan cards ---------- */ | |
| .seq-done-row, .seq-pool { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 10px; | |
| width: min(92vw, 700px); | |
| margin: 6px auto; | |
| } | |
| .seq-card { | |
| min-height: 84px; | |
| padding: 16px 22px; | |
| font-size: 25px; | |
| font-weight: 600; | |
| border: none; | |
| border-radius: 18px; | |
| background: var(--card); | |
| box-shadow: var(--shadow); | |
| cursor: pointer; | |
| text-align: left; | |
| } | |
| .seq-card:active { transform: scale(0.98); } | |
| .seq-card.done { | |
| background: #e7f2e3; | |
| cursor: default; | |
| color: var(--ink-soft); | |
| } | |
| .seq-card.done::before { content: "✓ "; color: var(--calm-dark); } | |
| /* ---------- Chess ---------- */ | |
| .chessboard { | |
| display: grid; | |
| grid-template-columns: repeat(8, 1fr); | |
| /* Explicit rows: implicit (auto) rows size to the piece glyphs, overflow | |
| the square container and get clipped — the board must always be whole. */ | |
| grid-template-rows: repeat(8, 1fr); | |
| width: min(92vw, 60vh, 560px); | |
| aspect-ratio: 1; | |
| margin: 8px auto; | |
| border-radius: 12px; | |
| overflow: hidden; | |
| box-shadow: var(--shadow); | |
| touch-action: manipulation; | |
| } | |
| .sq { | |
| position: relative; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: clamp(28px, 6.4vmin, 52px); | |
| line-height: 1; | |
| cursor: pointer; | |
| user-select: none; | |
| min-height: 0; | |
| min-width: 0; | |
| } | |
| .sq.light { background: #f0d9b5; } | |
| .sq.dark { background: #b58863; } | |
| .sq.selected { outline: 4px solid var(--accent); outline-offset: -4px; } | |
| .sq.hint-glow { animation: pulsehint 1.4s ease infinite; } | |
| .sq .dot { | |
| position: absolute; | |
| width: 26%; height: 26%; | |
| border-radius: 50%; | |
| background: rgba(90, 70, 40, 0.4); | |
| } | |
| /* Filled glyphs for both colors; the color is painted here so white pieces | |
| read as solid white with a dark outline instead of thin hollow outlines. */ | |
| .sq .piece.white { | |
| color: #fdfdfd; | |
| text-shadow: 0 0 2px #3a2f25, 0 1px 2px #3a2f25, 0 -1px 2px #3a2f25, | |
| 1px 0 2px #3a2f25, -1px 0 2px #3a2f25; | |
| } | |
| .sq .piece.black { | |
| color: #26201a; | |
| text-shadow: 0 1px 2px rgba(255, 248, 235, 0.45); | |
| } | |
| .sq .piece.returning { animation: pieceback 0.4s ease; } | |
| @keyframes pieceback { | |
| 0% { transform: scale(1.25); } | |
| 100% { transform: scale(1); } | |
| } | |
| /* ---------- Go (daily problem) ---------- */ | |
| .goboard-wrap { | |
| width: min(92vw, 62vh, 560px); | |
| margin: 8px auto; | |
| border-radius: 14px; | |
| overflow: hidden; | |
| box-shadow: var(--shadow); | |
| background: #e9c37f; /* warm wood */ | |
| touch-action: manipulation; | |
| } | |
| .goboard-wrap svg { display: block; width: 100%; height: auto; } | |
| .go-stone-fade { animation: gostonefade 0.9s ease forwards; } | |
| @keyframes gostonefade { | |
| 0% { opacity: 1; } | |
| 100% { opacity: 0; } | |
| } | |
| .go-hint { animation: gohint 1.4s ease infinite; } | |
| @keyframes gohint { | |
| 0%, 100% { opacity: 0.25; } | |
| 50% { opacity: 0.75; } | |
| } | |
| /* ---------- Welcome / finish ---------- */ | |
| .streak-flame { font-size: 28px; margin-top: 14px; } | |
| .center-fill { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| width: 100%; | |
| } | |
| #confetti { | |
| position: fixed; | |
| inset: 0; | |
| pointer-events: none; | |
| z-index: 80; | |
| } | |
| /* Recording indicator: a gentle breathing mic, NOT a timer */ | |
| .rec-live { font-size: 80px; animation: breathe 1.6s ease infinite; } | |
| @keyframes breathe { | |
| 0%, 100% { transform: scale(1); opacity: 0.85; } | |
| 50% { transform: scale(1.15); opacity: 1; } | |
| } | |
| @media (max-width: 820px) { | |
| h1 { font-size: 34px; } | |
| .btn-primary { font-size: 30px; } | |
| .osk-key { min-height: 68px; font-size: 26px; } | |
| } | |