/* ═══════════════════════════════════════猫狗双塑· 完整内置CSS（合并版）
   ═══════════════════════════════════════ */

@import url('https://chinese-fonts-cdn.deno.dev/packages/lxgwwenkai/dist/LXGWWenKai-Regular/result.css');
think { display: none; }

/* ===== 全局背景 ===== */
.chat-container {
  background:
    url('...') center/cover no-repeat fixed !important;font-family: 'LXGW WenKai', '霞鹜文楷','KaiTi', serif !important;
}

/* ===== 顶部模型选择栏 ===== */
.chat-container > div:first-child,
div[class="sticky"][class*="top-0"] {
  background: linear-gradient(135deg, rgba(196,120,120,0.72), rgba(232,160,160,0.6)) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196,120,120,0.3) !important;
}

/* ===== 回复卡片（外层容器） ===== */
#customized-answer-content,
#ai-chat-answer #customized-answer-content {
  background: linear-gradient(160deg, rgba(255,250,248,0.88), rgba(253,242,240,0.84)) !important;
  border: 1px solid rgba(232,160,160,0.45) !important;
  border-radius: 16px !important;
  box-shadow:
    0 8px 32px rgba(160,90,90,0.16),
    inset 0 0 0 1px rgba(255,255,255,0.35),
    0 0 20px rgba(232,160,160,0.1);
  backdrop-filter: blur(6px);
  padding: 20px 22px !important;
  position: relative;
  overflow: hidden;
}

#customized-answer-content::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(232,160,160,0.18), transparent 70%);
  pointer-events: none;
}

#customized-answer-content::after {
  content: '🐾';
  position: absolute;
  bottom: 8px;
  right: 16px;
  font-size: 16px;
  opacity: 0.1;
  pointer-events: none;
}

/* ===== Markdown Body ===== */
.markdown-body {
  font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
  color: #4a4a4a !important;
  line-height: 1.85 !important;
  font-size: 15px !important;
}

.markdown-body strong {
  color: #c47878;
}

/* ══════════════════════════════════════▼ game 内部CSS（保持不变）▼
   ══════════════════════════════════════ */

game {
  display: block;
  position: relative;
  color: #4a4a4a;
  line-height: 1.8;
  padding: 0 2px 48px 2px;
  font-size: 15px;
}

text {
  display: block;
  padding: 4px 2px 18px 2px;
  margin-bottom: 14px;
  border-bottom: 1px dashed rgba(232,160,160,0.35);
}

status {
  display: block;
  padding-top: 4px;
}

game header {
  position: relative;
  background: rgba(255,245,245,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(232,160,160,0.25);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 22px;
  box-shadow: 0 2px 12px rgba(232,160,160,0.08);
  overflow: hidden;
}

game header::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 10px;
  width: 32px;
  height: 32px;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c47878'%3E%3Cellipse cx='12' cy='16' rx='5' ry='4'/%3E%3Ccircle cx='6' cy='9' r='2.5'/%3E%3Ccircle cx='18' cy='9' r='2.5'/%3E%3Ccircle cx='9' cy='5' r='2'/%3E%3Ccircle cx='15' cy='5' r='2'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

game header p.hi {
  margin: 0;
  padding: 1px 0;
  font-size: 0.82em;
  color: #9a8a8a;
  letter-spacing: 1.5px;
  font-weight: 500;
}

game header p.hm {
  margin: 6px 0 0 0;
  padding: 6px 0 0 0;
  border-top: 1px dashed rgba(232,160,160,0.35);
  font-size: 0.88em;
  color: #c47878;
  font-weight: 600;
  letter-spacing: 0.5px;
}

game text p {
  margin: 0 0 14px 0;
  text-indent: 2em;
  line-height: 1.95;
  font-size: 0.94em;
  color: #4a4a4a;
}

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

game .sp {
  background: #ffffff;
  border: 1px solid rgba(232,160,160,0.2);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(232,160,160,0.06);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

game .sp:last-child {
  margin-bottom: 0;
}

game .sp:hover {
  box-shadow: 0 2px 12px rgba(232,160,160,0.13);
  border-color: rgba(232,160,160,0.35);
}

game .sp[open] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

game .sp summary {
  padding: 13px 18px;
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #c47878;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 3px solid #e8a0a0;
  background: linear-gradient(135deg, rgba(252,232,232,0.25), rgba(255,245,245,0.4));
  transition: background 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
}

game .sp summary:hover {
  background: linear-gradient(135deg, rgba(252,232,232,0.5), rgba(255,245,245,0.6));
}

game .sp summary::-webkit-details-marker {
  display: none;
}

game .sp summary::marker {
  display: none;
  content: "";
}

game .sp summary::after {
  content: "›";
  font-size: 1.3em;
  font-weight: 300;
  color: #e8a0a0;
  transition: transform 0.3s ease;
  display: inline-block;
  flex-shrink: 0;margin-left: 8px;
}

game .sp[open] summary::after {
  transform: rotate(90deg);
}

game .sp[open] summary {
  border-bottom: 1px solid rgba(232,160,160,0.15);
}

game .sp ul,
game .sp ol {
  padding: 10px 18px 10px 36px;
  margin: 0;
}

game .sp li {
  margin: 3px 0;
  font-size: 0.88em;
  line-height: 1.7;
  color: #5a5a5a;
}

game .sp strong {
  color: #c47878;
  font-weight: 600;
}

game .sp em {
  color: #b08888;
  font-style: italic;
}

game .mh {
  font-size: 0.8em;
  color: #c47878;
  text-align: center;
  margin: 14px 18px 6px 18px;
  padding: 0;
  font-weight: 500;
  letter-spacing: 3px;
}

game .mt {
  width: calc(100% - 36px);
  margin: 6px 18px 10px 18px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.8em;
  border: 1px solid rgba(232,160,160,0.2);
}

game .mt th {
  background: linear-gradient(135deg, #fce8e8, #fdf0f0);
  color: #c47878;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 0.88em;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(232,160,160,0.25);
}

game .mt td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(232,160,160,0.1);
  color: #5a5a5a;
  line-height: 1.5;
}

game .mt tr:nth-child(even) td {
  background: rgba(255,245,245,0.4);
}

game .mt tr:last-child td {
  border-bottom: none;
}

game::after {
  content: "";
  position: absolute;
  bottom: 4px;
  right: 8px;
  width: 48px;
  height: 48px;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c47878'%3E%3Cellipse cx='12' cy='16' rx='5' ry='4'/%3E%3Ccircle cx='6' cy='9' r='2.5'/%3E%3Ccircle cx='18' cy='9' r='2.5'/%3E%3Ccircle cx='9' cy='5' r='2'/%3E%3Ccircle cx='15' cy='5' r='2'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* ══════════════════════════════════════
   ▲ game 内部CSS 结束 ▲
   ══════════════════════════════════════ */

/* ===== 用户输入气泡 ===== */
#ai-chat-question,
[id="user-message"] {
  background: linear-gradient(135deg, rgba(160,90,90,0.82), rgba(196,120,120,0.75)) !important;
  color: #fff5f0 !important;
  border: 1px solid rgba(232,160,160,0.35) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(160,90,90,0.22);
  font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

/* ===== 底部渐变遮罩 ===== */
.bg-gradient-to-t.from-white.via-white.to-transparent {
  background: linear-gradient(
    to top,
    rgba(248,225,225,0.85) 0%,
    rgba(248,225,225,0.45) 50%,
    transparent 100%
  ) !important;
}

/* ===== 输入框 ===== */
#ai-chat-input {
  background: rgba(255,250,248,0.9) !important;
  color: #4a4a4a !important;
  border: none;
  font-size: 14px;
  font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

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

#ai-chat-input-container,
div:has(> #ai-chat-input) {
  background: rgba(255,248,245,0.75) !important;
  border: 1.5px solid #e8a0a0 !important;
  border-radius: 14px !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(160,90,90,0.12);
  transition: all 0.3s ease;
}

div:has(> #ai-chat-input):focus-within {
  border-color: #c47878 !important;
  box-shadow: 0 0 14px rgba(232,160,160,0.4), 0 4px 16px rgba(160,90,90,0.18);
}

/* ===== 发送按钮 ===== */
#ai-send-button {
  background: linear-gradient(135deg, #e8a0a0, #c47878) !important;
  border-radius: 10px !important;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(196,120,120,0.3);
}

#ai-send-button:hover {
  background: linear-gradient(135deg, #f0b0b0, #d08888) !important;
  box-shadow: 0 0 16px rgba(232,160,160,0.5);
  transform: scale(1.06);
}

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

/* ===== 第一排工具栏 ===== */
.MuiButton-textPrimary {
  color: #c47878 !important;
  transition: all 0.25s ease;
  font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

.MuiButton-textPrimary:hover {
  background: rgba(232,160,160,0.14) !important;
  color: #a05858 !important;
}

/* ===== 第二排工具栏 ===== */
.MuiButton-outlinedPrimary {
  border-color: rgba(232,160,160,0.55) !important;
  color: #c47878 !important;
  background: rgba(255,248,245,0.5) !important;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

.MuiButton-outlinedPrimary:hover {
  background: rgba(232,160,160,0.14) !important;
  border-color: #c47878 !important;
  color: #a05858 !important;
  box-shadow: 0 0 12px rgba(232,160,160,0.28);
}

/* ===== 翻页 ===== */
.MuiPaginationItem-root {
  color: #c47878 !important;
  font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

.MuiPaginationItem-root:hover {
  background: rgba(232,160,160,0.14) !important;
}

.MuiPaginationItem-root.Mui-selected {
  background: linear-gradient(135deg, rgba(232,160,160,0.5), rgba(196,120,120,0.4)) !important;
  color: #fff5f0 !important;
  border: 1px solid rgba(232,160,160,0.45);
}

/* ===== 滚动条 ===== */
.chat-container ::-webkit-scrollbar {
  width: 8px;
}

.chat-container ::-webkit-scrollbar-track {
  background: rgba(245,220,220,0.25);
  border-radius: 4px;
}

.chat-container ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e8a0a0, #c47878);
  border-radius: 4px;
}

.chat-container ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f0b0b0, #d08888);
}

/* ===== 评论区文字 ===== */
.chat-container span,
.chat-container div[class="comment"],
.chat-container div[class*="Comment"],
.chat-container .overflow-y-auto span {
  color: #f5e0e0 !important;
}

/* ===== 移动端适配 ===== */
@media (max-width: 480px) {
  game header {
    padding: 10px 14px;
    border-radius: 10px;
  }
  game header p.hi {
    font-size: 0.78em;
    letter-spacing: 1px;
  }
  game header p.hm {
    font-size: 0.84em;
  }
  game text p {
    text-indent: 1.5em;
    font-size: 0.9em;
    line-height: 1.85;
    margin-bottom: 12px;
  }
  game .sp summary {
    padding: 11px 14px;
    font-size: 0.82em;
    letter-spacing: 0.8px;
  }
  game .sp ul,
  game .sp ol {
    padding: 8px 14px 8px 30px;
  }
  game .sp li {
    font-size: 0.84em;
  }
  game .mt {
    width: calc(100% - 28px);
    margin: 6px 14px 8px 14px;
    font-size: 0.72em;
  }
  game .mt th,
  game .mt td {
    padding: 5px 6px;
  }
  game .mh {
    margin: 10px 14px 4px 14px;
    font-size: 0.76em;
    letter-spacing: 2px;
  }
  game header::before {
    width: 26px;
    height: 26px;
    top: 5px;
    right: 8px;
  }
  game::after {
    width: 36px;
    height: 36px;
  }
  #customized-answer-content {
    padding: 14px 16px !important;
    border-radius: 12px !important;
  }
}