
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background-color: #f0f0f0;
            font-family: 'Arial', sans-serif;
        }

        .calculator {
            background-color: #3a4452;
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
            width: 320px;
        }

        #display {
            width: 100%;
            height: 65px;
            font-size: 2.6em;
            text-align: right;
            border: none;
            background-color: #a7afbe;
            border-radius: 10px;
            padding: 10px 15px;
            margin-bottom: 20px;
            box-sizing: border-box;
            color: #333;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .buttons {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
        }

        button {
            padding: 16px; /* Slightly reduced padding to fit extra row better */
            font-size: 1.3em; /* Slightly reduced font size */
            border: none;
            border-radius: 10px;
            cursor: pointer;
            background-color: #e0e0e0;
            color: #333;
            transition: background-color 0.2s ease;
        }

        button:hover {
            background-color: #d5d5d5;
        }

        button:active {
            background-color: #cccccc;
        }

        /* Style for function buttons (Sqrt, Percent, Memory) */
        .function {
             background-color: #f39c12; /* Orange background */
             color: white;
             font-weight: bold;
        }
         .function:hover { background-color: #e67e22; }
         .function:active { background-color: #d35400; }

        /* Style for operator buttons */
        .operator {
            background-color: #f39c12; /* Orange background */
            color: white;
            font-weight: bold;
        }
        .operator:hover { background-color: #e67e22; }
        .operator:active { background-color: #d35400; }

        /* Style for Equals button */
        .equals {
            grid-column: span 1;
            background-color: #2ecc71; /* Green background */
            color: white;
            font-weight: bold;
        }
        .equals:hover { background-color: #27ae60; }
        .equals:active { background-color: #1e8449; }

        /* Style for Clear/Delete buttons */
        .clear {
             background-color: #e74c3c; /* Red background */
             color: white;
             font-weight: bold;
        }
         .clear:hover { background-color: #c0392b; }
         .clear:active { background-color: #a93226; }


         .zero {
             grid-column: span 2;
        }
