/* font-family: 'Montserrat', sans-serif; */
/* font-family: 'Tomorrow', sans-serif; */

/* BASIC RESET */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
}

/* PREVENT ORIENTATION CHANGE */

@media screen and (min-width: 320px) and (max-width: 767px) and (orientation: landscape) {
    html {
        transform: rotate(-90deg);
        transform-origin: left top;
        width: 100vh;
        overflow-x: hidden;
        position: absolute;
        top: 100%;
        left: 0;
    }
}

/* PRIMARY STYLE */

html {
    font-family: 'Montserrat', sans-serif;
}

.main {
    position: relative;
    margin: 40px auto 0;
    border: 4px solid black;
    width: 400px;
    height: 500px;
}

.display {
    position: absolute;
    text-align: right;
    font-family: 'Tomorrow', sans-serif;
    font-size: 34px;
    line-height: 50px;
    width: 80%;
    height: 10%;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ddd;
}

.input {
    display: flex;
    position: absolute;
    width: 80%;
    height: 80%;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
}

/* NUMBERS PANEL */

.input .numbers {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    flex-basis: 70%;
    padding: 5%;
    padding-left: 0;
}

.numbers div {
    border: 2px solid black;
    width: 26%;
    height: 15%;
}

.numbers div:first-child {
    order: 2;
    margin-right: 7px;
}

.numbers div:first-child,
.numbers div:last-child {
    width: 42%;
}

/* OPERATORS PANEL */

.input .operators {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 30%;
    padding-top: 5%;
    padding-bottom: 5%;
}

.input .operators div {
    flex-basis: 40%;
    height: 15%;
    border: 2px solid black;
}

.input .operators .clear,
.input .operators .equal {
    flex-basis: 100%;
}

.clear {
    order: -1;
}

.equal {
    order: 2;
}

/* BUTTONS */

.input div {
    background-color: #ccc;
    border-radius: 10%;
    font-size: 30px;
    text-align: center;
    line-height: 165%;
    cursor: pointer;
    transition: .3s;
}

.input div:hover {
    background-color: #666;
    color: white;
}