/* 思维链容器整体样式 */
details summary {
  cursor: pointer;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
  border: 1px solid #c2d9ff;
  border-radius: 8px;
  margin: 8px 0;
  font-weight: 600;
  color: #2957a2;
  transition: all 0.3s ease;
  position: relative;
  list-style: none;
}
details summary:hover {
  background: linear-gradient(135deg, #e6f0ff 0%, #d6e6ff 100%);
  border-color: #9cc0ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 87, 162, 0.1);
}
details summary::marker,
details summary::-webkit-details-marker {
  display: none;
}
details summary::after {
  content: "▼";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
  font-size: 12px;
  color: #5a7fcc;
}
details[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}
/* 思维链内容区域 */
details > div {
  padding: 20px;
  margin: 8px 0 16px;
  background: #ffffff;
  border: 1px solid #e1ebff;
  border-radius: 8px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
  box-shadow: inset 0 2px 8px rgba(41, 87, 162, 0.05);
}
/* 思维链内部结构样式 */
details > div > p {
  margin: 0 0 12px;
  line-height: 1.6;
  color: #333;
  font-size: 14px;
}
details > div > p strong {
  color: #2957a2;
  font-weight: 600;
}
/* Markdown代码块样式 */
details pre {
  background: #f8fbff;
  border: 1px solid #d9e7ff;
  border-radius: 6px;
  padding: 16px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
}
details pre code {
  background: transparent;
  padding: 0;
  color: #1a365d;
}
details pre .hljs {
  background: transparent;
}
/* 思维链中的列表样式 */
details ol, details ul {
  margin: 12px 0 12px 20px;
  padding-left: 0;
}
details li {
  margin: 8px 0;
  line-height: 1.6;
  color: #444;
  font-size: 14px;
}
details li::marker {
  color: #5a7fcc;
}
/* 场景信息容器特殊样式 */
details:nth-of-type(2) summary {
  background: linear-gradient(135deg, #fff9f0 0%, #fff4e6 100%);
  border-color: #ffd9b3;
  color: #d46b08;
}
details:nth-of-type(2) summary:hover {
  background: linear-gradient(135deg, #fff4e6 0%, #ffeccc 100%);
  border-color: #ffb366;
}
details:nth-of-type(2) > div {
  border-color: #ffe6cc;
  background: #fffdf9;
}
/* 角色档案容器特殊样式 */
details:nth-of-type(3) summary {
  background: linear-gradient(135deg, #f0fff4 0%, #e6ffe6 100%);
  border-color: #b3ffb3;
  color: #389e0d;
}
details:nth-of-type(3) summary:hover {
  background: linear-gradient(135deg, #e6ffe6 0%, #d9ffd9 100%);
  border-color: #80ff80;
}
details:nth-of-type(3) > div {
  border-color: #d9ffd9;
  background: #f9fff9;
}
/* 监控名单容器特殊样式 */
details:nth-of-type(4) summary {
  background: linear-gradient(135deg, #fff0f6 0%, #ffe6f0 100%);
  border-color: #ffb3d9;
  color: #c41d7f;
}
details:nth-of-type(4) summary:hover {
  background: linear-gradient(135deg, #ffe6f0 0%, #ffd9e6 100%);
  border-color: #ff80bf;
}
details:nth-of-type(4) > div {
  border-color: #ffd9e6;
  background: #fff9fb;
}
/* 记忆存储容器特殊样式 */
details:nth-of-type(5) summary {
  background: linear-gradient(135deg, #f5f0ff 0%, #ebe6ff 100%);
  border-color: #d9ccff;
  color: #531dab;
}
details:nth-of-type(5) summary:hover {
  background: linear-gradient(135deg, #ebe6ff 0%, #e0d9ff 100%);
  border-color: #b399ff;
}
details:nth-of-type(5) > div {
  border-color: #e6d9ff;
  background: #f9f7ff;
}
/* 剧情分支容器特殊样式 */
details:nth-of-type(6) summary {
  background: linear-gradient(135deg, #fff5e6 0%, #fff0d9 100%);
  border-color: #ffd699;
  color: #ad4e00;
}
details:nth-of-type(6) summary:hover {
  background: linear-gradient(135deg, #fff0d9 0%, #ffeccc 100%);
  border-color: #ffb366;
}
details:nth-of-type(6) > div {
  border-color: #ffe6cc;
  background: #fffaf0;
}
/* 表格样式 */
details table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
details th {
  background: #e6f0ff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #2957a2;
  border: 1px solid #c2d9ff;
}
details td {
  padding: 10px 12px;
  border: 1px solid #e1ebff;
  color: #444;
  vertical-align: top;
}
details tr:nth-child(even) {
  background: #f8fbff;
}
details tr:hover {
  background: #f0f7ff;
}
/* 引用块样式 */
details blockquote {
  border-left: 4px solid #5a7fcc;
  margin: 12px 0;
  padding: 8px 16px;
  background: #f8fbff;
  color: #444;
  font-style: italic;
  border-radius: 0 4px 4px 0;
}
/* 分隔线样式 */
details hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #c2d9ff, transparent);
  margin: 20px 0;
}
/* 响应式设计 */
@media (max-width: 768px) {
  details summary {
    padding: 10px 12px;
    font-size: 14px;
  }
  details > div {
    padding: 16px;
  }
  details pre {
    padding: 12px;
    font-size: 12px;
  }
  details table {
    font-size: 12px;
  }
  details th,
  details td {
    padding: 8px 10px;
  }
}
/* 打印优化 */
@media print {
  details {
    break-inside: avoid;
  }
  details summary {
    background: #fff !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
  }
  details > div {
    border: 1px solid #ddd !important;
    background: #fff !important;
  }
}