@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    width: 100%;
    min-height: 100vh; /* 👈 Changed from height to min-height */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 20px; /* 👈 Added 50px padding to top & bottom, 20px to left & right */
    box-sizing: border-box; /* 👈 Prevents padding from breaking the screen width/height */
    background: linear-gradient(45deg, #0a0a0a, #3a4452);
}

.calculator {
    border: 1px solid #717377;
    padding: 20px;
    border-radius: 16px;
    background: transparent;
    box-shadow: 0px 3px 15px rgba(113, 115, 119, 0.5);
    width: 100%;             /* Takes full available width */
    max-width: 400px;        /* Stops expanding after 400px */
    box-sizing: border-box;  /* Keeps padding inside the width */
}


input {
    width: 100%;             
    box-sizing: border-box;
    border: none;
    padding: 24px;
    margin-bottom: 20px;     
    background: transparent;
    box-shadow: -8px -8px 15px rgba(255, 255, 255, 0.1);
    font-size: 40px;
    text-align: right;
    cursor: pointer;
    color: #ffffff;
    border-radius: 8px;
}

.calculator > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

input::placeholder{
    color: #ffffff;
}

button {
    border: none;
    width: 60px;
    height: 60px;
    /* margin: 10px; <-- Remove this, Flexbox handles spacing now */
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    font-size: 20px;
    box-shadow: -8px -8px 15px rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease-in-out; /* Smooth effect on hover/click */
}

.equalBtn{
    background-color: #fb7c14;
}

.operator{
    color: #6dee0a;
}


@media screen and (max-width: 400px) {
    .calculator {
        padding: 15px;       /* Reduce container padding */
    }
    input {
        font-size: 30px;     /* Smaller text on mobile */
        padding: 15px;
    }
    button {
        width: 50px;         /* Smaller buttons */
        height: 50px;
        font-size: 18px;
    }
}