* {
    box-sizing: border-box;
}

@keyframes flash {
    0% {
        background-color: lightgrey;
    }

    50% {
        background-color: lightslategray;
    }

    100% {
        background-color: lightgrey;
    }
}

.flash {
    animation: flash 1s infinite;
}

body {
    font-family: Cambria;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    background-color: #f0f0f0;
    height: 100vh;
    overflow-x: hidden;
}

#container {
    display: flex;
    flex-flow: row wrap;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
}

#calculator {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
}

#history {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-flow: column nowrap;
    overflow-y: scroll;
    gap: 5px;
    min-width: 400px;
}

#modifiedDisplay {
    display: none;
		grid-column: span 6;
}

#resultdisplay {
    font-size: 16px;
    text-align: right;
    color: dimgrey;
    grid-column: span 6;
    border: none;
    overflow-x: auto;
    padding: 13px;
    border: 1px solid #ddd;
    border-radius: 5px;
		background-color: lightgrey;
    cursor: pointer;
    transition: background-color 0.3s;
}

#resultdisplay:hover {
    background-color: lightskyblue;
}
#display {
    font-size: 24px;
    text-align: right;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    grid-column: span 6;
    overflow-x: auto;
    height: 70px;
    width: 385px;
}


button {
    font-family: Cambria;
    width: 60px;
    height: auto;
    min-height: 40px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    background-color: lightgrey;
    cursor: pointer;
    transition: background-color 0.3s;
}

button.historybutton {
    width: auto;
    flex-shrink: 0;
    padding-top: 0px;
}

button.clear {
    background-color: lightsalmon;
}

button.trig {
    background-color: lightgreen;
}

button:hover {
    background-color: lightskyblue;
}
@media (max-width: 768px) {
#calculator{
    width: 100%;
}

button {
    width:auto;
}

#display {
    width: auto;
}

body {
    align-items: flex-start;
}

#history {
 width: 100%;
 height: 100px;
}
}