.max-w-\[720px\] {
    --dialogue-bg: #f0f8fa;              /* 清爽海蓝白 */
    --dialogue-shadow: 0 6px 20px rgba(74, 155, 181, 0.2);  /* 海蓝阴影, 呼应页面accent */
    --details-border-color: #c4dde8;      /* 冰蓝边框 */
    --details-header-bg: #dceef4;         /* 浅蓝标题底 */
    --details-header-bg-hover: #c8e4ee;   /* 稍深悬停 */
    --content-bg: #fafdff;                /* 极淡蓝白 */
    --text-color-primary: #2c4a5a;         /* 主文字: 深海军蓝, 与原页面文本一致 */
    --text-color-secondary: #6a9ab0;       /* 辅助柔蓝 */
    --border-radius-main: 20px;
    --border-radius-inner: 12px;
    --accent-pink: #4a9bb5;                /* 海蓝主色 → 与页面高亮水蓝协调 */
    --accent-warm: #6ab8d0;               /* 辅助暖蓝 */
}

/* 对话气泡：海蓝渐变 + 清爽边框 + 与原页面卡片风格统一 */
.chat-container .group .relative.inline-block {
    background: linear-gradient(135deg, #fafdff 0%, #f0f8fa 100%);
    border: 2px solid var(--accent-pink);
    box-shadow: var(--dialogue-shadow);
    border-radius: var(--border-radius-main);
    padding: 12px 16px;
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.chat-container .group .relative.inline-block:hover {
    box-shadow: 0 8px 24px rgba(74, 155, 181, 0.2);
}

/* 对话气泡装饰：海浪与音符 (呼应夏日声音主题) */
.chat-container .group .relative.inline-block::before {
    content: '🌊';
    position: absolute;
    top: -10px;
    left: -8px;
    font-size: 18px;
    opacity: 0.75;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}
.chat-container .group .relative.inline-block::after {
    content: '🎵';
    position: absolute;
    bottom: -10px;
    right: -8px;
    font-size: 18px;
    opacity: 0.75;
    transition: transform 0.2s ease;
}
.chat-container .group .relative.inline-block:hover::after {
    transform: scale(1.1);
}

/* 隐藏多余元素 (保持干净) */
.chat-container .group .relative.inline-block > .MuiBox-root.css-0 {
    display: none;
}

/* 折叠块整体 - 海洋装饰 */
.markdown-body details {
    border: none;
    margin: 20px 0;
    background-color: transparent;
    overflow: visible;
}

/* 折叠块标题：海蓝胶囊按钮，与页面卡片按钮风格一致 */
.markdown-body summary {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--details-header-bg) 0%, #b8dae8 100%);
    color: var(--text-color-primary);
    font-weight: 600;
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    border: 1px solid #c4dde8;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(74, 155, 181, 0.15);
    list-style: none;
    letter-spacing: 0.04em;
}

.markdown-body summary::-webkit-details-marker {
    display: none;
}

/* 标题悬停：优雅加深 */
.markdown-body summary:hover {
    background: linear-gradient(135deg, var(--details-header-bg-hover) 0%, #a4d0e0 100%);
    border-color: var(--accent-pink);
    box-shadow: 0 6px 18px rgba(74, 155, 181, 0.25);
    transform: translateY(-2px);
}

/* 自定义折叠图标：海浪标志 (呼应夏日海边) */
.markdown-body summary::before {
    content: '🌊';
    display: inline-block;
    margin-right: 10px;
    font-size: 1rem;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.05));
}

.markdown-body details[open] > summary::before {
    transform: rotate(15deg) scale(1.05);
}

/* 折叠块内部内容：海蓝背景 + 冰蓝边框 + 细腻内阴影 */
.markdown-body details > pre,
.markdown-body details > table {
    margin-top: 14px;
    border: 1px solid #c4dde8;
    border-radius: var(--border-radius-inner);
    background-color: var(--content-bg);
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(74, 155, 181, 0.08);
    transition: all 0.2s ease;
}

/* 代码块美化: 清爽海调 */
.markdown-body details pre > div:first-child[style*="border-color"] {
    display: none;
}

.markdown-body details pre {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

.markdown-body details pre > div[node="[object Object]"] {
    padding: 16px;
    color: #2c5a6a;
    background: #f8fcfe !important;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
}

.markdown-body details code.language-markdown {
    font-size: 13px;
    line-height: 1.5;
    color: #3a8aa0;
    background: transparent !important;
}

/* 表格美化: 冰蓝边框 + 轻柔底色 */
.markdown-body details table {
    border-collapse: collapse;
    width: 100%;
}
.markdown-body details table th,
.markdown-body details table td {
    font-size: 13px;
    padding: 8px 12px;
    line-height: 1.5;
    border: 1px solid #c4dde8;
    color: #2c4a5a;
}
.markdown-body details table th {
    background: #e8f2f7;
    font-weight: 600;
}
.markdown-body details table tr:nth-child(even) {
    background-color: #f4fafc;
}

/* AI生成中动画：海浪旋绕 + 软萌文字 (符合整体夏日诗意氛围) */
@keyframes ai-answer-spinner-rotation {
  to {
    transform: rotate(360deg);
  }
}

#ai-chat-answer .chat-answer-container div:has(> .style_dot-flashing__8L91Q) {
  justify-content: flex-start;
  width: auto;
  height: auto;
  gap: 12px;
}

#ai-chat-answer .chat-answer-container div:has(> .style_dot-flashing__8L91Q)::after {
    content: '🌊 海风轻拂，少女正在书写心意 🌊';
    font-size: 14px;
    color: #4a9bb5;
    margin-left: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
    font-family: 'Noto Serif SC', serif;
}

/* 隐藏原有点闪特效，替换为海蓝色旋转环 */
#ai-chat-answer .chat-answer-container .style_dot-flashing__8L91Q::before,
#ai-chat-answer .chat-answer-container .style_dot-flashing__8L91Q::after {
    content: none;
    display: none;
}

#ai-chat-answer .chat-answer-container .style_dot-flashing__8L91Q {
    background: transparent;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    flex-shrink: 0;
    border: 3px solid rgba(74, 155, 181, 0.25);
    border-top-color: #4a9bb5;
    border-radius: 50%;
    animation: ai-answer-spinner-rotation 0.8s linear infinite;
    box-shadow: 0 0 6px rgba(74,155,181,0.3);
}

/* 附加点缀：让折叠区域更贴合"夏日物语"氛围 */
.markdown-body details[open] {
    position: relative;
}
.markdown-body details[open]::after {
    content: '🎵';
    position: absolute;
    bottom: -12px;
    right: 8px;
    font-size: 14px;
    opacity: 0.5;
    pointer-events: none;
}

/* 针对整体页面背景继承，使对话卡片不显得突兀 */
.max-w-\[720px\] {
    background: transparent;
}