body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f2f5;
    margin: 0;
    font-family: Arial, sans-serif;
}

.calculator {
    width: min(85vw, 400px);
    min-width: 220px;
    background-color: #fff;
    border: #232323 1px solid;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    padding: 20px;
}

.display-container {
    display: flex;
    align-items: stretch;
    margin-bottom: 10px;
}

.display {
    flex: 1;
    background-color: #232323;
    color: #fff;
    align-items: center;
    font-size: clamp(0.9rem, 3vw, 1.5rem);
    padding: 10px;
    text-align: left;
    border-radius: 5px;
    overflow-x: auto;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(3px, 1.5vw, 6px)
}

button {
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    border: none;
    border-radius: 5px;
    background-color: #f0f0f0;
    padding: clamp(10px, 3vw, 20px);
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #e0e0e0;
}

.equals {
    background-color: #2196F3;
    color: #fff;
}


.operator {
    background-color: #ff9500;
    color: #fff;
    font-weight: bold;
}

.operator:hover {
    background-color: #e68a00;
}

.equals:hover {
    background-color: #1976D2;
}

.clear {
    background-color: #f44336;
    color: #fff;
}

.clear:hover {
    background-color: #d32f2f;
}

#back-space {
    font-weight: bold !important;
    padding: 10px;
    width: clamp(34px, 10vw, 50px);
    margin-left: 5px;
}