/* CSS Variables for Anti-Entropy Theme */
/* 主题色：深邃的蓝黑、深灰 */
/* 辅助色：亮眼的电光蓝、青色 */
/* 点缀色：少量橙色（用于警告/高亮） */

/* --- 全局字体设置 (应用于所有元素，确保一致性) --- */
* {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
    box-sizing: border-box !important; /* 统一盒模型 */
}

/* --- AI卡整体容器样式 --- */
ai {
    display: block !important; /* 确保<ai>标签作为块级元素显示 */
    width: 100% !important;
    max-width: 100% !important;
    /* 整体背景由各个区块自身定义，避免冲突 */
}

/* --- 顶部栏美化 --- */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(to right, #1a1e27, #2e3540) !important; /* 深蓝黑渐变背景 */
    border-bottom: 1px solid #00aaff !important; /* 底部电光蓝细边 */
    box-shadow: 0 2px 10px rgba(0, 224, 255, 0.2) !important; /* 底部微光蓝影 */
    padding: 8px 16px !important;
    transition: all 0.3s ease !important;
}

/* 模型选择器容器 */
#ai-model-selector .group.flex.items-center {
    background: #2e3540 !important; /* 中等深灰背景 */
    border: 1px solid #3a4555 !important; /* 边框 */
    border-radius: 4px !important;
    padding: 4px 8px !important;
    transition: all 0.2s ease !important;
}
#ai-model-selector .group.flex.items-center:hover {
    border-color: #00e0ff !important; /* 悬停高亮边框 */
    box-shadow: 0 0 8px rgba(0, 224, 255, 0.4) !important;
}

/* 模型名称 */
#ai-model-selector .truncate.text-\[13px\] {
    color: #e0e6f0 !important; /* 浅色文本 */
    font-weight: bold !important;
    font-size: 13px !important;
}

/* 下拉箭头图标 */
#ai-model-selector .shrink-0.flex.items-center svg {
    color: #00e0ff !important; /* 电光蓝图标 */
    transition: transform 0.2s ease !important;
}
#ai-model-selector .group.flex.items-center:hover .shrink-0.flex.items-center svg {
    transform: rotate(180deg) !important; /* 悬停时旋转 */
}

/* 历史记录图标 (移动端) */
.sticky.w-full.top-0 svg.lucide-clock-8 {
    color: #00aaff !important; /* 辅助蓝 */
    transition: color 0.2s ease !important;
}
.sticky.w-full.top-0 svg.lucide-clock-8:hover {
    color: #00e0ff !important;
}

/* 历史记录未读角标 (移动端) */
.sticky.w-full.top-0 span.MuiBadge-dot.md\:hidden {
    background-color: #ff4500 !important; /* 醒目橙色 */
}

/* 音乐按钮图标 */
.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2 {
    color: #00aaff !important; /* 辅助蓝 */
    transition: color 0.2s ease !important;
}
.sticky.w-full.top-0 button.MuiIconButton-root:hover svg.lucide-music-2 {
    color: #00e0ff !important;
}

/* '设置'按钮 */
#header-setting-button {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: #00aaff !important;
    transition: all 0.2s ease !important;
}
#header-setting-button:hover {
    border-color: #00e0ff !important;
    color: #00e0ff !important;
    box-shadow: 0 0 5px rgba(0, 224, 255, 0.3) !important;
}
#header-setting-button svg {
    color: inherit !important; /* 继承父元素的颜色 */
}

/* --- 聊天框美化 (输入与输出共有) --- */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(145deg, #2e3540, #1a1e27) !important; /* 深色渐变背景 */
    border: 1px solid #3a4555 !important; /* 科技感边框 */
    border-radius: 8px !important;
    box-shadow: 0 0 15px rgba(0, 224, 255, 0.3) !important; /* 蓝色微光阴影 */
    padding: 12px !important;
    overflow: hidden !important;
    isolation: isolate !important; /* 建立层叠上下文，确保伪元素在下方 */
    position: relative !important; /* 确保伪元素定位参考 */
    z-index: 0 !important; /* 确保自身层级 */
}

/* 聊天框背景动效 (伪元素) */
.bg-gray-100\/90.relative.inline-block::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important; /* 确保在内容下方 */
    opacity: 0.2 !important; /* 半透明效果 */
    /* 编码后的SVG背景，模拟数据流/电路板 */
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 100 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='gridPattern' width='10' height='10' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 10 0 L 0 0 L 0 10' fill='none' stroke='%232a303b' stroke-width='0.5'/%3E%3C/pattern%3E%3ClinearGradient id='glowGradient' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%2300e0ff' stop-opacity='0.2'/%3E%3Cstop offset='100%25' stop-color='%2300aaff' stop-opacity='0.05'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='0' width='100' height='100' fill='url(%23gridPattern)'/%3E%3Crect x='0' y='0' width='100' height='100' fill='url(%23glowGradient)' opacity='0.3'/%3E%3Cline x1='0' y1='0' x2='100' y2='100' stroke='%2300e0ff' stroke-width='0.8' opacity='0.4'%3E%3Canimate attributeName='x1' values='0%3B100%3B0' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='y1' values='0%3B100%3B0' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='x2' values='100%3B0%3B100' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='y2' values='100%3B0%3B100' dur='8s' repeatCount='indefinite'/%3E%3C/line%3E%3C/svg%3E") !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 聊天框内的主要文本内容 */
.markdown-body {
    color: #e0e6f0 !important; /* 浅色文本，确保可读性 */
    background: transparent !important; /* 确保背景透明，显示伪元素动效 */
    line-height: 1.6 !important;
    font-size: 14px !important;
    z-index: 1 !important; /* 确保文本在背景动效之上 */
    position: relative !important; /* 确保z-index生效 */
}
/* 确保markdown内部的链接、代码块等元素的颜色也符合主题 */
.markdown-body a {
    color: #00e0ff !important;
    text-decoration: none !important;
}
.markdown-body a:hover {
    text-decoration: underline !important;
}
.markdown-body code {
    background-color: rgba(0, 224, 255, 0.1) !important;
    border-radius: 3px !important;
    padding: 2px 4px !important;
    color: #00e0ff !important;
    font-family: 'Consolas', 'Monaco', monospace !important;
}
.markdown-body pre {
    background-color: #1a1e27 !important;
    border: 1px solid #3a4555 !important;
    border-radius: 5px !important;
    padding: 10px !important;
    overflow-x: auto !important;
}
.markdown-body pre code {
    background-color: transparent !important;
    color: #e0e6f0 !important;
    padding: 0 !important;
}

/* 聊天框底部操作按钮 (复制, 编辑, 删除等) */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #00aaff !important; /* 辅助蓝 */
    background: transparent !important;
    border: 1px solid transparent !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    font-size: 12px !important;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #00e0ff !important; /* 悬停高亮 */
    border-color: #00e0ff !important;
    background: rgba(0, 224, 255, 0.1) !important;
    box-shadow: 0 0 5px rgba(0, 224, 255, 0.3) !important;
}
/* 确保按钮图标颜色也一致 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary svg {
    color: inherit !important;
}

/* 模型名称文本 (例如 gemini2.5pro) */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #8899aa !important; /* 偏淡的灰色，作为次要信息 */
    font-size: 11px !important;
}

/* Token消耗文本 */
.text-orange-500 {
    color: #ff8c00 !important; /* 橙色，用于警告或重要提示 */
    font-weight: bold !important;
    font-size: 11px !important;
}

/* --- 底部输入栏美化 --- */
#ai-chat-bottom-input {
    background: #1a1e27 !important; /* 深色背景 */
    border-top: 1px solid #3a4555 !important; /* 顶部边框 */
    padding: 10px 16px !important;
    box-shadow: 0 -2px 10px rgba(0, 224, 255, 0.15) !important; /* 底部微光蓝影 */
}

/* 主输入框 */
#ai-chat-input {
    background: #2e3540 !important; /* 中等深灰背景 */
    border: 1px solid #3a4555 !important; /* 边框 */
    border-radius: 6px !important;
    color: #e0e6f0 !important; /* 浅色文本 */
    padding: 10px 12px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}
#ai-chat-input:focus {
    border-color: #00e0ff !important; /* 聚焦时高亮边框 */
    box-shadow: 0 0 8px rgba(0, 224, 255, 0.4) !important;
    background: #222831 !important; /* 聚焦时背景略深 */
}

/* 占位符样式 */
#ai-chat-input::placeholder {
    color: #8899aa !important; /* 偏淡的灰色 */
    opacity: 1 !important; /* 确保完全显示 */
}

/* 文字选中效果 */
#ai-chat-input::selection {
    background: #00aaff !important; /* 辅助蓝背景 */
    color: #1a1e27 !important; /* 深色文本 */
}

/* --- 底部按钮栏美化 --- */
#ai-mod-button2 button.MuiButton-root {
    background: #2e3540 !important; /* 中等深灰背景 */
    color: #00e0ff !important; /* 电光蓝文本 */
    border: 1px solid #00aaff !important; /* 辅助蓝边框 */
    border-radius: 4px !important;
    padding: 6px 12px !important;
    min-width: unset !important; /* 移除最小宽度限制 */
    transition: all 0.2s ease !important;
    font-size: 13px !important;
    text-transform: none !important; /* 保持原始大小写 */
}
#ai-mod-button2 button.MuiButton-root:hover {
    background: #00aaff !important; /* 悬停时背景变亮 */
    color: #1a1e27 !important; /* 文本变深 */
    border-color: #00e0ff !important;
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.5) !important;
}
#ai-mod-button2 button.MuiButton-root svg {
    color: inherit !important; /* 图标颜色继承 */
    margin-right: 4px !important; /* 图标与文字间距 */
}

/* --- 分页栏美化 --- */
.MuiPaginationItem-root {
    color: #00aaff !important; /* 辅助蓝文本 */
    background: #2e3540 !important; /* 中等深灰背景 */
    border: 1px solid #3a4555 !important; /* 边框 */
    border-radius: 4px !important;
    margin: 0 2px !important;
    transition: all 0.2s ease !important;
    font-size: 13px !important;
    min-width: 32px !important; /* 确保有足够点击区域 */
    height: 32px !important;
}
.MuiPaginationItem-root:hover {
    background: #3a4555 !important; /* 悬停背景略深 */
    color: #00e0ff !important;
    border-color: #00e0ff !important;
}

/* 按钮选中状态 */
.MuiPaginationItem-root.Mui-selected {
    background: #00e0ff !important; /* 电光蓝背景 */
    color: #1a1e27 !important; /* 深色文本 */
    border-color: #00e0ff !important;
    font-weight: bold !important;
}
.MuiPaginationItem-root.Mui-selected:hover {
    background: #00aaff !important; /* 选中悬停时略微变暗 */
    color: #1a1e27 !important;
}

/* 按钮禁用状态 */
.MuiPaginationItem-root.Mui-disabled {
    opacity: 0.4 !important; /* 半透明效果 */
    pointer-events: none !important; /* 禁止点击 */
    background: #222831 !important;
    border-color: #2a303b !important;
    color: #8899aa !important;
}

/* 翻页箭头图标 */
.MuiPaginationItem-icon {
    color: #00e0ff !important; /* 电光蓝图标 */
}
.MuiPaginationItem-root.Mui-disabled .MuiPaginationItem-icon {
    color: #8899aa !important; /* 禁用时图标颜色 */
}

/* 跳转输入区域容器 */
.MuiStack-root.css-1uwir8f {
    color: #e0e6f0 !important; /* 浅色文本 */
    font-size: 13px !important;
}

/* 跳转输入区域文字样式 */
.MuiStack-root.css-1uwir8f .MuiBox-root {
    color: #e0e6f0 !important; /* 浅色文本 */
}

/* 跳转输入区域输入框 */
.MuiInputBase-input {
    background: #2e3540 !important; /* 中等深灰背景 */
    border: 1px solid #3a4555 !important; /* 边框 */
    border-radius: 4px !important;
    color: #00e0ff !important; /* 电光蓝文本 */
    padding: 4px 8px !important;
    width: 40px !important; /* 适当宽度 */
    text-align: center !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
}
.MuiInputBase-input:focus {
    border-color: #00e0ff !important;
    box-shadow: 0 0 5px rgba(0, 224, 255, 0.4) !important;
}

/* --- 评论区美化 --- */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background: linear-gradient(to bottom, #1a1e27, #222831) !important; /* 深色渐变背景 */
    color: #e0e6f0 !important; /* 浅色文本 */
    border-top: 1px solid #3a4555 !important; /* 顶部边框 */
    box-shadow: 0 -5px 20px rgba(0, 224, 255, 0.1) !important; /* 顶部微光蓝影 */
    padding: 15px !important;
}

/* 顶部标题 '评论(x)' */
div.text-lg.font-bold {
    color: #00e0ff !important; /* 电光蓝标题 */
    font-size: 18px !important;
    margin-bottom: 15px !important;
}

/* '个人评分'文字 */
p.MuiTypography-body1.text-grey-600 {
    color: #8899aa !important; /* 较淡的灰色 */
    font-size: 14px !important;
}

/* 评分容器 */
span.MuiRating-root {
    color: #ff8c00 !important; /* 橙色星星 */
}

/* 未选中的评分星星 (空心) */
span.MuiRating-iconEmpty svg {
    color: #556677 !important; /* 较暗的灰色 */
}

/* 选中的星星 */
span.MuiRating-iconFilled svg {
    color: #ff8c00 !important; /* 橙色 */
}

/* 评分数字 */
span.text-orange-500 {
    color: #ff8c00 !important; /* 橙色 */
    font-weight: bold !important;
}

/* 评论输入框容器 */
div.flex.flex-col.border-gray-200 {
    border: 1px solid #3a4555 !important; /* 边框 */
    border-radius: 6px !important;
    background: #2e3540 !important; /* 中等深灰背景 */
    margin-top: 10px !important;
    transition: all 0.2s ease !important;
}
div.flex.flex-col.border-gray-200:focus-within {
    border-color: #00e0ff !important;
    box-shadow: 0 0 8px rgba(0, 224, 255, 0.4) !important;
}

/* 评论输入框 */
textarea.rc-textarea {
    background: transparent !important; /* 透明背景 */
    color: #e0e6f0 !important; /* 浅色文本 */
    padding: 10px !important;
    border: none !important; /* 移除默认边框 */
    resize: vertical !important; /* 允许垂直调整大小 */
    font-size: 14px !important;
    outline: none !important; /* 移除聚焦轮廓 */
}
textarea.rc-textarea::placeholder {
    color: #8899aa !important;
}
textarea.rc-textarea::selection {
    background: #00aaff !important;
    color: #1a1e27 !important;
}

/* 输入字数统计 */
div.bg-gray-100.text-gray-500 {
    background: #222831 !important; /* 略深的背景 */
    color: #8899aa !important; /* 较淡的灰色 */
    padding: 5px 10px !important;
    border-top: 1px solid #3a4555 !important;
    font-size: 12px !important;
}

/* 发送评论按钮 */
div.cursor-pointer.group.flex.items-center.justify-center {
    background: #00aaff !important; /* 辅助蓝背景 */
    border-radius: 4px !important;
    padding: 8px 15px !important;
    margin-top: 10px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 10px rgba(0, 170, 255, 0.3) !important;
}
div.cursor-pointer.group.flex.items-center.justify-center:hover {
    background: #00e0ff !important; /* 悬停高亮 */
    box-shadow: 0 2px 15px rgba(0, 224, 255, 0.5) !important;
    transform: translateY(-1px) !important;
}

/* 发送评论按钮的图标 */
div[data-state="closed"] svg[data-icon="Send03"] {
    color: #1a1e27 !important; /* 深色图标 */
    width: 20px !important;
    height: 20px !important;
}

/* 分割线 */
div.style_divider__mW0YX {
    background-color: #3a4555 !important; /* 边框色 */
    height: 1px !important;
    margin: 20px 0 !important;
}

/* 排序按钮容器 */
.MuiStack-root.css-1dmzxoz {
    margin-bottom: 15px !important;
}

/* 排序按钮 (通用) */
button.MuiButton-containedPrimary, button.MuiButton-outlinedPrimary {
    text-transform: none !important; /* 保持原始大小写 */
    font-size: 13px !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    margin-right: 8px !important;
}

/* 排序按钮 (已选中) */
button.MuiButton-containedPrimary {
    background: #00e0ff !important; /* 电光蓝背景 */
    color: #1a1e27 !important; /* 深色文本 */
    border: 1px solid #00e0ff !important;
    box-shadow: 0 2px 8px rgba(0, 224, 255, 0.4) !important;
}
button.MuiButton-containedPrimary:hover {
    background: #00aaff !important;
    box-shadow: 0 2px 10px rgba(0, 170, 255, 0.5) !important;
}

/* 排序按钮 (未选中) */
button.MuiButton-outlinedPrimary {
    background: #2e3540 !important; /* 中等深灰背景 */
    color: #00aaff !important; /* 辅助蓝文本 */
    border: 1px solid #00aaff !important;
}
button.MuiButton-outlinedPrimary:hover {
    background: #3a4555 !important;
    color: #00e0ff !important;
    border-color: #00e0ff !important;
}

/* 评论列表容器 */
div.p-3.overflow-y-auto {
    padding: 0 !important; /* 移除默认padding，由评论项自身控制 */
}

/* 评论项 */
div.group.ml-0 {
    background: #222831 !important; /* 略深的背景 */
    border: 1px solid #3a4555 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-bottom: 15px !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    overflow: hidden !important;
}
div.group.ml-0:hover {
    box-shadow: 0 0 12px rgba(0, 224, 255, 0.25) !important;
    transform: translateY(-2px) !important;
}
/* 评论项的伪元素装饰 */
div.group.ml-0::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 5px !important;
    height: 100% !important;
    background: linear-gradient(to bottom, #00e0ff, #00aaff) !important; /* 左侧渐变条 */
    border-radius: 8px 0 0 8px !important;
}

/* 用户头像 */
div.group img.rounded-full {
    border: 2px solid #00aaff !important; /* 蓝色边框 */
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.4) !important;
}

/* 用户名 */
div.text-sm.text-grey-600 span.font-bold {
    color: #e0e6f0 !important; /* 浅色文本 */
    font-size: 14px !important;
}

/* "（你）" 标签 */
span.text-\[10px\] {
    background: #00aaff !important; /* 辅助蓝背景 */
    color: #1a1e27 !important; /* 深色文本 */
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-size: 10px !important;
    margin-left: 5px !important;
    font-weight: bold !important;
}

/* 评论内容 */
div.break-all {
    color: #c0c8d0 !important; /* 略淡的浅色文本 */
    font-size: 14px !important;
    margin-top: 5px !important;
}

/* 时间戳 */
div.text-xs.text-grey-600 {
    color: #8899aa !important; /* 较淡的灰色 */
    font-size: 11px !important;
    margin-top: 8px !important;
}

/* 点赞按钮 */
button.text-gray-400 {
    color: #8899aa !important; /* 灰色 */
    transition: color 0.2s ease !important;
    font-size: 12px !important;
}
button.text-gray-400:hover {
    color: #00e0ff !important; /* 悬停高亮 */
}

/* 点赞按钮的图标 */
button.text-gray-400 svg {
    color: inherit !important;
}

/* 回复(是无边框的两个字,点击回复) */
span.cursor-pointer {
    color: #00aaff !important; /* 辅助蓝 */
    font-size: 12px !important;
    transition: color 0.2s ease !important;
}
span.cursor-pointer:hover {
    color: #00e0ff !important;
    text-decoration: underline !important;
}

/* 回复区域边框 */
div.ml-8.border-l {
    border-left: 2px solid #3a4555 !important; /* 边框色 */
    padding-left: 10px !important;
    margin-top: 10px !important;
}

/* --- 自定义状态栏容器 (<top-status>, <bottom-status>) --- */
ai top-status,
ai bottom-status {
    display: block !important; /* 确保它们作为块级元素显示 */
    background: linear-gradient(145deg, #2e3540, #1a1e27) !important; /* 统一的深色背景 */
    border: 1px solid #3a4555 !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    margin-bottom: 15px !important; /* 确保与相邻区块有间距 */
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.2) !important;
    color: #e0e6f0 !important; /* 默认文本颜色 */
}

ai top-status p,
ai bottom-status p {
    margin-bottom: 5px !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
    color: #c0c8d0 !important; /* 略浅的灰色用于一般信息 */
}

/* 突出显示top-status的首行和末行 */
ai top-status p:first-child,
ai top-status p:last-child {
    font-weight: bold !important;
    color: #00e0ff !important; /* 电光蓝突出 */
}

/* --- 故事正文区域 (<text>) --- */
ai text {
    display: block !important;
    margin-bottom: 15px !important;
    background: linear-gradient(145deg, #2e3540, #1a1e27) !important; /* 统一的深色背景 */
    border: 1px solid #3a4555 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.2) !important;
    color: #e0e6f0 !important; /* 默认文本颜色 */
    line-height: 1.6 !important;
    font-size: 14px !important;
}
ai text p {
    color: #e0e6f0 !important;
    margin-bottom: 1em !important; /* 段落间距 */
}

/* --- details / summary 样式 --- */
ai bottom-status details summary {
    color: #00e0ff !important; /* 电光蓝用于摘要文字 */
    font-weight: bold !important;
    cursor: pointer !important;
    padding: 5px 0 !important;
    transition: color 0.2s ease !important;
    list-style: none !important; /* 移除默认的标记 */
    position: relative !important;
}

/* 自定义 details 展开/折叠标记 */
ai bottom-status details summary::before {
    content: '▶' !important; /* 关闭状态的标记 */
    display: inline-block !important;
    margin-right: 8px !important;
    transform: rotate(0deg) !important;
    transition: transform 0.2s ease !important;
    color: #00aaff !important;
}

ai bottom-status details[open] summary::before {
    content: '▼' !important; /* 展开状态的标记 */
    transform: rotate(90deg) !important;
}

ai bottom-status details summary:hover {
    color: #00aaff !important; /* 悬停效果 */
}

/* details 内部内容样式 */
ai bottom-status details details { /* 嵌套的details */
    margin-top: 10px !important;
    padding-left: 15px !important;
    border-left: 1px solid #3a4555 !important; /* 视觉分隔线 */
}

ai bottom-status details p,
ai bottom-status details table {
    padding-left: 15px !important; /* 内容缩进 */
    margin-top: 5px !important;
    color: #c0c8d0 !important;
}

/* 表格样式 (如记忆区) */
ai bottom-status details table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 10px !important;
    font-size: 13px !important;
}

ai bottom-status details th,
ai bottom-status details td {
    border: 1px solid #3a4555 !important;
    padding: 8px !important;
    text-align: left !important;
    color: #c0c8d0 !important;
}

ai bottom-status details th {
    background-color: #222831 !important;
    color: #00e0ff !important;
    font-weight: bold !important;
}

/* 行动建议样式 */
.choice-item {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 8px !important;
    padding: 8px 10px !important;
    background: #2e3540 !important;
    border: 1px solid #3a4555 !important;
    border-radius: 5px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}
.choice-item:hover {
    background: #3a4555 !important;
    border-color: #00e0ff !important;
    box-shadow: 0 0 8px rgba(0, 224, 255, 0.3) !important;
}
.choice-letter {
    font-weight: bold !important;
    color: #00e0ff !important;
    margin-right: 10px !important;
    min-width: 20px !important; /* 确保字母对齐 */
    text-align: center !important;
}
.choice-text {
    color: #e0e6f0 !important;
    flex-grow: 1 !important;
}


/* --- 加载动画美化 --- */
/* 隐藏默认的加载元素 */
.style-module__AtdJSq__dot-flashing.style-module__AtdJSq__text {
    display: none !important;
}

/* 加载元素父级容器 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 30px !important; /* 适当放大，确保动画可见 */
    height: 30px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 加载动画 ::before (外层旋转方框) */
.flex.items-center.justify-center.w-6.h-5::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 24px !important;
    height: 24px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    /* SMIL SVG for outer rotating square */
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='2' y='2' width='20' height='20' rx='4' stroke='%2300e0ff' stroke-width='2' stroke-dasharray='8%2C8' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3C/rect%3E%3C/svg%3E") !important;
}

/* 加载动画 ::after (内层脉冲点) */
.flex.items-center.justify-center.w-6.h-5::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 12px !important;
    height: 12px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    /* SMIL SVG for inner pulsing dot */
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='6' cy='6' r='4' fill='%2300aaff'%3E%3Canimate attributeName='r' values='4%3B2%3B4' dur='1s' repeatCount='indefinite' begin='0s'/%3E%3Canimate attributeName='opacity' values='1%3B0.5%3B1' dur='1s' repeatCount='indefinite' begin='0s'/%3E%3C/circle%3E%3C/svg%3E") !important;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .sticky.w-full.top-0.flex.items-center {
        padding: 5px 10px !important;
    }
    #ai-model-selector .group.flex.items-center {
        padding: 3px 6px !important;
    }
    .bg-gray-100\/90.relative.inline-block {
        padding: 8px !important;
    }
    .markdown-body {
        font-size: 13px !important;
    }
    #ai-chat-bottom-input {
        padding: 8px 10px !important;
    }
    #ai-chat-input {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
    #ai-mod-button2 button.MuiButton-root {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
    .MuiPaginationItem-root {
        min-width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
    div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
        padding: 10px !important;
    }
    div.text-lg.font-bold {
        font-size: 16px !important;
    }
    div.group.ml-0 {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }
    ai top-status,
    ai bottom-status,
    ai text {
        padding: 10px !important;
        font-size: 13px !important;
    }
    ai bottom-status details p,
    ai bottom-status details table {
        padding-left: 10px !important;
    }
    ai bottom-status details th,
    ai bottom-status details td {
        padding: 6px !important;
    }
}

/* 低动效模式：降低动画频率和幅度 */
@media (prefers-reduced-motion: reduce) {
    .bg-gray-100\/90.relative.inline-block::before {
        animation: none !important; /* 禁用背景SVG的SMIL动画 */
        opacity: 0.1 !important; /* 降低透明度 */
    }
    .flex.items-center.justify-center.w-6.h-5::before {
        animation: none !important; /* 禁用外层旋转方框SMIL动画 */
    }
    .flex.items-center.justify-center.w-6.h-5::after {
        animation: none !important; /* 禁用内层脉冲点SMIL动画 */
        opacity: 0.7 !important; /* 保持可见 */
    }
    /* 移除一些非必要的 hover 动效或简化 */
    #ai-model-selector .group.flex.items-center:hover {
        box-shadow: none !important;
    }
    #header-setting-button:hover {
        box-shadow: none !important;
    }
    #ai-chat-input:focus {
        box-shadow: none !important;
    }
    #ai-mod-button2 button.MuiButton-root:hover {
        box-shadow: none !important;
        transform: none !important;
    }
    div.group.ml-0:hover {
        box-shadow: none !important;
        transform: none !important;
    }
    div.cursor-pointer.group.flex.items-center.justify-center:hover {
        box-shadow: none !important;
        transform: none !important;
    }
}