/* 基础样式 */
* {
  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 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  margin-bottom: 30px;
  padding: 30px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.logo {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.logo:hover {
  transform: scale(1.05);
}

/* 光影刷过效果 */
.logo-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.6),
    transparent
  );
  transition: left 0.6s ease;
  z-index: 2;
  pointer-events: none;
}

.logo-container:hover::before {
  left: 100%;
}

.header-text {
  text-align: left;
}

header h1 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 10px;
  font-weight: 700;
}

header p {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin: 0;
}

/* API配置区域 */
.config-section {
  background: #f8f9fa;
  color: #2c3e50;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.config-section h2 {
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-weight: 500;
}

.config-section .input-group input {
  background: #ffffff;
  border: 1px solid #dee2e6;
  color: #333;
  border-radius: 4px;
  padding: 10px 12px;
}

.config-section .input-group input:focus {
  background: white;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.save-config-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 0.95rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  width: 100%;
}

.save-config-btn:hover:not(:disabled) {
  background: #2980b9;
  transform: translateY(-1px);
}

.save-config-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
}

/* 已配置状态显示 */
.config-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(46, 204, 113, 0.1);
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  border-left: 4px solid #2ecc71;
}

.config-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.config-info span {
  color: #27ae60;
  font-weight: 600;
}

/* 余额显示 */
.balance-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 15px;
  font-size: 0.9rem;
}

.balance-label {
  color: #7f8c8d;
  font-weight: 500;
}

.balance-value {
  color: #2980b9;
  font-weight: 600;
  min-width: 50px;
}

.refresh-balance-btn {
  background: none;
  border: none;
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #7f8c8d;
  transition: all 0.3s ease;
  padding: 0;
  border-radius: 50%;
}

.refresh-balance-btn:hover:not(:disabled) {
  color: #2980b9;
  transform: rotate(90deg);
}

.refresh-balance-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.change-config-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s;
}

.change-config-btn:hover {
  background: #c0392b;
}

/* Loading动画 */
.loading-spinner {
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(127, 140, 141, 0.3);
  border-top: 1.5px solid #7f8c8d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 通知设置 */
.notification-setting {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(155, 89, 182, 0.1);
  border-radius: 15px;
  font-size: 0.9rem;
}

.notification-label {
  color: #7f8c8d;
  font-weight: 500;
}

.notification-toggle {
  background: none;
  border: none;
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: #9b59b6;
  transition: all 0.3s ease;
  background: rgba(155, 89, 182, 0.1);
}

.notification-toggle:hover:not(:disabled) {
  background: rgba(155, 89, 182, 0.2);
  color: #8e44ad;
}

.notification-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.notification-toggle.granted {
  background: rgba(46, 204, 113, 0.1);
  color: #27ae60;
}

.notification-toggle.granted:hover:not(:disabled) {
  background: rgba(46, 204, 113, 0.2);
}

.notification-toggle.denied {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .header-text {
    text-align: center;
  }

  .logo {
    width: 100px;
    height: 100px;
    border-radius: 12px;
  }

  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1rem;
  }

  .config-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .balance-display,
  .notification-setting {
    font-size: 0.85rem;
  }
}

/* 自定义下拉框样式 */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: white;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 50px;
}

.custom-select:hover {
  border-color: #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.selected-model {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.model-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 1rem;
}

.model-price {
  background: #3498db;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 10px;
}

.select-arrow {
  color: #7f8c8d;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  margin-left: 10px;
}

.select-arrow.open {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e1e8ed;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: -2px;
}

.custom-option {
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f8f9fa;
}

.custom-option:hover {
  background: rgba(52, 152, 219, 0.1);
  color: #2c3e50;
}

.custom-option:hover .option-price {
  background: #3498db;
  color: white;
}

.custom-option.selected {
  background: rgba(52, 152, 219, 0.1);
  border-left: 4px solid #3498db;
}

.option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.option-name {
  font-weight: 600;
  font-size: 1rem;
}

.option-price {
  background: #3498db;
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.option-description {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-top: 3px;
}

.custom-option:hover .option-description {
  color: #7f8c8d;
}

/* 表单区域 */
.form-section {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

.input-group textarea {
  min-height: 100px;
  resize: vertical;
}

.button-group {
  display: flex;
  gap: 15px;
}

.generate-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 14px 25px;
  font-size: 1.1rem;
  border-radius: 5px;
  cursor: pointer;
  flex: 1;
  font-weight: 600;
  transition: background 0.3s;
}

.generate-btn:hover:not(:disabled) {
  background: #2980b9;
}

.generate-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

.reset-btn {
  background: #95a5a6;
  color: white;
  border: none;
  padding: 14px 25px;
  font-size: 1.1rem;
  border-radius: 5px;
  cursor: pointer;
  width: 120px;
  font-weight: 600;
  transition: background 0.3s;
}

.reset-btn:hover:not(:disabled) {
  background: #7f8c8d;
}

.reset-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

.add-to-reference-btn {
  background: #9b59b6;
  color: white;
  border: none;
  padding: 14px 25px;
  font-size: 1.1rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.add-to-reference-btn:hover:not(:disabled) {
  background: #8e44ad;
}

.add-to-reference-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

/* 生成时间显示 */
.generate-time {
  margin-left: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

/* 生成按钮内的加载状态 */
.generate-btn span[x-show="isGenerating"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.generate-btn .spinner {
  width: 20px;
  height: 20px;
  border-width: 3px;
  margin: 0;
}

/* 参考图管理样式 */
.reference-images-container {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 15px;
  background: #f8f9fa;
  transition: all 0.3s;
}

.reference-images-container.drag-over {
  border-color: #3498db;
  background: rgba(52, 152, 219, 0.1);
  transform: scale(1.02);
}

.drag-hint {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.drag-hint p {
  margin: 0;
}

.upload-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.upload-btn {
  padding: 8px 16px;
  border: 1px solid #3498db;
  background: white;
  color: #3498db;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.upload-btn:hover {
  background: #3498db;
  color: white;
}

.reference-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.reference-image-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: move;
  transition: transform 0.2s;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reference-image-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.reference-image-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  cursor: pointer;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 5px;
  opacity: 0;
  transition: opacity 0.3s;
}

.reference-image-item:hover .image-overlay {
  opacity: 1;
}

.delete-btn {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.delete-btn:hover {
  background: #c0392b;
}

.image-number {
  background: #3498db;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
}

/* 上传进度条 */
.upload-progress {
  margin-top: 10px;
}

.progress-bar {
  height: 10px;
  background: #ecf0f1;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 5px;
}

.progress-fill {
  height: 100%;
  background: #3498db;
  transition: width 0.3s;
}

/* 上传加载动画 */
.upload-loading {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 5px;
}

.upload-loading .spinner {
  width: 20px;
  height: 20px;
  border-width: 3px;
}

.upload-loading span {
  color: #3498db;
  font-size: 0.9rem;
  font-weight: 500;
}

/* 结果区域 */
.result-section {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.result-section h2 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.image-container {
  text-align: center;
  margin-bottom: 20px;
}

.image-container img {
  max-width: 100%;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
}

.actions button:first-child {
  background: #2ecc71;
  color: white;
}

.actions button:last-child {
  background: #f39c12;
  color: white;
}

.actions button:hover {
  opacity: 0.9;
}

/* 历史记录区域 */
.history-section {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.history-section h2 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.history-item {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
  position: relative;
}

.history-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.delete-history-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(231, 76, 60, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}

.history-item:hover .delete-history-btn {
  opacity: 1;
}

.delete-history-btn:hover {
  background: rgba(192, 57, 43, 0.9);
}

.history-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.history-info {
  padding: 10px;
}

.history-info p {
  font-size: 0.9rem;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-info small {
  color: #7f8c8d;
}

.empty-history {
  text-align: center;
  padding: 30px;
  color: #7f8c8d;
}

/* 异步任务进度显示 */
.task-progress-section {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.task-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cancel-task-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cancel-task-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.cancel-task-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(231, 76, 60, 0.3);
}

/* 轮询指示器 */
.polling-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.polling-indicator.active {
    opacity: 1;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #3498db;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.task-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f1f1;
}

.info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-label {
    font-weight: 500;
    opacity: 0.9;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 600;
    text-align: right;
}

.task-id {
    font-family: monospace;
    font-size: 0.8rem;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-all;
}

/* 状态徽章 */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-preparing {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.status-in-progress {
    background: #3498db;
    color: white;
    animation: blink 1s infinite;
}

.status-success {
    background: #2ecc71;
    color: white;
}

.status-failure {
    background: #e74c3c;
    color: white;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #CDDC39);
    border-radius: 5px;
    transition: width 0.5s ease;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-weight: bold;
    font-size: 16px;
    min-width: 50px;
    text-align: right;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 进度步骤 */
.progress-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.4;
    transition: all 0.3s ease;
    flex: 1;
}

.progress-step.active {
    opacity: 1;
    transform: scale(1.05);
}

.progress-step.active .step-icon {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
    animation: bounce 0.6s ease;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.progress-step span {
    font-size: 0.8rem;
    text-align: center;
    font-weight: 500;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

.task-hint {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 10px;
    color: #2c3e50;
}

.task-hint small {
    font-size: 0.85rem;
    color: #2c3e50;
    display: block;
    line-height: 1.4;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .task-progress-section {
        padding: 15px;
    }
    
    .task-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .polling-indicator {
        align-self: flex-end;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .info-value {
        text-align: left;
    }
    
    .progress-details {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .progress-step {
        min-width: 70px;
    }
    
    .step-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-section,
    .result-section,
    .history-section {
        padding: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group button {
        width: 100%;
    }
    
    .history-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .task-progress-section {
        padding: 12px;
    }
    
    .task-info p {
        font-size: 12px;
    }
}

/* 加载动画 */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 提示信息 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 5px;
  color: white;
  background-color: #2ecc71;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transform: translateX(200%);
  transition: transform 0.3s ease-in-out;
}

.notification.show {
  transform: translateX(0);
}

.notification.error {
  background-color: #e74c3c;
}


/* 拖拽时的视觉反馈 */
.reference-image-item.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .reference-images-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .reference-image-item img {
    height: 100px;
  }
  
  .upload-controls {
    flex-direction: column;
  }
}
