.whack-a-bug-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 400px; margin: 0 auto; } .bug-hole { width: 100px; height: 100px; background-color: rgba(255, 255, 255, 0.1); border-radius: 50%; position: relative; cursor: pointer; border: 2px solid rgba(255, 255, 255, 0.2); transition: border-color 0.3s; overflow: hidden; } .bug-hole:hover { border-color: rgba(255, 255, 255, 0.5); } .bug { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem; animation: pop-up 0.3s ease-out; } @keyframes pop-up { 0% { transform: translate(-50%, 50%) scale(0); } 80% { transform: translate(-50%, -60%) scale(1.1); } 100% { transform: translate(-50%, -50%) scale(1); } } .whacked { animation: whack-anim 0.2s ease-in; color: #4ade80; /* green-400 */ } @keyframes whack-anim { 0% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(0.8); } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }