/* styles.css */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
  color: white;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

main {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

section {
  margin-bottom: 30px;
}

section h3 {
  color: #4a5568;
  margin-bottom: 15px;
  font-size: 1.3rem;
}



/* 上传区域样式 */
.upload-area {
  border: 3px dashed #cbd5e0;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f7fafc;
}

.upload-area:hover {
  border-color: #667eea;
  background: #edf2f7;
}

.upload-area.dragover {
  border-color: #667eea;
  background: #e6fffa;
  transform: scale(1.02);
}

.upload-content .upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.upload-content p {
  color: #718096;
  font-size: 1.1rem;
}

.file-info {
  margin-top: 15px;
  padding: 12px;
  background: #e6fffa;
  border-radius: 8px;
  border-left: 4px solid #38b2ac;
}

.file-info p {
  color: #2d3748;
  font-weight: 500;
}

/* 批量文件列表样式 */
.batch-files {
  margin-top: 20px;
  padding: 20px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.batch-files h4 {
  margin-bottom: 15px;
  color: #2d3748;
  font-size: 1.1rem;
}

.file-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.file-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-item.processing {
  border-color: #667eea;
  background: #edf2f7;
}

.file-item.success {
  border-color: #48bb78;
  background: #f0fff4;
}

.file-item.error {
  border-color: #f56565;
  background: #fed7d7;
}

.file-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-item-name {
  font-weight: 500;
  color: #2d3748;
}

.file-item-status {
  font-size: 0.9rem;
  color: #718096;
}

.file-item-result {
  font-size: 0.85rem;
  color: #4a5568;
  margin-top: 4px;
}

.file-item-actions {
  display: flex;
  gap: 8px;
}

.file-item-actions button {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-remove {
  background: #fed7d7;
  color: #c53030;
}

.btn-remove:hover {
  background: #feb2b2;
}

.batch-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-outline {
  background: transparent;
  border: 2px solid #e2e8f0;
  color: #4a5568;
}

.btn-outline:hover {
  border-color: #cbd5e0;
  background: #f7fafc;
}

/* 按钮样式 */
.actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 30px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  color: #718096;
  font-size: 1.1rem;
}

/* 结果显示样式 */
.result-card {
  background: #f7fafc;
  border-radius: 12px;
  padding: 25px;
  border: 1px solid #e2e8f0;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
  border-bottom: none;
}

.result-item label {
  font-weight: 600;
  color: #2d3748;
  min-width: 80px;
}

.result-item span {
  color: #4a5568;
  font-size: 1.1rem;
  text-align: right;
  flex: 1;
}

/* 错误信息样式 */
.error {
  margin-top: 20px;
}

.error-message {
  background: #fed7d7;
  border: 1px solid #feb2b2;
  border-radius: 8px;
  padding: 15px;
  color: #c53030;
  font-weight: 500;
}




/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  header h1 {
    font-size: 2rem;
  }

  main {
    padding: 20px;
  }

  .actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 200px;
  }

}

/* 批量文件管理样式 */
.batch-files {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.batch-files h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 1.1rem;
}

.file-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  margin-bottom: 10px;
  background: white;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.file-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-name {
  font-weight: 500;
  color: #2d3748;
  font-size: 0.95rem;
}

.file-details {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #718096;
}

.file-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.pending {
  background-color: #fbbf24;
}

.status-indicator.processing {
  background-color: #3b82f6;
  animation: pulse 1.5s infinite;
}

.status-indicator.success {
  background-color: #10b981;
}

.status-indicator.error {
  background-color: #ef4444;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.file-result {
  margin-top: 8px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.85rem;
  border-left: 3px solid #10b981;
}

.file-result.error {
  border-left-color: #ef4444;
  background: #fef2f2;
  color: #dc2626;
}



.batch-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* 底部作者信息 */
.footer {
  margin-top: 40px;
  text-align: center;
  color: white;
  opacity: 0.8;
}

.footer-content {
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.footer .author-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.footer .wechat-info {
  color: #fff;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .footer .author-info {
    flex-direction: column;
    gap: 0.25rem;
  }
}