@charset "UTF-8";
/* CSS Document */
/* General reset and body */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 40px 10px;
}

/* Heading */
h1 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

/* Calculator card */
.calculator {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 360px;
}

/* Display input */
.display {
    width: 100%;
    height: 60px;
    font-size: 28px;
    text-align: right;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #eee;
}

/* Button grid */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

/* Buttons style */
.buttons button {
    font-size: 22px;
    padding: 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: #e0e0e0;
    transition: all 0.2s ease;
}

.buttons button:hover {
    background-color: #d4d4d4;
}

/* Operator buttons */
.buttons button.operator {
    background-color: #ff9500;
    color: white;
}

.buttons button.operator:hover {
    background-color: #e08900;
}

/* AC button */
.buttons button.ac {
    background-color: #f44336;
    color: white;
    grid-column: span 4;
}

.buttons button.ac:hover {
    background-color: #d32f2f;
}

/* Responsive adjustments for small phones */
@media screen and (max-width: 400px) {
    .display {
        font-size: 24px;
        height: 50px;
    }

    .buttons button {
        font-size: 20px;
        padding: 15px;
    }
}
