/* 通用样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 设置整体页面背景 */
body {
  font-family: "Cascadia Code", "Arial", sans-serif;
  background-color: #f4f4f9;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

/* 禁止非必要元素的选中/复制 */
body,
.big-button,
.svg-btn,
.tooltip,
.formula,
.highlight {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* 标题样式 */
h1 {
  text-align: center;
  color: #4caf50;
  font-size: 2.5rem;
  margin-bottom: 20px;
}

/* 显示映射结果区域样式 */
#mappedDates {
  font-size: 1.2rem;
  color: #555;
  background-color: #ffffff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
  max-width: 600px;
  text-align: center;
}

#mappedDates.placeholder {
  color: #aaa;
}

.placeholder {
  color: #aaa;
}

/* 大按钮样式 */
.big-button {
  display: block;
  margin: 20px auto;
  padding: 12px 20px;
  font-size: 1rem;
  font-family: "Cascadia Code", "Arial", sans-serif;
  color: white;
  background-color: #4caf50;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

.big-button:hover {
  background-color: #45a049;
  transform: scale(1.05); /* 鼠标悬停时放大 */
}

/* 输入区域样式 */
input[type="text"] {
  display: block;
  margin: 10px auto;
  padding: 10px;
  font-size: 1rem;
  font-family: "Cascadia Code", "Arial", sans-serif;
  width: 100%;
  max-width: 300px;
  border-radius: 5px;
  border: 1px solid #ddd;
  outline: none;
  text-align: center; /* 居中显示文本 */
}

input[type="text"]:focus {
  border-color: #4caf50;
}

/* 容器样式 */
.container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式布局：让内容适应小屏幕 */
@media screen and (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  #mappedDates {
    font-size: 1rem;
    padding: 10px;
  }

  input[type="text"] {
    max-width: 100%;
  }
}

/* 历史记录样式 */
#history {
  margin-top: 20px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.history-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #ddd;
}

.history-entry:last-child {
  border-bottom: none;
}

.history-entry:hover .svg-btn {
  display: inline;
}

.svg-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  padding: 0; /* 去除内边距 */
}

.svg-btn svg {
  width: 16px;
  height: 16px;
}

.icon-button {
  display: inline-flex;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

/* #toggleHistory {
  display: block;
  margin: 20px auto;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s;
} */

#toggleHistory {
  transition: transform 0.3s;
}

#toggleHistory svg {
  width: 24px;
  height: 24px;
  fill: none;
}

#toggleHistory:hover {
  transform: scale(1.1); /* 鼠标悬停时轻轻浮起 */
}

#infoButton {
  transition: transform 0.3s;
}

#infoButton svg {
  width: 24px;
  height: 24px;
  fill: none;
  transition: transform 0.3s;
}

#infoButton:hover {
  transform: scale(1.1); /* 鼠标悬停时轻轻浮起 */
}

.tooltip {
  display: none;
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 5px;
  border-radius: 5px;
  white-space: normal;
  font-size: 0.9rem;
  z-index: 10;
  width: auto;
  max-width: 600px;
  overflow: hidden;
}

#infoButton:hover + .tooltip {
  display: block;
}

/* 公式方块样式 */
.formula {
  background-color: #e0f7fa;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
  max-width: 600px;
  text-align: center;
  font-size: 1.2rem;
  color: #333;
}

.highlight {
  cursor: pointer;
  position: relative;
}

.highlight:hover::after {
  content: attr(data-value);
  position: absolute;
  bottom: 100%;
  left: 0%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 5px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 0.9rem;
  z-index: 10;
}

.info-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 20px; /* 设置按钮之间的间距 */
}
