/* 
   占卜网站优化版 CSS
   特点:
   1. 神秘紫蓝色调主题
   2. 金色/古铜色强调元素
   3. 细节装饰增强神秘感
   4. 全面响应式设计
   5. 渐变和微妙动画效果
*/

:root {
  /* 五行色系 */
  --wood-color: #688e26;      /* 木：青绿色 */
  --fire-color: #b44230;      /* 火：朱红色 */
  --earth-color: #b8894d;     /* 土：土黄色 */
  --metal-color: #c5bfb0;     /* 金：金属色 */
  --water-color: #3d5e8c;     /* 水：深蓝色 */

  /* 主色调 */
  --bg-color: #f9f5ea;        /* 宛纸色背景 */
  --bg-color-rgb: 249, 245, 234;
  --text-color: #33302e;      /* 墨色文字 */
  --primary-color: #872d2d;   /* 朱砂色主色调 */
  --secondary-color: #f3ecd8; /* 淡宛纸色背景 */
  
  /* 按钮和交互元素 */
  --button-bg: #872d2d;       /* 朱砂色按钮 */
  --button-bg-hover: #5a1818; /* 深朱砂色按钮悬停 */
  --button-bg-rgb: 135, 45, 45;
  --button-text: #f3ecd8;     /* 淡宛纸色按钮文字 */
  
  /* 边框和装饰 */
  --border-color: #b8894d;    /* 金鉺色边框 */
  --shadow-color: rgba(84, 66, 41, 0.3); /* 暗褐色阴影 */
  
  /* 状态颜色 */
  --success-color: #688e26;   /* 木色成功 */
  --danger-color: #b44230;    /* 火色危险 */
  --warning-color: #d9a748;   /* 金色警告 */
  --info-color: #3d5e8c;      /* 水色信息 */
  
  /* 表格和卡片 */
  --table-header-bg: #e6d7b7; /* 淡灰黄色表头 */
  --table-row-hover: #f3ecd8;  /* 淡宛纸色悬停 */
  --table-border: #b8894d;    /* 金鉺色表格边框 */
  
  /* 输入框 */
  --input-bg: #f9f5ea;        /* 宛纸色输入框 */
  --input-border: #b8894d;    /* 金鉺色输入框边框 */
  --input-focus-border: #872d2d; /* 朱砂色聚焦边框 */
  --card-bg: #f9f5ea;         /* 宛纸色卡片背景 */
  
  /* 五行元素类型色 */
  --element-jin: #c5bfb0;     /* 金 */
  --element-mu: #688e26;      /* 木 */
  --element-shui: #3d5e8c;    /* 水 */
  --element-huo: #b44230;     /* 火 */
  --element-tu: #b8894d;      /* 土 */
  --transition-speed: 0.3s;
}

[data-theme="dark"] {
  /* 东方现学暗色主题 */
  --bg-color: #231f20;        /* 深墨色背景 */
  --bg-color-rgb: 35, 31, 32; /* 背景色RGB值 */
  --container-bg: #2d2925;    /* 茶褐色容器背景 */
  --text-color: #e9e2d0;      /* 宛纸色文字 */
  --primary-color: #ca3433;   /* 朱红色主色调 */
  --secondary-color: #2d2925; /* 茶褐色背景 */
  
  /* 按钮和交互元素 */
  --button-bg: #ca3433;       /* 朱红色按钮 */
  --button-bg-hover: #aa2222; /* 深朱红色按钮悬停 */
  --button-bg-rgb: 202, 52, 51;
  --button-text: #f3ecd8;     /* 宛纸色按钮文字 */
  
  /* 边框和装饰 */
  --border-color: #d9a748;    /* 金色边框 */
  --shadow-color: rgba(0, 0, 0, 0.45); /* 深色阴影 */
  
  /* 状态颜色和表格 */
  --table-header-bg: #3a332c;  /* 深茶褐色表头 */
  --table-row-hover: #46372d;  /* 深茶褐色悬停 */
  --table-border: #d9a748;     /* 金色表格边框 */
  
  /* 输入框 */
  --input-bg: #2d2925;        /* 茶褐色输入框 */
  --input-border: #d9a748;    /* 金色输入框边框 */
  --input-focus-border: #ca3433; /* 朱红色聚焦边框 */
  --card-bg: #2d2925;         /* 茶褐色卡片背景 */
  
  /* 五行元素暗色主题色 */
  --element-jin: #d9a748;     /* 金-暗色主题 */
  --element-mu: #6fa33e;      /* 木-暗色主题 */
  --element-shui: #4f7cba;    /* 水-暗色主题 */
  --element-huo: #ca3433;     /* 火-暗色主题 */
  --element-tu: #aa8044;      /* 土-暗色主题 */
}

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

body {
  font-family: 'Noto Serif SC', serif, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  margin: 0;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  width: 100%;
  overflow-x: hidden;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><path fill="rgba(155, 89, 182, 0.05)" d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5z"/></svg>');
  background-position: center center;
  background-attachment: fixed;
  background-size: 200px;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  padding: 30px 20px;
  background-color: var(--container-bg);
  box-shadow: 0 4px 20px var(--shadow-color);
  border-radius: 12px;
  flex: 1;
  transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

/* 添加装饰性边角元素 */
.container::before,
.container::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  border: 2px solid var(--accent-color);
  opacity: 0.4;
  z-index: 0;
}

.container::before {
  top: 5px;
  left: 5px;
  border-right: none;
  border-bottom: none;
  border-radius: 8px 0 0 0;
}

.container::after {
  bottom: 5px;
  right: 5px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 8px 0;
}

h2 {
  color: var(--title-color);
  margin-bottom: 30px;
  font-size: 1.8rem;
  text-align: center;
  font-weight: 600;
  position: relative;
  padding-bottom: 15px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--accent-color), transparent);
}

/* 公告样式 */
.announcement-container {
  width: 100%;
  margin-bottom: 25px;
  overflow: hidden; /* 确保内容不会溢出 */
}

.announcement {
  background-color: #ffed98;
  color: #333;
  padding: 12px 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden; /* 确保内容不会溢出 */
}

[data-theme="dark"] .announcement {
  background-color: #584e00;
  color: #f8f8f8;
}

.announcement i {
  margin-right: 10px;
  font-size: 1.2rem;
  color: #e3742f;
  flex-shrink: 0; /* 防止图标被压缩 */
}

[data-theme="dark"] .announcement i {
  color: #ffb74d;
}

.announcement-text {
  color: #ff0000; /* 设置文字为红色 */
  font-weight: 600; /* 加粗显示 */
  white-space: nowrap; /* 防止文字换行 */
  display: inline-block;
  padding-right: 50px; /* 添加间距，使循环看起来更自然 */
  /* 使用CSS变量控制滚动速度，便于JS动态修改 */
  --scroll-speed: 15s;
  animation: scrollText var(--scroll-speed) linear infinite;
}

/* 设置滚动动画 */
@keyframes scrollText {
  0% {
    transform: translateX(100%); /* 从右侧开始 */
  }
  100% {
    transform: translateX(-100%); /* 滚动到左侧 */
  }
}

.theme-switch {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10; /* 增加层级，确保不被遮挡 */
}

.theme-switch button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  color: var(--text-color);
  transition: transform 0.3s;
}

.theme-switch button:hover {
  transform: scale(1.1);
}

.input-section {
  display: flex;
  flex-direction: column;
  gap: 10px; /* 减少元素间的间距 */
  margin-bottom: 25px;
  width: 100%;
  max-width: 450px; /* 缩小最大宽度，使布局更紧凑 */
  margin-left: auto;
  margin-right: auto;
  padding: 0 10px; /* 添加小的内边距 */
}

.input-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px; /* 减少间距 */
  justify-content: flex-start; /* 改为左对齐 */
  width: 100%;
  margin-bottom: 12px; /* 增加行间距 */
}

.input-group label {
  width: 90px; /* 减少标签宽度 */
  text-align: right;
  color: var(--label-color);
  font-size: 1rem;
  flex-shrink: 0;
  margin-right: 10px; /* 添加右侧间距 */
}

input {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  padding: 10px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  background-color: var(--input-bg, var(--container-bg));
  color: var(--text-color);
}

input:focus {
  border-color: var(--button-bg);
  outline: none;
}

button {
  margin: 20px auto;
  padding: 12px 30px;
  background-color: var(--button-bg);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  transition: background-color 0.3s, transform 0.2s;
  display: block;
}

button:hover {
  background-color: var(--button-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

button:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

button:active {
  transform: translateY(0);
}

.table-container {
  overflow-x: auto;
  margin: 30px auto; /* 上下边距30px，左右自动 - 实现居中 */
  border-radius: 8px;
  box-shadow: 0 4px 15px var(--shadow-color);
  display: none; /* 默认隐藏表格 */
  max-width: 100%; /* 确保不超出容器 */
  width: fit-content; /* 适应内容宽度 */
  background-color: var(--container-bg);
  padding: 10px; /* 添加内边距 */
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  box-shadow: 0 4px 12px var(--shadow-color);
  border-radius: 8px;
  overflow: hidden;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><path fill="rgba(155, 89, 182, 0.03)" d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm63 31c1.657 0 3-1.343 3-3s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM34 90c1.657 0 3-1.343 3-3s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.657 0 3-1.343 3-3s-.895-2-2-2-2 .895-2 2 .895 2 2 2z"/></svg>');
  background-position: center center;
  background-size: 200px;
}

td {
  border: 1px solid var(--border-color);
  padding: 18px 15px; /* 增加内边距使表格更大 */
  text-align: center;
  font-size: 1.1rem; /* 增大字号 */
  line-height: 1.4;
}

tr:first-child td {
  background-color: var(--table-header-bg);
  font-weight: bold;
}

/* 五行元素样式美化 */
.wood {
  background: linear-gradient(135deg, #43a047, #2e7d32);
  color: white;
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.5);
}

.fire {
  background: linear-gradient(135deg, #ff7043, #e64a19);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 112, 67, 0.5);
}

.earth {
  background: linear-gradient(135deg, #a1887f, #795548);
  color: white;
  box-shadow: 0 2px 8px rgba(161, 136, 127, 0.5);
}

.metal {
  background: linear-gradient(135deg, #ffeb3b, #fbc02d);
  color: #5d4037;
  box-shadow: 0 2px 8px rgba(255, 235, 59, 0.5);
}

.water {
  background: linear-gradient(135deg, #29b6f6, #0288d1);
  color: white;
  box-shadow: 0 2px 8px rgba(41, 182, 246, 0.5);
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    margin: 50px 0 10px 0; /* 增加顶部间距，给按钮留出空间 */
    padding: 20px 15px;
    width: calc(100% - 20px);
  }

  h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-top: 25px; /* 增加顶部空间，避免标题被按钮遮挡 */
  }

  .input-group {
    justify-content: flex-start;
  }

  .input-group label {
    min-width: 100px;
    font-size: 0.9rem;
  }

  input {
    max-width: 150px;
    padding: 8px;
    font-size: 0.9rem;
  }

  button {
    font-size: 0.95rem;
    padding: 10px 20px;
  }

  .theme-switch {
    right: 10px;
    top: 55px; /* 将按钮位置下移，避免遮挡标题 */
    position: fixed; /* 固定定位，确保始终可见 */
    background-color: rgba(var(--bg-color-rgb), 0.8);
    padding: 8px;
    border-radius: 8px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* 增加阴影使按钮更明显 */
    border: 1px solid rgba(255, 255, 255, 0.1); /* 添加轻微边框 */
  }
}

@media screen and (max-width: 480px) {
  body {
    padding: 5px;
  }

  .container {
    margin: 5px 0;
    padding: 15px 10px;
    width: calc(100% - 10px);
  }

  h2 {
    font-size: 1.3rem;
  }

  button {
    width: 100%;
    padding: 10px;
  }

  td {
    padding: 6px 3px;
    font-size: 0.85rem;
  }

  .footer {
    margin-left: -5px;
    margin-right: -5px;
    margin-bottom: -5px;
    width: calc(100% + 10px);
  }

  .footer-content {
    padding: 0 10px;
  }

  .theme-switch {
    right: 5px;
    top: 50px; /* 调整超小屏幕上的按钮位置 */
  }
}

/* 历史记录弹窗样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  position: relative;
  background-color: var(--container-bg);
  margin: 10% auto;
  padding: 25px;
  width: 80%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 4px 6px var(--shadow-color);
}

.modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.modal-header h3 {
  color: var(--title-color);
  margin: 0;
  font-size: 1.3rem;
}

.close-button {
  position: absolute;
  right: -15px;
  top: -15px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  background-color: var(--button-bg);
  color: white;
  border: none;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px var(--shadow-color);
}

.close-button:hover {
  background-color: var(--button-hover);
  transform: scale(1.1);
}

.modal-body {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.history-item {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
}

.history-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.history-numbers {
  font-weight: bold;
  color: var(--text-color);
}

.history-time {
  color: var(--label-color);
  font-size: 0.9rem;
  margin-top: 3px;
}

.history-topic {
  color: var(--label-color);
  font-size: 0.9rem;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 自定义滚动条 */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--button-bg);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--button-hover);
}

/* 修改主题切换按钮组样式 */
.theme-switch {
  display: flex;
  gap: 10px;
}

.theme-switch button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--container-bg);
  box-shadow: 0 2px 4px var(--shadow-color);
}

/* 响应式设计补充 */
@media screen and (max-width: 768px) {
  .modal-content {
    width: 90%;
    margin: 10% auto;
  }

  .history-item {
    padding: 10px;
  }

  .close-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    right: -15px;
    top: -15px;
  }
}

@media screen and (max-width: 480px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .close-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    right: -15px;
    top: -15px;
  }
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 20px 0;
}

.button-group button {
  margin: 0;
}

.clear-button {
  background-color: #dc3545;
}

.clear-button:hover {
  background-color: #c82333;
}

.clear-button i {
  margin-right: 5px;
}

/* 响应式设计补充 */
@media screen and (max-width: 480px) {
  .button-group {
    flex-direction: column;
    gap: 10px;
  }
}

.footer {
  width: 100%;
  text-align: center;
  padding: 40px 20px 20px;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-color);
  position: relative;
  left: 0;
  right: 0;
  margin-left: -20px;
  margin-right: -20px;
  margin-bottom: -20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
  text-align: center;
  padding: 0 20px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-section h4 {
  color: var(--title-color);
  margin-bottom: 15px;
  font-size: 1.1rem;
  text-align: center;
}

.footer-section p {
  color: var(--text-color);
  margin: 8px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  max-width: 300px;
}

.footer-section i {
  margin-right: 8px;
  color: var(--button-bg);
}

.footer-section a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--button-bg);
}

/* 点击复制样式 */
.copy-text {
  cursor: pointer;
  color: var(--text-color);
  border-bottom: 1px dashed var(--text-color);
  transition: all 0.3s ease;
  padding-bottom: 1px;
}

.copy-text:hover {
  color: var(--button-bg);
  border-bottom-color: var(--button-bg);
}

.copy-tip {
  font-size: 0.8rem;
  color: #888;
  margin-left: 5px;
}

.copy-success {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 0.9rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.copy-success.show {
  opacity: 1;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.footer-bottom a {
  color: var(--text-color);
  text-decoration: none;
  margin: 0 10px;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-bottom a:hover {
  color: var(--button-bg);
}

/* 响应式设计补充 */
@media screen and (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 20px;
  }

  .footer-section {
    text-align: center;
  }

  .footer-section p {
    max-width: 100%;
  }
}

@media screen and (max-width: 480px) {
  .footer {
    padding: 30px 15px 15px;
    margin-top: 30px;
  }

  .footer-bottom a {
    display: block;
    margin: 8px 0;
  }

  .footer-section h4 {
    font-size: 1rem;
  }

  .footer-section p {
    font-size: 0.85rem;
  }
}

/* 清空历史记录按钮样式 */
.clear-history-button {
  width: 100%;
  margin: 0 0 15px 0;
  padding: 8px 15px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, transform 0.2s;
}

.clear-history-button:hover {
  background-color: #c82333;
  transform: translateY(-2px);
}

.clear-history-button i {
  margin-right: 8px;
}

@media screen and (max-width: 480px) {
  .clear-history-button {
    font-size: 0.85rem;
    padding: 6px 12px;
  }
}

/* 解释信息区域样式 */
.interpretation-container {
  margin-top: 30px;
  background-color: var(--container-bg);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow-color);
  overflow: hidden;
  display: none; /* 默认隐藏，提交后显示 */
}

.interpretation-tabs {
  display: flex;
  background-color: var(--table-header-bg);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-button {
  padding: 15px 30px; /* 增大填充使按钮更宽 */
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1.1rem; /* 进一步增大字体 */
  transition: all 0.3s ease;
  min-width: 150px; /* 增加最小宽度 */
  text-align: center; /* 文本居中 */
}

.tab-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .tab-button:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.tab-button.active {
  border-bottom-color: var(--button-bg);
  font-weight: 600;
}

.interpretation-content {
  padding: 30px;
  font-size: 1.1rem;
  line-height: 1.6;
  background-color: rgba(240, 240, 255, 0.1);
  border-radius: 0 0 10px 10px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.content-placeholder {
  text-align: center;
  color: var(--label-color);
  padding: 30px 0;
  font-style: italic;
}

.interpretation-item {
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.interpretation-item:last-child {
  border-bottom: none;
}

.interpretation-item h4 {
  color: var(--title-color);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.interpretation-item p {
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 5px;
}

.interpretation-fortune {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  margin: 5px 0;
  font-weight: 600;
}

.fortune-da-ji {
  background: linear-gradient(135deg, #43a047, #2e7d32);
  color: white;
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.fortune-zhong-ji {
  background: linear-gradient(135deg, #7cb342, #558b2f);
  color: white;
  box-shadow: 0 2px 8px rgba(124, 179, 66, 0.3);
}

.fortune-ji {
  background: linear-gradient(135deg, #c0ca33, #9e9d24);
  color: #fff;
  box-shadow: 0 2px 8px rgba(192, 202, 51, 0.3);
}

.fortune-xiao-ji {
  background: linear-gradient(135deg, #ffb300, #fb8c00);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 179, 0, 0.3);
}

.fortune-xiong {
  background: linear-gradient(135deg, #ff7043, #e64a19);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 112, 67, 0.3);
}

.fortune-da-xiong {
  background: linear-gradient(135deg, #ef5350, #d32f2f);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 83, 80, 0.3);
}

/* 移动端响应式样式 */
@media screen and (max-width: 768px) {
  .interpretation-tabs {
    padding-bottom: 2px;
  }
  
  .tab-button {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .interpretation-content {
    padding: 15px;
  }
  
  .interpretation-item h4 {
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .tab-button {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .interpretation-content {
    padding: 10px;
  }
  
  .interpretation-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
}

.interpretation-heading {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--title-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
  text-align: center;
  position: relative;
}

.interpretation-heading::before {
  content: '✧';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  opacity: 0.7;
}

.interpretation-heading::after {
  content: '✧';
  position: absolute;
  right: 0;
  color: var(--accent-color);
  opacity: 0.7;
}