*{ touch-action: manipulation; } html, body { height:100%; overflow: hidden; } body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background-color: hsl(0, 0%, 25%); } #calculator { font-family: Arial, sans-serif; background-color: hsl(0, 0%, 15%); border-radius: 15px; max-width: 500px; width: 80%; overflow: hidden; } #display { padding: 20px; font-size: 3rem; /* Adjusted for smaller screens */ text-align: right; border: none; background-color: hsl(0, 0%, 20%); color: white; width: 100%; box-sizing: border-box; } #keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 20px; } button { width: 100%; padding: 20px; border-radius: 15px; border: none; background-color: hsl(0, 0%, 30%); color: white; font-size: 2rem; /* Adjusted for smaller screens */ 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%); } /* Responsive adjustments for smaller screens */ @media (max-width: 600px) { #display { font-size: 2rem; padding: 15px; } #keys { gap: 8px; } button { font-size: 1.5rem; padding: 15px; border-radius: 10px; } }