body {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 16px;
            line-height: 1.5;
            color: #000000;
            background-color: #FFFFFF;
            margin: 0 auto;
            max-width: 960px;
            padding: 20px;
-webkit-tap-highlight-color: transparent;
        }

        h1, h2, h3 {
            font-family: "Times New Roman", Times, serif;
            text-align: center;
        }

        a {
            color: #0000FF;
            text-decoration: underline;
        }

        hr {
            border: 0;
            height: 1.5px;
            background: #333;
            margin: 20px 0;
        }

        .tool-container {
            border: 1.5px solid #000000;
            padding: 20px;
            background-color: #F0F0F0;
            position: relative;
            margin: 0 auto;
        }

        .home-link {
    display: block;
    text-align: center;
    margin-bottom: 20px;
    -webkit-tap-highlight-color: transparent;
    color: #0000FF;            /* blue like a hyperlink */
    cursor: pointer;           /* shows pointer hand on hover */
}

        .calculator-page {
            display: flex;
            flex-direction: column;
        }

        .display {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    flex-grow: 1;
    padding: 10px;
    background: #F0F0F0;
    border: 1.5px solid #000000;
    height: 150px;
    text-align: right;
}

#expression-preview-content {
    display: block;
    position: relative;
    min-width: 1.5px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    text-align: left;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}

.expression-preview {
    font-size: 1.4rem;
    color: #800080;
    font-weight: 500;
    width: 100%;
    opacity: 1;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    line-height: 1.2;
    text-align: left;
    padding-bottom: 5px;
    transition: color var(--transition-speed);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.expression-preview::-webkit-scrollbar {
    display: none;
}

.current-display {
    font-size: 2.5rem;
    font-weight: bold;
    width: 100%;
    text-align: right;
    margin-top: 2%;
    margin-bottom: 0%;
    flex-shrink: 0;
    white-space: nowrap;
    overflow-x: auto;
    color: #000000;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.current-display::-webkit-scrollbar {
    display: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.expression-preview .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #800080;
    vertical-align: middle;
    margin-left: 2px;
    margin-bottom: 5px;
    flex-shrink: 0;
    animation: blink 1.2s ease-in-out infinite;
}

        .main-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
        }

        .btn {
            height: 60px;
            border: 1.5px solid #000000;
            cursor: pointer;
            font-size: 1.2rem;
            font-weight: bold;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #DDDDDD;
            color: #000000;
        }

        .btn:hover {
            background-color: #CCCCCC;
        }

        .btn-op {
            background-color: #C9302C;
            color: #FFFFFF;
        }

        .btn-op:hover {
            background-color: #A32926;
        }

        .btn-clear {
            background-color: #337AB7;
            color: #FFFFFF;
        }

        .btn-clear:hover {
            background-color: #2A6496;
        }

        .btn-scientific {
            background-color: #337AB7;
            color: #FFFFFF;
        }

        .btn-scientific:hover {
            background-color: #2A6496;
        }

        .btn-equals {
            background-color: #449D44;
            color: #FFFFFF;
            grid-row: span 2;
        }

        .btn-equals:hover {
            background-color: #388E3C;
        }

        .btn-zero {
            grid-column: span 1;
        }

        .info-section {
            margin-top: 0;
        }

        .info-section h2, .info-section h3 {
            text-align: left;
        }

        .info-section p {
            text-align: left;
        }
        .info-section ul li {
            margin-top: 12px;
        }

        @keyframes blink {
            50% {
                opacity: 0;
            }
        }

        .cursor {
            display: inline-block;
            width: 2px;
            height: 1.2rem;
            background-color: #C9302C;
            animation: blink 1.2s step-end infinite;
        }

        /* Media Queries for button sizes and fixed width */
        @media (min-width: 768px) {
            .tool-container {
                width: 750px;
            }

            .btn {
                height: 80px;
                font-size: 1.5rem;
            }
        }