/* 增强型UI样式 - 专为占卜网站设计 */

/* AI确认对话框样式优化 */
.ai-confirm-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 26, 46, 0.85);
  z-index: 2000;
  display: none; /* 默认隐藏，只有点击"获取解卦"按钮后才显示 */
  justify-content: center;
  align-items: center;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.ai-confirm-content {
  /* 东方现学风格对话框 */
  background: linear-gradient(135deg, #2d2925, #3a332c);
  color: #e9e2d0;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  position: relative;
  overflow: hidden;
  border: 1px solid #d9a748; /* 金色边框 */

  /* 添加东方风格装饰元素 */
  background-image: 
    linear-gradient(135deg, #2d2925, #3a332c),
    url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 25L60 40H40L50 25Z' fill='%23d9a74822'/%3E%3Cpath d='M50 75L40 60H60L50 75Z' fill='%23d9a74822'/%3E%3Cpath d='M25 50L40 40V60L25 50Z' fill='%23d9a74822'/%3E%3Cpath d='M75 50L60 60V40L75 50Z' fill='%23d9a74822'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100px 100px;
}

.ai-confirm-content::before,
.ai-confirm-content::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid #d4af37;
  opacity: 0.4;
  z-index: 0;
}

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

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

.ai-confirm-header {
  text-align: center;
  margin-bottom: 15px;
}

.ai-confirm-header h4 {
  color: #b08fff;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  padding-bottom: 10px;
  position: relative;
}

.ai-confirm-header h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, transparent, #d4af37, transparent);
}

.ai-confirm-content p {
  text-align: center;
  margin: 15px 0;
  line-height: 1.6;
}

.ai-confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* 东方神秘风格的获取解卦按钮 */
.ai-button {
  position: relative;
  padding: 10px 25px;
  background: linear-gradient(135deg, #9b59b6, #483d8b);
  color: #f3ecd8;
  border: 2px solid rgba(212, 175, 55, 0.6);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 1px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

/* 添加图标 */
.ai-button::before {
  content: '\f1ce'; /* Font Awesome指南针图标 */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 8px;
  font-size: 1.1rem;
  color: #f3ecd8;
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
  transition: all 0.3s ease;
}

/* 装饰边角 */
.ai-button::after {
  content: '';
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0) 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.ai-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3),
              0 0 12px rgba(155, 89, 182, 0.5),
              0 0 8px rgba(212, 175, 55, 0.3);
  border-color: rgba(233, 192, 80, 0.8);
  background: linear-gradient(135deg, #8e44ad, #32297a);
}

.ai-button:hover::before {
  color: #e9c050;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
  transform: scale(1.1);
}

.ai-button:hover::after {
  opacity: 0.5;
}

.ai-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
}

/* 深色主题样式调整 */
[data-theme="dark"] .ai-button {
  background: linear-gradient(135deg, #9b59b6, #1a1a2e);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4), 0 0 8px rgba(155, 89, 182, 0.3);
}

[data-theme="dark"] .ai-button:hover {
  background: linear-gradient(135deg, #8e44ad, #131328);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5), 0 0 15px rgba(155, 89, 182, 0.5), 0 0 10px rgba(212, 175, 55, 0.3);
}

#ai-confirm-yes {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white;
}

#ai-confirm-yes:hover {
  background: linear-gradient(135deg, #8e44ad, #6c3483);
}

#ai-confirm-no {
  background: linear-gradient(135deg, #7f8c8d, #95a5a6);
  color: white;
}

/* 免责声明优化 */
.disclaimer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 26, 46, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.disclaimer-content {
  background: linear-gradient(135deg, #f5f3fa, #fff);
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(72, 61, 139, 0.3);
  border: 1px solid #d1c4e9;
  position: relative;
}

[data-theme="dark"] .disclaimer-content {
  background: linear-gradient(135deg, #16213e, #1a1a2e);
  border: 1px solid #483d8b;
}

.disclaimer-header {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #d1c4e9;
  position: relative;
}

[data-theme="dark"] .disclaimer-header {
  border-bottom: 1px solid #483d8b;
}

.disclaimer-header h3 {
  margin: 0;
  color: #483d8b;
  font-size: 1.4rem;
  position: relative;
  display: inline-block;
}

[data-theme="dark"] .disclaimer-header h3 {
  color: #b08fff;
}

.disclaimer-header h3::before,
.disclaimer-header h3::after {
  content: '✧';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #d4af37;
  opacity: 0.8;
}

.disclaimer-header h3::before {
  left: -25px;
}

.disclaimer-header h3::after {
  right: -25px;
}

.disclaimer-body {
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.disclaimer-scroll {
  padding: 20px;
}

.disclaimer-subtitle {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

[data-theme="dark"] .disclaimer-subtitle {
  color: #cccccc;
}

.disclaimer-section {
  margin-bottom: 25px;
}

.disclaimer-section h4 {
  color: #483d8b;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #d1c4e9;
}

[data-theme="dark"] .disclaimer-section h4 {
  color: #b08fff;
  border-bottom: 1px dashed #483d8b;
}

.disclaimer-section p {
  line-height: 1.6;
  margin-bottom: 10px;
}

.disclaimer-footer {
  padding: 15px 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  border-top: 1px solid #d1c4e9;
}

[data-theme="dark"] .disclaimer-footer {
  border-top: 1px solid #483d8b;
}

.disclaimer-btn {
  padding: 10px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.disclaimer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.agree-btn {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white;
}

.agree-btn:hover {
  background: linear-gradient(135deg, #8e44ad, #6c3483);
}

.disagree-btn {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.disagree-btn:hover {
  background: linear-gradient(135deg, #c0392b, #962d22);
}

/* 历史记录模态框样式 */
#historyModal {
  background-color: rgba(0, 0, 0, 0.9); /* 加深背景色，从0.7改为0.9 */
  display: none; /* 默认隐藏，只有在点击历史记录按钮时才显示 */
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
  overflow: hidden;
  z-index: 1100; /* 确保在最上层 */
  position: fixed; /* 确保固定定位 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#historyModal .modal-content {
  background-color: var(--container-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* 加深阴影 */
  max-height: 80vh; /* 降低最大高度，留出更多空间 */
  width: 90%;
  max-width: 600px;
  margin: 0; /* 重置边距 */
  display: flex;
  flex-direction: column;
  position: absolute; /* 使用绝对定位 */
  top: 50%; /* 上边缘在垂直中心线 */
  left: 50%; /* 左边缘在水平中心线 */
  transform: translate(-50%, -50%); /* 向左上偏移自身宽高的一半，实现完全居中 */
  border: 1px solid var(--border-color); /* 添加边框增强对比度 */
  opacity: 1; /* 确保完全不透明 */
}

#historyModal .modal-header {
  background-color: var(--primary-color); /* 使用主色调作为标题栏背景 */
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 15px;
  border-radius: 12px 12px 0 0;
  color: white; /* 白色文字增强可读性 */
}

#historyList {
  max-height: 70vh;
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
  padding: 15px;
  flex: 1;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1); /* 内阴影增强立体感 */
}

/* 加深modal-body的背景颜色 */
.modal-body {
  background-color: #f2f0f7; /* 浅紫色背景，与网站整体色调协调 */
  border-radius: 0 0 8px 8px;
}

/* 深色模式下的modal-body */
[data-theme="dark"] .modal-body {
  background-color: #1a1a2e; /* 深色主题下的背景色 */
}

/* 历史记录特效样式 */
.history-item {
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 12px 15px;
  border-left: 3px solid transparent;
  background-color: #f3ecd8; /* 使用实际颜色而非变量，确保不透明 */
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-item:hover {
  background-color: #e6d7b7; /* 使用实际颜色而非半透明值 */
  border-left: 3px solid #9b59b6;
  transform: translateX(5px);
}

/* 清除历史记录按钮样式 */
.clear-history-button {
  background-color: #f2f0f7;
  color: #483d8b;
  border: 1px solid #d4af37;
  padding: 8px 12px;
  margin: 10px;
  border-radius: 4px;
  cursor: pointer;
  display: block;
  width: calc(100% - 20px);
  text-align: center;
  transition: all 0.3s ease;
}

.clear-history-button:hover {
  background-color: #e74c3c;
  color: white;
  border-color: #c0392b;
}

/* 深色模式历史记录样式 */
[data-theme="dark"] .history-item {
  background-color: #2d2925; /* 深色主题下的不透明背景 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  color: #e9e2d0;
}

[data-theme="dark"] .history-item:hover {
  background-color: #3a332c; /* 深色主题下的悬停颜色 */
}

[data-theme="dark"] .clear-history-button {
  background-color: #1a1a2e;
  color: #d4af37;
  border-color: #483d8b;
}

[data-theme="dark"] .clear-history-button:hover {
  background-color: #c0392b;
  color: #f2f0f7;
}

/* 红色文字强调 */
.red-text {
  color: #e74c3c;
  font-weight: bold;
}

/* 表格动画效果 */
@keyframes tableAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#result-container {
  animation: tableAppear 0.5s ease-out;
}

/* 解释信息区域优化样式 */
.interpretation-container {
  display: flex;
  gap: 20px; 
  flex-wrap: wrap;
  margin: 30px auto;
  animation: fadeIn 0.5s ease;
  max-width: 100%;
  width: 85%; /* 将宽度设置为容器的85% */
  justify-content: center; /* 确保内容居中 */
}

#interpretationContainer {
  display: none; /* 默认隐藏，由JS控制显示 */
}

.ai-interpretation-container {
  flex: 1; 
  min-width: 500px; /* 进一步增大最小宽度 */
  background: linear-gradient(135deg, rgba(240, 240, 255, 0.05), rgba(240, 240, 255, 0.02));
  border-radius: 10px;
  padding: 24px; /* 增加内边距 */
  border: 1px solid var(--border-color);
  margin: 0 auto; /* 增加居中效果 */
  max-width: 750px; /* 添加最大宽度限制，使其比例更合适 */
}

[data-theme="dark"] .ai-interpretation-container {
  background: linear-gradient(135deg, rgba(72, 61, 139, 0.1), rgba(72, 61, 139, 0.03));
}

.ai-timer {
  display: inline-block;
  margin-left: 10px;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
}

/* 侧边控制面板样式 */
/* 侧边控制面板和把手容器 */
.control-panel {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--secondary-color);
  border-radius: 10px 0 0 10px;
  box-shadow: 0 2px 10px var(--shadow-color);
  padding: 10px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  transition: all 0.3s ease;
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  /* 添加东方纹理装饰 */
  background-image: url("data:image/svg+xml,%3Csvg width='44' height='44' viewBox='0 0 44 44' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23b8894d' fill-opacity='0.05'%3E%3Cpath fill-rule='evenodd' d='M0 0h4v4H0V0zm4 4h4v4H4V4z'/%3E%3C/g%3E%3C/svg%3E");
}

.control-handle {
  position: absolute;
  left: -50px; /* 调整圆形按钮的位置 */
  top: -30px; /* 将圆形按钮定位到面板上方 */
  background: linear-gradient(135deg, #9b59b6, #483d8b); /* 深蓝紫色渐变 */
  color: #f3ecd8; /* 浅色文字 */
  width: 40px;
  height: 40px;
  border: 2px solid #d4af37; /* 金色边框 */
  border-radius: 50%; /* 完全圆形 */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 98; /* 降低z-index确保不会遮挡按钮 */
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* 弹性过渡效果 */
  transform: rotate(0deg); /* 不再需要旋转按钮本身 */
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3), /* 金色光晕 */
              0 0 10px rgba(0, 0, 0, 0.2);
  /* 添加装饰效果 */
  overflow: hidden;
}

/* 装饰性伪元素，金色圆环装饰 */
.control-handle::before {
  content: '';
  position: absolute;
  top: 3px; 
  left: 3px;
  right: 3px;
  bottom: 3px;
  border: 1px solid rgba(212, 175, 55, 0.6);
  border-radius: 50%;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.control-handle::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.4s ease;
  animation: rotateRing 20s linear infinite;
}

@keyframes rotateRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.panel-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 5px; /* 确保按钮与把手有足够的间距 */
}

.panel-btn {
  background-color: rgba(var(--button-bg-rgb), 0.15); /* 半透明朱砂色背景 */
  color: var(--text-color); /* 使用墨色图标 */
  border: 1px solid var(--border-color); /* 金鉺色边框 */
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  position: relative; /* 确保按钮位置正确 */
  z-index: 101; /* 设置比把手更高的z-index */
  box-shadow: 0 2px 5px var(--shadow-color); /* 使用变量定义的阴影颜色 */
  font-size: 1.3rem; /* 增大图标尺寸 */
  /* 添加东方装饰元素 */
  background-image: radial-gradient(circle at center, rgba(var(--button-bg-rgb), 0.05) 0%, transparent 70%);
}

.panel-btn:hover {
  background-color: rgba(var(--button-bg-rgb), 0.25); /* 悬停时背景颜色更深 */
  transform: scale(1.1);
  box-shadow: 0 3px 10px var(--shadow-color), 0 0 10px rgba(var(--button-bg-rgb), 0.3); /* 增强阴影效果 */
  border-color: var(--accent-color, #d9a748); /* 金色边框 */
}

/* 暗色模式下的按钮样式 */
[data-theme="dark"] .panel-btn {
  background-color: rgba(var(--button-bg-rgb), 0.2); /* 朱红色背景 */
  color: var(--text-color); /* 使用变量定义的文字颜色 */
  border-color: var(--border-color); /* 金色边框 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(var(--button-bg-rgb), 0.2);
  /* 添加东方印章效果 */
  background-image: 
    radial-gradient(circle at center, rgba(var(--button-bg-rgb), 0.1) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 5L20 20H10L15 5Z' fill='%23d9a74811'/%3E%3C/svg%3E");
  background-size: 100%, 22px 22px;
  background-position: center;
}

/* 暗色模式下的按钮悬停样式 */
[data-theme="dark"] .panel-btn:hover {
  background-color: rgba(var(--button-bg-rgb), 0.35); /* 加深背景色 */
  border-color: var(--accent-color, #d9a748); /* 更鲜明的金色边框 */
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--button-bg-rgb), 0.3);
  /* 金色光晕效果 */
  background-image: 
    radial-gradient(circle at center, rgba(var(--button-bg-rgb), 0.2) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 5L20 20H10L15 5Z' fill='%23d9a74822'/%3E%3C/svg%3E");
}

/* 控制面板展开/收起状态 */
.control-panel.collapsed {
  right: -45px; /* 收起时移动面板，但确保把手仍然可见 */
}

.control-panel.collapsed .control-handle i {
  transform: rotate(180deg);
}

/* 夜间模式下把手样式增强 */
[data-theme="dark"] .control-handle {
  background: linear-gradient(45deg, #9b59b6, #1a1a2e); /* 深色主题颜色 */
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4), /* 金色光晕增强 */
              -2px 0 10px rgba(0, 0, 0, 0.4);
  border: 2px solid #d4af37;
}

[data-theme="dark"] .control-handle:hover {
  background: linear-gradient(45deg, #8e44ad, #1a1a2e);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 
              -3px 0 12px rgba(0, 0, 0, 0.5);
  border-color: #e9c050; /* 更亮的金色 */
}

[data-theme="dark"] .control-handle i {
  text-shadow: 0 0 8px rgba(243, 236, 216, 0.8); /* 更强的发光效果 */
  color: #e9c050; /* 金色图标 */
}

.control-handle:hover {
  background: linear-gradient(135deg, #8e44ad, #32297a); /* 挂停时颜色更深 */
  transform: scale(1.08); /* 缩放效果，导致按钮的“脉动感” */
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.6), 
              0 0 12px rgba(155, 89, 182, 0.4);
  border-color: #e9c050; /* 更亮的金色边框 */
}

.control-handle:hover::before {
  opacity: 1;
  border-color: rgba(233, 192, 80, 0.8);
  transform: scale(0.9) rotate(15deg); /* 内圈缩小并微旋 */
}

.control-handle:hover::after {
  opacity: 0.7;
  border-width: 2px;
  animation: rotateRing 10s linear infinite; /* 悬停时加快旋转 */
}

.control-handle i {
  font-size: 1.1rem;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* 弹性动画效果 */
  display: inline-block;
  will-change: transform;
  width: 18px; /* 增加图标尺寸 */
  height: 18px; /* 增加图标尺寸 */
  text-align: center;
  line-height: 18px;
  color: #f2f0f7; /* 浅色图标 */
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.4); /* 金色光晕 */
}

.control-panel.collapsed .control-handle i {
  transform: rotate(180deg);
}

.control-panel.expanded .control-handle i {
  transform: rotate(0deg); /* 重置旋转角度 */
  animation: pulseIcon 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* 添加脉动动画 */
}

/* 添加脉动效果动画 */
@keyframes pulseIcon {
  0% { transform: rotate(180deg) scale(1); }
  50% { transform: rotate(0deg) scale(1.2); }
  100% { transform: rotate(0deg) scale(1); }
}

/* 点击效果 */
.control-handle:active {
  transform: scale(0.95);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4),
              0 0 5px rgba(155, 89, 182, 0.3);
  transition: all 0.2s;
}

/* 点击效果 - 图标 */
.control-handle:active i {
  transform: scale(0.9);
  transition: all 0.2s;
}

/* 神秘风格按钮样式 - 东方元素加强 */
.mystical-btn {
  position: relative;
  background: linear-gradient(135deg, #9b59b6, #483d8b);
  color: #f3ecd8;
  border: none;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: 10px 15px;
  min-width: 120px;
  height: 48px;
}

/* 按钮内容样式 */
.mystical-btn .btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.1rem;
  letter-spacing: 1px;
  font-weight: 500;
  padding: 0 20px;
  font-family: 'Noto Serif SC', serif;
}

.mystical-btn i {
  margin-right: 8px;
  font-size: 1.2rem;
  color: #f3ecd8;
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
  transition: all 0.3s ease;
}

/* 边框装饰 */
.mystical-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid rgba(212, 175, 55, 0.6);
  border-radius: 8px;
  opacity: 0.8;
  transition: all 0.3s ease;
  z-index: 1;
}

/* 金色装饰氛围 */
.mystical-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0) 70%);
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
  z-index: 0;
}

/* 角落装饰 */
.mystical-btn .btn-content::before,
.mystical-btn .btn-content::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid #d4af37;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.mystical-btn .btn-content::before {
  top: 5px;
  left: 5px;
  border-right: none;
  border-bottom: none;
}

.mystical-btn .btn-content::after {
  bottom: 5px;
  right: 5px;
  border-left: none;
  border-top: none;
}

/* 悬停效果 */
.mystical-btn:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 
              0 0 12px rgba(155, 89, 182, 0.5), 
              0 0 8px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
  background: linear-gradient(135deg, #8e44ad, #32297a);
}

.mystical-btn:hover::before {
  border-color: rgba(233, 192, 80, 0.8);
  opacity: 1;
}

.mystical-btn:hover::after {
  opacity: 0.5;
}

.mystical-btn:hover .btn-content::before,
.mystical-btn:hover .btn-content::after {
  width: 15px;
  height: 15px;
  opacity: 1;
  border-color: #e9c050;
}

.mystical-btn:hover i {
  transform: scale(1.1);
  color: #e9c050;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
}

/* 点击效果 */
.mystical-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
}

/* 提交按钮特殊样式 */
.submit-btn {
  background: linear-gradient(135deg, #9b59b6, #483d8b);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #8e44ad, #32297a);
}

/* 清空按钮特殊样式 */
.clear-btn {
  background: linear-gradient(135deg, #7d6bb0, #483d8b);
}

.clear-btn:hover {
  background: linear-gradient(135deg, #6a5b9e, #32297a);
}

/* 深色主题样式调整 */
[data-theme="dark"] .mystical-btn {
  background: linear-gradient(135deg, #9b59b6, #1a1a2e);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 8px rgba(155, 89, 182, 0.3);
}

[data-theme="dark"] .mystical-btn::before {
  border-color: rgba(212, 175, 55, 0.5);
}

[data-theme="dark"] .mystical-btn:hover {
  background: linear-gradient(135deg, #8e44ad, #131328);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5), 0 0 15px rgba(155, 89, 182, 0.5), 0 0 10px rgba(212, 175, 55, 0.3);
}

[data-theme="dark"] .mystical-btn:hover::before {
  border-color: rgba(233, 192, 80, 0.7);
}

[data-theme="dark"] .submit-btn {
  background: linear-gradient(135deg, #9b59b6, #1a1a2e);
}

[data-theme="dark"] .submit-btn:hover {
  background: linear-gradient(135deg, #8e44ad, #131328);
}

[data-theme="dark"] .clear-btn {
  background: linear-gradient(135deg, #7d6bb0, #1a1a2e);
}

[data-theme="dark"] .clear-btn:hover {
  background: linear-gradient(135deg, #6a5b9e, #131328);
}

/* 东方神秘风格顶部装饰 */
.mystical-header-decoration {
  position: relative;
  width: 100%;
  height: 120px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 左右装饰云纹 */
.decoration-left,
.decoration-right {
  position: relative;
  width: 180px;
  height: 80px;
  background-image: url("data:image/svg+xml,%3Csvg width='180' height='80' viewBox='0 0 180 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10,40 Q30,20 50,40 Q70,60 90,40 Q110,20 130,40 Q150,60 170,40' stroke='%23d4af37' stroke-width='2' fill='none' stroke-opacity='0.3' /%3E%3Cpath d='M10,50 Q30,30 50,50 Q70,70 90,50 Q110,30 130,50 Q150,70 170,50' stroke='%23d4af37' stroke-width='2' fill='none' stroke-opacity='0.3' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
}

.decoration-left {
  transform: scaleX(-1); /* 左侧云纹水平翻转 */
}

/* 中央装饰符文 */
.decoration-center {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mystical-symbol {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 89, 182, 0.15) 0%, rgba(155, 89, 182, 0.05) 70%);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  animation: pulseSymbol 6s ease-in-out infinite, rotateSymbol 30s linear infinite; /* 添加旋转动画到容器 */
}

/* 太极SVG图案样式 */
.taiji-svg {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.4));
  /* 不需要旋转动画，因为容器会旋转 */
}

/* 修改太极图标的颜色 */
.mystical-symbol::before {
  content: '';
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  z-index: 0;
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

/* 装饰光晕 */
.mystical-symbol::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.3);
  animation: rotateBorder 15s linear infinite reverse;
}

/* 标题样式 */
.mystical-title {
  position: relative;
  text-align: center;
  color: #483d8b;
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 2.2rem;
  margin-bottom: 25px;
  padding-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 标题下方装饰线 */
.mystical-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 3px;
  background: linear-gradient(90deg, 
    rgba(212, 175, 55, 0) 0%,
    rgba(212, 175, 55, 0.8) 50%,
    rgba(212, 175, 55, 0) 100%);
}

/* 动画效果 */
@keyframes pulseSymbol {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes rotateSymbol {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotateBorder {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulseGlow {
  0% { opacity: 0.5; box-shadow: 0 0 5px rgba(212, 175, 55, 0.3); }
  100% { opacity: 0.8; box-shadow: 0 0 15px rgba(212, 175, 55, 0.6); }
}

/* 深色主题适配 */
[data-theme="dark"] .mystical-title {
  color: #b08fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .mystical-symbol {
  background: radial-gradient(circle, rgba(155, 89, 182, 0.3) 0%, rgba(72, 61, 139, 0.1) 70%);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
}

/* 深色主题下太极SVG样式 */
[data-theme="dark"] .taiji-svg {
  filter: drop-shadow(0 0 8px rgba(233, 192, 80, 0.6));
}

[data-theme="dark"] .taiji-svg circle[stroke="#d4af37"] {
  stroke: #e9c050; /* 深色主题下使用更亮的金色边框 */
}

[data-theme="dark"] .taiji-svg path[fill="#d4af37"] {
  fill: #e9c050; /* 深色主题下使用更亮的金色填充 */
  fill-opacity: 0.8;
}

[data-theme="dark"] .taiji-svg circle[fill="#d4af37"] {
  fill: #e9c050; /* 深色主题下使用更亮的金色填充 */
}

[data-theme="dark"] .mystical-symbol::before {
  background: radial-gradient(circle, rgba(26, 26, 46, 0.3) 0%, transparent 70%);
  border: 1px solid rgba(233, 192, 80, 0.4);
  box-shadow: 0 0 10px rgba(233, 192, 80, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .mystical-header-decoration {
    height: 100px;
  }
  
  .decoration-left,
  .decoration-right {
    width: 120px;
    height: 60px;
  }
  
  .mystical-symbol {
    width: 70px;
    height: 70px;
  }
  
  .mystical-symbol::before {
    width: 50px;
    height: 50px;
  }
  
  .mystical-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }
}

/* 控制面板按钮样式 - 东方神秘风格 */
.panel-btn {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 8px 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #9b59b6, #483d8b);
  color: #f3ecd8;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid rgba(212, 175, 55, 0.6);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2),
              0 0 6px rgba(212, 175, 55, 0.2);
  overflow: hidden;
  opacity: 0.9;
}

/* 内圈装饰 */
.panel-btn::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  opacity: 0.6;
  transition: all 0.3s ease;
  pointer-events: none;
}

/* 光晕效果 */
.panel-btn::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -40%;
  width: 180%;
  height: 180%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0) 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.panel-btn i {
  font-size: 1.2rem;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

/* 悬停效果 */
.panel-btn:hover {
  transform: scale(1.1);
  border-color: rgba(233, 192, 80, 0.8);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3),
              0 0 12px rgba(212, 175, 55, 0.4);
  opacity: 1;
}

.panel-btn:hover::before {
  opacity: 0.8;
  transform: scale(0.9) rotate(15deg);
}

.panel-btn:hover::after {
  opacity: 0.7;
}

.panel-btn:hover i {
  transform: scale(1.1);
  color: #e9c050;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* 点击效果 */
.panel-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.2s;
}

/* 深色主题样式调整 */
[data-theme="dark"] .panel-btn {
  background: linear-gradient(135deg, #9b59b6, #1a1a2e);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4),
              0 0 8px rgba(155, 89, 182, 0.3);
}

[data-theme="dark"] .panel-btn:hover {
  background: linear-gradient(135deg, #8e44ad, #1a1a2e);
  border-color: #e9c050;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4),
              0 0 15px rgba(212, 175, 55, 0.5);
}

/* 夜间模式下的按钮悬停效果增强 */
[data-theme="dark"] .panel-btn:hover {
  background-color: rgba(155, 89, 182, 0.4);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(148, 90, 255, 0.4);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.panel-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

/* 移动端响应式布局优化 */
@media screen and (max-width: 768px) {
  .interpretation-container,
  .ai-interpretation-container {
    flex-direction: column;
    width: 100%;
  }
  
  .interpretation-container > div {
    min-width: 100%;
    width: 100%;
    margin-bottom: 20px;
  }
  
  .ai-interpretation-content {
    max-height: 400px;
    overflow-y: auto;
  }
  
  .table-container {
    padding: 5px;
  }
  
  .result-table td {
    padding: 8px 5px;
    font-size: 0.9rem;
  }
}

/* 超小屏幕调整 */
@media screen and (max-width: 480px) {
  /* 移动设备上控制面板样式调整 */
  .control-panel {
    padding: 12px 8px;
    right: 0;
    top: auto;
    bottom: 10%;
    transform: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    background-color: rgba(var(--bg-color-rgb), 0.92);
  }

  .control-handle {
    left: -35px;
    top: 50%;
    transform: translateY(-50%) rotate(0); /* 重置旋转，恢复到左侧 */
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad); /* 阴影色增强辨识度 */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3), 0 0 8px rgba(155, 89, 182, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .panel-btn {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
    margin: 2px 0;
    background-color: rgba(155, 89, 182, 0.25);
  }
  .interpretation-tabs {
    overflow-x: auto;
    white-space: nowrap;
    /* 使用多浏览器兼容的滑动条样式 */
    -ms-overflow-style: none; /* IE 和 Edge */
  }
  
  /* 自定义webkit滑动条 */
  .interpretation-tabs::-webkit-scrollbar {
    height: 4px;
  }
  
  .interpretation-tabs::-webkit-scrollbar-thumb {
    background-color: var(--button-bg);
    border-radius: 4px;
  }
  
  .tab-button {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  
  .result-table td {
    padding: 6px 4px;
    font-size: 0.85rem;
  }
  
  .ai-confirm-content {
    width: 90%;
    padding: 20px 15px;
  }
}

/* 修复页脚样式 */
.footer-section a {
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.footer-section a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(to right, transparent, #9b59b6, transparent);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

.footer-section a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.footer-section a:hover {
  color: #9b59b6;
}

[data-theme="dark"] .footer-section a:hover {
  color: #b08fff;
}

/* 东方神秘风格页脚样式 */
.footer {
  background: linear-gradient(to bottom, rgba(72, 61, 139, 0.05) 0%, rgba(72, 61, 139, 0.15) 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding-top: 50px;
  position: relative;
  overflow: hidden;
}

/* 页脚装饰元素 */
.footer::before, .footer::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M50,5 L95,50 L50,95 L5,50 Z' fill='none' stroke='%23d4af37' stroke-width='1' stroke-opacity='0.2'/%3E%3C/svg%3E");
  background-size: 100px 100px;
  background-repeat: no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.footer::before {
  top: 20px;
  left: 5%;
  transform: rotate(15deg);
}

.footer::after {
  bottom: 20px;
  right: 5%;
  transform: rotate(-15deg);
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer-section h4 {
  color: #483d8b;
  font-family: 'Noto Serif SC', serif;
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 0.8) 50%, rgba(212, 175, 55, 0) 100%);
}

.footer-bottom {
  background: linear-gradient(to right, rgba(72, 61, 139, 0.1) 0%, rgba(72, 61, 139, 0.2) 50%, rgba(72, 61, 139, 0.1) 100%);
  padding: 15px 0;
  margin-top: 30px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  position: relative;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 0.3) 50%, rgba(212, 175, 55, 0) 100%);
}

.footer-bottom a {
  color: #666;
  margin: 0 12px;
  font-size: 0.9rem;
  position: relative;
  transition: color 0.3s;
}

.footer-bottom a:hover {
  color: #9b59b6;
}

.footer-bottom a::after {
  content: '\2022';
  position: absolute;
  right: -12px;
  color: rgba(212, 175, 55, 0.5);
}

.footer-bottom a:last-child::after {
  display: none;
}

/* 页脚装饰元素样式 */
.footer-decoration {
  position: relative;
  height: 30px;
  width: 100%;
  overflow: hidden;
  margin-top: -30px;
}

.footer-cloud {
  position: absolute;
  height: 30px;
  width: 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30'%3E%3Cpath d='M0,15 Q10,5 20,15 T40,15 T60,15 T80,15 T100,15 V30 H0 Z' fill='%23d4af37' fill-opacity='0.15'/%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: repeat-x;
}

.footer-cloud-left {
  left: 0;
  animation: cloudMove 40s linear infinite;
}

.footer-cloud-right {
  right: 0;
  transform: scaleX(-1);
  animation: cloudMoveReverse 40s linear infinite;
}

@keyframes cloudMove {
  from { background-position: 0 0; }
  to { background-position: 100% 0; }
}

@keyframes cloudMoveReverse {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.section-decoration {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, rgba(212, 175, 55, 0.8) 50%, rgba(212, 175, 55, 0) 100%);
  margin: -10px auto 15px;
}

/* 深色主题页脚样式 */
[data-theme="dark"] .footer {
  background: linear-gradient(to bottom, rgba(26, 26, 46, 0.7) 0%, rgba(26, 26, 46, 0.9) 100%);
  border-top: 1px solid rgba(233, 192, 80, 0.2);
}

[data-theme="dark"] .footer-section h4 {
  color: #e9c050;
}

[data-theme="dark"] .footer-section p {
  color: #aaa;
}

[data-theme="dark"] .footer-section i {
  color: #9b59b6;
}

[data-theme="dark"] .footer-bottom {
  background: rgba(26, 26, 46, 0.95);
  border-top: 1px solid rgba(233, 192, 80, 0.1);
}

[data-theme="dark"] .footer-bottom a {
  color: #aaa;
}

[data-theme="dark"] .footer-bottom a:hover {
  color: #e9c050;
}
