/* ═══════════ AI 实验室（页面组成参考 changelog.html,时间轴复用 cl-* 组件） ═══════════ */

/* ---------- 左侧:实验卡片列表 ---------- */
.lab-cards { display: flex; flex-direction: column; gap: 12px; }

.lab-card {
  display: block;
  background: #ececec;                      /* 方框:灰色 */
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  padding: 0 0 12px;                        /* 封面贴满上/左右,仅下方文字区留内边距 */
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.lab-card:hover { border-color: #9e9e9e; transform: translateY(-1px); }
.lab-card.is-active {
  background: #e3e3e3;
  border-color: #8f8f8f;
}

.lab-card-title {
  display: block;
  margin: 0;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1, #e2e8f0);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 卡片封面:16:9 图,横向充满方框(上/左右贴边无缝隙) */
.lab-card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  margin-bottom: 10px;
  border-radius: 9px 9px 0 0;               /* 顶部随卡片圆角,底部直角贴边 */
  overflow: hidden;
  background: rgba(127, 127, 127, 0.12);
}
.lab-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lab-card-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0 14px;
}
.lab-card-progress-track {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.lab-card-progress-track span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: #111;                        /* 进度条:黑色 */
  transition: width 0.4s ease;
}
.lab-card-progress-label {
  flex: none;
  font-size: 11px;
  color: var(--text-3, #8b9bb4);
  max-width: 5.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lab-card.is-active .lab-card-progress-label { color: var(--text-1, #1f2328); font-weight: 600; }

.lab-cards-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--text-3, #8b9bb4);
  font-size: 13px;
}
.lab-cards-empty i, .lab-cards-empty svg { width: 28px; height: 28px; opacity: 0.5; }

/* ---------- 顶部:实验面板（标题/简介 + 阶段步骤 + 搜索） ---------- */
.lab-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 18px 20px 14px;
  margin-bottom: 24px;
}
body.light-mode .lab-panel {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

.lab-panel-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1, #1f2328);
  line-height: 1.35;
}
.lab-panel-intro {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2, #57606a);
}

/* 阶段步骤条:横向等分,连接线在圆点后侧 */
.lab-steps {
  display: flex;
  align-items: flex-start;
  margin-top: 18px;
  overflow-x: auto;
  padding: 4px 2px 2px;
  scrollbar-width: none;
}
.lab-steps::-webkit-scrollbar { display: none; }

.lab-step {
  position: relative;
  flex: 1 1 0;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
/* 连接线:自上一个圆点延伸到本圆点 */
.lab-step + .lab-step::before {
  content: '';
  position: absolute;
  top: 13px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: rgba(127, 127, 127, 0.25);
  z-index: 0;
}
/* 已完成的节点与下一节点之间的线段点亮(黑色) */
.lab-step.is-done + .lab-step::before {
  background: rgba(0, 0, 0, 0.55);
}

.lab-step-dot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  background: rgba(127, 127, 127, 0.15);
  color: var(--text-3, #8b9bb4);
  border: 2px solid transparent;
  transition: all 0.25s ease;
}
.lab-step.is-done .lab-step-dot {
  background: #111;                        /* 已完成节点:黑色 */
  color: #fff;
}
.lab-step.is-current .lab-step-dot {
  background: #fff;
  color: #111;
  border-color: #111;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12);
}

.lab-step-name {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-3, #8b9bb4);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lab-step.is-current .lab-step-name,
.lab-step.is-done .lab-step-name {
  font-weight: 600;
}
.lab-step.is-done .lab-step-name { color: var(--text-1, #1f2328); }
.lab-step.is-current .lab-step-name { color: var(--text-1, #1f2328); }

/* 目的/总结折叠块 */
.lab-panel-docs { margin-top: 14px; border-top: 1px solid rgba(127, 127, 127, 0.14); }
body.light-mode .lab-panel-docs { border-top-color: rgba(0, 0, 0, 0.08); }

.lab-doc { border-bottom: 1px solid rgba(127, 127, 127, 0.14); }
body.light-mode .lab-doc { border-bottom-color: rgba(0, 0, 0, 0.08); }
.lab-doc:last-child { border-bottom: none; }

.lab-doc summary {
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2, #57606a);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lab-doc summary::-webkit-details-marker { display: none; }
.lab-doc summary::before {
  content: '+';
  font-size: 14px;
  font-weight: 700;
  color: #FF0000;
  transition: transform 0.2s ease;
}
.lab-doc[open] summary::before { content: '−'; }
.lab-doc-body { padding: 0 0 12px; font-size: 13px; }

/* 搜索框:面板右下角 */
.lab-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 14px;
  margin-left: auto;
  width: 240px;
  max-width: 100%;
}
.lab-search input {
  width: 100%;
  padding: 8px 36px 8px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-1, #1f2328);
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.25s ease;
}
.lab-search input::placeholder { color: var(--text-3, #8b9bb4); }
.lab-search input:focus { border-color: #FF0000; }
.lab-search button {
  position: absolute;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3, #8b9bb4);
  cursor: pointer;
  transition: color 0.25s ease;
}
.lab-search button:hover { color: #FF0000; }

/* ---------- 时间轴条目:简介行（徽章已按要求去掉） ---------- */
.cl-item-excerpt {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-3, #8b9bb4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cl-item-card:not(.has-thumb) .cl-item-body { flex: 1; min-width: 0; }

/* ---------- 日志详情页 ---------- */
.lab-log-page { max-width: 860px; margin: 0 auto; padding: 4px 0 40px; }

.lab-log-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 28px 32px;
}
body.light-mode .lab-log-card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.lab-log-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-1, #1f2328);
}

.lab-log-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-3, #8b9bb4);
}
.lab-log-date { display: inline-flex; align-items: center; gap: 5px; }
.lab-log-experiment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #FF0000;
  text-decoration: none;
}
.lab-log-experiment:hover { text-decoration: underline; }

.lab-log-cover {
  display: block;
  width: 100%;
  border-radius: 10px;
  margin-top: 18px;
}

.lab-log-content { margin-top: 20px; }

.lab-log-foot {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(127, 127, 127, 0.14);
}
body.light-mode .lab-log-foot { border-top-color: rgba(0, 0, 0, 0.08); }
.lab-log-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-2, #57606a);
  text-decoration: none;
  transition: color 0.2s ease;
}
.lab-log-back:hover { color: #FF0000; }

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .lab-panel { padding: 14px 14px 12px; }
  .lab-panel-title { font-size: 17px; }
  .lab-step { min-width: 64px; }
  .lab-search { width: 100%; margin-left: 0; }
  .lab-log-card { padding: 20px 16px; }
  .lab-log-title { font-size: 20px; }
}

/* 月历:被筛选日期高亮（其余日历样式复用 changelog.css） */
.cl-calendar .calendar-day.selected {
  color: #fff;
  background: #FF0000;
}

/* 搜索框位于左侧栏顶部（月历上方）：占满栏宽 */
.changelog-sidebar .lab-search {
  width: 100%;
  margin: 0 0 16px;
}

/* 阶段总结：常驻展示的高亮卡片（不再折叠） */
.lab-summary {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 0, 0, 0.04);
  border: 1px solid rgba(255, 0, 0, 0.18);
  border-radius: 8px;
}
.lab-summary-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #FF0000;
}
.lab-summary-body { font-size: 13px; }
