/* 偶像风状态栏美化 - 墨璃引擎 */
/* 假设HTML已使用以下结构，并为数值添加对应class（或使用nth-child后备） */

/* ===== 全局基调 ===== */
details {
  background: #fff9fb;
  border: 2px solid #ffd6e0;
  border-radius: 14px;
  padding: 10px 16px;
  margin: 10px 0;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.12);
  font-family: "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
  transition: box-shadow 0.2s;
}
details[open] {
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.2);
}

/* summary - 可折叠标题 */
details > summary {
  font-weight: 600;
  font-size: 1.05em;
  color: #b04a6b;
  cursor: pointer;
  padding: 6px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
details > summary::-webkit-details-marker {
  display: none; /* 移除默认三角 */
}
details > summary::before {
  content: "💖 ";
  font-size: 1.2em;
}

/* 子内容通用 */
details article,
details p,
details blockquote {
  line-height: 1.7;
  color: #4a2d3b;
}

/* ===== 数值着色（按类型）===== */
/* 需为数值添加span，如：<span class="val-favor">85</span> */
.val-favor { color: #e84393; font-weight: 600; }           /* 好感度 */
.val-vigil { color: #3b82f6; font-weight: 600; }           /* 警戒值 */
.val-hypno { color: #8b5cf6; font-weight: 600; }           /* 催眠深度 */
.val-heat   { color: #f97316; font-weight: 600; }          /* 发情指数 */
.val-preg   { color: #dc2626; font-weight: 600; }          /* 怀孕概率 */
.val-period-safe  { color: #16a34a; }                      /* 生理期-安全 */
.val-period-warn  { color: #ca8a04; }                      /* 生理期-危险 */
.val-period-active{ color: #dc2626; font-weight: 600; }    /* 生理期-经期 */
.val-develop { color: #db2777; background: linear-gradient(90deg, #fce4ec, #f8bbd0); padding: 0 4px; border-radius: 4px; } /* 开发度 */

/* 若无span，使用nth-child后备（假设偶像状态内字段顺序固定） */
details > summary + p:nth-of-type(10) strong + span, /* 好感度 */
details > summary + p:nth-of-type(11) strong + span, /* 警戒值 */
details > summary + p:nth-of-type(12) strong + span, /* 催眠深度 */
details > summary + p:nth-of-type(15) strong + span  { /* 发情指数（示例） */
  color: #e84393; /* 统一高亮，不区分类型 */
}

/* ===== 偶像状态 - 肉体开发度专属 ===== */
details > summary + p:has(strong:contains("开发度")),
details p:has(strong:contains("开发度")) {
  background: linear-gradient(90deg, #ffe4ec, #ffccd5);
  border-radius: 8px;
  padding: 2px 8px;
  margin: 2px 0;
  font-size: 0.95em;
}
/* 心形点缀 */
details p:has(strong:contains("开发度"))::after {
  content: " 💕";
  color: #e84393;
}

/* 生理期差异化（需添加对应class至内容） */
.period-state {
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 500;
}
.period-state.safe {
  background: #d4edda;
  color: #155724;
}
.period-state.warning {
  background: #fff3cd;
  color: #856404;
}
.period-state.active {
  background: #f8d7da;
  color: #721c24;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
}

/* ===== 推荐行动 - 差异化顺序列表 ===== */
.action-list {
  counter-reset: action;
  list-style: none;
  padding: 0;
}
.action-list li {
  counter-increment: action;
  padding: 8px 12px 8px 40px;
  margin: 6px 0;
  border-radius: 10px;
  background: #f1f0fa;
  position: relative;
  font-weight: 500;
  transition: transform 0.15s, background 0.2s;
}
.action-list li::before {
  content: counter(action);
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: #ff6b9d;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  font-weight: 700;
}
.action-list li:nth-child(1) { background: #fce4ec; }    /* 第1选项 */
.action-list li:nth-child(2) { background: #e8eaf6; }    /* 第2选项 */
.action-list li:nth-child(3) { background: #e0f2fe; }    /* 第3选项 */
.action-list li:nth-child(4) { background: #f3e5f5; }    /* 第4选项 */
.action-list li:nth-child(5) { background: #fff8e1; }    /* 第5选项 */
.action-list li:hover {
  transform: translateX(4px);
  background: #ffe0ec !important;
}

/* ===== 其他细节优化 ===== */
/* 主角信息、偶像状态等内部表格样式 */
details table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
details table th, details table td {
  padding: 6px 10px;
  border-bottom: 1px solid #ffd6e0;
}
details table th {
  background: #ffecf2;
  color: #b04a6b;
  font-weight: 600;
}

/* 分隔线 */
details hr {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffd6e0, #ffb3c6, #ffd6e0);
  margin: 12px 0;
}

/* 所有可展开栏位默认收起：无需额外CSS，HTML中不写open即可 */