* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 40px 20px;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
        }
        
        h1 {
            color: white;
            font-size: 48px;
            margin-bottom: 8px;
            text-align: center;
            font-weight: 700;
        }
        
        .subtitle {
            color: rgba(255, 255, 255, 0.9);
            text-align: center;
            font-size: 18px;
            margin-bottom: 40px;
        }
        
        .layout {
            display: grid;
            grid-template-columns: 280px 1fr;
            gap: 30px;
            align-items: start;
        }
        
        .left-column {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .download-section-top {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .download-section-top .theme-name-input {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            transition: border-color 0.2s;
        }
        
        .download-section-top .theme-name-input:focus {
            outline: none;
            border-color: #667eea;
        }
        
        .download-section-top .btn-primary {
            width: 100%;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 14px 32px;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }
        
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }

        .btn-secondary {
            background: white;
            color: #2d3748;
            border: 2px solid #e2e8f0;
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
        }

        .btn-secondary:hover {
            border-color: #667eea;
            box-shadow: 0 12px 44px rgba(0, 0, 0, 0.12);
            transform: translateY(-1px);
        }
        
        .left-actions-row {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: space-between;
        }

        .left-actions-row .btn-ghost {
            flex: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .install-link-bottom {
            background: white;
            border-radius: 12px;
            padding: 16px 20px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            text-decoration: none;
            color: #667eea;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
        }
        
        .install-link-bottom:hover {
            background: #f7fafc;
            color: #5568d3;
        }
        
        .help-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 22px;
            height: 22px;
            background: #667eea;
            color: white;
            border-radius: 50%;
            font-size: 13px;
            font-weight: 700;
        }
        
        .controls-section {
            background: white;
            border-radius: 12px;
            padding: 24px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
            min-height: 200px;
        }
        
        .controls-section.empty {
            display: flex;
            align-items: center;
            justify-content: center;
            color: #a0aec0;
            font-size: 14px;
            text-align: center;
            padding: 40px 20px;
        }
        
        .controls-section h3 {
            font-size: 18px;
            color: #2d3748;
            margin-bottom: 20px;
            font-weight: 700;
        }
        
        .control-group {
            margin-bottom: 20px;
        }
        
        .control-group:last-child {
            margin-bottom: 0;
        }
        
        .control-group label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: #4a5568;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Override the default .control-group label styles for this inline control */
        .control-group label.inline-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 0;
            padding: 0;
            cursor: pointer;
            user-select: none;
            text-transform: none;
            letter-spacing: 0;
            font-size: 13px;
            color: #2d3748;
        }

        .control-group label.inline-toggle input[type="checkbox"] {
            position: absolute;
            opacity: 0;
            width: 1px;
            height: 1px;
        }

        .toggle-ui {
            width: 36px;
            height: 20px;
            border-radius: 999px;
            background: #e2e8f0;
            position: relative;
            transition: background 0.2s;
            flex: 0 0 auto;
        }

        .toggle-ui::after {
            content: "";
            position: absolute;
            top: 2px;
            left: 2px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: white;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
            transition: transform 0.2s;
        }

        .control-group label.inline-toggle input[type="checkbox"]:checked + .toggle-ui {
            background: #667eea;
        }

        .control-group label.inline-toggle input[type="checkbox"]:checked + .toggle-ui::after {
            transform: translateX(16px);
        }

        .control-group label.inline-toggle input[type="checkbox"]:focus-visible + .toggle-ui {
            outline: 3px solid rgba(102, 126, 234, 0.35);
            outline-offset: 2px;
        }

        .toggle-label {
            font-size: 13px;
            font-weight: 600;
            color: #2d3748;
            text-transform: none;
            letter-spacing: 0;
        }

        .tooltip-icon {
            width: 18px;
            height: 18px;
            border-radius: 999px;
            border: 1px solid #cbd5e0;
            color: #718096;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
            background: #f7fafc;
            flex: 0 0 auto;
            position: relative;
        }

        .tooltip-icon:hover,
        .tooltip-icon:focus {
            border-color: #667eea;
            color: #667eea;
            outline: none;
        }

        .tooltip-icon:hover::after,
        .tooltip-icon:focus::after {
            content: attr(data-tooltip);
            position: absolute;
            left: 0;
            top: 100%;
            margin-top: 8px;
            width: 260px;
            max-width: 70vw;
            background: rgba(26, 32, 44, 0.95);
            color: white;
            padding: 10px 12px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 500;
            line-height: 1.35;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
            z-index: 1200;
            text-transform: none;
            letter-spacing: 0;
        }
        
        .color-mode-tabs {
            display: flex;
            gap: 4px;
            background: #f7fafc;
            border-radius: 6px;
            padding: 4px;
            margin-bottom: 12px;
        }
        
        .color-mode-tab {
            flex: 1;
            padding: 8px 12px;
            font-size: 13px;
            font-weight: 600;
            border: none;
            background: transparent;
            color: #718096;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.2s;
        }
        
        .color-mode-tab.active {
            background: white;
            color: #667eea;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }
        
        .color-picker-wrapper {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .color-preview {
            width: 60px;
            height: 40px;
            border: 2px solid #e2e8f0;
            border-radius: 6px;
            cursor: pointer;
            transition: border-color 0.2s;
        }
        
        .color-preview:hover {
            border-color: #667eea;
        }
        
        input[type="color"] {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        input[type="text"] {
            flex: 1;
            padding: 10px 12px;
            border: 2px solid #e2e8f0;
            border-radius: 6px;
            font-size: 14px;
            font-family: 'Monaco', 'Courier New', monospace;
            text-transform: uppercase;
            transition: border-color 0.2s;
        }
        
        input[type="text"]:focus {
            outline: none;
            border-color: #667eea;
        }
        
        .presets-section {
            background: white;
            border-radius: 12px;
            padding: 24px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        }
        
        .presets-section h2 {
            font-size: 18px;
            color: #2d3748;
            margin-bottom: 16px;
            font-weight: 700;
        }
        
        .preset-pagination {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .preset-dropdown {
            margin-bottom: 12px;
        }

        .preset-dropdown select {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            background: white;
            color: #2d3748;
            transition: border-color 0.2s;
        }

        .preset-dropdown select:focus {
            outline: none;
            border-color: #667eea;
        }
        
        .pagination-controls {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }
        
        .pagination-arrow {
            background: #f7fafc;
            border: 1px solid #e2e8f0;
            width: 32px;
            height: 32px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: #4a5568;
            transition: all 0.2s;
        }
        
        .pagination-arrow:hover:not(.disabled) {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }
        
        .pagination-arrow.disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }
        
        .page-indicator {
            flex: 1;
            text-align: center;
            font-size: 13px;
            color: #718096;
            font-weight: 500;
        }
        
        .preset-grid {
            display: grid;
            gap: 0;
        }
        
        .preset-item {
            padding: 4px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            border: 2px solid transparent;
        }
        
        .preset-item:hover {
            background: #f7fafc;
            border-color: #667eea;
        }
        
        .preset-colors {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 4px;
        }
        
        .preset-color {
            width: 100%;
            height: 20px;
            border-radius: 3px;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        .preview-section {
            background: white;
            border-radius: 12px;
            padding: 40px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        }
        
        .preview-container {
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            overflow: hidden;
            background: white;
        }
        
        .preview-area {
            transition: all 0.2s;
            position: relative;
        }
        
        .preview-area:hover {
            outline: 3px solid #667eea;
            outline-offset: -3px;
            cursor: pointer;
        }
        
        .preview-area.selected {
            outline: 3px solid #4c51bf;
            outline-offset: -3px;
        }
        
        /* Also highlight Selected Tab when toolbar is selected */
        #area-activeTab.selected {
            outline: 3px solid #4c51bf;
            outline-offset: -3px;
        }
        
        .preview-toolbar {
            height: 40px;
            display: flex;
            align-items: center;
            padding: 0 12px;
            gap: 8px;
        }
        
        .preview-tab {
            padding: 8px 16px;
            border-radius: 8px 8px 0 0;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 6px;
            position: relative;
        }
        
        .preview-selected-tab {
            margin-bottom: -1px;
            z-index: 2;
            position: relative;
        }
        
        .preview-tab-icon {
            font-size: 10px;
        }
        
        .preview-toolbar-main {
            height: 48px;
            display: flex;
            align-items: center;
            padding: 0 12px;
            gap: 12px;
            position: relative;
            z-index: 1;
        }
        
        /* Coordinated hover for toolbar and selected tab */
        #area-toolbar:hover:not(:has(#area-addressBar:hover)),
        .coordinated-hover {
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
        }
        
        /* Address bar hover independently */
        #area-addressBar:hover {
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
        }
        
        .preview-address-bar {
            flex: 1;
            height: 32px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            padding: 0 16px;
            font-size: 12px;
            transition: box-shadow 0.2s;
        }
        
        .preview-icon {
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }
        
        .preview-page {
            height: 400px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }
        
        .status {
            padding: 12px 20px;
            border-radius: 6px;
            font-size: 14px;
            display: none;
            text-align: center;
        }
        
        .status.success {
            background: #c6f6d5;
            color: #22543d;
            display: block;
        }
        
        .status.error {
            background: #fed7d7;
            color: #742a2a;
            display: block;
        }
        
        .status.info {
            background: #bee3f8;
            color: #2c5282;
            display: block;
        }
        
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        
        .modal-overlay.active {
            display: flex;
        }
        
        .modal-content {
            background: white;
            border-radius: 12px;
            padding: 32px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }
        
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }
        
        .modal-header h2 {
            margin: 0;
            color: #2d3748;
            font-size: 24px;
        }
        
        .modal-close {
            background: none;
            border: none;
            font-size: 28px;
            color: #718096;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: background 0.2s;
        }
        
        .modal-close:hover {
            background: #f7fafc;
        }
        
        .modal-body {
            color: #4a5568;
            line-height: 1.6;
        }

        .modal-body h3 {
            margin: 20px 0 10px;
            font-size: 16px;
            color: #2d3748;
        }

        .modal-body h4 {
            margin: 14px 0 6px;
            font-size: 13px;
            color: #2d3748;
        }

        .modal-body p {
            margin: 10px 0;
        }

        .help-intro {
            background: #f7fafc;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            padding: 12px 14px;
            margin-bottom: 14px;
        }

        .help-toc {
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            padding: 12px 14px;
            margin: 12px 0 18px;
            background: white;
        }

        .help-toc-title {
            font-size: 12px;
            font-weight: 800;
            color: #2d3748;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .help-toc ul {
            margin: 0;
            padding-left: 18px;
        }

        .help-toc a {
            color: #667eea;
            text-decoration: none;
        }

        .help-toc a:hover {
            text-decoration: underline;
        }

        .help-markdown h1 {
            margin: 0 0 10px;
            font-size: 20px;
            color: #2d3748;
            text-align: left;
        }
        
        /* When h1 is inside a summary, it should inherit summary styling */
        .help-markdown details summary h1 {
            margin: 0;
            font-size: inherit;
            font-weight: inherit;
            color: inherit;
        }

        .help-markdown h2 {
            margin: 18px 0 8px;
            font-size: 16px;
            color: #2d3748;
        }

        .help-markdown h3 {
            margin: 14px 0 6px;
            font-size: 14px;
            color: #2d3748;
        }

        .help-markdown p,
        .help-markdown ul,
        .help-markdown ol {
            margin: 10px 0;
        }

        /* Our global reset removes default list indentation; restore it for rendered markdown */
        .help-markdown ul,
        .help-markdown ol {
            padding-left: 22px;
        }

        .help-markdown li {
            margin: 6px 0;
        }

        .help-markdown table {
            width: 100%;
            border-collapse: collapse;
            margin: 12px 0 16px;
            font-size: 12px;
        }

        .help-markdown th,
        .help-markdown td {
            border: 1px solid #e2e8f0;
            padding: 8px 10px;
            vertical-align: top;
        }

        .help-markdown th {
            background: #f7fafc;
            color: #4a5568;
            font-weight: 700;
            text-align: left;
            white-space: nowrap;
        }

        .help-md-note {
            margin-top: 14px;
            padding-top: 12px;
            border-top: 1px solid #e2e8f0;
            font-size: 11px;
            color: #718096;
            line-height: 1.4;
        }
        
        /* Collapsible accordion sections */
        .help-markdown details {
            margin: 12px 0;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            background: #ffffff;
        }
        
        .help-markdown details summary {
            padding: 12px 16px;
            cursor: pointer;
            font-weight: 600;
            font-size: 16px;
            color: #2d3748;
            user-select: none;
            list-style: none;
            display: flex;
            align-items: center;
        }
        
        .help-markdown details summary::-webkit-details-marker {
            display: none;
        }
        
        .help-markdown details summary::before {
            content: '▶';
            display: inline-block;
            margin-right: 8px;
            font-size: 10px;
            color: #718096;
            transition: transform 0.2s;
        }
        
        .help-markdown details[open] summary::before {
            transform: rotate(90deg);
        }
        
        .help-markdown details summary:hover {
            background: #f7fafc;
        }
        
        .help-markdown .help-section-content {
            padding: 16px;
            border-top: 1px solid #e2e8f0;
        }
        
        .help-markdown .help-section-content > *:first-child {
            margin-top: 0;
        }
        
        .help-markdown .help-section-content > *:last-child {
            margin-bottom: 0;
        }
        
        .modal-body ol {
            padding-left: 24px;
            margin: 16px 0;
        }
        
        .modal-body li {
            margin: 12px 0;
        }
        
        .modal-body code {
            background: #f7fafc;
            padding: 2px 8px;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            color: #667eea;
            font-size: 14px;
        }

        .help-table {
            width: 100%;
            border-collapse: collapse;
            margin: 12px 0 16px;
            font-size: 12px;
        }

        .help-table th,
        .help-table td {
            border: 1px solid #e2e8f0;
            padding: 8px 10px;
            vertical-align: top;
        }

        .help-table th {
            background: #f7fafc;
            color: #4a5568;
            font-weight: 700;
            text-align: left;
            white-space: nowrap;
        }

        .help-table td {
            color: #4a5568;
        }

        .help-table code {
            font-size: 12px;
            padding: 1px 6px;
        }
        
        .modal-body strong {
            color: #2d3748;
        }

        /* Side Panel (Preset Palettes) */
        .side-panel-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Transparent (no lightbox/dimming) */
            background: transparent;
            z-index: 900;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }

        .side-panel-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .side-panel {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            /* Must be no wider than the left column (280px) */
            width: 280px;
            max-width: 280px;
            background: white;
            box-shadow: 20px 0 60px rgba(0, 0, 0, 0.18);
            transform: translateX(-100%);
            transition: transform 0.25s ease;
            display: flex;
            flex-direction: column;
            padding: 20px;
            overflow: hidden;
        }

        .side-panel-overlay.active .side-panel {
            transform: translateX(0);
        }

        .side-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 12px;
        }

        .side-panel-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .btn-ghost {
            background: #ffffff;
            border: 2px solid #cbd5e0;
            color: #2d3748;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 600;
        }

        .btn-ghost:hover {
            border-color: #667eea;
            color: #667eea;
            background: #f7fafc;
        }

        .btn-small {
            padding: 6px 10px;
            font-size: 12px;
            font-weight: 700;
        }

        .side-panel-header h2 {
            margin: 0;
            font-size: 18px;
            color: #2d3748;
            font-weight: 700;
        }

        .side-panel #presetsContainer {
            overflow-y: auto;
            padding-right: 4px;
        }

        /* Presets list (grouped, long column) */
        .preset-dropdown,
        .preset-pagination,
        .pagination-controls,
        .pagination-arrow,
        .page-indicator {
            display: none;
        }

        .preset-list {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .preset-theme {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px;
            border-radius: 8px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
        }

        .preset-theme:hover {
            background: #f7fafc;
            border-color: #667eea;
        }

        .preset-theme .preset-colors {
            grid-template-columns: repeat(6, 1fr);
            gap: 3px;
            width: 126px;
            flex: 0 0 auto;
        }

        .preset-theme .preset-color {
            height: 14px;
            border-radius: 3px;
        }

        
        /* Image Upload Modal */
        .upload-dropzone {
            border: 2px dashed #cbd5e0;
            border-radius: 8px;
            padding: 40px 20px;
            text-align: center;
            background: #f7fafc;
            cursor: pointer;
            transition: all 0.2s;
            margin: 20px 0;
        }
        
        .upload-dropzone:hover,
        .upload-dropzone.dragover {
            border-color: #667eea;
            background: #edf2f7;
        }

        /* Import dropzone: reuse upload styles but keep dragover class consistent */
        #importDropzone.dragover {
            border-color: #667eea;
            background: #edf2f7;
        }
        
        .upload-dropzone-icon {
            font-size: 48px;
            color: #a0aec0;
            margin-bottom: 12px;
        }
        
        .upload-dropzone-text {
            font-size: 16px;
            color: #4a5568;
            margin-bottom: 8px;
        }
        
        .upload-dropzone-hint {
            font-size: 13px;
            color: #718096;
        }
        
        .upload-guidance {
            background: #edf2f7;
            border-radius: 8px;
            padding: 16px;
            margin: 16px 0;
        }
        
        .upload-guidance h4 {
            font-size: 14px;
            font-weight: 600;
            color: #2d3748;
            margin: 0 0 12px 0;
        }
        
        .upload-guidance ul {
            margin: 0;
            padding-left: 20px;
            font-size: 13px;
            color: #4a5568;
            line-height: 1.6;
        }
        
        .upload-guidance li {
            margin: 6px 0;
        }
        
        .upload-guidance code {
            background: white;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 12px;
        }
        
        .image-preview-container {
            margin: 16px 0;
            text-align: center;
        }
        
        .image-preview {
            max-width: 100%;
            max-height: 200px;
            border-radius: 8px;
            border: 2px solid #e2e8f0;
        }
        
        .remove-image-btn {
            margin-top: 12px;
            padding: 8px 16px;
            background: #fc8181;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: background 0.2s;
        }
        
        .remove-image-btn:hover {
            background: #f56565;
        }
        
        /* Tint Controls */
        .tint-section {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 2px solid #e2e8f0;
        }
        
        .tint-section h4 {
            font-size: 14px;
            font-weight: 600;
            color: #2d3748;
            margin: 0 0 12px 0;
        }
        
        .tint-slider-group {
            margin-bottom: 12px;
        }
        
        .tint-slider-label {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: #4a5568;
            margin-bottom: 4px;
        }
        
        .tint-slider-value {
            font-weight: 600;
            color: #667eea;
        }
        
        .tint-slider {
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: #e2e8f0;
            outline: none;
            -webkit-appearance: none;
            appearance: none;
        }
        
        .tint-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #667eea;
            cursor: pointer;
        }
        
        .tint-slider::-moz-range-thumb {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #667eea;
            cursor: pointer;
            border: none;
        }
        
        .tint-reset-btn {
            font-size: 12px;
            padding: 4px 12px;
            background: #edf2f7;
            color: #4a5568;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 500;
            transition: background 0.2s;
        }
        
        .tint-reset-btn:hover {
            background: #e2e8f0;
        }
        
        /* NTP Properties */
        .ntp-properties {
            margin-top: 16px;
        }
        
        .property-select {
            width: 100%;
            padding: 8px 12px;
            border: 2px solid #e2e8f0;
            border-radius: 6px;
            font-size: 14px;
            background: white;
            cursor: pointer;
            transition: border-color 0.2s;
        }
        
        .property-select:focus {
            outline: none;
            border-color: #667eea;
        }
        
        /* Palette Extraction */
        .palette-extraction {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 2px solid #e2e8f0;
        }
        
        .palette-extraction h4 {
            font-size: 14px;
            font-weight: 600;
            color: #2d3748;
            margin: 0 0 12px 0;
        }
        
        .palette-colors {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
            margin-bottom: 12px;
        }
        
        .palette-color-swatch {
            aspect-ratio: 1;
            border-radius: 6px;
            border: 2px solid #e2e8f0;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }
        
        .palette-color-swatch:hover {
            transform: scale(1.1);
            border-color: #667eea;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .palette-color-label {
            position: absolute;
            bottom: 2px;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 9px;
            font-weight: 600;
            text-shadow: 0 0 3px rgba(0,0,0,0.5), 0 0 3px rgba(255,255,255,0.5);
            color: white;
            padding: 2px;
        }
        
        .generate-palette-btn {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
            margin-bottom: 12px;
        }
        
        .generate-palette-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }
        
        .generate-palette-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        
        .apply-palette-btn {
            width: 100%;
            padding: 10px;
            background: #48bb78;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }
        
        .apply-palette-btn:hover {
            background: #38a169;
        }
        
        .palette-hint {
            font-size: 11px;
            color: #718096;
            text-align: center;
            margin-top: 8px;
            line-height: 1.4;
        }
        
        @media (max-width: 1024px) {
            .layout {
                grid-template-columns: 1fr;
            }
        }
