body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
}

.title {
    color: #333;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

.calculator {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 20px;
    background: #f4f4f4;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.display {
    width: 100%;
    height: 40px;
    margin-bottom: 10px;
    padding: 5px;
    font-size: 20px;
    text-align: right;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

button {
    padding: 15px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.num {
    background: #fff;
}

.op {
    background: #ffd700;
}

.equals {
    background: #90ee90;
}

.clear {
    background: #ff6b6b;
}

.backspace {
    background: #ff9966;
}

@media screen and (max-width: 480px) {
    .calculator {
        width: 95%;
        padding: 10px;
    }

    .buttons {
        gap: 3px;
    }

    button {
        padding: 10px;
        font-size: 16px;
    }

    .display {
        height: 35px;
        font-size: 18px;
    }

    .title {
        font-size: 24px;
    }
}
