html,
body {
    width: 100%;
    height: 100%;
}

body {
    background-color: #ebebeb5b;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
        sans-serif;
}

.header {
    background-color: #1f2937;
    font-size: 24px;
    font-weight: bold;
    color: #f9faf8;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 0;
}

.footer {
    background-color: #1f2937;
    color: #e5e7eb;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    flex-shrink: 0;
    width: 100%;
}

.container {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.display {
    display: flex;
    flex-direction: column;
    text-align: right;
    width: 300px;
    padding: 50px;
    background-color: #ffffff;
    margin-bottom: -199.8px;
    height: 72px;
}

.firstLine {
    opacity: 0.2;
}

.secondLine {
    opacity: 0.4;
}

.thirdLine {
    opacity: 0.6;
}

.currentLine {
    font-weight: bold;
    font-size: 20px;
}

.keypad {
    width: 400px;
    padding: 200px;
    margin-bottom: -180px;
}

.clearRow {
    display: flex;
}

.firstRow {
    display: flex;
}

.secondRow {
    display: flex;
}

.thirdRow {
    display: flex;
}

.fourthRow {
    display: flex;
}

button {
    appearance: none;
    background-color: #ffffff;
    border-width: 0;
    box-sizing: border-box;
    color: #000000;
    cursor: pointer;
    display: inline-block;
    font-family: Clarkson, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1em;
    margin: 0.2px;
    opacity: 1;
    outline: 0;
    padding: 30px 30px;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-rendering: geometricprecision;
    text-transform: uppercase;
    transition: opacity 300ms cubic-bezier(0.694, 0, 0.335, 1),
        background-color 100ms cubic-bezier(0.694, 0, 0.335, 1),
        color 100ms cubic-bezier(0.694, 0, 0.335, 1);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    vertical-align: baseline;
    white-space: nowrap;
    width: 100%;
}

.operator {
    font-size: 18px;
}

.equal {
    font-size: 18px;
}

.dot {
    font-size: 20px;
    font-weight: bold;
}

button:before {
    animation: opacityFallbackOut 0.5s step-end forwards;
    backface-visibility: hidden;
    background-color: #ebebeb;
    clip-path: polygon(-1% 0, 0 0, -25% 100%, -1% 100%);
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    transform: translateZ(0);
    transition: clip-path 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
        -webkit-clip-path 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 100%;
    opacity: 0.4;
}

button:hover:before {
    animation: opacityFallbackIn 0s step-start forwards;
    clip-path: polygon(0 0, 101% 0, 101% 101%, 0 101%);
    opacity: 0.4;
}

button:after {
    background-color: #ffffff;
}

button span {
    z-index: 1;
    position: relative;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .header {
        padding: 20px 0;
    }
    .footer {
        padding: 20px 0;
        font-size: 14px;
        text-align: center;
    }

    .display {
        width: 90%;
        padding: 20px;
        margin-bottom: -99.8px;
    }

    .keypad {
        width: 100%;
        padding: 100px 0;
        margin-bottom: -90px;
    }

    button {
        padding: 20px 0;
        font-size: 12px;
    }
}
