#gameArea {
    position: relative;
    width: 1280px;
    height: 650px;
    overflow: hidden;
    object-fit: scale-down;
}

#title {
    position: absolute;
    left: 36%;
    top: 10px;
    font-size: 2em;
    color: white;
    text-shadow: 2px 2px 10px black;
    z-index: 5;
}

#goalpost {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#goalkeeper {
    position: absolute;
    width: 65px;
    bottom: 260px;
    left: 46.5%;
    z-index: 2;
}

#football {
    position: absolute;
    width: 50px;
    bottom: 80px;
    left: 48%;
    z-index: 3;
}

#controls {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 200px;
    z-index: 4;
}

button {
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    background-color: yellowgreen;
    border: 2px solid black;
    border-radius: 10px;
}

button:hover {
    background-color: limegreen;
}

#message {
    position: absolute;
    top: 36%;
    left: 42%;
    font-size: 3.5em;
    font-weight: bold;
    text-shadow: 2px 2px 50px black;
    display: none;
    transform: scale(0.8);
    transition: transform 0.3s ease-in-out;
    z-index: 5;
}

#rules {
    position: absolute;
    top: 1%;
    left: 1%;
    z-index: 5;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 10px black;
    padding: 2px 20px;
    border-radius: 10px;
}

#resetBtn {
    position: absolute;
    top: 5%;
    right: 5%;
    z-index: 5;
    padding: 10px 20px;
    font-size: 18px;
    background-color: crimson;
    color: white;
    border: 2px solid black;
    border-radius: 10px;
    cursor: pointer;
}

#resetBtn:hover {
    background-color: darkred;
}

@keyframes ballLeft {
    0% { bottom: 80px; left: 48%; }
    100% { bottom: 420px; left: 18%; }
}

@keyframes ballRight {
    0% { bottom: 80px; left: 48%; }
    100% { bottom: 420px; left: 76%; }
}

@keyframes diveLeft {
    0% { transform: translate(0,0) rotate(0deg); }
    100% { transform: translate(-300px,-20px) rotate(-45deg); }
}

@keyframes diveRight {
    0% { transform: translate(0,0) rotate(0deg); }
    100% { transform: translate(300px,-20px) rotate(45deg); }
}

@keyframes zoomIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.8); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes goalkeeperReset {
    0% { }
    100% { transform: translate(0,0) rotate(0deg); }
}

@keyframes ballReset {
    0% { }
    100% { bottom: 80px; left: 48%; }
}