@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;1,700&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    outline: 0;
    transition: all 0.5s ease;
}

body {
    font-family: sans-serif;
    background: linear-gradient(-45deg, #d2a83d, #5a7abb, #d4a328, #5a7abb);
	background-size: 400% 400%;
	animation: gradient 15s ease infinite;
    font-family: "Roboto", sans-serif;
    overflow: hidden;
}

@keyframes gradient {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

.container {
    width: 100vw;
    height: 100vh;
    display: grid;
    place-items: center;
}

.text {
    width: Calc(100% - 45px);
}

.calculator {
    position: relative;
    height: auto;
    width: 325px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 30px #000000;
}

.theme-toggler {
    position: absolute;
    top: 35px;
    right: 30px;
    color: #FFFFFF;
    cursor: pointer;
    z-index: 1;
}

.theme-toggler.active {
    color: #333333;
}

.theme-toggler.active::before {
    background-color: #FFFFFF;
}

.theme-toggler::before {
    content:'';
    height: 30px;
    width: 30px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background-color: #333333;
    z-index: -1;
}

#display {
    margin: 0 10px;
    height: 150px;
    width: auto;
    max-width: auto;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    font-size: 30px;
    margin-bottom: 20px;
    overflow-x: scroll;
}

#display::-webkit-scrollbar {
    display: block;
    height: 3px;
}

button {
    height: 60px;
    width: 60px;
    border:  0;
    border-radius: 30px;
    margin: 5px;
    font-size: 20px;
    cursor: pointer;
    transition: all 200ms ease;
}

button:hover {
    transform: scale(1.1);
}

button#equal {
    height: 150px;
}

/* Working On Light Theme */

.calculator {
    background-color: #FFFFFF;
    color: #000000;
}

.calculator #display {
    color: #0a1e23;
}

.calculator button#clear {
    background-color: #ffd5d8;
    color: #fc2552;
}

.calculator button.btn-number {
    background-color:  #c3eaff;
    color: #000000;
}

.calculator button.btn-operator {
    background-color: #ffd0fd;
    color: #f967f3;
}

.calculator button.btn-equal {
    background-color: #adf9e7;
    color: #000000;
}

/* Working On Dark Theme */

.calculator.dark {
    background-color:  #071115;
    color: #FFFFFF;
}

.calculator.dark #display {
    color: #f8fafd;
}

.calculator.dark button#clear {
    background-color: #2d191e;
    color: #bd3740;
}

.calculator.dark button.btn-number {
    background-color:  #1b2f38;
    color: #f8fafb;
}

.calculator.dark button.btn-operator {
    background-color: #2e1f39;
    color: #aa00a4;
}

.calculator.dark button.btn-equal {
    background-color: #223323;
    color: #FFFFFF;
}

.credit {
    display: flex;
    align-items: center;
    flex-direction: column;
    background: #0000003b;
    border-radius: 10px;
    padding: 10px;
}

.credit p {
    margin: 5px;
    color: #FFFFFF;
}

.credit p {
    margin: 5px;
    color: #FFFFFF;
}

.credit a {
    color: #FFFFFF;
}
