README / app /globals.css
kaigiii's picture
Deploy Learn8 Demo Space
5c920e9
@tailwind base;
@tailwind components;
@tailwind utilities;
/* ── Hide scrollbar but keep scroll functionality ── */
.scrollbar-hide {
-ms-overflow-style: none; /* IE/Edge */
scrollbar-width: none; /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
display: none; /* Chrome/Safari/Opera */
}
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Open+Sans:wght@400;500;600;700&display=swap");
html,
body {
margin: 0;
padding: 0;
font-family: "Open Sans", sans-serif;
}
/* Custom utility classes */
@layer utilities {
.text-shadow-sm {
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
}
/* ── Particle animations ── */
@keyframes float-up {
0% {
transform: translateY(0) translateX(0) scale(1);
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
transform: translateY(-100vh) translateX(var(--drift, 20px)) scale(0.4);
opacity: 0;
}
}
@keyframes shimmer {
0%, 100% {
opacity: 0.3;
transform: scale(0.8);
}
50% {
opacity: 1;
transform: scale(1.2);
}
}
@keyframes drift {
0% {
transform: translateY(0) translateX(0);
opacity: 0;
}
15% {
opacity: 0.7;
}
85% {
opacity: 0.7;
}
100% {
transform: translateY(var(--float-y, -80px)) translateX(var(--float-x, 30px));
opacity: 0;
}
}
.particle {
animation: float-up var(--duration, 12s) var(--delay, 0s) infinite ease-in-out;
}
.sparkle {
animation: shimmer var(--duration, 3s) var(--delay, 0s) infinite ease-in-out;
}
.floater {
animation: drift var(--duration, 8s) var(--delay, 0s) infinite ease-in-out;
}
/* ── GameButton pulse ── */
@keyframes pulse-subtle {
0%, 100% {
transform: scale(1);
box-shadow: 0 4px 14px rgba(88, 204, 2, 0.3);
}
50% {
transform: scale(1.03);
box-shadow: 0 6px 20px rgba(88, 204, 2, 0.5);
}
}
.animate-pulse-subtle {
animation: pulse-subtle 2s ease-in-out infinite;
}
/* ── Shake animation (wrong answer) ── */
@keyframes shake {
0%, 100% { transform: translateX(0); }
20% { transform: translateX(-4px); }
40% { transform: translateX(4px); }
60% { transform: translateX(-3px); }
80% { transform: translateX(3px); }
}
.animate-shake {
animation: shake 0.4s ease-in-out;
}
/* ── XP bar shimmer ── */
@keyframes shimmer-bar {
0% { transform: translateX(-100%); }
100% { transform: translateX(200%); }
}
.animate-shimmer-bar {
animation: shimmer-bar 1.5s ease-in-out infinite;
}