
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #303030;
    margin: 0;
}

.calculator {
    background-color: #0f1217;
    border-radius: 15px;
    width: 880px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#inputBox {
    width: 100%;
    height: 70px;
    border: solid #5f6267 1px;
    border-radius: 10px;
    font-size: 32px;
    font-weight: bold;
    text-align: right;
    padding: 10px;
    padding-left: 50px;
    background-color: #0f1217;
    color: #fff;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}


#inputBox:focus {
    outline: none;
}

button {
    width: 160px;
    height: 55px;
    margin: 5px;
    border: none;
    border-radius: 9px;
    font-size: 20px;
    font-weight:500; 
    color: #fff;
    background-color: #5f6267;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    cursor: pointer;
}

#btn{
    background-color: #444;
}
#equal{
    background-color: lightskyblue;
    color: white;
}

button:hover {
    background-color: #727882;
}

button:active {
    background-color: #727882;
    box-shadow: inset 0 4px 10px #727882;
    border: solid #757575 0.6px;

}
.special-btn{
    background-color: #3c4043;
}
.special-btn:hover{
    background-color: #51565a;
}

.special-btn:active{
    background-color: #3c4043;
    box-shadow: none;
    border: solid #757575 0.6px;
}
#equal-btn{
    color: black;
    background-color: #aec6f6;
}

#equal-btn:hover{
    background-color: #a3b9e5;
}

#equal-btn:active{
    background-color: #b4caf6;
    box-shadow: none;
    border: solid #cccc 0.6px;
}
.calculator div {
    display: flex;
    justify-content: space-between;
}

#rad-deg{
    width: 340px;
}

.input-container {
    position: relative;
    width: 100%;
}

#history-btn {
    position: absolute;
    left: -px;
    top: 30%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0px;
    z-index: 1;
}

#history-btn img {
    width: 30px;
    height: 30px;
    opacity: 0.7;
}

#history-btn:hover img {
    opacity: 1;
}



button {
    width: 120px;
    height: 50px;
    font-size: 18px;
}
#inputBox {
    font-size: 28px;
    height: 60px;
}
#history {
    display: none; 
    position: absolute;
    top: 0; 
    left: 0px; 
    width: 45%; 
    height: 68%; 
    background-color: rgba(7, 7, 9, 0.95); 
    color: #f4f1f1;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); 
    padding: 10px;
    z-index: 10; 
    overflow-y: auto; 
}

#historyList{
    list-style: none;
    margin: 0;
    padding: 0;
}
#historyList li {
    padding: 8px;
    border-bottom: 1px solid #0c0c0c; 
    font-size: 14px; 
    color: #f6efef;
}
#historyList li:last-child {
    border-bottom: none;
}

#close-history-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(15, 18, 23, 0.95);
    color: #fff;
    border: none;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    font-size: 18px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s;
}

#close-history-btn:hover {
    background-color: #272a2e;
}

#close-history-btn:active {
    background-color: #040404;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.digits{
    background-color: #41435a;
}
@media (max-width: 768px) {
    .calculator {
        width: 90%;
        padding: 15px;
    }

    button {
        width: 100px;
        height: 45px;
        font-size: 16px;
        margin: 3px;
    }

    #inputBox {
        font-size: 24px;
        height: 50px;
    }
}

@media (max-width: 500px) {
    .calculator {
        width: 100%;
        padding: 10px;
    }

    button {
        width: 22%;
        height: 40px;
        font-size: 14px;
    }
    .scientific{
        display: none;
    }
    #equal{
        width: 69%;
    }

    #history-btn{
        top: 32%;
        left: 0%;
    }
    #inputBox {
        font-size: 20px;
        height: 40px;
        padding: 5px;
        width: 90%;
    }

    .calculator div {
        flex-wrap: wrap;
        justify-content: center;
    }
}