body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  color: #333;
}

.input-box {
    border: 2px dashed #ccc;
    padding: 20px;
    min-height: 200px;
    position: relative;
    cursor: text;
    transition: 0.3s;
    background: #fafafa;
}

.input-box:hover {
  border-color: #888;
}

.input-box textarea {
    width: 100%;
    height: 200px;
    font-size: 16px;
    padding: 10px;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    display: block; /* 默认显示 */
}
.input-box.has-image textarea {
    display: none;
}
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

select {
  font-size: 16px;
  padding: 5px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.result-box {
  margin-top: 20px;
  padding: 15px;
  background: #f1f1f1;
  border-radius: 8px;
  min-height: 100px;
}

.preview-image {
  max-width: 100%;
  margin-top: 10px;
  display: none;
}

.loading-overlay {
  display: none; /* 默认隐藏 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 半透明黑色遮罩 */
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #f3f3f3;
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}