/* ========================================= */
/* 主题：醇香拿铁·咖啡馆 (Coffee & Latte)    */
/* 特点：深棕色强调，奶油色背景，温和圆润    */
/* ========================================= */

/* ====== 1. 顶部栏相关 ====== */
/* 顶部主容器背景：深咖啡色，沉稳质感 */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(135deg, #4e3629 0%, #3e2723 100%) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25) !important;
    border-bottom: 2px solid #8b4513 !important;
}

/* 模型名称文字：奶油白 */
#ai-model-selector .truncate.text-\[13px\] {
    color: #fdfbf7 !important;
    font-weight: bold !important;
    font-family: system-ui, -apple-system, sans-serif !important;
}

/* 顶部各类图标：浅卡其色 */
#ai-model-selector .shrink-0.flex.items-center svg,
.sticky.w-full.top-0 svg.lucide-clock-8,
.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2,
.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]),
#header-setting-button svg {
    color: #e6dace !important;
    transition: transform 0.3s ease, color 0.3s ease !important;
}

/* 图标悬浮效果：变焦糖色并微微放大 */
.sticky.w-full.top-0 svg.lucide-clock-8:hover,
#header-setting-button svg:hover,
.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2:hover {
    color: #d2b48c !important;
    transform: scale(1.1) !important;
}

/* 历史记录未读角标：红褐色点缀 */
.sticky.w-full.top-0 span.MuiBadge-dot.md\:hidden {
    background-color: #a0522d !important;
}


/* ====== 2. 开场白选择器相关 ====== */
/* 开场白主容器：拿铁色背景，深棕边框 */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"],
div.h-9.rounded-md.cursor-pointer.group:has(svg[data-icon="SlidersH"]) {
    background: #f4ece6 !important;
    border: 1px solid #a0522d !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 5px rgba(139, 69, 19, 0.1) !important;
}

div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
    background: #e6dace !important;
    border-color: #8b4513 !important;
}

/* 滑块和箭头图标颜色 */
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="SlidersH"],
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="ChevronDown"] {
    color: #5c4033 !important;
}


/* ====== 3. 按钮栏相关 ====== */
/* 按钮基础样式：浅咖啡色背景，深咖文字 */
#ai-mod-button2 button.MuiButton-root {
    background: #e6dace !important;
    color: #4e3629 !important;
    border: 1px solid #c19a6b !important;
    border-radius: 20px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
    background: #8b4513 !important;
    color: #fdfbf7 !important;
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3) !important;
}

#ai-mod-button2 button.MuiButton-root svg {
    color: inherit !important;
}


/* ====== 4. 底部栏相关 ====== */
/* 底部输入框容器 */
#ai-chat-bottom-input {
    background: #fdfbf7 !important;
    border-radius: 12px !important;
    border: 1px solid #d7ccc8 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02), 0 2px 10px rgba(92, 64, 51, 0.1) !important;
}

/* 主输入框字体与颜色 */
#ai-chat-input {
    color: #3e2723 !important;
    font-family: system-ui, -apple-system, sans-serif !important;
}

/* 占位符颜色 */
#ai-chat-input::placeholder {
    color: #8d6e63 !important;
    font-style: italic !important;
}

/* 文字选中效果 */
#ai-chat-input::selection {
    background: #c19a6b !important;
    color: #fff !important;
}


/* ====== 5. 分页栏相关 (仅修饰视觉) ====== */
/* 分页按钮：拿铁色 */
.MuiPaginationItem-root {
    color: #5c4033 !important;
    border-color: #d7ccc8 !important;
    background: transparent !important;
}

/* 选中的分页：深咖底白字 */
.MuiPaginationItem-root.Mui-selected {
    background-color: #5c4033 !important;
    color: #fdfbf7 !important;
    border-color: #3e2723 !important;
}

.MuiPaginationItem-root:hover {
    background-color: #e6dace !important;
}

/* 翻页箭头 */
.MuiPaginationItem-icon {
    color: inherit !important;
}

/* 跳转输入区文字 */
.MuiStack-root.css-1uwir8f .MuiBox-root {
    color: #5c4033 !important;
    font-weight: bold !important;
}

.MuiInputBase-input {
    color: #3e2723 !important;
    border-bottom: 2px solid #8b4513 !important;
}


/* ====== 6. 评论区相关 ====== */
/* 评论区大背景：奶油卡其色 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background: #fdfbf7 !important;
    border-top: 3px solid #8b4513 !important;
}

/* 顶部标题与通用文字：深褐色确保极佳阅读性 */
div.text-lg.font-bold,
p.MuiTypography-body1.text-grey-600,
div.text-sm.text-grey-600 span.font-bold,
div.break-all {
    color: #3e2723 !important;
    font-family: system-ui, -apple-system, sans-serif !important;
}

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

/* 未选中的星星：浅卡其色；选中的星星：拿铁棕 */
span.MuiRating-iconEmpty svg {
    color: #d7ccc8 !important;
}
span.MuiRating-iconFilled svg {
    color: #c19a6b !important;
}

/* 评论输入框容器与边框 */
div.flex.flex-col.border-gray-200 {
    border-color: #c19a6b !important;
    background: #f4ece6 !important;
    border-radius: 8px !important;
}

/* 输入框字体 */
textarea.rc-textarea {
    color: #3e2723 !important;
}

/* 字数统计 */
div.bg-gray-100.text-gray-500 {
    background: #e6dace !important;
    color: #5c4033 !important;
}

/* 发送评论按钮及图标：深咖啡 */
div.cursor-pointer.group.flex.items-center.justify-center {
    background: #4e3629 !important;
    border-radius: 6px !important;
    transition: background 0.3s ease !important;
}
div.cursor-pointer.group.flex.items-center.justify-center:hover {
    background: #8b4513 !important;
}
div[data-state="closed"] svg[data-icon="Send03"] {
    color: #fdfbf7 !important;
}

/* 分割线：柔和的浅棕色 */
div.style_divider__mW0YX {
    border-color: #d7ccc8 !important;
}

/* 排序按钮(通用修饰) */
button.MuiButton-containedPrimary, 
button.MuiButton-outlinedPrimary {
    border-radius: 20px !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
}

/* 已选中的排序按钮：咖啡色实心 */
button.MuiButton-containedPrimary {
    background-color: #5c4033 !important;
    color: #fdfbf7 !important;
    border: 1px solid #3e2723 !important;
}

/* 未选中的排序按钮：透明底拿铁字 */
button.MuiButton-outlinedPrimary {
    background-color: transparent !important;
    color: #8b4513 !important;
    border: 1px solid #c19a6b !important;
}

button.MuiButton-outlinedPrimary:hover {
    background-color: #f4ece6 !important;
    border-color: #8b4513 !important;
}

/* 评论项头像：圆润且加上咖啡色边框 */
div.group img.rounded-full {
    border: 2px solid #c19a6b !important;
}

/* "（你）" 标签 */
span.text-\[10px\] {
    background: #8b4513 !important;
    color: #fff !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
}

/* 时间戳与点赞等小功能区：中等灰棕色 */
div.text-xs.text-grey-600,
button.text-gray-400,
button.text-gray-400 svg {
    color: #8d6e63 !important;
    transition: color 0.3s ease !important;
}

button.text-gray-400:hover,
button.text-gray-400:hover svg {
    color: #d84315 !important; /* hover时稍微偏红/焦糖 */
}

/* 回复文字与回复区域边框 */
span.cursor-pointer {
    color: #5c4033 !important;
    font-weight: bold !important;
}
span.cursor-pointer:hover {
    text-decoration: underline !important;
}

div.ml-8.border-l {
    border-color: #c19a6b !important;
}

/* 增加整体的咖啡色柔和滚动条（部分浏览器支持） */
::-webkit-scrollbar {
    width: 6px !important;
}
::-webkit-scrollbar-track {
    background: #fdfbf7 !important; 
}
::-webkit-scrollbar-thumb {
    background: #c19a6b !important; 
    border-radius: 10px !important;
}
::-webkit-scrollbar-thumb:hover {
    background: #8b4513 !important; 
}

/* 隐藏顶部默认颜色装饰条 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 统一聊天框基础样式：深焙咖啡质感与微光晕 */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(145deg, #3E2723, #2D1B15) !important;
    border: 1px solid #5D4037 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(45, 27, 21, 0.6), inset 0 2px 5px rgba(141, 110, 99, 0.15) !important;
    padding: 20px 24px !important;
    position: relative !important;
    isolation: isolate !important;
    transition: all 0.3s ease !important;
}

/* 模拟咖啡热气/香气的背景微动效 */
.bg-gray-100\/90.relative.inline-block::before {
    content: "" !important;
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit !important;
    background: radial-gradient(circle at top right, rgba(141, 110, 99, 0.15), transparent 60%) !important;
    z-index: 0 !important;
    pointer-events: none !important;
    animation: coffeeAroma 6s ease-in-out infinite alternate !important;
}

@keyframes coffeeAroma {
    0% { opacity: 0.3; transform: translateY(0px); }
    100% { opacity: 0.8; transform: translateY(-6px); }
}

/* 聊天框内的主要文本内容：【强制高对比度】奶油拉花色，确保在深咖色背景上绝对可读 */
.markdown-body {
    color: #F8F1ED !important; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: bold !important;
    line-height: 1.75 !important;
    z-index: 1 !important;
    background: transparent !important;
    text-shadow: none !important; /* 严禁文字阴影以保可读性 */
}

/* 底部附加元素：操作按钮、模型名称、Token消耗，调整为浅咖色以适配深色背景 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #D7CCC8 !important; 
    font-weight: bold !important;
    transition: color 0.2s ease, background-color 0.2s ease !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #FFFFFF !important;
    background-color: rgba(215, 204, 200, 0.15) !important;
    border-radius: 8px !important;
}

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

/* 自定义SVG加载动效：模拟咖啡杯上腾起的蒸汽 (SMIL动画) */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
}

.flex.items-center.justify-center.w-6.h-5::before {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><circle cx="7" cy="16" r="2" fill="%23D7CCC8"><animate attributeName="cy" values="16;8;16" dur="2s" repeatCount="indefinite" /><animate attributeName="opacity" values="0.2;1;0.2" dur="2s" repeatCount="indefinite" /></circle><circle cx="12" cy="16" r="2.5" fill="%23F8F1ED"><animate attributeName="cy" values="16;6;16" dur="2.2s" repeatCount="indefinite" begin="0.3s" /><animate attributeName="opacity" values="0.2;1;0.2" dur="2.2s" repeatCount="indefinite" begin="0.3s" /></circle><circle cx="17" cy="16" r="2" fill="%23D7CCC8"><animate attributeName="cy" values="16;8;16" dur="2s" repeatCount="indefinite" begin="0.6s" /><animate attributeName="opacity" values="0.2;1;0.2" dur="2s" repeatCount="indefinite" begin="0.6s" /></circle></svg>') !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* 移动端与低动效适配 */
@media(max-width:480px) {
    .bg-gray-100\/90.relative.inline-block {
        padding: 16px !important;
        border-radius: 16px !important;
    }
}

@media(prefers-reduced-motion:reduce) {
    .bg-gray-100\/90.relative.inline-block::before {
        animation-duration: 20s !important;
        transform: none !important;
    }
}