* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Changed to min-height for better flexibility */
    background-color: hsl(0, 0%, 0%); /* Black background like iPhone calculator */
    padding: 20px; /* Reduced margin for better mobile fit */
}

/* Calculator Container */
#Calculator {
    font-family: 'SF Pro Display', -apple-system, Arial, sans-serif; /* iPhone-like font */
    background-color: hsl(0, 0%, 10%); /* Darker base for depth */
    border-radius: 40px; /* Softer, iPhone-like corners */
    width: 100%;
    max-width: 360px; /* Matches iPhone calculator width */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Subtle shadow for elevation */
}

/* Display */
#display {
    width: 100%;
    padding: 40px 20px 20px; /* More padding at top for balance */
    font-size: 5rem; /* Kept large but refined */
    text-align: right; /* iPhone calculator aligns right */
    border: none;
    background-color: hsl(0, 0%, 10%); /* Matches container for seamless look */
    color: white;
    font-weight: 300; /* Lighter weight for elegance */
    letter-spacing: -2px; /* Tightens spacing for a modern feel */
    outline: none; /* Removes focus outline */
}

/* Keypad */
#keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px; /* Slightly larger gap for breathing room */
    padding: 20px;
}

/* Buttons */
button {
    width: 70px; /* Smaller, iPhone-like size */
    height: 70px;
    border-radius: 50%; /* Full circle for iPhone aesthetic */
    border: none;
    background-color: hsl(0, 0%, 33%); /* Gray for number buttons */
    color: white;
    font-size: 2rem; /* Slightly smaller for proportion */
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease; /* Smooth hover/active transition */
}

button:hover {
    background-color: hsl(0, 0%, 45%); /* Lighter gray on hover */
}

button:active {
    background-color: hsl(0, 0%, 55%); /* Even lighter when pressed */
}

/* Operator Buttons */
.operator-btn {
    background-color: hsl(39, 100%, 50%); /* Vibrant orange like iPhone */
}

.operator-btn:hover {
    background-color: hsl(39, 100%, 60%);
}

.operator-btn:active {
    background-color: hsl(39, 100%, 70%);
}

/* Utility Buttons (e.g., AC, +/-, %) - Assuming you might add these */
button.utility-btn {
    background-color: hsl(0, 0%, 20%); /* Darker gray for utility */
    color: black; /* Black text for contrast */
    font-size: 1.8rem;
}

button.utility-btn:hover {
    background-color: hsl(0, 0%, 30%);
}

button.utility-btn:active {
    background-color: hsl(0, 0%, 40%);
}

/* Responsive Adjustments */
@media (max-width: 400px) {
    #Calculator {
        max-width: 300px;
    }

    button {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    #display {
        font-size: 4rem;
        padding: 30px 15px 15px;
    }

    #keys {
        gap: 10px;
        padding: 15px;
    }
}