116 lines
6.1 KiB
CSS
116 lines
6.1 KiB
CSS
:root {
|
|
--bg: #f8fafc;
|
|
--panel: #ffffff;
|
|
--text: #0f172a;
|
|
--muted: #475569;
|
|
--accent: #16a34a;
|
|
--danger: #dc2626;
|
|
--brand: #2563eb;
|
|
--border: #e2e8f0;
|
|
--shadow: 0 10px 20px rgba(2, 6, 23, 0.06), 0 2px 6px rgba(2, 6, 23, 0.05);
|
|
--yellow: #f59e0b;
|
|
--orange: #f97316;
|
|
--pink: #ec4899;
|
|
--purple: #8b5cf6;
|
|
--blue: #3b82f6;
|
|
--teal: #14b8a6;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
html, body { height: 100%; }
|
|
body {
|
|
margin: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
|
Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, 'Comic Sans MS', 'Comic Neue', sans-serif;
|
|
background-image: url('/static/img/bg-math.svg'), linear-gradient(0deg, rgba(255,255,255,0.70), rgba(255,255,255,0.70)), url('/static/img/background.jpg');
|
|
background-repeat: repeat, no-repeat, no-repeat;
|
|
background-size: 160px 160px, 100% 100%, cover;
|
|
background-position: 0 0, center center, center center;
|
|
color: var(--text);
|
|
}
|
|
|
|
.app { max-width: 900px; margin: 0 auto; padding: 24px; }
|
|
|
|
.title { display: flex; align-items: center; gap: 12px; margin: 8px 0 6px; font-size: 28px; font-weight: 900; color: #0f172a; }
|
|
.mascot { width: 48px; height: 48px; }
|
|
.subtitle { margin: 0 0 18px; color: #64748b; }
|
|
|
|
.top-bar { display: flex; gap: 12px; align-items: center; }
|
|
.timer, .progress { background: var(--panel); padding: 10px 14px; border-radius: 10px; color: var(--muted); border: 1px solid var(--border); box-shadow: var(--shadow); }
|
|
.start { margin-left: auto; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: #0f172a; cursor: pointer; box-shadow: var(--shadow); font-size: large;}
|
|
.start:hover { background: #f1f5f9; }
|
|
.start:disabled { opacity: 0.6; cursor: not-allowed; }
|
|
|
|
.status { min-height: 22px; margin: 10px 0 8px; color: var(--muted); text-align: center; font-size: xx-large}
|
|
|
|
.game { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); margin-top: 1em;}
|
|
.problem { text-align: center; font-size: 72px; font-weight: 900; letter-spacing: 1px; margin: 10px 0 24px; color: #0f172a; background: linear-gradient(120deg, #fef3c7, #e0f2fe); border-radius: 14px; padding: 16px; border: 1px solid var(--border); }
|
|
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
|
|
|
|
.option-btn { font-size: 28px; font-weight: 800; padding: 22px; border-radius: 14px; border: 1px solid var(--border); background: #ffffff;
|
|
color: #0f172a; cursor: pointer; transition: transform 80ms ease, background 0.2s ease, box-shadow 0.2s ease; box-shadow: var(--shadow); position: relative; overflow: hidden; }
|
|
.option-btn:hover { transform: translateY(-1px); }
|
|
.option-btn:active { transform: translateY(0); }
|
|
.option-btn:disabled { opacity: 0.8; cursor: default; transform: none; }
|
|
.option-btn.correct { outline: 2px solid var(--accent); box-shadow: 0 0 0 6px rgba(22,163,74,0.12), var(--shadow); animation: pop 280ms ease-out; }
|
|
.option-btn.wrong { outline: 2px solid var(--danger); box-shadow: 0 0 0 6px rgba(220,38,38,0.12), var(--shadow); animation: shake 300ms ease-in-out; }
|
|
|
|
/* Fun color variants */
|
|
.option-btn.c-yellow { background: linear-gradient(180deg, #fff7ed, #fffbeb); border-color: #fde68a; }
|
|
.option-btn.c-orange { background: linear-gradient(180deg, #fff1ec, #fff7ed); border-color: #fdba74; }
|
|
.option-btn.c-pink { background: linear-gradient(180deg, #fff0f6, #fdf2f8); border-color: #f9a8d4; }
|
|
.option-btn.c-purple { background: linear-gradient(180deg, #f5f3ff, #f3e8ff); border-color: #c4b5fd; }
|
|
.option-btn.c-blue { background: linear-gradient(180deg, #eff6ff, #e0f2fe); border-color: #93c5fd; }
|
|
.option-btn.c-teal { background: linear-gradient(180deg, #ecfeff, #e6fffb); border-color: #99f6e4; }
|
|
.option-btn.c-yellow:hover { background: linear-gradient(180deg, #fff3d6, #fff3da); }
|
|
.option-btn.c-orange:hover { background: linear-gradient(180deg, #ffe8e1, #ffefe6); }
|
|
.option-btn.c-pink:hover { background: linear-gradient(180deg, #ffe7f0, #ffe9f3); }
|
|
.option-btn.c-purple:hover { background: linear-gradient(180deg, #efeaff, #eee4ff); }
|
|
.option-btn.c-blue:hover { background: linear-gradient(180deg, #e7f0ff, #d9ecfb); }
|
|
.option-btn.c-teal:hover { background: linear-gradient(180deg, #e6fcff, #e0fef7); }
|
|
|
|
.result { margin-top: 18px; padding: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
|
|
.result .score { font-size: 20px; margin-bottom: 8px; }
|
|
.again { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: #0f172a; cursor: pointer; box-shadow: var(--shadow); }
|
|
.again:hover { background: #f1f5f9; }
|
|
|
|
.hidden { display: none; }
|
|
|
|
/* Animations */
|
|
@keyframes pop {
|
|
0% { transform: scale(1); }
|
|
50% { transform: scale(1.08); }
|
|
100% { transform: scale(1); }
|
|
}
|
|
|
|
@keyframes shake {
|
|
0% { transform: translateX(0); }
|
|
20% { transform: translateX(-6px); }
|
|
40% { transform: translateX(6px); }
|
|
60% { transform: translateX(-4px); }
|
|
80% { transform: translateX(4px); }
|
|
100% { transform: translateX(0); }
|
|
}
|
|
|
|
.fx-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 999; }
|
|
.confetti { position: absolute; width: 8px; height: 14px; border-radius: 2px; will-change: transform, opacity; transform: translate(-50%, -50%); }
|
|
@keyframes confetti {
|
|
0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
|
|
100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--rot)); }
|
|
}
|
|
|
|
/* Full-screen flash for correct answer */
|
|
.flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.65), rgba(255,255,255,0.0) 60%); animation: flashFade 520ms ease-out forwards; }
|
|
@keyframes flashFade { from { opacity: 1; } to { opacity: 0; } }
|
|
|
|
/* Decorative images */
|
|
/* decorative assets removed */
|
|
|
|
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
|
|
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.08); opacity: 1; } }
|
|
|
|
@media (max-width: 640px) {
|
|
.problem { font-size: 52px; }
|
|
.option-btn { font-size: 22px; padding: 18px; }
|
|
}
|