* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

@font-face {
    font-family: 'archisticonormal';
    src: url('fonts/Archistico_Simple-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'archisticobold';
    src: url('fonts/Archistico_Bold-webfont.woff') format('woff');
    font-weight: bold;
    font-style: bold;
}


body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: url('images/background.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    backdrop-filter: blur(6px);
}

header {
    display: flex;
    justify-content: center;
    color: #28cb38;
    padding: 30px 0;
}

header h1 {
    font-size: 80px;
    font-size: clamp(40px, 12vw, 80px);
    font-weight: normal;
    font-family: 'archisticonormal', Arial, sans-serif;
    text-align : center;
}


footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 40px;
    position:absolute;
    bottom:0;
    width: 100%;
    height: 120px;
    user-select: none;
}

footer span {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    color: #048f11;
}

footer img:hover {
    transform: scale(1.1);
}

.footer-left,
.footer-middle,
.footer-right {
    display: flex;
    align-items: center;
    font-weight: bold;
    text-decoration: none;
    padding: 0 15px
}

.footer-left img,
.footer-middle img,
.footer-right img {
    width: 40px;
    vertical-align: middle;
}


.app {
    display: flex;
    justify-content: center;
    padding-bottom: 130px;      /* >= footer height */
}


.calculator {
    background-color:  rgb(5, 15, 24);
    width: 100%;
    max-width: 375px;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    border-radius: 1.5rem;
    overflow: hidden;
    background: linear-gradient(rgb(5, 15, 25), rgb(5, 15, 25)) padding-box,
                linear-gradient(to right, rgb(140, 140, 140), rgb(88, 88, 88)) border-box;
    border: 4px solid transparent;
}

.display {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    text-align: right;
    margin: 0.25rem;
    flex: 1 1 0%;
    min-height: 200px;
    padding: 1.5rem;
    color: #048f11;
    border-radius: 1.5rem;
    background: linear-gradient(rgb(5, 15, 25), rgb(5, 15, 25)) padding-box,
    linear-gradient(to right, rgb(140, 140, 140), rgb(88, 88, 88)) border-box;
    border: 4px solid transparent;
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: end;
    width: 325px;
    height: 150px;
}

.display .input {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    max-height: 100px;
    overflow-wrap: break-word;
}

.display .output {
    font-size: 3.0rem;
    font-weight: 700;
    width: 100%;
    overflow-wrap: break-word;
}

.display .output .error {
    color: #c14c4c;
}

.display .operator {
    color: #c14c4c;
}

.display .brackets, 
.display .percent {
    color: #048f11;
}

.keys {
    background-color: #292d36;
    padding: 1.5rem;
    /* border-radius: 1.5rem 1.5rem 0 0; */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    grid-gap: 1rem;
    background-color: rgb(5, 15, 24);
    box-shadow: 0px -2px 16px rgba(0, 0, 0, 0.2);
}

.keys .key {
    position: relative;
    cursor: pointer;
    display: block;
    height: 0;
    padding-top: 100%;
    background-color: #262933;
    border: 1px solid #3f444e;
    border-radius: 1rem;
    transition: 0.2s;
    user-select: none;
}

.keys .key span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: rgba(245, 245, 245, 0.818);
}

.keys .key:hover {
    box-shadow: inset 0px 0px 8px rgba(0,0,0,0.2);
}

.keys .key.operator span {
    color: #c14c4c;
}

.keys .key.action span {
    color: #048f11;
}

.modal {
    width: 375px;
    border-radius: 15px;
    box-shadow: -1px 1px 2px rgb(109, 103, 103) ;
    padding:10px;
    background: linear-gradient(0deg, rgba(142, 144, 142, 0.821) 0%, rgb(175, 219, 242) 53%);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal::backdrop {
    background: linear-gradient(45deg, rgb(103, 88, 88), rgb(150, 150, 237));
    opacity: .5;
}

.close-button {
    padding: 10px;
    border-radius: 10px;
    border:2px solid black;
    font-size: 16px;
    font-weight: bold;
}

.bounce {
    animation: bounce 0.3s;
}

@keyframes bounce {
	0% { transform: scale(1) translateY(0); }
	10% { transform: scale(1.2, 0.8); }
	30% { transform: scale(0.8, 1.1) translateY(-2px); }
	50% { transform: scale(1) translateY(0); }
	100% { transform: translateY(0); }
}