        /* 全局样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }
        
        /* 主容器 */
        .container {
            display: flex;
            height: calc(100vh - 120px);
            overflow: hidden;
            margin: 0 auto;
            max-width: 1200px;
        }
        
        /* 左侧边栏 */
        .sidebar {
            width: 280px;
            background: white;
            border-right: 1px solid #eee;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }
        
        .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid #eee;
        }
        
        .sidebar-header h2 {
            font-size: 1.5rem;
            margin-bottom: 10px;
        }
        
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }
        
        /* 分类列表 */
        .categories {
            flex: 1;
            padding: 10px;
            overflow-y: auto;
        }
        
        .category-item {
            padding: 12px 16px;
            margin-bottom: 8px;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .category-item:hover {
            background-color: #f0f2f5;
        }
        
        .category-item.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .category-name {
            flex: 1;
        }
        
        .category-count {
            background: rgba(255, 255, 255, 0.2);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.8rem;
            min-width: 24px;
            text-align: center;
        }
        
        .category-item.active .category-count {
            background: rgba(255, 255, 255, 0.3);
        }
        
        .category-actions {
            display: flex;
            gap: 5px;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        
        .category-item:hover .category-actions {
            opacity: 1;
        }
        
        .btn-small {
            padding: 4px 8px;
            font-size: 0.8rem;
            background: transparent;
            border: 1px solid #ddd;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .category-item.active .btn-small {
            border-color: rgba(255, 255, 255, 0.5);
            color: white;
        }
        
        .btn-small:hover {
            background: #f0f2f5;
        }
        
        .category-item.active .btn-small:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        
        /* 右侧主内容区 */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        /* 顶部操作栏 */
        .main-header {
            padding: 20px;
            background: white;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .main-title {
            font-size: 1.5rem;
        }
        
        .header-actions {
            display: flex;
            gap: 10px;
        }
        
        .btn-secondary {
            background: #f0f2f5;
            color: #333;
        }
        
        .btn-secondary:hover {
            background: #e4e6eb;
        }
        
        /* 图片上传区域 */
        .upload-section {
            padding: 30px;
            background: white;
            margin: 20px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            text-align: center;
        }
        
        .upload-area {
            border: 2px dashed #ddd;
            border-radius: 10px;
            padding: 40px;
            transition: all 0.2s ease;
            cursor: pointer;
        }
        
        .upload-area:hover {
            border-color: #667eea;
            background: #f8f9ff;
        }
        
        .upload-area.dragover {
            border-color: #667eea;
            background: #e8eeff;
        }
        
        .upload-icon {
            font-size: 3rem;
            color: #667eea;
            margin-bottom: 20px;
        }
        
        .upload-text {
            font-size: 1.1rem;
            margin-bottom: 15px;
            color: #666;
        }
        
        .upload-hint {
            font-size: 0.9rem;
            color: #999;
        }
        
        /* 隐藏的文件输入 */
        #image-upload {
            display: none;
        }
        
        /* 图片库 */
        .gallery-section {
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            margin: 0 20px 20px 20px;
            padding: 20px;
            overflow: hidden;
        }
        
        .gallery-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .gallery-title {
            font-size: 1.2rem;
        }
        
        .gallery-info {
            font-size: 0.9rem;
            color: #666;
        }
        
        /* 图片网格 */
        .gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
            overflow-y: auto;
            max-height: calc(100vh - 400px);
        }
        
        /* 图片项 */
        .gallery-item {
            background: #fafafa;
            border: 1px solid #eee;
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.2s ease;
            display: flex;
            flex-direction: column;
            position: relative;
            height: auto;
        }
        
        .gallery-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        }
        
        .item-checkbox {
            position: absolute;
            top: 10px;
            left: 10px;
            z-index: 10;
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        
        .item-image-container {
            position: relative;
            width: 100%;
            aspect-ratio: 1 / 1;
            overflow: hidden;
            background: #f0f0f0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .item-image {
            width: 100%;
            height: 100%;
            object-fit: contain;
            cursor: pointer;
            transition: transform 0.3s ease;
        }
        
        .gallery-item:hover .item-image {
            transform: scale(1.05);
        }
        
        .item-info {
            padding: 15px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        
        .item-name {
            font-weight: 500;
            margin-bottom: 5px;
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .item-meta {
            font-size: 0.8rem;
            color: #666;
            margin-top: auto;
        }
        
        .item-actions {
            margin-top: 10px;
            display: flex;
            gap: 5px;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        
        .gallery-item:hover .item-actions {
            opacity: 1;
        }
        
        /* 空状态 */
        .empty-state {
            text-align: center;
            padding: 50px 20px;
            color: #999;
        }
        
        .empty-icon {
            font-size: 4rem;
            margin-bottom: 20px;
        }
        
        /* 底部操作栏 */
        .bottom-actions {
            padding: 15px 20px;
            background: white;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .selected-info {
            font-size: 0.9rem;
            color: #666;
        }
        
        /* 模态框 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        
        .modal-content {
            background: white;
            padding: 30px;
            border-radius: 10px;
            width: 90%;
            max-width: 500px;
            max-height: 80vh;
            overflow-y: auto;
        }
        
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .modal-title {
            font-size: 1.3rem;
        }
        
        .close-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: #666;
        }
        
        .close-btn:hover {
            color: #333;
        }
        
        /* 表单样式 */
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }
        
        .form-input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
        }
        
        .form-textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
            resize: vertical;
            min-height: 100px;
        }
        
        /* 预览模态框 */
        .preview-modal .modal-content {
            width: 90%;
            max-width: 800px;
        }
        
        .preview-content {
            text-align: center;
        }
        
        .preview-image {
            max-width: 100%;
            max-height: 60vh;
            object-fit: contain;
            border-radius: 5px;
        }
        
        /* 加载状态 */
        .loading {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 40px;
            color: #667eea;
        }
        
        /* 进度条 */
        .progress-container {
            margin: 0 20px;
        }
        
        .progress-bar {
            width: 100%;
            height: 8px;
            background: #f0f2f5;
            border-radius: 4px;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 4px;
            transition: width 0.3s ease;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .container {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                height: 200px;
            }
            
            .gallery {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 15px;
            }
        }