/* --- 1. Globals --- */
body {
    transition: background 5s ease-in;
    background: -moz-linear-gradient(-45deg, #360033 0%, #0b8793 100%);
    background: -webkit-linear-gradient(-45deg, #360033 0%, #0b8793 100%);
    background: linear-gradient(135deg, #360033 0%, #0b8793 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#80ffe53b', endColorstr='#80ff2525',GradientType=1 );
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: Arial;
    touch-action: manipulation;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- 2. Calculator --- */
.calculator-container {
    padding: 80px;
}

.calculator-container .card {
    width: 100%;
    margin: auto;
    display: block;
    max-width: 340px;
    background: #355691;
    border-radius: 10px;
    overflow: hidden;
    -webkit-box-shadow: 0px 0px 40px -2px rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 0px 0px 40px -2px rgba(0, 0, 0, 0.2);
    box-shadow: 0px 0px 40px -2px rgba(0, 0, 0, 0.2);
    font-size: 16px;
}

.calculator-container .card .header {
    padding: 30px 30px;
    background: #355691;
    height: 50px;
    border-bottom: 1px solid #a7a8aa;
    position: relative;
}

.calculator-container .card .header #operationDisplay {
    font-size: 0.9em;
    color: #a7a8aa;
    text-align: right;
}

.calculator-container .card .header #resultDisplay {
    font-size: 2em;
    color: #a7a8aa;
    text-align: right;
    position: absolute;
    right: 30px;
    top: 50px;
}

.calculator-container .card .body {
    width: 100%;
}

.calculator-container .card .body .row {
    /* Browsers automatically adds #355691 spaces to elements */
    /* By declaring the font-size as 0 for this element, it allows
       us to have buttons without any #355691 space around them.
     */
    font-size: 0;
}

.calculator-container .card .body button {
    width: 25%;
    height: 70px;
    transition: background 0.2s ease-in;
    background: #355691;
    font-size: 18px;
    color: #a7a8aa;
    text-align: center;
    outline: 0;
    border: 0;
    padding: 0;
}

.calculator-container .card .body button:hover,
.calculator-container .card .body button:focus {
    transition: background 0.2s ease-in;
    background: #22375d;
    cursor: pointer;
}

.calculator-container .card .body .button-large {
    width: 50%;
}
.calculator-container .card .body .button-large button {
    width: 50%;
}

.calculator-container .card .body .row button:last-of-type {
    background: #1d2e4e;
}

.calculator-container .card .body .row button:last-of-type:hover,
.calculator-container .card .body .row button:last-of-type:focus {
    background: rgba(254, 167, 51, 0.1);
}

.calculator-container .card .body .row:last-of-type button:last-of-type {
    background: #5f5aa2;
    color: #a7a8aa;
}

.calculator-container .card .body .row:last-of-type button:last-of-type:hover,
.calculator-container .card .body .row:last-of-type button:last-of-type:focus {
    background: #464276;
}

/* --- 2. Responsive media queries --- */
@media (max-width: 600px) {
    .calculator-container {
        padding: 0;
        height: 100%;
    }

    .calculator-container .card {
        width: 100%;
        max-width: 100%;
        height: 100%;
        border-radius: 0;
        box-shadow: none !important;
    }
}

@media screen and (min-width: 680px) and (orientation: portrait) {
    .calculator-container {
        padding: 60px;
    }
    .calculator-container .card {
        max-width: 100%;
    }
    .calculator-container .card .body button {
        min-height: 220px;
        font-size: 48px;
    }
    .calculator-container .card .header #resultDisplay {
        font-size: 4em;
        top: 30px;
    }
}
