/* Color Palette */
:root {
    /* Desk Colors (Dark Wood) */
    --wood-dark: #3a2a1a;
    --wood-light: #4d3c2e;
    --wood-shadow: rgba(0, 0, 0, 0.4);
    
    /* Calculator Colors (Sleek Black/Grey) */
    --body-color: #2c2f33;
    --key-base: #40444b; 
    --operator-orange: #ff8c00;
    --equal-green: #2ecc71;
    --display-bg: #e5ffe8;
    --display-text: #1a1a1a;
}

/* ---------------------------------- */
/* 1. REALISTIC BACKGROUND STYLES     */
/* ---------------------------------- */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    perspective: 1000px; /* Crucial for background realism */
    background-color: var(--wood-dark);
    
    /* Subtle background texture/wood grain simulation */
    background-image: linear-gradient(
        45deg, 
        var(--wood-dark) 25%, 
        var(--wood-light) 25%, 
        var(--wood-light) 50%, 
        var(--wood-dark) 50%, 
        var(--wood-dark) 75%, 
        var(--wood-light) 75%, 
        var(--wood-light)
    );
    background-size: 80px 80px;
    position: relative;
    overflow: hidden;
}

/* Simulate the edge of a desk/table and light source */
body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0.3), 
        rgba(0, 0, 0, 0.6) 80%
    );
    /* Creates a subtle shadow/depth at the bottom edge */
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

/* Stage for calculator placement and light direction */
.main-stage {
    /* Slight rotation to look like it's sitting on the desk */
    transform: rotateX(15deg) translateY(20px);
    box-shadow: 
        0 40px 80px 30px rgba(0, 0, 0, 0.6), /* Large shadow under the object */
        0 15px 30px rgba(0, 0, 0, 0.4);
}


/* ---------------------------------- */
/* 2. CALCULATOR BODY (NEUMORPHISM)   */
/* ---------------------------------- */
.calculator-body {
    width: 320px;
    background-color: var(--body-color);
    border-radius: 12px;
    padding: 20px;
    /* Calculator's own shadow, slightly softer */
    box-shadow: 
        5px 5px 15px rgba(0, 0, 0, 0.6), 
        -5px -5px 15px rgba(255, 255, 255, 0.05);
}

.brand-text {
    color: var(--operator-orange);
    font-size: 0.7rem;
    text-align: right;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Display Bezel/Housing */
.calculator-display-bezel {
    background-color: var(--body-color);
    padding: 10px 8px;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.5), 
        inset 0 -1px 3px rgba(255, 255, 255, 0.05); 
}

.calculator-screen {
    width: 100%;
    height: 45px;
    background-color: var(--display-bg);
    color: var(--display-text);
    text-align: right;
    padding: 0 5px;
    font-size: 2rem;
    border: none;
    outline: none;
    box-sizing: border-box;
    border-radius: 3px;
    /* Inner shadow for screen realism */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1); 
}

/* ---------------------------------- */
/* 3. KEYPAD LAYOUT & BUTTONS         */
/* ---------------------------------- */
.calculator-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
}

button {
    height: 55px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    background-color: var(--key-base);
    transition: all 0.1s ease;
    
    /* Embossed Button Shadows */
    box-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.7), 
        -3px -3px 6px rgba(255, 255, 255, 0.05); 
}

/* Button Press Effect */
button:active {
    box-shadow: 
        inset 2px 2px 5px rgba(0, 0, 0, 0.8), 
        inset -2px -2px 5px rgba(255, 255, 255, 0.03);
    transform: scale(0.98);
}

/* Number Buttons */
.num-btn {
    color: #e0e0e0;
}

/* Utility Buttons (AC, %, ^) */
.utility-btn {
    background-color: #585d66;
    color: #f0f0f0;
}
.utility-btn:hover {
    background-color: #6a6e76;
}

/* Operator Buttons (+, -, *, /) */
.operator-btn {
    background-color: var(--operator-orange);
}
.operator-btn:hover {
    background-color: #cc7000;
}

/* Equal Sign Button */
.equal-btn {
    background-color: var(--equal-green);
    font-size: 1.8rem;
}
.equal-btn:hover {
    background-color: #25a05b;
}

/* Spanning Buttons */
.zero-button {
    grid-column: 1 / 3;
}