
body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background: #f0f0f0;
    font-family: Arial, sans-serif;
}

.calculator {
    width: 300px;
    background-image: linear-gradient(50deg , white , black);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.display {
    width: 100%;
    margin-bottom: 10px;
}

.display input {
    width: 100%;
    height: 40px;
    text-align: right;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.box-2{
    
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.numeric {
    display: grid;
}

.numeric {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-left: 10px;
}

.operations {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
    margin-right: 10px;
}

p {
    background: #eee;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

p:hover {
    background-color: #dddddda9;
}



/*          Responsive design     */
@media (max-width: 400px) {
    .calculator {
        width: auto;  
        padding: 10px;
    }
    .display input {
        height: 25px; 
        font-size: 12px; 
    }
    .numeric, .operations {
        gap: 10px; 
    }

    .operations{
        margin-left: 10px;
    }

    p {
        padding: 5px;
    }
}


@media (max-width: 200px) {
    .calculator {
        width: 160px;  
        padding: 10px;
    }
    .display input {
        height: 30px; 
        font-size: 12px; 
    }
    .numeric, .operations {
        gap: 15px; 
    }
    p {
        padding: 6px; 
    }
    .box-2 {
        flex-direction: column; 
    }
    .operations {
        margin-top: 10px; 
        margin-right: 0; 
    }
}

