* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #222;
}

.calculator {
    background: #111;
    padding: 20px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 420px;
}

.display {
    grid-column: span 4;
    height: 70px;
    font-size: 2rem;
    padding: 10px;
    border-radius: 8px;
    border: none;
    text-align: right;
}

button {
    height: 65px;
    font-size: 1.8rem;
    border: none;
    border-radius: 8px;
    background: black;
    color: white;
    cursor: pointer;
}

button:hover {
    opacity: 0.85;
}

.operator {
    background: #333;
}

.equals {
    background: #0a84ff;
}

.danger {
    background: red;
    color: black;
}

.wide {
    grid-column: span 2;
}

/* 📱 Mobile optimization */
@media (max-width: 480px) {
    .calculator {
        max-width: 95%;
        gap: 10px;
    }

    button {
        height: 55px;
        font-size: 1.5rem;
    }

    .display {
        font-size: 1.6rem;
        height: 60px;
    }
}
