* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

.calculator {
    width: 100%;
    max-width: 375px;
    height: 100%;
    max-height: 700px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.display {
    text-align: right;
    padding: 20px;
    color: white;
    word-wrap: break-word;
    word-break: break-all;
}

.previous-operand {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    min-height: 30px;
}

.current-operand {
    font-size: 5rem;
    font-weight: 300;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.btn {
    height: 80px;
    width: 80px;
    border-radius: 50%;
    border: none;
    font-size: 2rem;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn:active {
    filter: brightness(1.5);
}

.gray { background-color: #a5a5a5; color: black; }
.dark-gray { background-color: #333333; color: white; }
.orange { background-color: #ff9f0a; color: white; }

.btn-zero {
    grid-column: span 2;
    width: 175px;
    border-radius: 50px;
    justify-content: flex-start;
    padding-left: 30px;
}

@media (max-width: 400px) {
    .btn {
        height: 70px;
        width: 70px;
        font-size: 1.8rem;
    }
    .btn-zero { width: 155px; }
    .current-operand { font-size: 4rem; }
}