@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

* {
    font-family: Cascadia Code;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.display {
    border: 1px;
    border-radius: 8px;
}

.main-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 500px;
    max-width: 900px;
    margin: 50px;
    padding: 30px;
}

.container {
    display: flex;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 0 40px;
    width: 420px;
    height: 100%;
}

.history {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    height: 100%;
    display: flex;
    text-align: center;
    width: 420px;
    flex-direction: column;
    justify-content: space-between;
}

.history ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.history h2 {
    text-align: center;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    margin-top: 0;
}

.history button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 10px 20px;
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    align-self: flex-end;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

.calculator table {
    background-color: #adadad;
    width: 350px;
    border-radius: 25px;
    height: 100%;
    margin: auto;
    border-spacing: 10px;
}

.cal_name {
    border: 2px;
    border-radius: 18px 18px 0px 0px;
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;

}

.button {
    height: 60px;
    width: 60px;
    text-align: center;
    background-color: whitesmoke;
    border-bottom-right-radius: 30%;
    border-bottom-left-radius: 30%;
    border-top-left-radius: 15%;
    border-top-right-radius: 15%;
    font-size: 20px;
    cursor: pointer;
}

.button:hover {
    background-color: yellow;
}

#output {
    height: 111px;
    width: 96%;
    border: 4px solid #000000;
    border-radius: 8px 8px 8px 8px;
    font-size: 34px;
    background-color: #a1ab96;

}

table th {
    height: 50px;
    letter-spacing: 0.3px;
    font-weight: bold;
    font-size: 25px;
}

.active {
    background-color: orange;
}

b {
    font-size: 25px;
    text-align: left;
}


.history ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.history li {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.history button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    align-self: flex-end;
}

.history button:hover {
    background-color: #ff1a1a;
}

@media (max-width: 739px) {
    .main-container {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        padding: 0px;
        width: 100%;
        height: auto;
        margin: 10px;

    }

    .container {
        width: 90%;
        margin: 10px 10px;
    }

    .history {
        width: 90%;
        overflow-y: unset;
        max-height: 480px;
    }
    body {
        display: flex;
        justify-content: center;
        padding: 0px;
        margin: 5px;
        height: auto;
        
    }
}