
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'San Francisco', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to right, #161685, #ff6f61);
        display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}


#calculator {
    background-color: #1c1c1e;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 30px;
    padding: 50px;
    width: 500px; 
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

/* Display Container */
.display-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* Display Styling */
#display {
    width: calc(100% - 100px); 
    height: 100px; 
    font-size: 40px; 
    text-align: right;
    background-color: #333333;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Delete Button Styling */
#delete {
    background-color: #ff3b30; 
    color: white;
    font-size: 30px; 
    padding: 15px; 
    width: 90px; 
    height: 90px; 
    border: none;
    border-radius: 15px;
    margin-left: 15px; 
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

#delete:hover {
    background-color: #ff2a1f;
}

#delete:active {
    background-color: #d9291c;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#delete:focus {
    outline: none;
}

/* Keys Styling */
.keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px ; /* Increased gap for better spacing */
    width: 100%;
}

/* Button Styling */
button {
    background-color: #2c2c2e;
    color: white;
    font-size: 40px; /* Increased font size */
    padding: 20px; /* Increased padding */
    width: 80px; /* Increased width */
    height: 80px; /* Increased height */
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

button:hover {
    background-color: #3a3a3c;
}

button:active {
    background-color: #5a5a5c;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

button:focus {
    outline: none;
}

/* Special Button Styling */
button:nth-child(1),
button:nth-child(2),
button:nth-child(3),
button:nth-child(5),
button:nth-child(6),
button:nth-child(7),
button:nth-child(4) {
    background-color: #ff9500; /* Orange for operators */
}

button:nth-child(1):hover,
button:nth-child(2):hover,
button:nth-child(3):hover,
button:nth-child(4):hover {
    background-color: #ff7f00;
}

button:last-child {
    background-color: #34c759; /* Green for Equals */
}

button:last-child:hover {
    background-color: #30b14e;
}

button:nth-child(20) {
    background-color: #ff3b30; /* Red for Clear */
}

button:nth-child(20):hover {
    background-color: #ff2a1f;
}

button:nth-child(8),
button:nth-child(19) {
    background-color: #8e8e93; /* Decimal and 0 styling */
}

button:nth-child(8):hover,
button:nth-child(19):hover {
    background-color: #78787d;
}

/* Responsive Design for Laptop Screens */
@media (max-width: 1024px) {
    #calculator {
        width: 600px; /* Increased width for larger screen sizes */
        padding: 60px; /* Increased padding */
    }

    #display {
        font-size: 50px; /* Increased font size */
        height: 120px; /* Increased height */
    }

    #delete {
        width: 100px; /* Increased width */
        height: 100px; /* Increased height */
    }

    button {
        font-size: 40px; /* Increased font size */
        padding: 25px; /* Increased padding */
        width: 90px; /* Increased width */
        height: 90px; /* Increased height */
    }
}

/* Responsive Design for Medium Screens (Tablets, Smaller Laptops) */
@media (max-width: 768px) {
    #calculator {
        width: 500px;
        padding: 40px;
    }

    #display {
        font-size: 55px;
        height: 100px;
        padding: 15px 20px;
    }

    #delete {
        width: 85px;
        height: 85px;
    }

    button {
        font-size: 32px;
        padding: 18px;
        width: 75px;
        height: 75px;
    }
}

@media (max-width: 480px) {
    #calculator {
        width: 300px;
        padding: 20px;
    }

    #display {
        font-size: 25px !important;
        height: 60px;
        padding: 10px 10px;
    }

    #delete {
        width: 60px;
        height: 60px;
    }

    .keys {
        gap: 10px;
    }

    button {
        font-size: 20px;
        padding: 10px;
        width: 50px;
        height: 50px;
    }
}
