body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
  background-color: #f4f4f4;
}

#root {
  max-width: 800px;
  margin: 0 auto;
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1, h2 {
  color: #333;
}

form {
  display: flex;
  flex-direction: column;
}

input, select, textarea, button {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

button {
  background-color: #5cb85c;
  color: white;
  border: none;
  cursor: pointer;
}

button:hover {
  background-color: #4cae4c;
}

#generatedImage img {
  max-width: 100%;
  height: auto;
  margin-top: 20px;
}

#generationStatus {
  margin-top: 10px;
  font-weight: bold;
}

#loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-size: 24px;
}

#content {
  display: none;
}

.form-group {
  margin-bottom: 20px;
  width: 100%;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.image-preview {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

.image-inputs {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.image-inputs .form-group {
  width: 48%; /* Adjust this value as needed */
}

/* 添加更多的样式 */

.form-group textarea {
    width: 98%;
    min-height: 100px;
    resize: vertical;
}

.image-inputs {
    display: flex;
    justify-content: space-between;
}

.image-inputs .form-group {
    width: 48%;
}

.image-upload-container {
    width: 100%;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.image-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.image-upload-placeholder i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 10px;
}

.image-upload-placeholder p {
    margin: 0;
    color: #999;
}

/* ... 其他样式保持不变 ... */

/* 新增样式 */
#generateForm {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#generateForm > .form-group:not(.image-inputs) {
    width: 100%;
}

#generateForm > .image-inputs {
    width: 100%;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background-color: #f0f0f0;
    cursor: pointer;
}

.tab-button.active {
    background-color: #5cb85c;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

#batchOriginalImagesPreview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

#batchOriginalImagesPreview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.history-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.history-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-image {
    width: calc(33.33% - 10px);
    margin-bottom: 10px;
    position: relative;
    padding-top: 59.25%; /* 16:9 的反比例 */
}

.history-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination button {
    margin: 0 5px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
}

.pagination button:disabled {
    background-color: #ddd;
    cursor: not-allowed;
}

#batchGeneratedImages {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.batch-generated-image {
    width: calc(33.33% - 10px);
    position: relative;
    padding-top: 59.25%; /* 16:9 的反比例 */
    margin-bottom: 10px;
}

.batch-generated-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-preview-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* 确保图片上传输入框隐藏 */
.image-upload-container input[type="file"] {
    display: none;
}

/* 添加 workflow 描述的样式 */
.workflow-description {
    margin-top: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    display: none; /* 默认隐藏，只有选择了 workflow 才显示 */
}
