body {
    margin: 0;
    overflow: hidden;
    border: none;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100%;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: black;
    background-image: url("/images/farm.jpg");
    background-size: cover;

}

#farm-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("./images/farm.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    justify-content: center;
    z-index: 0;
    pointer-events: none; 
    user-select: none;
}

#farm-background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); 
    z-index: -1; 
}

#farm-background h1 {
    position: relative;
    font-size: 7rem;
    color: white;
    margin-top: 5%;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}


.character1 img{
    max-width: 100%;
    height: 400px;
    pointer-events: none; 
    user-select: none;
    }
    
.character2 img{
    max-width: 100%;
    height: 350px;
    pointer-events: none; 
    user-select: none;
}

#npc-character {
    position: absolute;
    top: 52vh;
    left: 10vw;
    max-width: 100%;
}

#main-character {
    position: absolute;
    top: 47vh;
    left: 78vw;
    max-width: 100%;
}

.message-box {
    position: absolute;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    left: 50%; 
    top: -24%;
    transform: translate(-50%, -50%);
    border: 1px solid black;
    padding: 10px;
    text-align: center; 
    font-size: 22px;
    width: 400px;
    border-radius: 10px;
    gap: 5px;
    z-index: 10; 
}

.message-box p{
    margin: 10px;
    pointer-events: none;  
    user-select: none;
}

.message-box span{
    font-style: bold;
    font-weight: bolder;
}

.hidden {
    display: none;
}


.message-box input[type = number]{
    font-size: 20px;
    top: -60%;
}

.message-box button{
    width: auto;
    height: 25px;
    font-size: 20px;
}

#help-popup {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 100;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#help-popup img {
    width: 70px;
    height: 70px;
    filter: invert(1);
}

#help-content {
    position: absolute;
    top: 50%;
    right: 60%;
    border-radius: 1000px;
    width: 200px;
    height: 100px;
    background-color: white;
    border: 1px solid black;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    background-color: red;
}

#help-content button{
    background-color: transparent;
    border-radius: 3px;
    cursor: pointer;
}

#help-content p {
    margin: 0;
    font-size: 20px;
    line-height: 1.5;
}

#help-content span {
    font-weight: bold;
}
#reset-game {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 100; 
    cursor: pointer;
}

#reset-game img {
    width: 60px;
    height: 60px;
    filter: invert(1);
}

#reset-game img:hover {
    width: 80px;
    height: 80px;
    transition: 0.5s;
}

#help-content.popup-content{
    position: absolute;
    display: flex;
    align-items: center;
    text-align: center;
    flex-direction: column;
    gap: 20px;
    width: 600px;
    height: 300px;
    background-color: white;
    border: 1px solid black;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100
}

#help-content.popup-content.hidden{
    display: none;
}

@media screen and (max-width: 1023px){
    
    #game-container{
        display: none;
    }

    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100vh; 
        margin: 0;
        padding: 0;
        font-family: Arial, sans-serif;
        background-position: center;
        background-image: url("images/pig.jpg");
        background-repeat: no-repeat;
        background-size: cover;
        background-color: rgba(0, 0, 0, 0.3);
        position: relative; 
        overflow-x: hidden; 
    }
    
    #resolution-alert {
        display: none; 
        position: absolute;
        top: 55%; 
        left: 50%; 
        max-width: 200px;
        transform: translateX(-50%);
        background-color: white;
        color: #333; 
        padding: 5px;
        border-radius: 5px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); 
        z-index: 1000; 
        font-size: 17px;
        font-weight: bold;
    }

}
