/* ===== 全局容器基础样式 ===== */
details {
  margin: 12px 0;
  border: 2px solid #d4af37;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffef9 0%, #faf6ed 100%);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

details:hover {
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  transform: translateY(-1px);
}

details[open] {
  border-color: #c9a961;
  background: linear-gradient(135deg, #fffffa 0%, #fcfaed 100%);
}

/* ===== 折叠标题统一样式 ===== */
summary {
  padding: 14px 20px;
  background: linear-gradient(90deg, #f9ead5 0%, #fdf3e0 50%, #f9ead5 100%);
  color: #2c2416;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  list-style: none;
  position: relative;
  border-bottom: 2px solid #d4af37;
  transition: all 0.3s ease;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: " ▼";
  position: absolute;
  right: 20px;
  font-size: 12px;
  transition: transform 0.3s ease;
  color: #8b7355;
}

details[open] summary::after {
  transform: rotate(180deg);
}

summary:hover {
  background: linear-gradient(90deg, #f5e5c5 0%, #faefd5 50%, #f5e5c5 100%);
}

/* ===== 内容区域统一样式 ===== */
details p {
  margin: 10px 0;
  padding: 8px 20px;
  color: #2c2416;
  font-size: 15px;
  line-height: 1.8;
  border-left: 3px solid #d4af37;
  background: rgba(249, 234, 213, 0.2);
  transition: all 0.2s ease;
}

details p:hover {
  background: rgba(249, 234, 213, 0.35);
  border-left-color: #c9a961;
}

details p strong {
  color: #8b6914;
  font-weight: bold;
  margin-right: 8px;
}

/* ===== 思维链隐藏 ===== */
think {
  display: none;
}

/* ===== 正文区域美化 ===== */
text {
  display: block;
  padding: 20px;
  margin: 15px 0;
  background: linear-gradient(135deg, #fffef9 0%, #faf8f0 100%);
  border: 2px solid #d4af37;
  border-radius: 8px;
  color: #2c2416;
  font-size: 16px;
  line-height: 2;
  text-indent: 2em;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
}

text::first-letter {
  font-size: 24px;
  color: #8b6914;
  font-weight: bold;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #faf8f3;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d4af37 0%, #c9a961 100%);
  border-radius: 5px;
  border: 2px solid #faf8f3;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c9a961 0%, #b89850 100%);
}

/* ===== 响应式适配 ===== */
@media (max-width: 768px) {
  details {
    margin: 8px 0;
  }
  summary {
    padding: 12px 15px;
    font-size: 15px;
  }
  details p {
    padding: 6px 15px;
    font-size: 14px;
  }
  text {
    padding: 15px;
    font-size: 15px;
  }
}