*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}

:root{
    --bg-color:#121212;
    --calculator-bg:#1e1e1e;
    --display-bg:#000000;

    --text-color:#ffffff;

    --operator-color:#ff9800;
    --equal-color:#00c853;

    --shadow-color:rgba(0,0,0,0.5);
}

.light-theme{
    --bg-color:#f5f5f5;
    --calculator-bg:#ffffff;
    --display-bg:#e0e0e0;

    --text-color:#000000;

    --operator-color:#ff9800;
    --equal-color:#00c853;

    --shadow-color:rgba(0,0,0,0.2);
}

body{
    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    background:var(--bg-color);

    transition:0.3s ease;
}

.calculator{
    width:360px;

    background:var(--calculator-bg);

    padding:20px;

    border-radius:20px;

    box-shadow:0 0 25px var(--shadow-color);

    transition:0.3s ease;
}

.display{
    height:90px;

    background:var(--display-bg);

    color:var(--text-color);

    display:flex;
    justify-content:flex-end;
    align-items:center;

    font-size:2rem;

    padding:20px;

    border-radius:12px;

    overflow:hidden;

    margin-bottom:15px;
}

.buttons{
    display:grid;

    grid-template-columns:
    repeat(4,1fr);

    gap:10px;
}

button{
    height:65px;

    border:none;

    border-radius:12px;

    font-size:1.2rem;

    cursor:pointer;

    transition:0.2s;
}

button:hover{
    transform:scale(1.05);
}

button:active{
    transform:scale(0.95);
}

.operator{
    background:var(--operator-color);
    color:white;
}

.equal{
    background:var(--equal-color);
    color:white;

    grid-column:span 2;
}

.theme-btn{
    position:absolute;

    top:20px;
    right:20px;

    width:55px;
    height:55px;

    border-radius:50%;

    font-size:1.3rem;
}

@media(max-width:450px){

    .calculator{
        width:95%;
    }

}