body {
    color: rgb(255 255 255 / 80%);
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-image: url("img/bg00.webp?v1.1");
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
    background-color: #01b0eb;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -ms-user-select:none;
}

a {
    color: rgb(255 255 255 / 80%);
    text-decoration: none;
}

button {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -ms-user-select:none;
}

@keyframes animate-scale {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.25);
    }
}

#calculadora {
    transition: top 0.5s ease-in-out, left 0.5s ease-in-out;
    -webkit-transition: top 0.5s ease-in-out, left 0.5s ease-in-out;
    width: fit-content;
    margin: auto;
    padding: 5px;
    background-color: #000000c4;
    border: 1px solid #444;
    border-radius: 5px;
    display: grid;
    grid-template-columns: 80px 80px 80px 80px;
    grid-gap: 3px;
    grid-template-areas:
        'displayZone displayZone displayZone displayZone'
        'mmas mr mc borrar'
        'ac dividir multiplicar restar'
        'siete ocho nueve sumar'
        'cuatro cinco seis sumar'
        'uno dos tres igual'
        'cero cero coma igual'
    ;
}

#extras {
    font-size: 0.7em;
    padding: 3px 0;
}

#extras>span {
    display: inline-block;
}

#extras>span.right {
    float: right;
}

#extras>span>a {
    padding: 0 4px;
}
#extras_hex, #extras_mem {
    color: rgba(255,255,255,30%);
    transition: color 0.2s ease-out;
    -webkit-transition: color 0.2s ease-out;
}
#extras_hex.active, #extras_mem.active {
    color: rgba(255,255,255,80%);
}

img.invert {
    filter: invert(70%) brightness(92%);
}

#history>img {
    filter: invert(50%) brightness(50%);
    transition: filter 0.5s ease;
}

#info>img {
    zoom: 1.06;
    transition: margin 2s ease-in-out;
}

#history.active>img {
    filter: invert(70%) brightness(92%);
    animation-name: animate-scale;
    animation-duration: 0.35s;
    animation-timing-function: ease-out;
    animation-direction: alternate;
    animation-iteration-count: 4;
    animation-play-state: running;
}

#info {
    display: inline-block;
}

#info.animate {
    animation-name: animate-scale;
    animation-duration: 0.35s;
    animation-timing-function: ease-out;
    animation-direction: alternate;
    animation-iteration-count: 4;
    animation-play-state: running;
}

.extras-simbols {
    font-size: 17px;
    line-height: 16px;
    color: #aaa;
}

#displayZone {
    grid-area: displayZone;
    border-radius: 2px;
    background-color: transparent;
}

#display {
    color: white;
    width: 100%;
    border: 0;
    font-size: 2em;
    text-align: right;
    padding: 5px;
    resize: none;
    overflow: auto;
    background-color: transparent;
    user-select: auto;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -khtml-user-select: auto;
    -ms-user-select:auto;

}

#calculadora button {
    font-size: 1.3em;
    padding: 15px;
    background-color: rgb(0 0 0 / 59%);
    border: 0;
    border-radius: 2px;
    color: rgb(255 255 255 / 80%);
    transition: background-color 0.1s ease-out, color 0.2s ease-out;
    -webkit-transition: background-color 0.1s ease-out, color 0.2s ease-out;
}

#calculadora button.small {
    padding: 7px 15px;
}

#calculadora button.active {
    background-color: rgba(17, 17, 17, 0.375);
}

#calculadora button.red {
    color: #f24545;
}
#calculadora button.disabled {
    color: rgba(255,255,255,0.3);
}

header { grid-area: header; }
#mmas { grid-area: mmas; }
#mr { grid-area: mr; }
#mc { grid-area: mc; }
#borrar { grid-area: borrar; }
#ac { grid-area: ac; }
#dividir { grid-area: dividir; }
#multiplicar { grid-area: multiplicar; }
#restar { grid-area: restar; }
#sumar { grid-area: sumar; }
#igual { grid-area: igual; }
#coma { grid-area: coma; }
#nueve { grid-area: nueve; }
#ocho { grid-area: ocho; }
#siete { grid-area: siete; }
#seis { grid-area: seis; }
#cinco { grid-area: cinco; }
#cuatro { grid-area: cuatro; }
#tres { grid-area: tres; }
#dos { grid-area: dos; }
#uno { grid-area: uno; }
#cero { grid-area: cero; }

footer {
    position: fixed;
    bottom: 0px;
    background-color: rgba(0, 0, 0, 0.65);
    width: 100%;
    text-align: center;
}

footer h3 {
    display: inline-block;
    margin: 5px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9em;
    font-weight: 300;
}

footer a span:before {
    content: "\2764";
    filter: grayscale(80%);
    display: inline-block;
    transition: filter 2s ease, transform 1s ease-in-out;
    -webkit-transition: filter 2s ease, transform 1s ease-in-out;
}

footer:hover span::before {
    filter: grayscale(0%);
    animation-name: animate-scale;
    animation-duration: 0.7s;
    animation-timing-function: ease-out;
    animation-direction: alternate;
    animation-iteration-count: infinite;
    animation-play-state: running;
}

/* Establece una capa a tamaño completo */
.full_size {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#black {
    background-color: #000;
    transition: opacity 0.3s;
    -webkit-transition: opacity 0.3s;
    z-index: 11;
}

#loading {
    z-index: 10;
    opacity: 1;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
    transition: opacity 0.5s;
    -webkit-transition: opacity 0.5s;
}

#loading.close,
#black.close {
    opacity: 0;
}

/* Modal (background) */
.modal {
    display: none;
    z-index: 1;
    padding-top: 100px;
    background-color: black;
    background-color: #000000bd;
    opacity: 0;
    transition: opacity 0.5s;
    -webkit-transition: opacity 0.5s;
}

.modal a {
    text-decoration: underline;
}

.modal.active {
    opacity: 1;
}

/* Modal Content */
.modal-content {
    position: absolute;
    background-color: #000000bd;
    margin: auto;
    padding: 0;
    border: 1px solid #222;
    border-radius: 5px;
    width: 300px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    opacity: 1;
    transition: opacity 0.5s, top 0.5s ease-in-out, left 0.5s ease-in-out;
    -webkit-transition: opacity 0.5s, top 0.5s ease-in-out, left 0.5s ease-in-out;
}

/* Add Animation */
@-webkit-keyframes animate_opacity {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes animate_opacity {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* The Close Button */
.modal-close {
    text-decoration: none;
    color: #999;
    float: right;
    font-size: 25px;
}

.modal-close:hover,
.modal-close:focus {
    color: #eee;
    text-decoration: none;
    cursor: pointer;
}

.modal-header {
    padding: 2px 16px;
    background-color: #00000080;
    color: white;
}

.modal-header h2 {
    margin: 5px;
    font-size: 1.2em;
    color: #999;
    text-align: center;
    font-weight: 500;
}

#modal-body {
    padding: 2px 16px;
    overflow: auto;
}

#modal-body pre {
    font-size: 1.2em;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #aaa;
    text-align: right;
    padding: 0 5px;
}

#modal-body p,
#modal-body li {
    font-size: 0.9em;
    color: #aaa;
}

#modal-body ul {
    list-style-type: circle;
    padding-left: 24px;
}



/* Scroll bar */
::-webkit-scrollbar {
    width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
    border-radius: 4px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 4px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #444;
}