#container {
    font-family: sans-serif;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    background-color: rgb(245, 184, 109);
    background-size: cover;
    align-items: center;
    margin: 20px; /* Adjust margin for better responsiveness */
    padding: 20px; /* Add padding to ensure content doesn't touch edges */
}

button {
    font-size: 1.5rem;
    padding: 10px 15px;
    border-radius: 10px;
    background-color: rgb(94, 94, 217);
    cursor: pointer;
    color: white;
    font-weight: bold;
}

button:hover {
    background-color: rgb(63, 63, 177);
}

input {
    font-size: 2rem;
    width: 100%; /* Make input full-width */
    max-width: 300px; /* Limit maximum width */
    text-align: center;
    font-weight: bold;
    border: 5px solid;
    border-radius: 5px;
    padding: 10px; /* Add padding for better usability */
}

#diceresult {
    margin: 25px 0; /* Adjust margin for mobile view */
}

img {
    width: 100px; /* Reduce image size for better responsiveness */
    height: 100px;
    margin: 5px;
}

/* Media Queries for Mobile Devices */
@media (max-width: 768px) {
    #container {
        font-size: 1.5rem; /* Adjust font size for smaller screens */
        margin: 10px; /* Reduce margin */
    }

    button {
        font-size: 1.2rem; /* Adjust button font size */
        padding: 8px 12px; /* Adjust button padding */
    }

    input {
        font-size: 1.5rem; /* Adjust input font size */
    }

    img {
        width: 100px; /* Maintain smaller image size */
        height: 100px;
    }
}

@media (max-width: 480px) {
    #container {
        font-size: 1.2rem; /* Further reduce font size for very small screens */
    }

    button {
        font-size: 1rem; /* Further reduce button font size */
        padding: 6px 10px; /* Further reduce button padding */
    }

    input {
        font-size: 1.2rem; /* Further reduce input font size */
        width: 100%; /* Ensure full-width input */
    }

    img {
        width: 80px; /* Reduce image size for very small screens */
        height: 80px;
    }
}
