:root {
  --side-margin: 5vw;
  /* 定义左右边距的变量 */
}

html {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

.h1 {
  margin-left: var(--side-margin);
  margin-right: var(--side-margin);
  font-size: 35px;
  text-align: left;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  color: #ffffff;
}

.emptybox {
  padding: 0%;
  margin: 0%;
}

.sidebar {
  position: fixed;
  /* 固定定位 */
  top: 50vh;
  /* 垂直居中 */
  left: 0;
  /* 贴边左侧 */
  transform: translateY(-50%) translateX(-80%);
  /* 初始状态向左移动 */
  width: 150px;
  /* 宽度 */
  background-color: rgb(65, 72, 74);
  /* 背景颜色 */
  box-shadow: 3px 3px 15px rgba(12, 102, 132, 0.525);
  /* 阴影效果 */
  z-index: 1001;
  /* 确保悬浮窗在最上层 */
  transition: transform 0.3s ease-in-out;
  /* 添加过渡效果 */
  border-top-right-radius: 6px;
  /* 右上角圆角 */
  border-bottom-right-radius: 15px;
  /* 右下角圆角 */
  padding: 40px 0px 40px 0px;
}



.sidebar-button {
  display: inline-block;
  width: 100px;
  margin-top: 10px;
  padding: 5px;
  background-color: #0b1e25;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  border-radius: 0 10px 10px 0;
  transition: transform 0.05s ease;
}

.sidebar-button:hover {
  background-color: rgb(6, 108, 139);
  transform: scalex(1.05);
}



.sidebar:hover {
  transform: translateY(-50%) translateX(0);
  /* 鼠标经过时展开 */
}

.dot {
  width: 7px;
  height: 7px;
  background-color: rgb(88, 178, 219);
  border-radius: 50%;
  display: inline-block;
  margin: 7px 0;
}

/* 在styles.css文件中添加以下样式 */
.horizontal-line {
  width: 80%;
  text-align: left;

  border-top: 1px solid #ffffff;
  /* 设置直线的颜色和粗细 */
  margin: 20px var(--side-margin);
  /* 设置上下外边距 */
  margin-top: -1%;
}

.sticky-top {
  position: sticky;
  top: 20px;
  background-color: rgba(1, 14, 23, 0.783);
  /* 可选：设置背景颜色 */
  z-index: 1000;
  /* 确保在最上层 */
  padding: 1vw 0 1vw 0;
  margin: 0 1vw 0 1vw;
  /* 可选：设置内边距 */
  width: auto;
  backdrop-filter: blur(10px);
  border-radius: 10px;
  box-shadow: 0px 10px 30px rgba(3, 58, 71, 0.564);
}

.sticky-top-title {
  position: fixed;
  width: 100%;;
  height: 30px;
  color: rgb(63, 111, 118);
  font-size: 15px;
  background-color: black;
  padding: 0;
  margin: 0;
  text-align: right;
  z-index: 1001;
  top: 0;
  left: 0;

}

.container {
  width: calc(100% - (2 * var(--side-margin)));
  /* 减去左右边距的总和 */
  column-count: 3;
  /* 定义列数 */
  column-gap: 15px;
  /* 列间距 */
  margin: 2vw var(--side-margin) 4vw var(--side-margin);
}

/* 盒子样式 */
.box {
  width: 100%;
  background-color: black;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #ffffff7d;
  break-inside: avoid;
  /* 防止盒子被拆分 */
  border-radius: 20px;
  /* 添加圆角 */
  transition: transform 0.2s ease-in-out, border 0.3s ease-in-out;
  /* 添加过渡效果，使动画更平滑 */
}

@media (max-width: 1600px) {
  .container {
    column-count: 3;
  }

  .h1 {
    font-size: 40px;
  }
}

@media (max-width: 890px) {
  .container {
    column-count: 2;
  }

  .h1 {
    font-size: 30px;
  }
}

@media (max-width: 570px) {
  .container {
    column-count: 1;
  }

  .h1 {
    font-size: 20px;
  }
}

.box:hover {
  transform: scale(1.03);
  /* 鼠标悬停时图片放大 */
  border: 1px solid #505050;
}

/* 设置图片样式，使其等比例缩放且不超出盒子范围 */
.box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* 保持图片宽高比并完全适应盒子 */
  border-radius: 20px;
  /* 添加圆角 */
}

/* 全屏显示图片的样式 */
.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000cc;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: none;
  /* 确保初始状态下是隐藏的 */
}

.fullscreen img {
  max-width: 98%;
  max-height: 98%;
  object-fit: contain;
  transition: opacity 0.5s ease-in-out;
  /* 添加过渡效果 */
  border-radius: 20px;
  /* 添加圆角 */
}

.fullscreen img.hidden {
  opacity: 0;
}

.fullscreen img.visible {
  opacity: 1;
}
