    body {
    background: #232325;
    min-height: 100vh;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    }

    .calculator {
    max-width: 360px;
    width: 98vw;
    margin: 30px auto;
    padding: 24px 14px 12px 14px;
    border-radius: 26px;
    background: #16181c;
    box-shadow: 0 8px 32px #18181b7f;
    }

    .status-bar {
    display: flex;
    justify-content: space-between;
    color: #ababab;
    font-size: 1em;
    margin-bottom: 6px;
    }

    .display {
    background: #181920;
    color: #eaeaea;
    padding: 16px 12px;
    border-radius: 18px;
    margin-bottom: 16px;
    text-align: right;
    min-height: 50px;
    word-break: break-all;
    }

    #calc-expression {
    font-size: 1.1em;
    color: #8e8e91;
    }

    #calc-input {
    width: 100%;
    font-size: 2.2em;
    border: none;
    background: transparent;
    color: #eaeaea;
    text-align: right;
    outline: none;
    }

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

    button {
    background: #23272e;
    color: #fafafc;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    padding: 11px 0;
    box-shadow: 0 1px 3px #16181b33;
    cursor: pointer;
    transition: background 0.15s;
    }

    button:active, button:focus {
    background: #323643;
    outline: none;
    }

    .actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    }

    #calc-history {
    background: #141414;
    color: #e3e3e3;
    font-size: 0.96em;
    border-radius: 8px;
    padding: 8px 10px;
    min-height: 40px;
    margin-top: 8px;
    max-height: 130px;
    overflow-y: auto;
    }

    /* Popup styles */
    .share-popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #10101694;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    }

    .share-popup-inner {
    background: #232328;
    border-radius: 10px;
    padding: 26px 18px;
    color: #fff;
    box-shadow: 0 4px 32px #0004;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 1.12em;
    }

    @media (max-width: 500px) {
    .calculator {
        max-width: 99vw;
        padding: 10vw 3vw;
        border-radius: 16px;
    }
    .display {
        font-size: 0.92em;
        padding: 12px 7px;
        border-radius: 12px;
    }
    button {
        font-size: 1em;
        padding: 8px 0;
        border-radius: 8px;
    }
    #calc-history {
        padding: 4px 6px;
        font-size: 0.86em;
        border-radius: 6px;
        max-height: 80px;
    }
    .status-bar {
        font-size: 0.9em;
        margin-bottom: 3px;
    }
    }

    @media (min-width: 700px) {
    .calculator {
        max-width: 410px;
        padding: 28px 22px 14px 22px;
        border-radius: 28px;
    }
    .display {
        font-size: 1.08em;
        padding: 24px 14px;
        border-radius: 20px;
    }
    button {
        font-size: 1.2em;
        padding: 14px 0;
        border-radius: 14px;
    }
    #calc-history {
        font-size: 1em;
        border-radius: 10px;
        max-height: 160px;
    }
    }
