/* Reset and Base Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Deep VIP Purple/Blue Gradient */
}

/* Calculator Container with Glassmorphism */
.calculator {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 350px;
    padding: 30px;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.calculator:hover {
    transform: scale(1.02); /* Subtle hover lift for the whole calculator */
}

/* Display Styling */
.display-container {
    background-color: #f1f3f9;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.previous-operand {
    color: #888;
    font-size: 1.1em;
    min-height: 1.5em;
    word-break: break-all;
}

.calculator-display {
    width: 100%;
    background: transparent;
    border: none;
    color: #2d3436;
    font-size: 2.8em;
    font-weight: 600;
    text-align: right;
    outline: none;
    padding-top: 5px;
}

/* Buttons Grid */
.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Button Base Styles with Animations */
button {
    height: 70px;
    border: none;
    border-radius: 20px;
    font-size: 1.4em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

button:hover {
    filter: brightness(0.9);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    filter: brightness(0.8);
}

/* Number Buttons */
.number {
    background-color: #ffffff;
    color: #2d3436;
    border: 1px solid #edf2f7;
}

/* Operator Buttons */
.operator {
    background-color: #edf2f7;
    color: #667eea;
}

/* Special Operators (Clear, Delete) */
.clear, .delete {
    background-color: #fff5f5;
    color: #f56565;
}

/* Equals Button - VIP Gold/Blue mix */
.equals {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    grid-row: span 2;
    height: 100%;
}

.equals:hover {
    filter: brightness(1.1);
    box-shadow: 0 10px 20px rgba(118, 75, 162, 0.3);
}

/* Zero spans 2 columns */
.zero {
    grid-column: span 2;
}

/* Keyframe for display update effect */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.updating {
    animation: blink 0.1s ease-in-out;
}

/* Responsive */
@media (max-width: 400px) {
    .calculator {
        width: 90%;
        padding: 20px;
    }
    button {
        height: 60px;
    }
}
