@import "cbmath-color.css";


.paperzt{
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* 确保容器至少是视口高度 */
}

.nav-fill{
  position: fixed;
  top: 36px;
  /* 从左侧50%开始 */
  left: 50%;
  /* 向左移动自身宽度的一半以实现居中 */
  transform: translateX(-50%);
  width: 100%;
  /* 默认宽度100% */
  max-width: 1320px;
  /* 设置一个合理的最大宽度 */
  background-color: var(--db-quaternary);
  z-index: 100;
  padding: 0.5rem 0;
  height: 44px;
}


.selection-item{
  color: var(--db-secondary-text);
  font-size: 0.5rem;
  /* 去掉下划线 */
  text-decoration: none;
}

.nav{
  /* 添加上下外边距 */
  margin: 0.5rem 0;
}


.downarrow {
  background-image: url('/static/img/cbmath/down-light.png');
  display: inline-block;
  width: 0.4rem;
  /* 根据实际图片尺寸调整 */
  height: 0.4rem;
  /* 根据实际图片尺寸调整 */
  background-repeat: no-repeat;
  background-position: center;
  /* 背景图片大小适应宽度 */
  background-size: contain;
  /* 上下居中 */
  vertical-align: middle;
  margin-left: 0.3rem;
}

.exampaperlist {
  /* 占据剩余空间 */
  flex: 1;
  /* 圆角 */
  border-radius: 0;
  background-color: var(--db-secondary);
  /* 内边距 */
  padding: 0.1rem 0.8rem;
  margin-top: 36px;
    
}

.exampaper {
  list-style: none;
  border: 0.06rem solid var(--db-primary);
  height: 3.6rem;
  border-radius: 0.5rem;
  margin: 1rem 0.3rem;
  padding: 0 1rem;
  /* 修改左右padding，去掉上下padding */
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* 让内容分散对齐 */
}

.rightarrow {
  background-image: url('/static/img/cbmath/right.png');
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  /* 添加左边距来创建间隙 */
  margin-left: 1.2rem;
}


.selection-menu {
  position: fixed;
  top: 80px;
  /* nav-fill的高度 + top值 + padding */
  /* 从左侧50%开始 */
  left: 50%;
  /* 向左移动自身宽度的一半以实现居中 */
  transform: translateX(-50%);
  width: 100%;
  /* 默认宽度100% */
  max-width: 1320px;
  /* 设置一个合理的最大宽度 */
  
  background-color: var(--db-quaternary);
  z-index: 99;
  /* 比nav-fill低一级 */
  display: none;
  /* 默认隐藏，通过JS控制显示 */
  /* 添加一些样式美化 */
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.selection-options {
  padding: 1.6rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  justify-content: center;
  /* 整体居中 */
  width: 100%;
  /* 确保宽度与父容器一致 */
  max-width: 100%;
  /* 最大宽度不超过父容器 */
  overflow-y: auto;
  /* 允许垂直滚动 */
  max-height: 60vh;
  /* 限制最大高度 */
}

.selection-options .selection-option {
  
  border-radius: 0.5rem;
  min-width: 80px;
  max-width: 100%;
  text-align: center;
  padding: 0.5rem;
  box-sizing: border-box;
  white-space: nowrap;
  /* 防止文字换行 */
  overflow: hidden;
  text-overflow: ellipsis;
  /* 文字过长显示省略号 */

  border: 0.08rem solid var(--db-divider);
  font-size: 0.6rem;
  color: var(--db-secondary-text);
}

/* 在窄屏幕宽度下的显示样式 */
@media (max-width: 480px) {
  .selection-options .selection-option {

  border-radius: 0.5rem;
  text-align: center;
  padding: 0.5rem;
  box-sizing: border-box;
  white-space: nowrap;
  /* 防止文字换行 */
  overflow: hidden;
  text-overflow: ellipsis;
  /* 文字过长显示省略号 */

  border: 0.08rem solid var(--db-divider);
  font-size: 0.6rem;
  color: var(--db-secondary-text);
  }
}



.selection-options .selection-option.selected {
  border: 0.08rem solid var(--db-accent-border);
  font-size: 0.6rem;
  color: var(--db-accent-text);
}

.selection-options .selection-option:hover {
  border: 0.08rem solid var(--db-primary);
  font-size: 0.6rem;
  color: var(--db-primary-text);
}


/* 确保选项与筛选条件对齐 */
@media (min-width: 768px) {
  .selection-options {
    padding-left: calc(8rem + 16px);
    /* 与筛选条件左对齐 */
    /* padding-right: calc(1rem + 16px); */
    /* 与筛选条件右对齐 */
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    /* 固定4列 */
  }
}

/* 中屏幕适配（480px-767px） */
@media (max-width: 767px) and (min-width: 481px) {
  .selection-options {
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    /* 2列 */
    padding-left: 6rem;
    padding-right: 4rem;
  }
}

/* 小屏幕适配（≤480px） */
@media (max-width: 480px) {
  .selection-options {
    grid-template-columns: repeat(1, minmax(120px, 1fr));
    /* 1列 */
    padding-left: 1rem;
    padding-right: 1rem;
  }
}


/* 添加overlay样式 */
.overlay {
  position: fixed;
  /* 从左侧50%开始 */
  left: 50%;
  /* 向左移动自身宽度的一半以实现居中 */
  transform: translateX(-50%);
  width: 100%;
  /* 默认宽度100% */
  max-width: 1320px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 98;
  display: none;
}