body {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 100vh;
    background-color: #0d1a2f; /* Dark night-sky blue */
    margin: 0;
    overflow: hidden;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
}

.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 15%;
    background-color: #231c16; /* Dark earth color */
}

.pump-container {
    position: relative;
    width: 600px;
    height: 400px;
    margin-bottom: 9%;
}

/* --- Pump Parts --- */

.pump-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 15px;
    background: #333;
    border-radius: 5px 5px 0 0;
    z-index: 2;
}

.pump-tower {
    position: absolute;
    bottom: 15px;
    left: 150px;
    width: 25px;
    height: 150px;
    background: linear-gradient(#888, #777);
    z-index: 1;
}

.pump-beam-pivot {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #444;
    border-radius: 50%;
    z-index: 4;
}

.pump-beam {
    position: absolute;
    bottom: 155px;
    left: 60px;
    width: 450px;
    height: 18px;
    background: #c5c5c5;
    border-radius: 4px;
    transform-origin: 102px 9px;
    animation: nod 6s ease-in-out infinite;
    z-index: 3;
}

.counter-weight {
    position: absolute;
    left: 0;
    top: -16px;
    width: 50px;
    height: 50px;
    background: #c5c5c5;
    border-radius: 2px;
}

.horse-head {
    position: absolute;
    right: -10px;
    top: -30px;
    width: 40px;
    height: 60px;
    background: #999;
    border-radius: 50% 50% 0 0 / 80% 80% 0 0;
    transform: rotate(10deg);
}

.rod {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 145px;
    background: #777;
    border-radius: 3px 3px 0 0;
}


/* --- Animation --- */
@keyframes nod {
    0% {
        transform: rotate(20deg);
    }
    50% {
        transform: rotate(-15deg);
    }
    100% {
        transform: rotate(20deg);
    }
}
