body {
  background-color: #dcdcdc;
  font-family: "Microsoft YaHei", sans-serif;
}

.container {
  margin-top: 30px;
  max-width: 900px;
}

.search-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
}

.searchInput {
  width: 250px;
  border-radius: 20px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  transition: 0.2s;
}

.searchInput:focus {
  border-color: #ed3f27;
  box-shadow: 0 0 6px rgba(237, 63, 39, 0.3);
  outline: none;
}

.searchButton {
  margin-left: 10px;
  padding: 4px 15px;
  border: none;
  border-radius: 20px;
  background-color: #ed3f27;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.searchButton:hover {
  background-color: #c92d1c;
}

#stockTable {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#stockTable th {
  background-color: #ed3f27;
  color: white;
  text-align: center;
}

#stockTable td {
  text-align: center;
  vertical-align: middle;
  padding: 12px 8px;
}

#stockTable tbody tr:hover {
  background-color: #f5f5f5;
  cursor: pointer;
}

.pagination {
  margin-top: 15px;
  display: flex;
  justify-content: center;
}

.pagination button {
  margin-top: 2px;
  margin-left: 5px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  transition: 0.2s;
  height: 39px;
}

.pagination button:hover {
  background-color: #f1f1f1;
}

.pagination button.active {
  background-color: #ed3f27;
  color: white;
  font-weight: bold;
  border-color: #ed3f27;
}

.addFavBtn {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
}

.addFavBtn:focus {
  outline: none;
  box-shadow: none;
}

.addFavBtn img {
  display: block;
  width: 22px;
  height: 22px;
}

.removeBtn {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.removeBtn.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.selected-text {
  color: #fab12f;
  transition: color 0.3s ease;
}

#stockTable tbody tr.selected-text,
#stockTable tbody tr.selected-text * {
  color: #fab12f !important;
}

@media (max-width: 768px) {
  /* 让容器垂直排列 */
  .container-fluid > div {
    flex-direction: column;
    align-items: center;
  }

  /* 搜索栏改为居中显示 */
  .search-bar {
    justify-content: left;
    width: 100%;
    margin-bottom: 10px;
  }

  /* 分页器放到底部并固定 */
  .pagination {
    position: relative;
    bottom: auto;
    left: -40%;
    width: auto;
    /* 不占满整个宽度 */
    background: transparent;
    /* 背景透明 */
    padding: 8px 0;
    box-shadow: none;
    border: none;
    margin-top: 10px;
    /* 与表格或搜索框的间距 */
  }

  /* 调整分页按钮尺寸以便手指点击 */
  .pagination button {
    padding: 8px 14px;
    font-size: 15px;
  }
}
