body{
    margin: 0;
    font-family: Arial, sans-serif;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* height o‘rniga */
    padding: 10px;
}

.calculator{
    background: #000000;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 320px; /* telefon uchun ideal */
}

#display{
    width: 100%;
    height: 60px;
    font-size: 24px;
    margin-bottom: 15px;
    text-align: right;
    padding: 10px;
    border: none;
    border-radius: 20px;
    background: #4f4f4f;
    color: white;
    box-sizing: border-box;
}

.buttons{
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* fixed 70px o‘rniga */
    gap: 10px;
}

button{
    height: 60px;
    font-size: 18px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background: #4f4f4f;
    color: white;
    transition: 0.2s;
}

button:hover{
    background: #6b6b6b;
}

.equal{
    background: #ff9500;
}

.equal:hover{
    background: #ffa30e;
}

.zero{
    grid-column: span 2;
}

@media (max-width: 400px){
    .calculator{
        padding: 15px;
        border-radius: 15px;
    }

    #display{
        height: 50px;
        font-size: 20px;
    }

    button{
        height: 50px;
        font-size: 16px;
    }
}

@media (min-width: 768px){
    .calculator{
        max-width: 400px;
        padding: 25px;
    }

    #display{
        height: 70px;
        font-size: 28px;
    }

    button{
        height: 70px;
        font-size: 20px;
    }
}