/* Reset and body styling */
body {
    background: linear-gradient(135deg, #2b5876, #4e4376);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Calculator container */
.calculator {
    width: 320px;
    background-color: #1e1e2f;
    border-radius: 20px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Output display */
.output {
    padding: 20px;
    text-align: right;
    background-color: #212130;
    color: #fff;
    font-size: 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.display {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

/* Buttons container */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
    background-color: #2c2f4a;
}

/* Button styles */
button {
    height: 60px;
    font-size: 1.2rem;
    border: none;
    border-radius: 12px;
    background-color: #3c3f58;
    color: #fff;
    transition: all 0.2s ease;
}

button:hover {
    background-color: #50536b;
    transform: scale(1.05);
}

/* Operator buttons */
button.operator {
    background-color: #ff8c00;
    color: #fff;
}

button.operator:hover {
    background-color: #e67600;
}

/* AC and C buttons (utility) */
button:nth-child(1),
button:nth-child(2) {
    background-color: #dc3545;
}

button:nth-child(1):hover,
button:nth-child(2):hover {
    background-color: #c82333;
}
