/* 聊天气泡容器 - 适配当前页面无固定类，改用group模糊匹配消息 */
.group [class*="bg-gray-100"],
.group [class*="bg-gray-100/90"],
div[class*="group-[.is-user]"],
div[class*="group-[.is-assistant]"] {
    background: #140c0c !important; /* 暗黑暗红底色 */
    border: 1px solid #8b2222 !important; /* 暗红鎏金滚边 */
    border-radius: 16px 16px 16px 4px !important; /* 洛可可不对称圆角 */
    box-shadow: 0 4px 15px rgba(120, 30, 30, 0.22) !important; /*暗红朦胧软阴影 */
    color: #e2c8c8 !important; /* 浅红褐文本 */
    padding: 14px 20px !important;
    font-family: 'Georgia', 'Times New Roman', 'Noto Serif SC', serif !important;
    line-height: 1.85 !important;
}

/* 通用功能按钮 统一合并选择器，取消严格直接子元素 > 限制 */
div[class*="items-center"][class*="gap-2"] button,
.flex.items-center button[class*="button"],
.flex.items-center.gap-2.pb-2 button {
    background: #1a1010 !important;
    color: #d4af37 !important; /* 哑光鎏金 */
    border: 1px solid #702828 !important; /*暗红镶边 */
    border-radius: 20px !important; /* 圆润贝壳线脚 */
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.15) !important;
    font-weight: 600 !important;
    text-transform: none !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    padding: 6px 18px !important;
    font-family: 'Georgia', 'Times New Roman', 'Noto Serif SC', serif !important;
}

/* 按钮悬停效果 */
div[class*="items-center"][class*="gap-2"] button:hover,
.flex.items-center button[class*="button"]:hover,
.flex.items-center.gap-2.pb-2 button:hover {
    background: #2c1818 !important;
    color: #ffd470 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
}

/* 聊天输入框 去重合并｜暴力压白色背景 */
#ai-chat-input,
textarea[placeholder*="输入"],
textarea[class*="chat-input"],
div[role="textbox"],
.MuiInputBase-input {
    background-color: #110b0b !important;
    border: 1px solid #8b2222 !important; /*纤细暗红镀金边框 */
    border-radius: 20px !important;
    color: #e2c8c8 !important;
    box-shadow: inset 0 2px 5px rgba(120, 30, 30, 0.18) !important;
    padding: 10px 18px !important;
    font-family: 'Georgia', 'Times New Roman', 'Noto Serif SC', serif !important;
}

/* 修复浏览器自动填充白底色 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #110b0b inset !important;
    -webkit-text-fill-color: #e2c8c8 !important;
}

/* 输入区域底部容器透明化 */
#ai-chat-bottom-input,
[class*="chat-bottom-container"] { 
    background: transparent !important; 
    backdrop-filter: none !important; 
}

/* 聊天滚动背景 全局会话区域底色 */
div[class*="flex-1"][class*="overflow-y-auto"] {
    background-color: #070404 !important;
    background-image: radial-gradient(circle at center, #120808 0%, #020202 100%) !important;
}

/* 头像样式 匹配整体主题 */
.group img,
div[class*="avatar"] img {
    border-radius: 50% !important;
    border:1px solid #8b2222 !important;
    box-shadow:0 0 8px rgba(139,34,34,0.4) !important;
    transition:all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}
.group img:hover,
div[class*="avatar"] img:hover {
    border-color:#d4af37 !important;
    box-shadow:0 0 12px rgba(212,175,55,0.5) !important;
    transform: scale(1.05) !important;
}

/* 引用、代码块样式 适配洛可可字体+暗黑红金 */
.group blockquote,
.prose blockquote {
    border-left:4px solid #8b2222 !important;
    background-color:rgba(45,22,22,0.65) !important;
    color:#d8b8b8 !important;
    padding:0.75rem 1.25rem !important;
    border-radius:0 10px 10px 0 !important;
}
.group pre,
.prose pre {
    background-color:#0b0707 !important;
    border:1px solid #582020 !important;
    border-radius:10px !important;
}
.group code,
.prose code {
    color:#ff9494 !important;
    background-color:#241212 !important;
}

/* 隐藏多余元素（需要就取消注释） */
.MuiButtonBase-root.MuiButton-root.MuiButton-default.css-w13mdt,
.absolute.z-40 .px-4.py-2.hover\:bg-indigo-100:nth-child(5),
.css-nkqe49 {
    /* display: none !important; */
}