/* 设置全局字体 */
@font-face {
      font-family: "Song";
      src: url("song.ttf") format("woff2"),
           url("song.ttf") format("woff");}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Song', sans-serif;}
html, body { width: 100%; height: 100%; overflow: hidden; background: #fff; }

/* 背景视频 */
#bg-video {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s linear;
  z-index: 0;
}

#bg-img {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("img/background.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: 0;             
  pointer-events: none;    
}

/* 导航 */
#nav {
  position: fixed; top: 2em; left: 0;
  width: 100%; height: 50px;
  z-index: 10;
  opacity: 0;
}
#nav ul {
  display: flex; justify-content: space-around; align-items: center;
  height: 100%; position: relative;
}
#nav ul li {
  list-style: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  padding: 0 10px;
}
#nav ul li.active { /* 当前激活时，下划线由 JS 控制 */ }
#underline {
  position: absolute; bottom: 0; height: 2px; background: #fff;
  width: 0; left: 0;
  transform-origin: left center;
}

/* 页面容器 */
#pages {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 300vh;
  transform: translateY(0);
}
#pages section {
  position: relative;
  width: 100%; height: 100vh;
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
  display: none;
}

/* —— 启动页元素 —— */
/* 黑球 */
#ball {
  position: absolute;
  top: -50px;
  left: 50%;
  width: 50px; height: 50px;
  margin-left: -25px;
  background: #000;
  border-radius: 50%;
  z-index: 1;
}
#center-img, #join-btn, #about-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 2;
}

/* LOGO */
#center-img {
  bottom: -200px;
  width: 60%;
  max-width: 300px;
}

/* 按钮样式 */
#join-btn, #about-btn {
  bottom: auto; 
  padding: 0.8rem 1.5rem;
  background: rgba(255,255,255);        
  color: #000;             
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2); 
  transition: transform 0.2s ease;
  user-select: none;
        box-shadow: 1px 1px 5px 0px rgba(50, 50, 50, 0.75);
        transition: .2s;
}
#join-btn:active, #about-btn:active {
  transform: translateX(-50%) scale(0.95);
  background: #333;
}

/* 2) 公告跑马灯样式 */
#marquee-container {
  position: fixed;
  top: calc(20px + 50px + 20px); /* nav.top(20px)+nav.height(50px) */
  width: 100%;
  height: 30px;
  overflow: hidden;
  z-index: inherit;
  opacity: 0;
}
#announcement {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.9rem;
  color: #8cd9f7;
  line-height: 30px;
  /* 从右向左滚动 */
  animation: marquee 9s linear infinite;
}

/* marquee 动画 */
@keyframes marquee {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* 网页底信息 */
.home-footer {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-size: 0.6rem;
  color: #ffffff6d;
  line-height: 1.2;
  z-index: 2;
}

/* —— 故事 & 留言 —— */
.glass-container {
top: calc(38px + 50px + 15px);
left: 5%;
  position: absolute;
  width: 90%; height: 83%;
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  overflow: hidden;
  padding: 20px;
  padding-right: 7px;
}
/* 滚动列表 */
.story-list {
  width: 100%; height: 100%;
  overflow-y: auto;
}
.story {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 40px;
   opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.story.visible {
  opacity: 1;
  transform: translateY(0);
}
.story img {
  width: 80%; max-width: 300px; border-radius: 8px;
}
.story p {
  margin-top: 10px; color: #fff; text-align: center;
}

.message-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  gap: 20px;
}

/* 留言板可滑动列表 */
.message-list {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  justify-content: center; /* 水平居中 */
  align-items: flex-start;
  padding: 20px 0;
}

/* 单个留言项：竖直居中排布 */
.message-item {
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 文字 */
.message-text {
  color: #fff;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
/* 用于强调的文字 */
.message-text .highlight {
  color: #66ccff;
  font-weight: bold;
}

/* 图片 */
.message-img {
  width: 80%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* 按钮组 */
.message-buttons {
  display: flex;
  gap: 20px;
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

/* 单个按钮 */
.message-btn {
  flex: 1;
  max-width: 140px;
  padding: 0.8rem;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.1s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 按压效果 */
.message-btn:active {
  transform: scale(0.95);
  background: #333;
}

/* 响应式：更窄屏幕时按钮更紧凑 */
@media (max-width: 360px) {
  .message-buttons {
    gap: 10px;
  }
  .message-btn {
    max-width: 120px;
    padding: 0.6rem;
    font-size: 0.8rem;
  }
}

/* 通知框样式 */
.notify-container {
  position: fixed;  
  top: 9%;             
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #d4f8e8;  /* 淡绿色 */
  border-radius: 8px;
  padding: 0.8rem 1rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  display: inline-block;
}

/* 渐显 */
.notify-container.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* 文本 */
.notify-text {
  color: #036b4e;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* 进度条背景 */
.notify-bar-bg {
  width: 100%;
  height: 4px;
  background: #a9e6ca;
  border-radius: 2px;
  overflow: hidden;
}

/* 进度条 */
.notify-bar {
  width: 100%;
  height: 100%;
  background: #36c58f;
}