* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

.calculator {
    width: 320px;
    background-color: #222224;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.display {
    width: 100%;
    height: 100px;
    background-color: #222224;
    color: #ffffff;
    font-size: 3rem;
    text-align: right;
    padding: 30px 20px 10px;
    overflow-x: auto;
    white-space: nowrap;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background-color: #1a1a1c;
    padding: 2px;
}

.btn {
    border: none;
    background-color: #333336;
    color: white;
    font-size: 1.5rem;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #444448;
}

.btn:active {
    background-color: #55555a;
}

.operator {
    background-color: #ff9500;
    color: white;
    font-weight: bold;
}

.operator:hover {
    background-color: #e08300;
}
.clear {
    grid-column: span 2;
    background-color: #d4d4d2;
    color: #1c1c1c;
    font-weight: bold;
}

.clear:hover {
    background-color: #b5b5b4;
}

.backspace {
    background-color: #d4d4d2;
    color: #1c1c1c;
    font-weight: bold;
    font-size: 1.3rem;
}

.backspace:hover {
    background-color: #b5b5b4;
}

.zero {
    grid-column: span 2;
}

.equals {
    background-color: #ff9500;
    font-weight: bold;
}

.equals:hover {
    background-color: #e08300;
}