*{
box-sizing-border-box;
}

body {
    background-color: #222;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.heading {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
}

.calculator {
    background-color: #333;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    width: 400px;
    padding: 20px;
    display: inline-block;
}

.display {
    background-color: #000;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 2em;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

#history {
    font-size: 0.8em;
    color: #888;
}

#current {
    font-size: 1.5em;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.btn {
    background-color: #444;
    border: none;
    border-radius: 5px;
    padding: 20px;
    font-size: 1.2em;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #555;
}

.btn.function {
    background-color: #888;
}

.btn.operator {
    background-color: #f90;
}

.btn.operator:hover {
    background-color: #fc0;
}

.footer {
    margin-top: 20px;
    text-align: center;
    color: #888;
    font-size: 0.9em;
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media screen and (max-width:600px) {
    .calculator{
        width: 90%;
        max-width: 350px;
        padding: 12px;
    }
    .display{
        height: 80px;
    }
}
