
        :root {
            --primary-dark: #1a1a2e;
            --secondary-dark: #16213e;
            --tertiary-dark: #0f3460;
            --accent: #00d4ff;
            --danger: #e74c3c;
            --success: #27ae60;
        }
      .btn-reorder:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

    .layer-item.locked {
        opacity: 0.5;
        cursor: not-allowed;
    }
    .layer-item.hidden {
        opacity: 0.3;
        text-decoration: line-through;
    }
    .layer-toggle-btn {
        background: none;
        border: none;
        padding: 2px 5px;
        cursor: pointer;
        font-size: 14px;
        color: #666;
    }
    .layer-toggle-btn:hover {
        color: #000;
    }
    .layer-toggle-btn.active {
        color: #007bff;
    }
    .opacity-indicator {
        width: 30px;
        height: 4px;
        background: linear-gradient(to right, transparent, currentColor);
        display: inline-block;
        margin-left: 5px;
        vertical-align: middle;
    }
    .snap-guide {
        position: absolute;
        background: #00d4ff;
        pointer-events: none;
        z-index: 1000;
    }
    .snap-guide.vertical {
        width: 1px;
        height: 100%;
        top: 0;
    }
    .snap-guide.horizontal {
        width: 100%;
        height: 1px;
        left: 0;
    }
    .undo-redo-btns {
        display: flex;
        gap: 5px;
        margin-bottom: 10px;
    }
    .align-tools {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        margin-top: 10px;
    }
    .align-btn {
        padding: 5px;
        font-size: 12px;
        background: #f0f0f0;
        border: 1px solid #ccc;
        cursor: pointer;
        border-radius: 3px;
    }
    .align-btn:hover {
        background: #e0e0e0;
    }  
        .modal-backdrop {
                display: none!important;
        }
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: var(--primary-dark);
            color: #eee;
            overflow: hidden;
            height: 100vh;
        }
        
        .main-container {
            display: flex;
            height: calc( 100vh - 46px );
            width: 100%;
        }
        
        /* Sidebar */
        .sidebar {
            xmargin-top: 46px;
            margin-bottom: 46px;
            background: var(--neo-body-bg-color);
            width: 320px;
            height: calc( 100vh - 46px );
            overflow-y: auto;
            padding: 10px;
            z-index: 1000;
            transition: transform 0.3s ease;
        }
        
        .sidebar h2 {
            margin-bottom: 15px;
            color: #fff;
            font-size: 18px;
            margin-top: 15px;
        }
        
        .sidebar h2:first-child {
            margin-top: 0;
        }
        
        .control-group {
            margin-bottom: 15px;
        }
        
        .control-group label {
            display: block;
            margin-bottom: 6px;
            font-size: 13px;
            color: #aaa;
        }
        
        .control-group input[type="text"],
        .control-group input[type="number"],
        .control-group input[type="color"],
        .control-group input[type="range"],
        .control-group select {
            width: 100%;
            padding: 8px;
            xborder: 1px solid var(--tertiary-dark);
            xbackground: var(--tertiary-dark);
            xcolor: #fff;
            border-radius: 5px;
            font-size: 13px;
        }
        
        .control-group input[type="range"] {
            padding: 0;
        }
        
        .control-group input[type="file"] {
            width: 100%;
            padding: 8px;
            xbackground: var(--tertiary-dark);
            xborder: 1px solid var(--tertiary-dark);
            border-radius: 5px;
            color: #fff;
            cursor: pointer;
            font-size: 12px;
        }
        
        .control-group button {
            width: 100%;
            padding: 10px;
            xbackground: var(--neo-bg-dark);
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            font-size: 13px;
            transition: background 0.3s;
        }
        
        .control-group button:hover {
            xbackground: var(--neo-bg-light);
        }
        
        .control-group button.btn-danger {
            xbackground: var(--danger);
            xcolor: #fff;
        }
        
        .control-group button.btn-danger:hover {
            xbackground: #c0392b;
        }
        
        .control-group button.btn-success {
            xbackground: var(--success);
            color: #fff;
            font-size: 15px;
            padding: 12px;
        }
        
        .control-group button.btn-success:hover {
            xbackground: #229954;
        }
        
        /* Canvas Area */
        .canvas-area {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            background: var(--neo-bg-dark);
            padding: 20px;
            overflow: auto;
            position: relative;
        }
        
        #coverCanvas {
            border: 2px solid var(--neo-bg-light);
            box-shadow: 0 10px 40px rgba(150, 150, 150, 0.3);
            cursor: default;
            background: #fff;
            display: block;
            max-width: 100%;
            height: auto; 
                max-height: calc(100vh - 100px);
            
        }
        
        /* Mobile Hamburger Button */
        .hamburger-btn {
            display: none;
            position: fixed;
            top: 80px;
            left: 20px;
            z-index: 1001;
            background: var(--accent);
            color: #000;
            border: none;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 18px;
            font-weight: bold;
        }
        
        /* FAB - Download Button */
        .fab-download {
            display: none;
            position: fixed;
            bottom: 30px;
            right: 30px;
            z-index: 900;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: var(--success);
            color: white;
            border: none;
            cursor: pointer;
            font-size: 24px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            transition: transform 0.3s;
        }
        
        .fab-download:hover {
            transform: scale(1.1);
        }
        
        /* Sidebar Overlay (Mobile) */
        .sidebar-overlay {

            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }
        
        .close-sidebar-btn {
            display: none;
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            color: var(--accent);
            font-size: 28px;
            cursor: pointer;
        }
        
        .layers-list {
            max-height: 500px;
            overflow-y: auto;
            margin-bottom: 6px;
        }
        
        .layer-item {
            background: var(--tertiary-dark);
            padding: 5px 6px 5px 4px;
            margin-bottom: 6px;
            border-radius: 5px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            border: 2px solid transparent;
            font-size: 13px;
        }
        
        .layer-item.active {
            border-color: var(--accent);
        }
        
        .layer-item:hover {
            background: #1a4d7a;
        }
        
        .layer-item button {
            padding: 4px 8px;
            background: var(--danger);
            color: #fff;
            border: none;
            border-radius: 3px;
            cursor: pointer;
            font-size: 11px;
            margin-left: 0px;
        }
        .layer-buttons .layer-toggle-btn {
            background: transparent;
            padding-left: 1px; padding-right: 3px;
        }
        
        .layer-item .layer-buttons {
            display: flex;
            gap: 1px;
        }
        
        .layer-item button.btn-reorder {
            background: var(--accent);
            color: #000;
            padding: 4px 6px;
            font-size: 10px;
            font-weight: bold;
        }
        
        .layer-item button.btn-reorder:hover {
            background: #00a8cc;
        }
        
        .layer-item .layer-type {
            background: var(--neo-bg-dark);
            color: #fff;
            padding: 2px 6px;

            border-radius: 3px;
            font-size: 14px;
            margin-right: 6px;
            font-weight: bold;
        }
        
        .layer-item.bg-layer {
            background: #1a4d7a;
        }
        
        .layer-item.bg-layer .layer-type {
            background: #f39c12;
        }
        
        .divider {
            height: 1px;
            background: var(--tertiary-dark);
            margin: 15px 0;
        }
        
        .info {
            background: var(--neo-bg-light);
            padding: 8px;
            border-radius: 5px;
            font-size: 11px;
            color: #aaa;
            margin-top: 10px;
        }
        
        .range-value {
            display: inline-block;
            background: var(--tertiary-dark);
            padding: 2px 8px;
            border-radius: 3px;
            font-size: 12px;
            margin-left: 8px;
        }
        
        .checkbox-group {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
        }
        
        .checkbox-group input[type="checkbox"] {
            width: auto;
        }
        
        .stroke-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 10px;
        }
        
        .zoom-controls {
            display: flex;
            gap: 8px;
            margin-bottom: 15px;
        }
        
        .zoom-controls button {
            flex: 1;
            padding: 8px;
            font-size: 12px;
        }
        
        .zoom-value {
            text-align: center;
            font-size: 12px;
            color: #aaa;
            padding: 6px 0;
        }
        
        /* Mobile Responsive */
        @media (max-width: 768px) {
            .main-container {
                flex-direction: column;
            }
            
            .sidebar {

                margin-top: 46px;
                position: fixed;
                left: 0;
                top: 0;
                xheight: 100vh;
                width: 85%;
                max-width: 320px;
                transform: translateX(-100%);
                box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
            }
            
            .sidebar.active {
                transform: translateX(0);
            }
            
            .sidebar-overlay.active {
                display: block;
            }
            
            .hamburger-btn {
                display: block;
            }
            
            .close-sidebar-btn {
                display: block;
            }
            
            .canvas-area {
                width: 100%;
                height: 100vh;
                padding: 60px 15px 20px 15px;
            }
            
            .fab-download {
                display: flex;
                justify-content: center;
                align-items: center;
            }
            
            #coverCanvas {
                max-width: 100%;
                max-height: calc(100vh - 100px);
            }
        }

        
/* Saved Designs Container */
.saved-designs-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--tertiary-dark);
    border-radius: 5px;
    padding: 6px;
    background: var(--neo-bg-dark);
}

.saved-design-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: var(--tertiary-dark);
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 12px;
}

.saved-design-item:last-child {
    margin-bottom: 0;
}

.saved-design-item .design-info {
    flex: 1;
}

.saved-design-item h5 {
    margin: 0;
    font-size: 13px;
    color: #fff;
    word-break: break-word;
}

.saved-design-item small {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.saved-design-item .design-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.saved-design-item .btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
    white-space: nowrap;
}

        .image-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }
        .image-thumbnail {
            cursor: pointer;
            border-radius: 8px;
            overflow: hidden;
            aspect-ratio: 1;
            transition: transform 0.2s;
        }
        .image-thumbnail:hover {
            transform: scale(1.05);
        }
        .image-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }