/* ====== 向阳花与狐之夏 · 夏日主题 ====== */

/* 思维链隐藏 */
think {
  display: none;
}

/* ---- 顶部快览状态栏 ---- */
top {
  display: block;
  margin: 12px auto 16px auto;
  padding: 14px 18px;
  max-width: 520px;
  background: linear-gradient(135deg, #FFF3E0 0%, #FFECB3 50%, #FFF8E1 100%);
  border: 1.5px solid #FFD54F;
  border-radius: 16px;
  text-align: center;
  font-size: 14px;
  line-height: 2;
  color: #5D4037;
  letter-spacing: 0.5px;
  position: relative;
  box-shadow: 0 2px 12px rgba(245, 166, 35, 0.15);
  overflow: hidden;
}

top::before {
  content: "🌻";
  position: absolute;
  top: -6px;
  left: -6px;
  font-size: 28px;
  opacity: 0.2;
  transform: rotate(-15deg);
  pointer-events: none;
}

top::after {
  content: "🦊";
  position: absolute;
  bottom: -4px;
  right: -2px;
  font-size: 24px;
  opacity: 0.18;
  transform: rotate(12deg);
  pointer-events: none;
}

/* ---- 正文区域 ---- */
text {
  display: block;
  margin: 16px auto;
  padding: 24px 22px 24px 28px;
  max-width: 580px;
  background: linear-gradient(to bottom, #FFFDF7, #FFF8F0);
  border-radius: 12px;
  border-left: 3.5px solid #FFB7C5;
  font-size: 15.5px;
  line-height: 1.95;
  color: #4E342E;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  position: relative;
}

text::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 10px;
  width: 4px;
  height: 4px;
  background: #FFB7C5;
  border-radius: 50%;
  opacity: 0.6;
}

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

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

/* 正文内对话引号样式 */
text p .dialogue,
text p q {
  color: #E91E63;
  font-style: normal;
}

/* ---- 折叠面板（状态面板 & 行动建议） ---- */
details {
  margin: 12px auto;
  max-width: 580px;
  border: 1px solid #FFCC80;
  border-radius: 12px;
  overflow: hidden;
  background: #FFFDF7;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

details + details {
  margin-top: 10px;
}

details summary {
  padding: 12px 18px;
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  font-size: 15px;
  font-weight: 700;
  color: #E65100;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease, color 0.3s ease;
  list-style: none;
  position: relative;
}

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

details summary::before {
  content: "▸ ";
  color: #FF9800;
  font-size: 13px;
  transition: transform 0.3s ease;
  display: inline-block;
}

details[open] summary::before {
  content: "▾ ";
  color: #F57C00;
}

details summary:hover {
  background: linear-gradient(135deg, #FFE0B2, #FFCC80);
  color: #BF360C;
}

details[open] summary {
  border-bottom: 1px dashed #FFCC80;
}

details > *:not(summary) {
  padding: 0 18px;
}

details p,
details ul,
details li {
  font-size: 14px;
  line-height: 1.85;
  color: #5D4037;
}

details strong {
  color: #E65100;
  font-size: 14.5px;
}

details ul {
  padding-left: 8px;
  list-style: none;
}

details li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 4px;
}

details li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: #FFB74D;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.85;
}

/* ---- 记忆区特殊标识 ---- */
details em {
  color: #F06292;
  font-style: normal;
  font-size: 13.5px;
}

/* ---- 移动端适配 ---- */
@media screen and (max-width: 480px) {
  top {
    margin: 8px 6px 12px 6px;
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 12px;
    line-height: 1.9;
  }

  text {
    margin: 12px 6px;
    padding: 18px 16px 18px 22px;
    font-size: 15px;
    line-height: 1.9;
    border-radius: 10px;
  }

  text p {
    margin: 0 0 14px 0;
  }

  details {
    margin: 8px 6px;
    border-radius: 10px;
  }

  details summary {
    padding: 10px 14px;
    font-size: 14px;
  }

  details > *:not(summary) {
    padding: 0 14px;
  }

  details p,
  details ul,
  details li {
    font-size: 13.5px;
  }
}

/* ---- 平板适配 ---- */
@media screen and (min-width: 481px) and (max-width: 1024px) {
  top,
  text,
  details {
    max-width: 90%;
  }
}

/* ---- 细节动效 ---- */
details {
  transition: box-shadow 0.3s ease;
}

details:hover {
  box-shadow: 0 2px 12px rgba(245, 166, 35, 0.18);
}

details[open] {
  box-shadow: 0 3px 16px rgba(245, 166, 35, 0.22);
}

top {
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

top:hover {
  box-shadow: 0 4px 18px rgba(245, 166, 35, 0.25);
  transform: translateY(-1px);
}

/* ---- 滚动条美化（网页端） ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #FFF8E1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #FFD54F, #FFB74D);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #FFC107, #FF9800);
}

/* ===== 输入框美化 ===== */
#ai-chat-input {
  background: rgba(245, 242, 237, 0.85);
  color: #3d3832;
  border: none;
  font-size: 14px;
}

#ai-chat-input::placeholder {
  color: #b0a898;
}

/* 输入框外层容器 */
#ai-chat-input-container,
div:has(> #ai-chat-input) {
  background: rgba(240, 237, 230, 0.7);
  border: 1.5px solid #a8b5a0 !important;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

div:has(> #ai-chat-input):focus-within {
  border-color: #7a9472 !important;
  box-shadow: 0 0 8px rgba(143, 163, 137, 0.35);
}

/* ===== 发送按钮美化 ===== */
#ai-send-button {
  background: linear-gradient(135deg, #a8b5a0, #7a9472) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease;
}

#ai-send-button:hover {
  background: linear-gradient(135deg, #b8c5b0, #8fa389) !important;
  box-shadow: 0 0 12px rgba(143, 163, 137, 0.5);
  transform: scale(1.05);
}

#ai-send-button svg {
  color: #fff !important;
  fill: #fff !important;
}

/* ===== 第一排工具栏（复制/刷新/编辑等） ===== */
.MuiButton-textPrimary {
  color: #5a6e52 !important;
  transition: all 0.25s ease;
}

.MuiButton-textPrimary:hover {
  background: rgba(143, 163, 137, 0.15) !important;
  color: #7a9472 !important;
}

/* ===== 第二排工具栏（Mod/记忆增强/调试等） ===== */
.MuiButton-outlinedPrimary {
  border-color: #a8b5a0 !important;
  color: #5a6e52 !important;
  transition: all 0.25s ease;
}

.MuiButton-outlinedPrimary:hover {
  background: rgba(143, 163, 137, 0.12) !important;
  border-color: #7a9472 !important;
  color: #7a9472 !important;
}

/* ===== 底部翻页区域统一色调 ===== */
.MuiPaginationItem-root {
  color: #5a6e52 !important;
}

.MuiPaginationItem-root.Mui-selected {
  background: rgba(143, 163, 137, 0.25) !important;
  color: #7a9472 !important;
}