@font-face {
  font-family: 'DINdong';
  src: url('assets/fonts/DINdong.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: white; /* 改为白色背景 */
  font-family: 'DINdong', sans-serif;
}

canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

/* 右半边模糊遮罩 */
.blur-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  backdrop-filter: blur(0.5px); /* 模糊效果 */
  pointer-events: none;
  z-index: 5;
}

#top-left {
  position: absolute;
  top: 0px;
  left: 10px;
  font-size: 44px;
  color: white; 
  letter-spacing: 0.05em;
  z-index: 10;
  cursor: pointer;
  transition: color 0.3s ease;
}

#top-left:hover {
  color: rgb(2, 254, 23); 
}

#top-right {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  color: red;
  z-index: 10;
}

#bottom-right {
  position: absolute;
  bottom: 10px;
  right: 10px;
  text-align: right;
  z-index: 10;
  transition: opacity 0.3s ease; /* 智能隐藏效果 */
}

#catalog-title {
  font-size: 50px;
  color: grey;
  margin-bottom: 5px;
  transition: color 0.3s ease; /* 添加悬停过渡效果 */
}

#catalog-title:hover {
  color: rgb(2, 254, 23); /* 添加悬停绿色效果 */
}

#catalog-list div {
  font-size: 48px;
  color: black;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.3s ease;
}

#catalog-list div:hover {
  color: rgb(2, 254, 23);
}

/* 中间滚动文字 */
#center-text {
  position: absolute;
  top: 17px;
  left: 235px;
  right: 200px;
  overflow: hidden;
  z-index: 10;
}

#scrolling-message {
  display: flex;
  width: max-content;
  animation: scrollRight 20s linear infinite;
  font-size: 14px;
  color: black;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 400;
  will-change: transform;
}

#scrolling-message:hover {
  animation-play-state: paused;
}

#scrolling-message span {
  padding-right: 5px;
}

/* 默认显示桌面版本文字，隐藏移动版本 */
.mobile-text {
  display: none;
}

.desktop-text {
  display: inline;
}

/* 关键帧：滚动整个 message 的一半宽度，实现无缝衔接 */
@keyframes scrollRight {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  /* 右上角时间在手机端调整 */
  #top-right {
    font-size: 18px; /* 从26px进一步缩小 */
    top: 7px; /* 更靠上 */
    z-index: 15; /* 确保在最上层 */
  }
  
  /* 轮播文字在手机端变细并移到底部 */
  #center-text {
    top: auto; /* 取消固定顶部位置 */
    bottom: 52%; /* 定位到上半部分底部 */
    left: 10px;
    right: 10px;
  }
  
  #scrolling-message {
    font-weight: 300;
    font-size: 10px; /* 进一步缩小 */
  }
  
  /* 移动端显示移动版本文字，隐藏桌面版本 */
  .mobile-text {
    display: inline;
  }
  
  .desktop-text {
    display: none;
  }
  
  /* 移动端模糊遮罩调整为下半部分 */
  .blur-overlay {
    top: 50%;
    right: 0;
    width: 100%;
    height: 50%;
  }
  
  /* 确保右下角catalog在移动端可见 */
  #bottom-right {
    z-index: 15; /* 确保在最上层 */
  }
  
  /* 移动端调整catalog大小 */
  #catalog-title {
    font-size: 35px;
  }
  
  #catalog-list div {
    font-size: 32px;
  }
  
  /* 移动端确保悬停效果可见 */
  #top-left {
    font-size: 32px;
    top: 0px; /* 与about页面保持一致 */
    z-index: 15; /* 确保在最上层 */
    cursor: pointer; /* 确保显示手型光标 */
  }
  
  /* 移动端触摸反馈 */
  #top-left:active {
    color: rgb(2, 254, 23);
  }
  
  #catalog-title:active {
    color: rgb(2, 254, 23);
  }
  
  #catalog-list div:active {
    color: rgb(2, 254, 23);
  }
}