/* Basic resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #6DBE45;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-title {
    font-size: 2em;
    font-weight: bold;
    color: white;
    margin-bottom: 10px; /* Spacing between the title and the game container */
    text-align: center;
}

#instructions {
    font-size: 1.2em;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

#game-container {
    position: relative;
    width: 80vw;
    height: 60vh;
    border: 5px solid #fff;
    background-color: #28A745; /* Pitch color */
    display: flex;
    justify-content: center;
    align-items: center;
}

#rugby-pitch {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #32CD32;
    border: 2px solid white;
}

.player {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: blue;
    border-radius: 50%;
}

#player1 {
    top: 30%;
    left: 10%;
    transform: translate(-50%, -50%);
}

#player2 {
    top: 70%;
    left: 10%;
    transform: translate(-50%, -50%);
}

#ball {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    top: 30%; /* Initially positioned at player 1 */
    left: 10%;
    transform: translate(-50%, -50%);
    transition: top 0.5s ease; /* Ball will smoothly move between players in 0.5 seconds */
}

#game-over-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
}
