/* 全局变量 - 适配亮色/暗色主题 */
:root {
  --primary-color: #9b59b6;
  --secondary-color: #e91e63;
  --bg-light: #f8f9fa;
  --bg-dark: #1a1a2e;
  --text-light: #2c3e50;
  --text-dark: #ecf0f1;
  --border-color: rgba(155, 89, 182, 0.3);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --summary-text-color: #000000;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: #16213e;
    --text-light: #ecf0f1;
    --border-color: rgba(155, 89, 182, 0.5);
    --summary-text-color: #000000;
  }
}

/* 思维链折叠框 - 完全禁止打开 */
.think-box {
  margin: 15px 0;
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.4;
  pointer-events: none !important;
}

.think-box summary {
  background: linear-gradient(90deg, #ff9800 0%, #ff5722 100%);
  color: white;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  user-select: none;
  pointer-events: none !important;
  cursor: not-allowed;
  list-style: none;
}

.think-box summary::-webkit-details-marker {
  display: none;
}

.think-box summary::marker {
  display: none;
}

.think-box[open] {
  pointer-events: none !important;
}

.think-box[open] summary {
  pointer-events: none !important;
}

.think-box think {
  display: none !important;
  visibility: hidden !important;
}

/* 正文容器 */
text {
  display: block !important;
  visibility: visible !important;
  line-height: 1.8;
  color: var(--text-light);
  font-size: 16px;
  margin-bottom: 20px;
}

text p {
  display: block !important;
  visibility: visible !important;
  margin-bottom: 12px;
  text-indent: 2em;
}

/* 状态卡片通用样式 */
.status-card, .body-status {
  background: linear-gradient(135deg, var(--bg-light) 0%, rgba(155, 89, 182, 0.05) 100%);
  border-left: 4px solid var(--primary-color);
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: var(--shadow);
}

.status-card p, .body-status p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light);
}

.status-card strong, .body-status strong {
  color: var(--primary-color);
  font-weight: 600;
  margin-right: 8px;
}

/* details 折叠样式优化 */
details {
  margin: 15px 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

details:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.2);
}

/* 状态栏标题 - 黑色字体 */
details summary {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--summary-text-color) !important;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  user-select: none;
  transition: all 0.3s ease;
}

details summary:hover {
  background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  padding-left: 20px;
  color: var(--summary-text-color) !important;
}

details[open] summary {
  border-bottom: 2px solid var(--border-color);
  color: var(--summary-text-color) !important;
}

/* 记忆区表格样式 */
details table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 13px;
  background: var(--bg-light);
}

details table th {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
}

details table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-light);
  vertical-align: top;
}

details table tr:hover {
  background: rgba(155, 89, 182, 0.08);
}

details table tr:last-child td {
  border-bottom: none;
}

/* 记忆区标题样式 */
details summary::before {
  content: "📖 ";
  margin-right: 5px;
}

details[open] summary::before {
  content: "📖 ";
}

/* 推荐行动样式 */
.action-recommend {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(155, 89, 182, 0.1) 100%);
  border: 2px dashed var(--secondary-color);
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
}

.action-recommend strong {
  color: var(--secondary-color);
  font-size: 16px;
  display: block;
  margin-bottom: 10px;
}

.action-recommend p {
  margin: 8px 0;
  padding-left: 10px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
  transition: all 0.2s ease;
}

.action-recommend p:hover {
  padding-left: 15px;
  color: var(--secondary-color);
  font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 768px) {
  text {
    font-size: 15px;
  }
  
  .status-card, .body-status {
    padding: 12px;
  }
  
  details table {
    font-size: 12px;
  }
  
  details table th, details table td {
    padding: 8px 5px;
  }
  
  .action-recommend {
    padding: 12px;
  }
  
  .think-box summary {
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
  text p {
    text-indent: 1.5em;
  }
  
  details summary {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  details table {
    font-size: 11px;
  }
  
  .think-box {
    opacity: 0.5;
  }
}