body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: auto;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
}

.container {
    display: flex;
    flex-direction: column; /* Ensure the content flows in a column */
    align-items: center; /* Center the content */
    width: 100%;
    max-width: 1200px;
}

.main-content {
    width: 100%; /* Make main content take full width */
    max-width: 600px; /* Ensure it does not exceed the max width */
    padding: 20px;
}

.calculator-container {
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

.calculator {
    border-radius: 5px;
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 320px;
    padding: 20px;
    background-color: #f7f7f7;
    margin: 0 auto;
    box-sizing: border-box;
}

.calculator-screen {
    width: 100%;
    height: 80px;
    border: none;
    background-color: #252525;
    color: white;
    text-align: right;
    padding: 0 10px;
    font-size: 2.5rem;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.calculator-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

button {
    height: 60px;
    border: 1px solid #ddd;
    background-color: #f2f2f2;
    font-size: 1.5rem;
    outline: none;
    cursor: pointer;
}

button.operator {
    background-color: #f5923e;
    color: white;
}

button.equal-sign {
    background-color: #3d85c6;
    color: white;
}

button.all-clear {
    background-color: #d9534f;
    color: white;
}

button.backspace {
    background-color: #ffcc00;
    color: white;
}

button.toggle-negative {
    background-color: #6c757d;
    color: white;
}

button:active {
    box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
}

.usage {
    text-align: left;
    width: 100%;
}

.usage h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.usage ul {
    list-style-type: none;
    padding: 0;
}

.usage li {
    margin-bottom: 5px;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .main-content {
        max-width: 100%; /* Allow full width for smaller screens */
        padding: 10px;
    }
    
    .calculator {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    .calculator-screen {
        font-size: 2rem; /* Adjust font size for smaller screens */
    }

    button {
        height: 50px; /* Adjust button height for smaller screens */
        font-size: 1.2rem;
    }

    .usage h2 {
        font-size: 1.2rem; /* Adjust usage instructions font size */
    }

    .usage li {
        font-size: 1rem; /* Adjust list items font size */
    }
}

@media (max-width: 480px) {
    .calculator-screen {
        font-size: 1.5rem; /* Further adjust font size for very small screens */
    }

    button {
        height: 40px; /* Further adjust button height for very small screens */
        font-size: 1rem;
    }

    .usage h2 {
        font-size: 1rem; /* Further adjust usage instructions font size */
    }

    .usage li {
        font-size: 0.9rem; /* Further adjust list items font size */
    }
}
