.view-history {
  background: var(--bg-primary);
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 0.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-item:hover {
  background: var(--bg-tertiary);
}

.history-item:active {
  transform: scale(0.99);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.history-item-time {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.history-item-server {
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 3px 8px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

.history-item-stats {
  display: flex;
  gap: 10px;
}

.history-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.history-stat-label {
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}

.history-stat-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.history-stat-value.dl { color: var(--accent-blue); }
.history-stat-value.ul { color: var(--accent-purple); }
.history-stat-value.ping { color: var(--accent-green); }

.history-stat-unit {
  font-size: 10px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-left: 2px;
  font-weight: 400;
}

.empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* 历史详情弹层 */
.history-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.history-detail-card {
  width: 100%;
  max-width: 420px;
  max-height: 85%;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.history-detail-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.history-detail-subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.detail-section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid var(--separator);
}

.detail-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.detail-section-title {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  font-weight: 500;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.detail-row-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-row-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.detail-close-btn {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  font-size: 13px;
  font-weight: 500;
}

.detail-close-btn:hover {
  background: var(--bg-quaternary);
}
