/* 通用样式 */
body {
  font-family: "微软雅黑", sans-serif;
  padding: 2em;
  background: #f0f0f0;
  color: #000;
  transition: background 0.3s, color 0.3s;
}

.center-container {
  width: 1000px;
  max-width: 95vw; /* 最大宽度不超过屏幕95% */
  margin: 0 auto;
  text-align: left;
}

#toggleTheme {
  margin-bottom: 1em;
}

.text-info {
  display: flex;
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */
  border: 1px solid #ccc;
  padding: 1em;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  flex: 1;

  min-height: 120px; /* 关键：需有高度才能垂直居中 */
}

/* .text-info h1 {
  margin: 0 0 0.5em;
}

.text-info .author {
  margin: 0 0 0.5em;
  font-weight: bold;
  color: #333;
} */

.text-info .intro {
  color: #666;
  line-height: 1.5;
  text-align: left; /* 根据需求也可以是 center */
  margin: 0; /* 移除默认段落边距 */
}

#header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1em;
}

#header img {
  width: 120px;
  height: auto;
  border-radius: 6px;
}

.author {
  margin-left: 1.5em;
  font-weight: bold;
}

.intro {
  margin-left: 1.8em;
  color: #666;
}

#content {
  white-space: pre-wrap;
  background: #fff;
  padding: 1.5em;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s, color 0.3s;

  width: 1000px;
  max-width: 95vw;
  margin: 0 auto;
}

select {
  font-size: 1em;
  margin-bottom: 1em;
}

/* 夜间模式 */
body.dark {
  background: #1e1e1e;
  color: #eee;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

body.dark #content {
  background: #2e2e2e;
  color: #eee;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

body.dark .text-info {
  background-color: #2e2e2e;
  color: #eee;
  border-color: #444;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.05);
}
body.dark .text-info .intro {
  color: #ccc;
}
#backToTop {
  position: fixed;
  /* left: 20px; */
  right: 20px;
  bottom: 20px; /* 改成距离底部 */
  top: auto; /* 取消顶部定位 */
  transform: none; /* 取消平移 */
  padding: 10px 15px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  background: #555;
  color: white;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  z-index: 1000;
  display: none;
}

#backToTop:hover {
  opacity: 1;
}

/* 手机响应式 */
@media (max-width: 600px) {
  body {
    padding: 1em;
  }
  .center-container {
    width: 100%;
    max-width: 100%;
  }
  #content {
    width: 100%;
    max-width: 100%;
    padding: 1em;
    font-size: 1.1rem;
  }
  select {
    width: 100%;
    font-size: 1rem;
  }
  #toggleTheme {
    font-size: 1rem;
    padding: 8px 12px;
  }
}
