/* 加密货币监控工具样式 */

.control-panel {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.control-select {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  cursor: pointer;
  min-width: 140px;
}

.control-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.exchange-tabs {
  display: flex;
  gap: 8px;
}

.exchange-tab {
  padding: 10px 20px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.exchange-tab:hover {
  background: rgba(255, 255, 255, 0.15);
}

.exchange-tab.active {
  background: white;
  color: #667eea;
  border-color: white;
}

/* 拉升信号扫描区域 */
.pump-scan-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 2px dashed #f59e0b;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
  font-size: 20px;
  color: #1f2937;
}

.pump-params {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px;
  background: #fef3c7;
  border-radius: 8px;
}

.param-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.param-item label {
  font-size: 13px;
  color: #92400e;
  font-weight: 500;
}

.param-item input {
  width: 80px;
  padding: 8px 12px;
  border: 2px solid #f59e0b;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.param-item input:focus {
  outline: none;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.pump-results {
  min-height: 100px;
}

.pump-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pump-tip {
  font-size: 13px;
  opacity: 0.95;
}

.pump-list {
  display: grid;
  gap: 16px;
}

.pump-item {
  display: grid;
  grid-template-columns: 140px 1fr 120px;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.pump-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.pump-item.high-score {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #f59e0b;
}

.pump-item.medium-score {
  background: #f0fdf4;
  border-color: #10b981;
}

.pump-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pump-symbol {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.pump-price {
  font-size: 18px;
  color: #374151;
  font-family: 'Consolas', 'Monaco', monospace;
}

.pump-change {
  font-size: 16px;
  font-weight: 700;
}

.pump-change.positive {
  color: #059669;
}

.pump-change.negative {
  color: #dc2626;
}

.pump-risk {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  width: fit-content;
}

.pump-risk.risk-low {
  background: #d1fae5;
  color: #059669;
}

.pump-risk.risk-medium {
  background: #fef3c7;
  color: #d97706;
}

.pump-risk.risk-high {
  background: #fee2e2;
  color: #dc2626;
}

.pump-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.detail-row:last-child {
  border-bottom: none;
}

.pump-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.detail-value {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  font-family: 'Consolas', 'Monaco', monospace;
}

.detail-value.highlight {
  color: #f59e0b;
  font-size: 14px;
}

.detail-value.positive {
  color: #059669;
}

.detail-value.negative {
  color: #dc2626;
}

.pump-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid #9ca3af;
}

.score-circle.high {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #f59e0b;
}

.score-circle.medium {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: #10b981;
}

.score-value {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
}

.score-label {
  font-size: 10px;
  color: #6b7280;
}

.score-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.score-badge.hot {
  background: #fee2e2;
  color: #dc2626;
}

.score-badge.trend {
  background: #d1fae5;
  color: #059669;
}

/* 市场统计 */
.market-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.stat-item.up .stat-value {
  color: #059669;
  background: #d1fae5;
  padding: 4px 12px;
  border-radius: 6px;
}

.stat-item.down .stat-value {
  color: #dc2626;
  background: #fee2e2;
  padding: 4px 12px;
  border-radius: 6px;
}

/* 表格样式 */
.table-container {
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.crypto-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.crypto-table th {
  background: #f8fafc;
  color: #1f2937;
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.crypto-table th:first-child {
  border-radius: 8px 0 0 0;
}

.crypto-table th:last-child {
  border-radius: 0 8px 0 0;
}

.crypto-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.crypto-table tbody tr:hover td {
  background: #f8fafc;
}

.crypto-table tbody tr.up-row td {
  background: #f0fdf4;
}

.crypto-table tbody tr.up-row:hover td {
  background: #ecfdf5;
}

.crypto-table tbody tr.down-row td {
  background: #fef2f2;
}

.crypto-table tbody tr.down-row:hover td {
  background: #fee2e2;
}

.empty-row {
  text-align: center;
  color: #64748b;
  padding: 40px !important;
  background: #fff;
}

.empty-row.error {
  color: #dc2626;
  background: #fef2f2;
}

.symbol-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.symbol-name {
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
}

.symbol-full {
  font-size: 12px;
  color: #64748b;
}

.exchange-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.exchange-badge.binance {
  background: #fef3c7;
  color: #92400e;
}

.exchange-badge.okx {
  background: #1f2937;
  color: #fff;
}

.price-cell {
  font-family: 'Consolas', 'Monaco', monospace;
  font-weight: 600;
  color: #0f172a;
}

.change-cell {
  font-weight: 700;
  font-size: 15px;
}

.change-cell.positive {
  color: #059669;
  background: #d1fae5;
  padding: 4px 10px;
  border-radius: 4px;
}

.change-cell.negative {
  color: #dc2626;
  background: #fee2e2;
  padding: 4px 10px;
  border-radius: 4px;
}

.volume-cell {
  font-family: 'Consolas', 'Monaco', monospace;
  color: #475569;
  font-weight: 500;
}

.btn-small {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: #374151;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-small:hover {
  background: #1f2937;
}

.icon-small {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* 搜索区域 */
.search-section {
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
}

.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: 50%;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 24px;
}

.chart-controls {
  margin-bottom: 20px;
}

.chart-container {
  height: 400px;
  position: relative;
}

.chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.chart-stat {
  display: flex;
  gap: 8px;
  font-size: 14px;
}

.chart-stat strong {
  color: #1f2937;
}

/* 加载状态 */
.loading {
  display: none;
  text-align: center;
  padding: 20px;
  color: #6b7280;
}

.loading.show {
  display: block;
}

.spinner {
  border: 3px solid #e5e7eb;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 15px;
}

.empty-state.warning {
  background: #fef3c7;
  border-radius: 8px;
  color: #92400e;
}

.empty-state.error {
  color: #dc2626;
}

/* 更新时间 */
.update-time {
  font-size: 13px;
  color: #6b7280;
}

/* 按钮样式覆盖 */
.btn-danger {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

#autoRefreshBtn.active {
  background: #10b981;
  color: white;
}

/* 响应式 */
@media (max-width: 768px) {
  .control-row {
    flex-direction: column;
    align-items: stretch;
  }

  .control-group {
    width: 100%;
  }

  .exchange-tabs {
    width: 100%;
  }

  .exchange-tab {
    flex: 1;
    text-align: center;
  }

  .pump-item {
    grid-template-columns: 1fr;
  }

  .pump-details {
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .pump-header {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .market-stats {
    flex-wrap: wrap;
  }

  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .chart-container {
    height: 300px;
  }
}
