/* 全局样式 */
body {
  font-family: Arial, sans-serif;
  font-size: 1.4vh
}

h1 {
  color: #333;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.table-center {
  border-collapse: collapse;
  width: 100%;
  display: flex; /* 使用弹性布局 */
  justify-content: center; /* 在水平方向上居中 */
}

.table-th-td-center {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

.red-text {
    color: red;
}

.input-container input[type=text]{
    margin: 5px 0; /* 在上下添加5像素的间距，可以根据需要进行调整 */
    height: 40px; /* 调整高度大小 */
    width: 200px; /* 调整宽度大小 */
    font-size: 18px
}
.input-container input[type=number] {
    margin: 5px 0; /* 在上下添加5像素的间距，可以根据需要进行调整 */
    height: 40px; /* 调整高度大小 */
    width: 100px; /* 调整宽度大小 */
    font-size: 18px
}

/* 增大"添加新股票"按钮的大小，并设置背景颜色为红色 */
button {
    margin: 5px 0; /* 在上下添加5像素的间距，可以根据需要进行调整 */
    padding: 10px 20px; /* 调整按钮的内边距以增大按钮的大小 */
    font-size: 16px; /* 增大字体大小，提高可读性 */
    background-color: red; /* 设置按钮的背景颜色为红色 */
    color: white; /* 设置文本颜色为白色，以提高可读性 */
}

/* 增大select标签的样式 */
select {
    padding: 10px; /* 增大内边距，使其更易点击 */
    font-size: 16px; /* 增大字体大小，提高可读性 */
    /*width: 100%;*/ /* 设置宽度以填满其父容器 */
}

.larger-button {
  padding: 12px 24px; /* 更大的内边距 */
  width: 120px; /* 调整按钮宽度 */
  height: 40px; /* 调整按钮高度 */
  font-size: 18px
}

/*table th,
table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}*/
/* 改善表格样式 */
table th, table td {
    padding: 12px 15px; /* 增加内边距 */
    border-bottom: 1px solid #ddd; /* 设置边框样式 */
}

/* 表格条纹样式 */
table tr:hover {
    background-color: #f2f2f2;
}


/* 按钮样式 */
.button {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  background-color: red;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
}

.button:hover {
  background-color: red;
}

.navbar {
    background-color: red;
    padding: 5px 0;
}

.navbar ul {
    list-style: none;
    padding: 0;
    display: flex;
    /* 使用 Flex 布局 */
}

.navbar li {
    margin-right: 20px;
    /* 增加链接之间的水平间距 */
}

.navbar a {
    text-decoration: none;
    color: white;
}

.dropdown-menu {
    background-color: #dc3545; /* 和你的 navbar 背景色一致，红色 */
}

.dropdown-item {
    color: white; /* 文字改成白色 */
}

.dropdown-item:hover {
    background-color: #c82333; /* 鼠标悬停时背景色稍微深一点 */
    color: white; /* 悬停时仍然保持白色字体 */
}
.header {
    max-height: 20vh;
}
.formdata {
    max-height: 10vh;
}
.divider {
  border: none;
  height: 2px;
  background-color: #000; /* 线的颜色 */
  position: relative;
  margin: 20px 0; /* 上下的空间 */
}

.divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0px; /* 调整文字位置 */
  transform: translateX(-50%);
  background-color: #fff; /* 背景色，通常是页面的背景色 */
  padding: 0 10px;
}

/*-----------------------------------------------------------页面样式*/
.pagination {
/*    position: fixed;
    top: 0;
    background-color: #fff;
    z-index: 1;
    width: 100%;*/
    max-height: 10vh;
    position: fixed;
    bottom: 0;
    background-color: #fff;
    z-index: 1;
    width: 100%;
    border-top: 1px solid #ddd; /* 设置边框 */
}

.pagination button {
  display: inline-block;
  padding: 4px 5px;
  text-decoration: none;
  background-color: red;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.menu {
    margin-top: 28px;
}

.table-container {
    margin-top: 5px;
    overflow-y: auto; /* 启用垂直滚动条 */
    max-height: 75vh; /* 设置固定高度 */
    border: 1px solid #ddd; /* 设置边框 */
}
.form-and-count {
  display: flex;
  align-items: center;
}

.count-text {
  margin-left: 10px;
  font-weight: bold;
  color: red;
}
.hidden {
    display: none;
}

.red-bold-text {
  color: red;
  font-weight: bold;
}

.stock-sign {
  font-weight: bold;
  color: red;
}

/* 确保表头固定在页面顶部 */
.fixed-header {
  position: sticky;
  top: 0;
  background-color: #fff; /* 可以根据需要更改背景颜色 */
}

/* 为内容表格添加滚动条 */
.scrollable-content {
  max-height: 400px; /* 设置内容表格的最大高度 */
  overflow-y: auto;
}

/* 样式化弹窗 */
/*.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}*/

/*.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
}*/

/* 响应式布局 - 手机端样式 */
@media screen and (max-width: 768px) {
  h1 {
    font-size: 18px;
  }

  table {
    font-size: 14px;
  }

  input[type="text"] {
      width: 100%;
      padding: 10px; /* 为输入框添加垂直内边距 */
      margin-bottom: 10px;
      height: 18px;
  }

  /* 根据需要添加样式，例如调整字体大小和内边距 */
  #showAddFormButton, #submitAddFormButton, #closeAddFormButton {
      font-size: 16px;
      padding: 10px;
  }
  #stockInput {
      width: 100%;
      padding: 10px; /* 为输入框添加垂直内边距 */
      margin-bottom: 10px;
      height: 18px;
  }

}
