body,
html {
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    color: #ecf0f1;
    background-color: rgb(23, 24, 37);
    font-family: 'Fjalla One', sans-serif;
    animation: fadein 1.5s;
    font-family: 'Fjalla One', sans-serif;
}
 @keyframes fadein {
    0% {
        opacity: 0%;
    }
    100%   {
        opacity: 100%;
    }
  }

h1 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 0;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
} 

input {
    background-color: rgba(52, 73, 94, 0.5);
    color: #ecf0f1;
    outline: none;
    text-align: right;
    border: none;
    font-size: 3rem;
    width: 80vw;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.5rem 1.5rem;
    -webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
    -moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
}

.container {
    margin: auto;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.calculator {
    padding: 0.25rem;
    display: inline-block;
}

table {
    margin: auto;
}

button {
    border: none;
    background-color: white;
    width: 20vw;
    height: 10vh;
    padding: 0.5rem 0;
    cursor: pointer;
    margin: 0.25vmax;
    font-size: 2vmax;
    border-radius: 1rem;
    -moz-transition: all ease 0.5s;
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
    -o-transition: all ease 0.5s;
}
button:active {
    transform: scale(0.95);
    /* Scaling button to 0.98 to its original size */
    box-shadow: 3px 2px 22px 1px rgba(0, 0, 0, 0.24);
    /* Lowering the shadow */
}

button:hover {
    -webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
    -moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
    -moz-transition: all ease 0.5s;
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
    -o-transition: all ease 0.5s;
}

a{
    outline: none;
    -moz-transition: all ease 0.5s;
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
    -o-transition: all ease 0.5s;
}

a:hover{
    text-shadow: 0px 0px 10px rgba(241, 196, 15, 0.5);
    -moz-transition: all ease 0.5s;
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
    -o-transition: all ease 0.5s;
}

#turn {
    display: none;
    z-index: 100;
    position: fixed;
}

#historybutton{
    width:40px;
    height:40px;
    border-radius: 20px;
    cursor: pointer;
}

#history{
    position: absolute;
    width:90%;
    height: 80vh;
    top:10vh;
    background-color: white;
    border: 6px solid black;
    border-radius: 10px;
    display: none;
    /* overflow-y: scroll; */
}

.historyelement{
    color: black;
    margin: 20px;
    font-size: 40px;
}

#bar1, #bar2{
    position: absolute;
    width:30px;
    height: 4px;
    background-color: white;
    margin-top: 20px;
    margin-right: 20px;
    margin-left: 93%;
    transform: rotate(45deg);
    cursor: pointer;
    display: none;
}

#bar2{
    transform: rotate(135deg);
}

@media (orientation: landscape) and (max-height: 500px) {
    #turn {
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 2rem;
        color: rgba(52, 73, 94, 1.0);
        background-color: rgba(236, 240, 241, 1.0);
    }
}

@media (max-width: 700px) {
    td button{
        font-size: 18px;
        font-weight: 600;
    }
}

.toggle-container {
    margin: 10px -10px 0 0;
    
}

.tittle{
    text-decoration: none; 
    color: #f1c40f;
    cursor: pointer;
    margin-left: -20px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: rgb(233, 227, 227);
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
    border-radius: 10px;
}

input:checked + .toggle-slider {
    background-color: #2a2c2e;
    border-radius: 10px;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #2b2c2d;
    border-radius: 10px;
}


input:checked + .toggle-slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Dark mode styles */

.dark-mode {
    background-color: black;
    border-radius: 10px;
    color: #fff;
}

.dark-mode body,
.dark-mode html {
     background-color: black; 
     border-radius: 10px;
     
}

.dark-mode .calculator {
     background-color: black; 
     border-radius: 10px;
   
}

.dark-mode table {
    color: #fff;
    border-radius: 10px;
}

.dark-mode button {
    background-color: #555;
    color: #fff;
    border-radius: 10px;
}


 .dark-mode a {
    color: #fff;
    border-radius: 10px;
}

.row{
    display: flex;
    font-size: 1rem;
    justify-content: center;
    max-width: 20vw;
    margin: auto;
}

.row .col button{
    background-color: #f01600;
    font-weight: bold;
    color: #ecf0f1; 
    width: 8vw;
}

@media (max-width: 700px) {
    .row .col button{
        width: 10vw;
    }
}
 
#answer {
    caret-color: #0f38f1;
}
/* Negative Numbers */
.negative {
    color: red;
  }