        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            background-color: #f0f2f5;
            color: #333;
            margin: 0;
            padding-bottom: 40px;
        }
        .container {
            max-width: 700px;
            width: 100%;
            padding: 20px;
            box-sizing: border-box;
        }
        header { text-align: center; border-bottom: 1px solid #ddd; padding-bottom: 1rem; margin-bottom: 1rem; }
        h1 { margin-bottom: 0.2rem; }
        h2 { font-size: 1.2em; font-weight: 500; margin-top: 1rem; }
        .hidden { display: none; }

        #upload-section {
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            text-align: center;
        }
        #fileInput {
            margin-top: 10px;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        #demo-thumbnails {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 10px;
        }
        #demo-thumbnails img {
            width: 140px;
            height: 105px;
            object-fit: cover;
            cursor: pointer;
            border: 2px solid transparent;
            border-radius: 4px;
            transition: transform 0.2s, border-color 0.2s;
        }
        #demo-thumbnails img:hover {
            transform: scale(1.05);
            border-color: #007bff;
        }

        #main-output {
            margin-top: 2rem;
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        #display-canvas {
            background-color: #e9e9e9;
            max-width: 100%;
            border-radius: 4px;
        }
        #controls {
            width: 100%;
            max-width: 500px;
            margin-top: 1.5rem;
        }
        .control-group {
            display: flex;
            align-items: center;
            margin-bottom: 1rem;
            gap: 10px;
        }
        .control-group label {
            flex-basis: 70px;
            text-align: right;
        }
        .control-group input[type=range] {
            flex-grow: 1;
            width: auto;
        }
        .control-group span {
            font-weight: bold;
            width: 30px;
        }
        
        #export-section {
            margin-top: 1rem;
            display: flex;
            gap: 15px;
            align-items: center;
        }
        .export-button {
            padding: 10px 20px;
            border: none;
            background-color: #007bff;
            color: white;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1em;
            transition: background-color 0.2s;
        }
        .export-button:hover { background-color: #0056b3; }
        .export-button:disabled { background-color: #999; cursor: not-allowed; }
        #status { font-style: italic; color: #555; }
