:root {
  --color-main: #004cbd;
  --color-black: #000;
  --color-white: #fff;
  --color-gray: #666;
  --font-digital: "SIDigitalNumRegular", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft Yahei", "Heiti SC", sans-serif;
  background-color: var(--color-black);
  overflow: hidden;
  color: var(--color-white);
}

/* 语义化布局容器 */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: flex-start; /* 只保留左侧按钮组，调整对齐方式 */
  padding: 20px;
}

main {
  position: relative;
  width: 100vw;
  height: 100vh;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px 20px;
  background-color: rgba(0, 0, 0, 0.0);
  text-align: center;
  z-index: 90;
  font-size: 14px;
  color: #ebe7e7;
}

/* 视频背景 */
.video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

/* 背景图片（备用/切换用） */
.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 使用绝对路径或确保相对路径正确 */
  background-image: url('https://picabstract-preview-ftn.weiyun.com/ftn_pic_abs_v3/59da20d123269e1463bcdd93fc57e4e9bd62fd30ede8d08f499b02ae12eef30a3cc66005d3df16fdbeccb31d8ff3b634?pictype=scale&from=30113&version=3.3.3.3&fname=20250228113203443.png&size=1024');
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}

/* 背景切换激活状态 */
.video-wrapper.active + .bg-image {
  opacity: 1;
  z-index: 1;
}

.video-wrapper.active video {
  opacity: 0;
}

/* 功能按钮组 */
.btn-group {
  display: flex;
  gap: 15px;
}

/* 背景切换按钮 */
.bg-switch-btn {
  padding: 10px 15px;
  border-radius: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--color-white);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.bg-switch-btn:hover {
  background-color: var(--color-main);
}

/* 关闭/显示公告按钮 */
.notice-btn {
  padding: 10px 15px;
  border-radius: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--color-white);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.notice-btn:hover {
  background-color: var(--color-main);
}

/* 加载公告（透明模式） */
.loading-poster {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; /* 更宽的响应式宽度 */
  max-width: 500px;
  background-color: rgba(0, 0, 0, 0.0); /* 稍微增加不透明度以便看清 */
  backdrop-filter: blur(2px); /* 适当增加模糊效果 */
  border-radius: 10px; /* 恢复一点圆角 */
  padding: 10px; /* 增加内边距 */
  z-index: 99;
  text-align: center;
  transition: all 0.5s ease;
  box-shadow: 0 0 30px rgba(0, 76, 189, 0.2);
}

.loading-poster.hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  pointer-events: none;
}

.loading-poster .loading-img {
  width: auto; /* 自动宽度 */
  height: 120px; /* 固定高度，防止变形 */
  margin-bottom: 20px;
  border-radius: 10%;
  box-shadow: 0 0 10px rgba(0, 76, 189, 0.3);
}

.loading-poster p {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); /* 增强文字阴影 */
}

.loading-poster .notice-title {
  font-size: 20px;
  font-weight: bold;
  color: #4dc3ff; /* 更亮的颜色 */
  margin-bottom: 15px;
}

.loading-poster a {
  color: #076fdd;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.0);
}

.loading-poster a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

/* 时间显示 */
.time-display {
  position: absolute;
  bottom: 80px; /* 留出底部版权空间 */
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-digital);
  color: var(--color-white);
  font-size: clamp(2rem, 8vw, 6rem);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 30px rgba(0, 76, 189, 0.6);
  letter-spacing: 5px;
  z-index: 10;
}

/* 底部版权 */
.copyright {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.copyright a {
  color: #e7e1e1; /* 更明显的颜色 */
  text-decoration: none;
  transition: color 0.3s ease;
}

.copyright a:hover {
  color: var(--color-white);
}

/* 数字字体 - 确保路径正确或使用绝对路径 */
@font-face {
  font-family: "SIDigitalNumRegular";
  src: url("https://cdn.jsdelivr.net/npm/si-digital-num-font@1.0.0/SIDigitalNumRegular.eot");
  src: url("https://cdn.jsdelivr.net/npm/si-digital-num-font@1.0.0/SIDigitalNumRegular.eot?#iefix") format("embedded-opentype")
  font-weight: normal;
  font-style: normal;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .btn-group {
    flex-direction: column;
    gap: 10px;
  }

  .loading-poster {
    padding: 15px;
  }

  .loading-poster .loading-img {
    height: 100px;
  }

  .loading-poster p {
    font-size: 14px;
  }

  .time-display {
    font-size: clamp(1.5rem, 6vw, 4rem);
    letter-spacing: 2px;
    bottom: 70px;
  }

  footer {
    padding: 10px 15px;
    font-size: 12px;
  }
}