@import url('https://fonts.googleapis.com/css2?family=Pangolin&display=swap');

body
{
    background: #000000;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 97vh;
    align-items: center;
    justify-items: center;
}

.calculator
{
    width: auto;
    min-height: 100%;
    border: solid 4px #c8d416;
    border-radius: 10px;
    display: grid;
    margin: 0;
    grid-template-columns: repeat(4, 25%);
    grid-template-rows: repeat(4, 25%);
}

.text
{
    display: flex;
    width: 100%;
    flex-direction: column;
    grid-column: 1/5;
    grid-row: 1/2;
    background: black;
    color: #c8d416;
    border-radius: 7px 7px 0 0;
    font-family: 'Pangolin', cursive;
    font-size: 4.5em;
    align-items: center;
    margin: auto;
}

.text input{
    width: 97%;
    height: 100%;
}

.numbers
{
    grid-row: 2/5;
    grid-column: 1/4;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.operators
{
    grid-column: 4/5;
    grid-row: 2/5;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.btn, .op-btn {
    background: #ffffff;
    color: black;
    font-size: 5em;
    font-family: 'Pangolin', cursive;
    flex-basis: 33.3333333333%;
    max-width: 33.3333333333%;
    line-height: 100%;
    text-align: center;
}

.btn:hover, .op-btn:hover {
    background: #c8d416
}

.btn:active, .op-btn:active {
  background: black;
  color: #c8d416;
}

.op-btn {
    background: #ffffff9f;
    flex-basis: 50%;
    max-width: 50%;
}

.btn-0 {
    border-bottom-left-radius: 10px;
}

#btn-equal {
    border-bottom-right-radius: 10px;
}

#btn-cls, #btn-equal{
    flex: 1;
}

#btn-e, #btn-pi {
    flex-basis: 16.6666666666%;
    max-width: 16.6666666666%;
}

#btn-equal {
    max-width: 100%;
    flex: 1;
}

#text {
    width: 100%;
    text-align: center;
}

#text-res {
    text-align: center;
    width: 100%;
}

@media screen and (max-device-height: 850px) {
    .btn:hover, .op-btn:hover {
        background: #ffffff;
    }
    .btn:active, .op-btn:active {
        background: black;
        color: #c8d416;
    }
    .btn, .op-btn {
        background: #ffffff;
        color: black;
        font-size: 2em;
        font-family: 'Pangolin', cursive;
        flex-basis: 33.3333333333%;
        max-width: 33.3333333333%;
        line-height: 100%;
        text-align: center;
    }
    .op-btn {
        background: #ffffff9f;
        flex-basis: 50%;
        max-width: 50%;
    }
    
    .btn-0 {
        border-bottom-left-radius: 10px;
    }
    
    #btn-equal {
        border-bottom-right-radius: 10px;
    }
    
    #btn-cls, #btn-equal{
        flex: 1;
    }
    
    #btn-e, #btn-pi {
        flex-basis: 16.6666666666%;
        max-width: 16.6666666666%;
    }
    
    #btn-equal {
        max-width: 100%;
        flex: 1;
    }
}