* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Arial', sans-serif; background: linear-gradient(to bottom, #87CEEB, #98FB98); min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; } .game-container { background-color: rgba(255, 255, 255, 0.9); border-radius: 15px; padding: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); text-align: center; max-width: 800px; width: 100%; } h1 { color: #2E8B57; margin-bottom: 20px; font-size: 2.5em; } .stats { display: flex; justify-content: space-around; flex-wrap: wrap; margin-bottom: 20px; background-color: #f0f8ff; padding: 15px; border-radius: 10px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .stat { font-size: 1.2em; font-weight: bold; margin: 5px; color: #333; } .game-area { position: relative; height: 300px; background-color: #90EE90; border: 3px solid #228B22; border-radius: 10px; margin-bottom: 20px; overflow: hidden; } .ball { position: absolute; width: 20px; height: 20px; background-color: white; border: 2px solid #333; border-radius: 50%; bottom: 40px; left: 20px; transition: all 1s ease-out; } .target { position: absolute; width: 30px; height: 30px; background-color: #FF4500; border-radius: 50%; bottom: 40px; right: 20px; box-shadow: 0 0 10px rgba(255, 69, 0, 0.8); } .ground { position: absolute; bottom: 0; width: 100%; height: 40px; background-color: #8B4513; } .controls { margin-bottom: 20px; } button { background-color: #2E8B57; color: white; border: none; padding: 12px 20px; margin: 0 10px; font-size: 1.1em; border-radius: 5px; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); } button:hover { background-color: #3CB371; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); } button:active { transform: translateY(0); } .upgrades { background-color: #f0f8ff; padding: 15px; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .upgrade-item { display: flex; justify-content: space-between; align-items: center; margin: 10px 0; padding: 10px; background-color: #e6f3ff; border-radius: 5px; } .upgrade-item button { background-color: #FF8C00; padding: 8px 15px; } .upgrade-item button:hover { background-color: #FFA500; } .message { font-size: 1.2em; font-weight: bold; color: #2E8B57; min-height: 30px; margin-top: 10px; } /* Animation for ball movement */ @keyframes hitAnimation { 0% { transform: translateX(0); } 50% { transform: translateX(100px) translateY(-50px); } 100% { transform: translateX(200px) translateY(0); } } .hit-animation { animation: hitAnimation 1s ease-out; }