/* 主样式文件 - Cloudflare 静态版本 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f5f7fa;
  font-family: sans-serif;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.title {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 28px;
}

.module {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.module-title {
  color: #222;
  font-size: 20px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* 上传区域样式 */
.upload-area {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-btn {
  padding: 8px 16px;
  background-color: #409eff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.upload-btn:hover {
  background-color: #337ecc;
}

.upload-tips {
  font-size: 12px;
  color: #666;
}

/* 图片选择区样式 */
.image-list {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.image-item {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #eee;
  transition: all 0.3s ease;
}

.image-item:hover {
  border-color: #409eff;
  transform: scale(1.05);
}

.image-item.active {
  border-color: #409eff;
  box-shadow: 0 0 0 2px rgba(64,158,255,0.2);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 设计器布局容器 */
.designer-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* 中间：设计器主区域 */
.designer-main {
  flex: 1;
  min-width: 0;
}

/* 右侧：预览侧边栏 */
.designer-sidebar {
  width: 300px;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* 功能按钮组样式 - 放在设计器下方 */
.canvas-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.func-btn {
  padding: 6px 12px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s;
}

.func-btn:hover {
  background-color: #e8f4ff;
  border-color: #409eff;
  color: #409eff;
}

/* 提示文本样式 */
.tips {
  font-size: 14px;
  color: #666;
}

/* 状态提示样式 */
.status {
  padding: 12px;
  border-radius: 6px;
  background-color: #f5f5f5;
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  text-align: center;
}

.status.success {
  background-color: #d4edda;
  color: #155724;
}

.status.error {
  background-color: #f8d7da;
  color: #721c24;
}

.status.loading {
  background-color: #e3f2fd;
  color: #0d6efd;
}

/* SDK 容器样式 */
.preview-container {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  min-height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f9f9f9;
}

.design-container {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 15px;
  min-height: 400px;
  background-color: #f9f9f9;
}
