
    body {
        background: linear-gradient(135deg, #181c24 0%, #232a36 100%);
        font-family: 'Segoe UI', 'Arial', sans-serif;
        color: #e3e6eb;
        margin: 0;
        padding: 0;
        min-height: 100vh;
    }

    h2 {
        text-align: center;
        margin-top: 36px;
        font-size: 2.3em;
        letter-spacing: 1.5px;
        color: #e3e6eb;
        text-shadow: 0 2px 8px #232a36, 0 1px 0 #181c24;
    }

    .container {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
        margin: 36px auto 0 auto;
        justify-content: center;
        max-width: 900px;
    }


    .img-block {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: rgba(32, 36, 48, 0.97);
        border-radius: 18px;
        box-shadow: 0 4px 24px 0 rgba(10, 20, 40, 0.25);
        padding: 22px 30px 28px 30px;
        min-width: 320px;
        transition: box-shadow 0.2s, transform 0.2s;
    }

    .img-block:hover {
        box-shadow: 0 8px 32px 0 rgba(30, 60, 120, 0.28);
        transform: translateY(-2px) scale(1.02);
    }

    .img-block span {
        font-weight: 700;
        color: #6cb6ff;
        margin-bottom: 10px;
        font-size: 1.18em;
        letter-spacing: 0.5px;
        text-shadow: 0 1px 0 #232a36;
    }

    #downloadBinBtn:hover {
        background: #2d8cf0;
        color: #fff;
        box-shadow: 0 6px 24px 0 rgba(45, 140, 240, 0.28);
    }


    canvas,
    img {
        max-width: 300px;
        max-height: 300px;
        border: 2px solid #3a4252;
        border-radius: 10px;
        margin-top: 0px;
        background: #232a36;
        box-shadow: 0 2px 12px 0 rgba(0,0,0,0.18);
        transition: box-shadow 0.2s, border-color 0.2s;
    }

    .img-block canvas {
        /* Upscale the low-res canvas to match the original image's display size */
        width: 100%;
        height: auto;
        image-rendering: pixelated;
        /* fallback for older browsers */
        image-rendering: crisp-edges;
        aspect-ratio: auto;
        display: block;
        /* Let JS set the width/height style for exact match */
    }

    canvas:hover,
    img:hover {
        border-color: #6cb6ff;
        box-shadow: 0 6px 24px 0 rgba(45, 140, 240, 0.23);
    }

    .controls {
        margin: 0 auto 22px auto;
        max-width: 760px;
        background: rgba(32, 36, 48, 0.98);
        border-radius: 16px;
        box-shadow: 0 2px 10px 0 rgba(0,0,0,0.18);
        padding: 22px 32px 14px 32px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 18px 24px;
        justify-content: center;
    }

    .controls label {
        font-weight: 500;
        margin-right: 6px;
        color: #e3e6eb;
        letter-spacing: 0.2px;
    }

    .controls input[type="range"] {
        accent-color: #6cb6ff;
        margin-right: 10px;
        vertical-align: middle;
        height: 3px;
        background: #232a36;
        border-radius: 2px;
        box-shadow: 0 1px 2px 0 rgba(45, 140, 240, 0.10);
    }

    .controls span {
        min-width: 36px;
        display: inline-block;
        text-align: right;
        color: #6cb6ff;
        font-weight: 600;
        font-size: 1.08em;
    }

    @media (max-width: 900px) {
        .container {
            flex-direction: column;
            align-items: center;
            gap: 24px;
        }
        .img-block {
            min-width: 0;
            width: 90vw;
            max-width: 98vw;
        }
    }