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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('image asset/light_image.png') no-repeat center center fixed;
    background-size: cover;
    transition: background-color 0.3s, background-image 0.3s;
}

.dark {
    background: url('image asset/night_image.png') no-repeat center center fixed;
    background-size: cover;
}

.calculator {
    background: white;
    position: relative;
    width: 340px;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.25),
                -15px -15px 20px rgba(255, 255, 255, 0.15);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.dark .calculator {
    background: #7b7b7b;
    box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.25),
                -15px -15px 20px rgba(255, 255, 255, 0.1);
}

.calculator .buttons {
    position: relative;
    display: grid;
}

.calculator .buttons #value {
    position: relative;
    grid-column: span 4;
    user-select: none;
    width: 100%;
    text-align: end;
    color: rgb(44, 60, 236);
    height: 100px;
    line-height: 100px;
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.1),
                inset -5px -5px 20px rgba(119, 119, 119, 0.1);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 0 20px;
    font-size: 2em;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.dark .calculator .buttons #value {
    background: #33393e;
    color: white;
    box-shadow: inset 15px 15px 20px rgba(0, 0, 0, 0.25),
                inset -5px -5px 10px rgba(255, 255, 255, 0.1);
}

.calculator .buttons span {
    position: relative;
    padding: 10px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1),
                -5px -5px 20px white;
    margin: 10px;
    cursor: pointer;
    user-select: none;
    min-width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    color: #666;
    border: 2px solid #edf1f4;
    border-radius: 10px;
    transition: box-shadow 0.3s, color 0.3s, border-color 0.3s;
}

.dark .calculator .buttons span {
    color: white;
    border: 1px solid #4e4e4e;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.25),
                -5px -5px 20px rgba(255, 255, 255, 0.1);
}

.calculator .buttons span:active {
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.1);
    color: red;
}

.dark .calculator .buttons span:active {
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.25),
                inset -5px -5px 20px rgba(255, 255, 255, 0.1);
}

.calculator .buttons #clear {
    grid-column: span 2;
    background-color: rgb(209, 127, 127);
    color: white;
}

.calculator .buttons #plus,
.calculator .buttons #divide,
.calculator .buttons #minus,
.calculator .buttons #multiply {
    background-color: rgb(100, 193, 126);
    color: white;
}

.calculator .buttons #equal {
    grid-row: span 2;
    background-color: rgb(112, 190, 214);
    color: white;
}

.calculator .buttons span#clear:active,
.calculator .buttons span#plus:active, 
.calculator .buttons span#divide:active,
.calculator .buttons span#minus:active,
.calculator .buttons span#multiply:active,
.calculator .buttons span#equal:active {
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.1);
}

.toggleBtn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border-color: #363636;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2), 
                -5px -5px 20px rgba(255, 255, 255, 0.1);
    background-color: gray;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    transition: background-color 0.3s;
}

.dark .toggleBtn {
    background-color: #333;
    border-color: #555;
}

.toggleBtn i {
    transition: color 0.3s;
    color: rgb(241, 246, 255);
}

.dark .toggleBtn i {
    color: white;
}
