/**
 * Popup样式文件
 * 采用现代简洁的设计风格
 */

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

body {
  width: 800px;
  min-height: 600px;
  max-height: 600px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #2c3e50;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow-x: hidden;
  overflow-y: auto;
}

.container {
  background: #fff;
  border-radius: 16px;
  margin: 16px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 头部 */
.header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 3px solid #f0f4ff;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-radius: 12px;
  padding: 24px 20px;
}

.title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* 更新提示横幅 */
.update-banner {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
  animation: slideDown 0.4s ease-out;
}

.update-banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.update-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

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

.update-title {
  color: white;
  font-size: 16px;
  font-weight: 700;
}

.update-version {
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 500;
}

.btn-update {
  padding: 10px 20px;
  background: white;
  color: #059669;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-update:hover {
  background: #f0fdf4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-close-update {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-update:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* 站点快捷访问区域 */
.sites-section {
  margin-bottom: 24px;
}

.sites-section details {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 16px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.sites-section details[open] {
  background: white;
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.sites-section summary {
  font-weight: 700;
  color: #667eea;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sites-section summary:hover {
  color: #5568d3;
  background: rgba(102, 126, 234, 0.08);
  transform: translateX(4px);
}

.sites-section summary::marker {
  color: #667eea;
}

.sites-content {
  margin-top: 16px;
}

.search-box {
  margin-bottom: 16px;
}

.site-search-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #fff;
  color: #2c3e50;
}

.site-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.site-search-input::placeholder {
  color: #94a3b8;
}

.bestsellers-option {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-radius: 10px;
  border: 2px solid rgba(102, 126, 234, 0.15);
  transition: all 0.3s ease;
}

.bestsellers-option:hover {
  border-color: rgba(102, 126, 234, 0.3);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #2c3e50;
  user-select: none;
  font-weight: 500;
}

.checkbox-label input[type='checkbox'] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
  flex-shrink: 0;
}

.checkbox-label span {
  font-weight: 600;
}

.checkbox-label:hover {
  color: #667eea;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.sites-grid::-webkit-scrollbar {
  width: 8px;
}

.sites-grid::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.sites-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.sites-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
}

.site-btn {
  padding: 16px 12px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 13px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 90px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.site-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.site-btn-flag {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.site-btn-code {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.site-btn-name {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  font-weight: 500;
}

.site-btn:hover .site-btn-name {
  color: rgba(255, 255, 255, 0.95);
}

.site-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-color: #10b981;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  animation: pulse-glow 2s infinite;
}

.site-btn.active .site-btn-name,
.site-btn.active .site-btn-code {
  color: white;
}

.site-btn.active:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-4px) scale(1.02);
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
  }
}

/* 页面信息区域 */
.page-info-section {
  margin-bottom: 24px;
}

.page-info-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  border-radius: 14px;
  padding: 20px;
  border: 2px solid #bfdbfe;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12);
  transition: all 0.3s ease;
}

.page-info-card:hover {
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
  border-color: #93c5fd;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-icon {
  font-size: 18px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.info-text {
  color: #1e40af;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 配置区域 */
.config-section {
  margin-bottom: 24px;
}

.config-section details {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 16px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.config-section details[open] {
  background: white;
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.config-section summary {
  font-weight: 700;
  color: #667eea;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-section summary:hover {
  color: #5568d3;
  background: rgba(102, 126, 234, 0.08);
  transform: translateX(4px);
}

.config-section summary::marker {
  color: #667eea;
}

.config-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.config-item label {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  white-space: nowrap;
  min-width: 80px;
}

.input-field {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  min-width: 200px;
}

.input-field:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

/* 状态区域 */
.status-section {
  margin-bottom: 28px;
}

.status-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  padding: 24px;
  border: 2px solid #e9ecef;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.status-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f4ff;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6c757d;
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.1);
}

.status-dot.idle {
  background: #6c757d;
  animation: none;
  box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.1);
}

.status-dot.scraping {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.status-dot.paused {
  background: #f97316;
  animation: pulse-slow 3s infinite;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2);
}

.status-dot.uploading {
  background: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2);
}

.status-dot.completed {
  background: #10b981;
  animation: none;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.status-dot.cancelled {
  background: #6c757d;
  animation: none;
  box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.1);
}

.status-dot.error {
  background: #ef4444;
  animation: none;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

@keyframes pulse-slow {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.95);
  }
}

.status-text {
  font-weight: 700;
  color: #2c3e50;
  font-size: 16px;
}

/* 进度信息 */
.progress-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.info-item {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 12px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.info-item:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.info-label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 进度条 */
.progress-bar-container {
  width: 100%;
  height: 10px;
  background: #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* 消息 */
.error-message,
.success-message {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-message {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  border: 2px solid #fecaca;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.success-message {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #166534;
  border: 2px solid #bbf7d0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* 按钮 */
.actions-section {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  flex: 1;
  min-width: 140px;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.3px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
}

.btn-warning:hover:not(:disabled) {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-small {
  flex: none;
  padding: 10px 18px;
  font-size: 13px;
  min-width: 100px;
}

.btn-icon {
  font-size: 14px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* 帮助区域 */
.help-section {
  margin-bottom: 24px;
}

.help-section details {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 16px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.help-section details[open] {
  background: white;
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.help-section summary {
  font-weight: 700;
  color: #667eea;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-section summary:hover {
  color: #5568d3;
  background: rgba(102, 126, 234, 0.08);
  transform: translateX(4px);
}

.help-section summary::marker {
  color: #667eea;
}

.help-list {
  margin: 16px 0 0 28px;
  font-size: 14px;
  color: #475569;
  line-height: 2;
}

.help-list li {
  margin-bottom: 10px;
  padding-left: 8px;
  transition: all 0.2s ease;
}

.help-list li:hover {
  color: #667eea;
  transform: translateX(4px);
}

/* 商家统计查询区域 */
.seller-stats-section {
  margin-bottom: 24px;
}

.seller-stats-section details {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 16px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.seller-stats-section details[open] {
  background: white;
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.seller-stats-section summary {
  font-weight: 700;
  color: #667eea;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.seller-stats-section summary:hover {
  color: #5568d3;
  background: rgba(102, 126, 234, 0.08);
  transform: translateX(4px);
}

.seller-stats-section summary::marker {
  color: #667eea;
}

.seller-stats-content {
  margin-top: 16px;
}

.stats-query-form {
  margin-bottom: 20px;
}

.query-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-item {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-item label {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  white-space: nowrap;
}

.filter-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  min-width: 80px;
}

.filter-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

/* 加载状态 */
.stats-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px;
  color: #667eea;
  font-size: 15px;
  font-weight: 600;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e9ecef;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 统计结果 */
.stats-results {
  margin-top: 20px;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid #f0f4ff;
}

.stats-title {
  font-weight: 700;
  color: #2c3e50;
  font-size: 16px;
}

.stats-count {
  font-size: 14px;
  color: #667eea;
  font-weight: 700;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 8px;
}

.stats-table-container {
  max-height: 400px;
  overflow-y: auto;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stats-table-container::-webkit-scrollbar {
  width: 8px;
}

.stats-table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.stats-table-container::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.stats-table-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.stats-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.stats-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0f4ff;
}

.stats-table tbody tr {
  transition: all 0.2s ease;
}

.stats-table tbody tr:hover {
  background-color: #f8f9ff;
  cursor: pointer;
  transform: scale(1.01);
}

.stats-table tbody tr:last-child td {
  border-bottom: none;
}

/* 店铺相关样式 */
.shops-cell {
  max-width: 300px;
  padding: 12px 16px !important;
}

.shops-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.shop-tag {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid #90caf9;
  border-radius: 6px;
  font-size: 12px;
  color: #1976d2;
  font-weight: 500;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

.shop-tag:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
  border-color: #64b5f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.2);
}

.text-muted {
  color: #c0c4cc;
  font-size: 12px;
  font-style: italic;
}

.site-tag-cell {
  text-align: center;
}

.site-badge {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.seller-id {
  font-weight: 600;
  color: #667eea;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.asin-count,
.offer-count {
  text-align: center;
  font-weight: 700;
  color: #10b981;
  font-size: 15px;
}

/* 错误信息 */
.stats-error {
  margin-top: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  border: 2px solid #fecaca;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

/* 复选框列样式 */
.checkbox-cell {
  text-align: center;
  padding: 14px;
  width: 50px;
}

.checkbox-cell input[type='checkbox'] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

/* 操作列样式 */
.action-cell {
  text-align: center;
  padding: 14px;
}

.btn-get-detail {
  padding: 10px 18px;
  border: 2px solid #667eea;
  border-radius: 10px;
  background: white;
  color: #667eea;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-get-detail:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-get-detail:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 批量操作区域 */
.batch-actions {
  margin-top: 20px;
  padding: 18px;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  border: 2px solid #e9ecef;
}

.batch-actions label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #2c3e50;
}

.batch-actions input[type='checkbox'] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.batch-info {
  font-size: 14px;
  color: #667eea;
  font-weight: 700;
  margin-left: auto;
  padding: 8px 16px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 8px;
}

/* 批量获取进度 */
.batch-progress {
  margin-top: 20px;
  padding: 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 12px;
  border: 2px solid #bfdbfe;
}

.batch-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1e40af;
}

.batch-progress-bar {
  width: 100%;
  height: 12px;
  background: #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.batch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  max-width: 90%;
  width: 750px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-large {
  max-width: 95%;
  width: 780px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 2px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* 商家详情样式 */
.seller-detail-loading,
.seller-detail-error {
  text-align: center;
  padding: 40px 20px;
}

.seller-detail-loading .loading-spinner {
  margin: 0 auto 16px;
}

.loading-hint {
  margin-top: 12px;
  font-size: 12px;
  color: #999;
}

.seller-detail-error p {
  margin: 8px 0;
  color: #666;
}

.seller-detail-url {
  margin: 16px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  word-break: break-all;
}

.seller-detail-url a {
  color: #667eea;
  text-decoration: none;
  font-size: 12px;
}

.seller-detail-info {
  font-size: 13px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e9ecef;
  flex-wrap: wrap;
}

.detail-site-badge {
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
}

.detail-seller-id {
  font-family: monospace;
  font-size: 13px;
  color: #667eea;
  font-weight: 600;
}

.detail-link {
  margin-left: auto;
  color: #667eea;
  text-decoration: none;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #667eea;
  border-radius: 4px;
  transition: all 0.2s;
}

.detail-link:hover {
  background: #667eea;
  color: white;
}

.detail-item {
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #667eea;
}

.detail-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  color: #212529;
  font-size: 13px;
  line-height: 1.6;
}

.detail-value a {
  color: #667eea;
  text-decoration: none;
}

.detail-value a:hover {
  text-decoration: underline;
}

.address-lines {
  line-height: 1.8;
}

.address-lines > div {
  margin-bottom: 4px;
}

/* 批量获取进度 */
.batch-progress {
  margin-top: 15px;
  padding: 12px;
  background: #e3f2fd;
  border-radius: 6px;
  border: 1px solid #90caf9;
}

.batch-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.batch-progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.batch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

/* 模态框显示 */
.modal.show {
  display: flex !important;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-export-format {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
}

.btn-export-format:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 导出统计栏 */
.export-stats-bar {
  display: flex;
  gap: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 搜索栏 */
.export-search-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s;
  font-weight: 500;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.site-filter {
  padding: 12px 20px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 140px;
  font-weight: 500;
}

.site-filter:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* 导出列表容器 */
.export-list-container {
  max-height: 500px;
  overflow-y: auto;
  padding: 8px;
}

.export-list-container::-webkit-scrollbar {
  width: 8px;
}

.export-list-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.export-list-container::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.export-list-container::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

/* 商家卡片 */
.seller-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.seller-card:hover {
  border-color: #667eea;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  transform: translateY(-4px);
}

.seller-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f2f5;
  flex-wrap: wrap;
  gap: 8px;
}

.seller-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-site-badge {
  padding: 6px 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.card-seller-id {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  letter-spacing: 0.5px;
}

.card-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.card-status.success {
  background: #d4edda;
  color: #155724;
}

.card-status.pending {
  background: #fff3cd;
  color: #856404;
}

.seller-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card-link {
  color: #667eea;
  text-decoration: none;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #667eea;
  border-radius: 4px;
  transition: all 0.2s;
}

.card-link:hover {
  background: #667eea;
  color: white;
}

.card-time {
  font-size: 11px;
  color: #6c757d;
}

.seller-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.card-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  transition: all 0.2s;
}

.card-field:hover {
  background: #e9ecef;
  border-left-color: #764ba2;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.field-value {
  font-size: 14px;
  color: #212529;
  word-break: break-word;
  font-weight: 500;
  line-height: 1.6;
}

.field-value a {
  color: #667eea;
  text-decoration: none;
}

.field-value a:hover {
  text-decoration: underline;
}

.address-field {
  line-height: 1.8;
}

.address-field > div {
  margin-bottom: 4px;
  padding-left: 8px;
  position: relative;
}

.address-field > div::before {
  content: '📍';
  position: absolute;
  left: -8px;
}

/* 店铺字段样式 */
.shops-field {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.shop-tag-small {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid #90caf9;
  border-radius: 6px;
  font-size: 12px;
  color: #1976d2;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.shop-tag-small:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
  border-color: #64b5f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.2);
}

/* 空状态 */
.export-empty {
  text-align: center;
  padding: 80px 20px;
  color: #6c757d;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.8;
}

.export-empty p {
  font-size: 16px;
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* 页脚 */
.footer {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 2px solid #f0f4ff;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
