/* ── 全局字体 ── */
body {
  font-family: "Heiti SC", "STHeiti", "SimHei", "黑体",
               "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
}

/* ── 上传拖拽区域 ── */
.drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  background: #f9fafb;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
}

.drop-zone:hover {
  border-color: #a78bfa;
  background: #f5f3ff;
}

.drop-zone.dragover {
  border-color: #8b5cf6;
  background: #ede9fe;
}

.drop-zone.selected {
  border-color: #a78bfa;
  background: #faf5ff;
  border-style: solid;
}

.drop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}
.drop-icon svg { width: 22px; height: 22px; }
.drop-zone:hover .drop-icon svg { color: #a78bfa; }
.drop-zone.selected .drop-icon svg { color: #7c3aed; }

.drop-hint {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  word-break: break-all;
  text-align: center;
  max-width: 100%;
  padding: 0 4px;
}

.drop-zone.selected .drop-hint {
  color: #7c3aed;
  font-weight: 600;
}

.drop-zone.edit-existing {
  border-color: #d97706;
  background: #fffbeb;
  border-style: dashed;
  position: relative;
}

.drop-zone.edit-existing .drop-hint {
  color: #92400e;
  font-weight: 600;
}

.drop-zone.edit-deleted {
  border-color: #ef4444;
  background: #fef2f2;
  border-style: dashed;
  position: relative;
}

.drop-zone.edit-deleted .drop-hint {
  color: #dc2626;
  font-weight: 600;
}

.zone-delete-btn {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 18px;
  height: 18px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10;
}

.zone-delete-btn:hover { background: #dc2626; }

.zone-undo-btn {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 18px;
  height: 18px;
  background: #6b7280;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10;
}

.zone-undo-btn:hover { background: #4b5563; }

/* ── 配色预设 chip ── */
.preset-chip {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
.preset-chip:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}
.preset-chip.active {
  border-color: #8b5cf6;
  background: #f5f3ff;
  color: #7c3aed;
}

/* ── 旋转进度动画 ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e5e7eb;
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

/* ── 进度条动画 ── */
.progress-bar {
  width: 30%;
  animation: progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes progress-indeterminate {
  0%   { width: 10%; margin-left: 0; }
  50%  { width: 50%; margin-left: 30%; }
  100% { width: 10%; margin-left: 90%; }
}

/* ── 滚动条美化（Webkit） ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
