﻿.upload-zone {
            border: 3px dashed var(--color-border);
            border-radius: 1rem;
            padding: 3rem;
            text-align: center;
            transition: all 0.3s ease;
            background: var(--color-surface);
        }

        .upload-zone:hover,
        .upload-zone.dragover {
            border-color: var(--color-primary);
            background: rgba(var(--color-primary-rgb), 0.05);
        }

        /* Tabs */
        .tab-btn.active {
            border-bottom-color: var(--color-primary);
            color: var(--color-primary);
            background: var(--color-bg);
        }

        /* Canvas & Container */
        .editor-container {
            position: relative;
            background: #e5e7eb;
            /* Neutral gray for canvas bg */
            border-radius: 0.75rem;
            overflow: hidden;
            box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
            min-height: 400px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: move;
            /* Indicate draggable */
        }

        .transparent-bg {
            background-image:
                linear-gradient(45deg, #ddd 25%, transparent 25%),
                linear-gradient(-45deg, #ddd 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #ddd 75%),
                linear-gradient(-45deg, transparent 75%, #ddd 75%);
            background-size: 20px 20px;
            background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
        }

        canvas {
            max-width: 100%;
            max-height: 500px;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }

        /* Color Picker Circles */
        .color-swatch {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            border: 2px solid var(--color-border);
            transition: transform 0.2s;
        }

        .color-swatch:hover {
            transform: scale(1.1);
        }

        .color-swatch.active {
            border-color: var(--color-primary);
            transform: scale(1.1);
        }

        /* Before/After Slider */
        .compare-container {
            position: relative;
            overflow: hidden;
            border-radius: 0.75rem;
            cursor: ew-resize;
            line-height: 0;
            /* Fix ghost spacing */
            max-width: 100%;
            margin: 0 auto;
        }

        .compare-img {
            width: 100%;
            height: auto;
            display: block;
        }

        .compare-container img {
            user-select: none;
            -webkit-user-drag: none;
        }

        .compare-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 50%;
            /* Initial split */
            height: 100%;
            overflow: hidden;
            border-right: 2px solid white;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        }

        .compare-overlay img {
            width: auto;
            /* Allow image to be full width of container */
            height: 100%;
            max-width: none;
            /* Prevent constraint inside overlay */
        }

        .slider-handle {
            position: absolute;
            top: 50%;
            left: 50%;
            /* Fixed: Match initial overlay width */
            transform: translate(-50%, -50%);
            width: 40px;
            height: 40px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
            z-index: 10;
            pointer-events: none;
            /* Let clicks pass to container */
        }

        /* Processing Overlay */
        .processing-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .processing-overlay.hidden {
            display: none !important;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 4px solid var(--color-border);
            border-top-color: var(--color-primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        .btn-primary {
            transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
        }

        .btn-primary:active {
            transform: translateY(0);
        }

        .btn-secondary {
            transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
        }

        .btn-secondary:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 10px -3px rgba(0, 0, 0, 0.12);
        }

        .btn-cta {
            transition: box-shadow 0.15s ease, filter 0.15s ease;
        }

        .btn-cta:hover {
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
        }

        .btn-cta[disabled] {
            opacity: 0.6;
            cursor: not-allowed;
            filter: grayscale(0.15);
        }

        .btn-cta[disabled]:hover {
            transform: none;
            box-shadow: none;
        }

        .btn-link {
            transition: color 0.15s ease;
        }

        .mode-btn {
            padding: 0.4rem 0.75rem;
            border-radius: 0.5rem;
            font-weight: 600;
            color: #4b5563;
            background: transparent;
            transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
        }

        .mode-btn.active {
            color: #111827;
            background: #ffffff;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
        }

        .mode-btn[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .mode-guide {
            max-width: 24rem;
            padding: 0.75rem;
            border: 1px solid #e5e7eb;
            border-radius: 0.75rem;
            background: #f9fafb;
            line-height: 1.45;
        }

        .compare-results {
            display: grid;
            gap: 0.5rem;
        }

        .compare-results.hidden {
            display: none;
        }

        .compare-result-btn {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            width: 100%;
            padding: 0.65rem 0.75rem;
            border: 1px solid #e5e7eb;
            border-radius: 0.75rem;
            background: #ffffff;
            color: #374151;
            font-size: 0.875rem;
            font-weight: 600;
            transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
        }

        .compare-result-btn:hover,
        .compare-result-btn.active {
            border-color: var(--color-primary);
            background: rgba(var(--color-primary-rgb), 0.06);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
        }

        .compare-result-btn[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .compare-result-meta {
            color: #6b7280;
            font-size: 0.75rem;
            font-weight: 500;
            white-space: nowrap;
        }

        .edge-strength {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            min-width: 200px;
        }

        .edge-strength.disabled {
            opacity: 0.5;
        }

        .btn-download,
        .btn-download:hover,
        .btn-download:visited,
        .btn-download:active {
            color: #fff;
            text-decoration: none;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

