/* 蓝调冷感风格 - 整体基调：清冷、蓝灰、通透、极简 */

details.tw-chain {
  background: transparent;  /* ✅ 透明，不遮挡背景 */
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  padding: 8px 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(143, 177, 214, 0.10);
  transition: all 0.25s ease;
}

details.tw-chain:hover {
  border-color: #8fb1d4;
  box-shadow: 0 4px 16px rgba(143, 177, 214, 0.18);
}

details.tw-chain > summary {
  font-size: 14px;
  font-weight: 600;
  color: #5a7a9a;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

details.tw-chain > summary::-webkit-details-marker {
  display: none;
}

details.tw-chain > summary::before {
  content: "🧊";
  font-size: 16px;
  margin-right: 4px;
}

details.tw-chain[open] > summary::before {
  content: "❄️";
}

details.tw-chain div.chain-block {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5a6b;
  padding: 6px 10px;
  margin: 4px 0;
  background: rgba(230, 240, 255, 0.50);  /* ✅ 半透冰蓝，可见底层 */
  border-radius: 8px;
  border-left: 3px solid #b0c8e8;
  backdrop-filter: blur(2px);  /* ✅ 微模糊，增强文字可读性 */
}

details.tw-chain div.chain-block b {
  color: #5a7ac8;
  font-weight: 700;
}

details.tw-chain div.chain-block.b1 { border-left-color: #8fb1d4; }
details.tw-chain div.chain-block.b2 { border-left-color: #6292c0; }
details.tw-chain div.chain-block.b3 { border-left-color: #407aac; }
details.tw-chain div.chain-block.b4 { border-left-color: #2a5a8a; }

text {
  display: block;
  background: linear-gradient(145deg, #f7faff, #f0f5fd);
  border: 1.5px solid #d0dce8;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 3px 12px rgba(143, 177, 214, 0.08);
  line-height: 1.75;
  font-size: 15px;
  color: #2a3a4a;
  transition: box-shadow 0.3s ease;
}

text:hover {
  box-shadow: 0 6px 20px rgba(143, 177, 214, 0.15);
}

text p {
  margin: 0 0 12px 0;
  text-indent: 2em;
}

text p:last-child {
  margin-bottom: 0;
}

details[open] {
  background: transparent;  /* ✅ 展开时透明 */
  border: 1.5px solid #c4d4e4;
  border-radius: 14px;
  padding: 8px 14px 14px 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(143, 177, 214, 0.06);
  transition: all 0.2s ease;
}

details[open]:hover {
  border-color: #a0b8d0;
  box-shadow: 0 3px 12px rgba(143, 177, 214, 0.12);
}

details > summary {
  font-size: 14px;
  font-weight: 700;
  color: #4a6a8a;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  letter-spacing: 0.3px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

details > summary::after {
  content: " ▾";
  font-size: 12px;
  color: #a0b8d0;
  transition: transform 0.25s ease;
}

details[open] > summary::after {
  content: " ▴";
}

details[open] p {
  font-size: 13px;
  line-height: 1.65;
  color: #354a5a;
  margin: 5px 0;
  padding: 3px 6px;
  background: rgba(235, 245, 255, 0.45);  /* ✅ 半透冰蓝白 */
  border-radius: 6px;
}

details[open] p b,
details[open] p strong {
  color: #5a7ac8;
  font-weight: 700;
}

details[open] details[open] {
  background: rgba(240, 248, 255, 0.55);  /* ✅ 嵌套半透 */
  border-color: #c8d8e8;
  margin-top: 8px;
  padding: 6px 12px 10px 12px;
}

details[open] details[open] p {
  background: rgba(220, 235, 255, 0.25);
}

details[open] details[open] p:has(+ p) {
  border-bottom: 1px dashed #d0dce8;
  padding-bottom: 6px;
}

details[open] details[open] p:last-child {
  margin-bottom: 2px;
}

a {
  color: #6a8ab0;
  text-decoration: none;
  border-bottom: 1px dotted #b8c8dc;
  transition: color 0.2s;
}

a:hover {
  color: #4a7ab8;
  border-bottom-color: #4a7ab8;
}

details[open]::-webkit-scrollbar {
  width: 5px;
}

details[open]::-webkit-scrollbar-track {
  background: rgba(240, 248, 255, 0.3);
  border-radius: 10px;
}

details[open]::-webkit-scrollbar-thumb {
  background: #b8c8dc;
  border-radius: 10px;
}

details[open]::-webkit-scrollbar-thumb:hover {
  background: #a0b8d0;
}

@media (max-width: 640px) {
  text {
    padding: 14px 16px;
    font-size: 14px;
    border-radius: 12px;
  }

  details[open] {
    padding: 6px 10px 12px 10px;
  }

  details[open] p {
    font-size: 12.5px;
    padding: 2px 4px;
  }

  details > summary {
    font-size: 13px;
  }

  details.tw-chain {
    padding: 6px 10px;
  }

  details.tw-chain div.chain-block {
    font-size: 12px;
    padding: 4px 8px;
  }
}