
       /* 新版布局样式 */
        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background-color: #f5f5f5;
            margin: 0;
            padding: 20px;
        }
        
        .container {
            max-width: 1600px;
            margin: 0 auto;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
            padding: 20px;
        }
        
        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 1px solid #eee;
        }
        
        .workspace {
            display: flex;
            gap: 20px;
            height: calc(100vh - 200px);
        }
        
        /* 边框素材区域 */
        .border-section {
            flex: 0 0 280px;
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0,0,0,0.05);
            padding: 15px;
            overflow-y: auto;
        }
        
        .border-section h2 {
            font-size: 18px;
            margin-top: 0;
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
        }
        
        .border-categories {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 15px;
        }
        
        .category-btn {
            flex: 1;
            min-width: 60px;
            padding: 8px 5px;
            background: #f0f0f0;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s;
        }
        
        .category-btn:hover {
            background: #e0e0e0;
        }
        
        .category-btn.active {
            background: #4CAF50;
            color: white;
        }
        
        .border-thumbnails {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
        
        .border-thumb {
            cursor: pointer;
            border-radius: 4px;
            overflow: hidden;
            border: 2px solid transparent;
            transition: all 0.3s;
        }
        
        .border-thumb:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        }
        
        .border-thumb.selected {
            border-color: #4CAF50;
        }
        
        .border-thumb img {
            width: 100%;
            height: auto;
            display: block;
        }
        
        .border-name {
            font-size: 11px;
            text-align: center;
            padding: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        /* 工作台区域 */
        .workbench {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0,0,0,0.05);
            padding: 15px;
        }
        
        .preview-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        
        .frame-wrapper {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #f9f9f9;
            border-radius: 8px;
            position: relative;
            overflow: hidden;
        }
        
        .loading-spinner {
            display: none;
            position: absolute;
            width: 40px;
            height: 40px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #4CAF50;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            z-index: 10;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .frame-container {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        #uploaded-image, #selected-border {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        
        .controls {
            margin-top: 15px;
            padding: 15px;
            background: #f9f9f9;
            border-radius: 8px;
        }
        
        .format-options {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }
        
        #download-btn {
            background-color: #4CAF50;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.3s;
            width: 100%;
        }
        
        #download-btn:hover {
            background-color: #45a049;
        }
        
        /* 操作面板区域 */
        .control-panel {
            flex: 0 0 320px;
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0,0,0,0.05);
            padding: 15px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }
        
        .upload-section {
            margin-bottom: 20px;
        }
        
        .upload-label {
            display: block;
            margin-bottom: 15px;
        }
        
        .upload-box {
            border: 2px dashed #ccc;
            border-radius: 8px;
            padding: 30px;
            text-align: center;
            transition: all 0.3s;
            cursor: pointer;
        }
        
        .upload-box.has-image {
            padding: 10px;
        }
        
        .upload-box:hover {
            border-color: #4CAF50;
        }
        
        .upload-icon {
            font-size: 48px;
            color: #ccc;
            margin-bottom: 10px;
        }
        
        .upload-box p {
            margin: 0;
            color: #777;
        }
        
        #image-upload {
            display: none;
        }
        
        .control-panel h2 {
            font-size: 18px;
            margin-top: 0;
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
        }
        
        .control-group {
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid #eee;
        }
        
        .control-group:last-child {
            border-bottom: none;
        }
        
        .control-group h3 {
            margin: 0 0 10px 0;
            font-size: 14px;
            color: #555;
        }
        
        .slider-control {
            margin-bottom: 10px;
        }
        
        .slider-control label {
            display: block;
            margin-bottom: 5px;
            font-size: 13px;
            color: #666;
        }
        
        .slider-control input[type="range"] {
            width: 100%;
            margin-bottom: 5px;
        }
        
        .slider-control .value-display {
            font-size: 12px;
            color: #4CAF50;
            text-align: right;
        }
        
        .filter-options {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }
        
        .filter-btn {
            padding: 8px 5px;
            background: #f0f0f0;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            text-align: center;
            transition: all 0.3s;
        }
        
        .filter-btn:hover {
            background: #e0e0e0;
        }
        
        .filter-btn.active {
            background: #4CAF50;
            color: white;
        }
        
        /* 响应式调整 */
        @media (max-width: 1200px) {
            .workspace {
                flex-direction: column;
                height: auto;
            }
            
            .border-section, .control-panel {
                flex: 1 1 auto;
                width: 100%;
            }
        }