/* ========== 修仙·灵界·玄幻聊天界面美化 ==========
 * 作者：道友（AI）
 * 风格：深玄夜色 · 青冥灵光 · 太极流转
 * 适用：通用 Web 聊天界面（如 Qwen、ChatGPT 等）
 * 使用方式：注入 <style> 或用户样式插件
 */
/* —————— 1. 隐藏原生顶部装饰条 —————— */
[class*="bg-[#F1CBCB]"],
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}
/* —————— 2. 聊天消息容器基础样式 —————— */
.bg-gray-100\/90.relative.inline-block {
    background-color: rgba(18, 22, 28, 0.95) !important;
    background-image: linear-gradient(135deg, rgba(30, 60, 114, 0.1) 0%, rgba(42, 82, 152, 0.1) 100%) !important;
    border: 1px solid rgba(0, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        inset 0 0 15px rgba(0, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    margin: 8px 0 !important;
    padding: 12px !important;
    isolation: isolate !important;
    position: relative !important;
    overflow: hidden !important;
}
/* —————— 3. 用户输入框（左侧青光标识） —————— */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
    border-left: 4px solid #00d2ff !important;
    background: rgba(25, 30, 40, 0.98) !important;
}
/* —————— 4. AI 回复框（右侧紫光标识，可选） —————— */
/* 若需区分 AI 回复，取消注释以下代码 */
/*
.chat-answer-container .bg-gray-100\/90.relative.inline-block {
    border-right: 4px solid #b36aff !important;
    background: rgba(30, 25, 45, 0.97) !important;
}
*/
/* —————— 5. 文本内容样式（天书体） —————— */
.markdown-body,
.markdown-body p,
.markdown-body li,
.markdown-body pre,
.markdown-body code {
    color: #e0e0e0 !important;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif !important;
    line-height: 1.7 !important;
    font-size: 15.5px !important;
    z-index: 1 !important;
    background: transparent !important;
    word-break: break-word !important;
}
/* 强调文字：灵力金 */
.markdown-body strong,
.markdown-body b {
    color: #ffcc00 !important;
    font-weight: bold !important;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.3) !important;
}
/* 代码块：玄铁黑底 + 青荧光 */
.markdown-body pre,
.markdown-body code:not(:has(*)) {
    background: rgba(10, 15, 25, 0.8) !important;
    border: 1px solid rgba(0, 200, 255, 0.3) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    color: #4dffea !important;
    font-family: "JetBrains Mono", "Consolas", monospace !important;
}
.markdown-body pre code {
    background: transparent !important;
    padding: 0 !important;
}
/* —————— 6. 按钮与辅助文字 —————— */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #00d2ff !important;
    opacity: 0.8 !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    opacity: 1 !important;
    background: rgba(0, 210, 255, 0.1) !important;
}
/* 底部时间/状态文字 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500,
.text-gray-500 {
    color: #8899aa !important;
    font-size: 0.75rem !important;
    font-family: "Courier New", monospace !important;
    opacity: 0.7 !important;
}
/* —————— 7. 动态灵力边框（呼吸流动） —————— */
.bg-gray-100\/90.relative.inline-block::after {
    content: "" !important;
    position: absolute !important;
    top: -1px; left: -1px; right: -1px; bottom: -1px !important;
    border-radius: 12px !important;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5, #00d2ff) !important;
    background-size: 200% auto !important;
    z-index: -1 !important;
    opacity: 0.3 !important;
    animation: spiritFlow 4s linear infinite !important;
    pointer-events: none !important;
}
@keyframes spiritFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}
/* —————— 8. 加载动画：太极旋涡 —————— */
/* 替换原加载图标为动态太极 */
.flex.items-center.justify-center.w-6.h-5,
.w-6.h-5.flex.items-center.justify-center {
    position: relative !important;
    min-width: 30px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
/* 隐藏原始加载点 */
.flex.items-center.justify-center.w-6.h-5 > div,
.w-6.h-5.flex.items-center.justify-center > div {
    display: none !important;
}
/* 插入太极 SVG */
.flex.items-center.justify-center.w-6.h-5::before,
.w-6.h-5.flex.items-center.justify-center::before {
    content: "" !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%2300d2ff' d='M50 15A35 35 0 0 0 50 85A17.5 17.5 0 0 1 50 50A17.5 17.5 0 0 0 50 15' opacity='.8'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 50 50' to='360 50 50' dur='1.5s' repeatCount='indefinite'/%3E%3C/path%3E%3Cpath fill='%233a7bd5' d='M50 85A35 35 0 0 0 50 15A17.5 17.5 0 0 1 50 50A17.5 17.5 0 0 0 50 85' opacity='.5'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 50 50' to='-360 50 50' dur='1.5s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}
/* —————— 9. 全局背景（可选：添加星空/云雾背景） —————— */
/* 取消注释以启用深空背景 */
/*
body, #root, .app-container {
    background: #0a0e17 url("https://cdn.jsdelivr.net/gh/akilar-candy/akilar-candy.github.io@main/images/background/starry-sky-blur.jpg") !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    color: #e0e0e0 !important;
}
*/