* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
button{
    -webkit-tap-highlight-color: transparent; /*removes blue flash */
    outline: none;                             /* removes focus outline */
     touch-action: manipulation; /*  this is the key fix for mobile tap delay & highlight */
    -webkit-appearance: none;     /*  removes default mobile styling */
    width: 100px;
    height: 100px;
    border-radius: 50px;
    border: none;
    background-color: hsl(0, 0%, 30%);
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor:pointer;
}
#keys{
    display:grid;
    grid-template-columns: repeat(5,1fr);
    gap:10px;
    padding: 25px;
}
#calculator{
    font-family:Arial, Helvetica, sans-serif;
    background-color: hsl(0, 0%,15%);
    border-radius:15px;
    max-width: 800px;
    overflow: hidden;
    transform: scale(0.85); /* ← 1 = full size, 0.7 = 70% size */
    transform-origin: top center;
}
#display{
    -webkit-tap-highlight-color: transparent;
    outline: none;
    width:100%;
    padding:20px;
    margin-top: 10px;
    font-size:2rem;
    color:white;
    text-align:left;
    border:none;
    background-color: hsl(0, 0%, 20%);
}
body{
    
    margin:0;
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    box-sizing:border-box;
    background-color: hsl(20, 10%, 55%);
    color: white;
   font-size:2rem;
   font-weight:bold;
   cursor:pointer;
}
button:hover{
    background-color:hsl(0, 0%, 40%);
}
button:active{
    background-color:hsl(0, 0%, 50%);
}
.operator-btn{
    background-color:hsl(35, 100%, 55%)
}
.operator-btn:hover{
    
    background-color:hsl(35, 100%, 65%);
}
.operator-btn:active{
    
    background-color:hsl(35, 100%, 75%)
}
/* Make calculator fill smaller screens */
#calculator {
    width: 100%;
    max-width: 800px;
}

/* Scale down for phones */
@media (max-width: 480px) {
    button {
        width: 70px;
        height: 70px;
        border-radius: 35px;
        font-size: 1.8rem;
    }

    #display {
        font-size: 2.5rem;
        padding: 15px;
    }

    #keys {
        gap: 8px;
        padding: 15px;
    }
}

