* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#dots-div {
    height: 350px;
    width: 520px;
    z-index: -1;
    position: relative;
}

.dots-svg {
    height: 150px;
    position: absolute;
}

.right-dots {
    bottom: 0;
    right: 0;
}

.left-dots {
    top: 0;
    left: 0;
}

.light {
    background-color: #EDEDED;
}

.light-dots {
    display: block;
}

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

.light button {
    background-color: #EFF0F5;
}

.dark {
    background-color: #242932;
}

.dark-dots {
    display: none;
}

.dark #calculator {
    background-color: #151920;
}

.dark button {
    background-color: #242932;
}

#calculator {
    border-radius: 10px;
    max-width: 250px;
    overflow: hidden;
    z-index: 1;
    position: absolute;
}

#display {
    width: 100%;
    border-radius: 10px;
    height: 150px;
    background-color: #151920;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 20px 10px;
}

#theme-btn {
    border: none;
    background-color: transparent;
    height: fit-content;
    width: fit-content;
    margin-left: auto;
    margin-bottom: auto;
}

#moon,
#sun {
    height: 15px;
    width: 15px;
}

#sun {
    display: none;
}

#equation,
#result {
    border-radius: 5px;
    border: none;
    background-color: transparent;
    width: 100%;
    text-align: right;
}

#equation {
    color: #868BFF;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .5px;
}

#result {
    color: #D1D3FF;
    font-size: 2rem;
    font-weight: 900;
}

#clear-btn {
    grid-area: AC;
    width: 100%;
    border-radius: 10px 0 0 0;
}

#divide {
    grid-area: d;
    border-radius: 0 10px 0 0;
}

#multiply {
    grid-area: m;
}

#subtract {
    grid-area: s;
}

#add {
    grid-area: a;
}

#equal-btn {
    grid-area: e;
    border-radius: 0 0 10px 0;
}

#decimal {
    grid-area: dec;
}

#blank-btn {
    grid-area: b;
    border-radius: 0 0 0 10px;
    cursor: default;
}

#zero {
    grid-area: zero;
}

#one {
    grid-area: one;
}

#two {
    grid-area: two;
}

#three {
    grid-area: three;
}

#four {
    grid-area: four;
}

#five {
    grid-area: five;
}

#six {
    grid-area: six;
}

#seven {
    grid-area: seven;
}

#eight {
    grid-area: eight;
}

#nine {
    grid-area: nine;
}

#keys {
    display: grid;
    padding: 10px;
    gap: 5px;
    grid-template-areas:    "AC AC AC d"
                            "seven eight nine m"
                            "four five six s"
                            "one two three a"
                            "b zero dec e";
}

button {
    height: 50px;
    font-size: 1rem;
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: #747597;
}

button:hover {
    background-color: #868BFF;
    color: #FFFFFF;
}

button:active {
    background-color: hsl(238, 100%, 86%);
    color: #FFFFFF;
}

.light #blank-btn:hover {
    background-color: #EFF0F5;
}

.dark #blank-btn:hover {
    background-color: #242932;
}

@media screen and (max-height: 449px) {
    body {
        margin: 100px 0;
    }
}