@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ========== 基础布局 ========== */
body {
  /* background-color: #1e1e1e; */
  color: #f0f0f0;
  font-family: 'Press Start 2P', cursive;
  text-align: center;
  padding: 2em;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1 {
  font-size: 1.5em;
  margin-bottom: 1em;
}

a {
  color: #00ffff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ========== 导航栏 ========== */
nav {
  position: relative;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  color: #00ffff;
  cursor: pointer;
  text-align: right;
  padding: 10px;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 2em;
  margin: 1em 0;
}

nav li {
  margin: 0;
}

/* ========== 图集样式 ========== */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em;
  margin-top: 2em;
}

figure {
  width: 200px;
  margin: 0;
}

figure img {
  max-width: 100%;
  border: 2px solid #fff;
}

figcaption {
  margin-top: 0.5em;
  font-size: 0.8em;
}

/* ========== gif 图展示 ========== */
.gif-container {
  display: flex;
  justify-content: center;
  margin-top: 80px;
  margin-bottom: 40px;
}

.gif-container img {
  width: 300px;
  height: auto;
}

/* ========== Footer credit ========== */
footer.credit {
  margin-top: auto;
  text-align: center;
  font-size: 14px;
  color: #00ffcc;
  font-family: 'Courier New', Courier, monospace;
  padding: 20px;
  z-index:10;/* 确保footer在最前面 */
  }
 

/* ========== 建设时钟 ========== */
#site-timer {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #00ffcc;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid #00ffcc;
  border-radius: 4px;
  z-index: 9999;
}

/* ========== 响应式适配：移动设备 ========== */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .gallery {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 两列布局 */
    gap: 1em;
  }

  h1 {
    font-size: 24px;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1em;
  }

  nav ul.active {
    display: flex;
  }

  nav li {
    margin: 10px 0;
  }

  .gif-container img {
    width: 200px;
  }
}

/* 新增的CSS样式 */
.fullscreen-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8); /* 半透明背景 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* 确保全屏图像位于所有内容之上 */
}

.fullscreen-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain; /* 确保图片比例不失真 */
  border: 2px solid #fff; /* 图片边框 */
  cursor: pointer; /* 鼠标指针显示为手形 */
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* 让粒子效果在背景中 */
}

body {
  background: linear-gradient(135deg, #1e1e1e, #333);
  color: #f0f0f0;
  font-family: 'Press Start 2P', cursive;
  text-align: center;
  padding: 2em;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 禁止右键点击图片 */
img {
  pointer-events: auto;  /* 保持图片能够响应点击 */
  -webkit-user-drag: none;  /* 禁止拖拽 */
  user-select: none;  /* 禁止文本选中 */
}

/* 禁用右键菜单 */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 在图片上添加一个透明的层来阻止右键和拖拽 */
.gallery figure {
  position: relative;
}

.gallery figure img {
  pointer-events: auto; /* 允许图片响应点击 */
}

/* 防止右键菜单弹出 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* 页面最小高度 */
}

/* 全屏显示图片样式 */
.fullscreen-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8); /* 半透明背景 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* 确保全屏图像位于所有内容之上 */
}

/* 图片样式 */
.fullscreen-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain; /* 确保图片比例不失真 */
  border: 2px solid #fff; /* 图片边框 */
  cursor: pointer; /* 鼠标指针显示为手形 */
}

/* 关闭按钮样式 */
.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 50%;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* <!-- 建设主页人物导航互动 --> */
.interactive-zone {
  position: relative;
  text-align: center;
  margin-top: 30px;
}

#zimno {
  width: 200px;
  cursor: pointer;
}

#dialog-box {
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  width: fit-content;
  margin: 20px auto 0;
  display: none;
}

.options button {
  margin: 10px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.options button {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.options button:hover {
  background-color: #444;
  color: #fff;
}

.hidden {
  display: none;
}

/* Zimno位置调整 */
.zimno-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

#zimno {
  width: 150px;
  height: auto;
  border-radius: 10px;
}

.dialogue {
  flex: 1;
  background-color: #222;
  color: white;
  padding: 15px;
  border-radius: 10px;
  font-family: monospace;
}

.options {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.options button {
  background-color: #444;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.options button:hover {
  background-color: #666;
}

.menu-icon {
  color: #00ffff; /* 改成你导航栏链接的颜色 */
  font-weight: bold;
}

/* Zimno 表情状态 */

#zimno.happy {
  filter: brightness(1.05); /* 稍微提亮，不刺眼 */
  animation: pulse 0.5s infinite alternate; /* 加快动画节奏 */
}

#zimno.sad {
  filter: grayscale(70%) brightness(0.7);
  animation: fadePulse 2s ease-in-out infinite;
}

#zimno.angry {
  filter: grayscale(100%) brightness(0.7) hue-rotate(-120deg); /* 变灰，降低亮度 */
  animation: shake 0.3s infinite;
}

/* 颤抖效果 */
@keyframes shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, 2px); }
  100% { transform: translate(1px, -2px); }
}

#zimno.curious {
  filter: brightness(0.95); /* 降低亮度 */
  animation: curious-move 1s infinite alternate ease-in-out;
}

/* 左右小幅移动模拟“观察”行为 */
@keyframes curious-move {
  from { transform: translateX(-5px); }
  to { transform: translateX(5px); }
}

#zimno.shy {
  filter: blur(1px) opacity(0.8);
}

#zimno.neutral {
  filter: none;
}

#zimno.confused {
  filter: hue-rotate(60deg);
}

#zimno.tired {
  opacity: 0.7;
}

/* 动画定义 */

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

@keyframes shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 0); }
  50% { transform: translate(2px, 0); }
  75% { transform: translate(-2px, 0); }
  100% { transform: translate(0, 0); }
}

@keyframes fadePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* 第二分枝选项卡样式 */
/* Secondary options 基础按钮样式 */

.secondary-options button {
  background-color: #111;
  color: #eee;
  border: 1px solid #666;
  padding: 10px 16px;
  margin: 5px;
  font-size: 14px;
  font-family: 'Press Start 2P', monospace; /* 使用像素字体 */
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* 鼠标悬停效果 */
.secondary-options button:hover {
  background-color: #333;
  transform: scale(1.1);
}

/* 禁用状态样式 */
.secondary-options button.disabled {
  background-color: #d3d3d3;
  color: #888;
  cursor: not-allowed;
  pointer-events: none; /* 禁止点击 */
}

/* 悬停效果 */
.secondary-options button:hover {
  background-color: #333;
  transform: scale(1.05);
}

/* 点击时略缩小 */
.secondary-options button:active {
  transform: scale(0.97);
}

/* 被点击过的按钮变灰 */
button.disabled {
  background-color: #d3d3d3;
  cursor: not-allowed;
  pointer-events: none; /* 禁止重复点击 */
}

/* 引入 Google Fonts 上的 8-bit 字体 */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* 全局字体设置 */
body {
  font-family: 'Press Start 2P', monospace; /* 8-bit 风格字体 */
  background-color: #000; /* 黑色背景 */
  color: #eee; /* 白色字体 */
}

/* 为中文字符使用其他适合的字体 */
@font-face {
  font-family: '8bit-chinese';
  src: url('path-to-your-chinese-8bit-font.woff2') format('woff2'), /* 引入你自定义的中文8-bit字体文件 */
       url('path-to-your-chinese-8bit-font.woff') format('woff');
}

/* 如果字体不存在，使用其他合适的中文字体 */
.chinese-text {
  font-family: '8bit-chinese', 'Press Start 2P', monospace;
}

/* 让链接字体也使用8-bit风格 */
a {
  text-decoration: none;
  color: #00ffcc;
}

/* 按钮样式 */
button {
  font-family: 'Press Start 2P', monospace; /* 8-bit 字体 */
  padding: 10px 20px;
  background-color: #111;
  color: #fff;
  border: 2px solid #444;
  cursor: pointer;
  text-transform: uppercase;
}

button:hover {
  background-color: #444;
}

/* 视觉专属的标题字体大小优化（适用于小屏） */
@media (max-width: 480px) {
  h1 {
    font-size: 18px;
  }
  .options button {
    font-size: 12px;
    padding: 8px 10px;
  }
}