/* styles.css – Responsive Calculator Styles */

/* Global styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Calculator container */
.calculator {
    width: 320px;
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}

/* Display area */
.display {
    background: #222;
    color: #fff;
    font-size: 2rem;
    text-align: right;
    padding: 20px 10px;
    min-height: 80px;
    word-wrap: break-word;
    overflow: hidden;
}

/* Button grid */
.button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px;
}

/* Button base styles */
.button-grid button {
    padding: 20px;
    font-size: 1.5rem;
    border: none;
    border-radius: 8px;
    background: #e0e0e0;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 60px;
    user-select: none;
}

/* Digit buttons */
.button-grid button.digit {
    background: #f0f0f0;
}

.button-grid button.digit:active {
    background: #d0d0d0;
}

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

.button-grid button.operator:active {
    background: #e08e00;
}

/* Equals button */
.button-grid button.equals {
    background: #ff9500;
    color: #fff;
    grid-column: span 2;
}

.button-grid button.equals:active {
    background: #e08e00;
}

/* Clear button */
.button-grid button.clear {
    background: #d9534f;
    color: #fff;
}

.button-grid button.clear:active {
    background: #c44b3e;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .calculator {
        width: 90%;
    }

    .display {
        font-size: 1.8rem;
        padding: 15px 10px;
    }

    .button-grid button {
        padding: 18px;
        font-size: 1.4rem;
    }
}