/* =========================================
   《魔法少女苍蓝星》主题：白昼光芒形态
   核心设计：高亮浅色底 + 极高对比度纯黑字体 + 苍蓝魔法点缀
   ========================================= */

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

/* ================= [ 聊天框主体美化 ] ================= */
/* 统一聊天框：明亮的苍蓝白光背景 */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(145deg, #FFFFFF 0%, #E0F7FA 100%) !important;
    border: 1px solid rgba(0, 188, 212, 0.4) !important;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.15) !important;
    border-radius: 14px !important;
    isolation: isolate !important;
}

/* 【强制】主文本极高对比度：纯黑无阴影，确保绝对清晰 */
.markdown-body {
    color: #000000 !important;
    font-weight: bold !important;
    text-shadow: none !important; /* 严禁阴影干扰阅读 */
    font-family: system-ui, -apple-system, sans-serif !important;
    background: transparent !important;
    z-index: 1 !important;
}

/* 底部附加元素（按钮、模型名称、Token消耗）：深灰色以适配浅色背景 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #333333 !important; 
    font-weight: bold !important;
}

/* 苍蓝星魔法阵加载动画 (颜色加深以适配浅色背景) */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}
.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="22" height="22"><circle cx="12" cy="12" r="8" fill="none" stroke="%2300838F" stroke-width="1.5" opacity="0.6"><animate attributeName="r" values="6;9;6" dur="2s" repeatCount="indefinite"/></circle><path d="M12 2L14.5 9.5L22 12L14.5 14.5L12 22L9.5 14.5L2 12L9.5 9.5Z" fill="%2300838F"><animateTransform attributeName="transform" type="rotate" from="0 12 12" to="360 12 12" dur="4s" repeatCount="indefinite"/></path></svg>') !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ================= [ 顶部栏与开场白美化 ] ================= */
/* 顶部栏主容器：明亮通透的毛玻璃 */
.sticky.w-full.top-0.flex.items-center {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(0, 188, 212, 0.3) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

/* 顶部栏文本与图标：深苍蓝色 */
#ai-model-selector .truncate.text-\[13px\],
#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: #00838F !important;
    fill: #00838F !important;
}

/* 开场白选择器 */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 188, 212, 0.4) !important;
    color: #000000 !important;
    transition: all 0.3s ease !important;
}
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
    box-shadow: 0 0 8px rgba(0, 188, 212, 0.3) !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: #00838F !important;
}

/* ================= [ 底部栏与输入框美化 ] ================= */
/* 底部渐变遮罩 (适配浅色) */
.bg-gradient-to-t {
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%) !important;
}

/* 输入框容器与主输入框 */
#ai-chat-bottom-input {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 188, 212, 0.5) !important;
    border-radius: 16px !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08) !important;
}
#ai-chat-input {
    color: #000000 !important;
    caret-color: #00838F !important;
    font-weight: bold !important;
}
#ai-chat-input::placeholder {
    color: #888888 !important;
}
#ai-chat-input::selection {
    background: rgba(0, 188, 212, 0.3) !important;
    color: #000000 !important;
}

/* 按钮栏 */
#ai-mod-button2 button.MuiButton-root {
    background: #E0F7FA !important;
    border: 1px solid rgba(0, 188, 212, 0.3) !important;
    color: #00838F !important;
    transition: all 0.3s ease !important;
}
#ai-mod-button2 button.MuiButton-root:hover {
    background: #B2EBF2 !important;
}
#ai-mod-button2 button.MuiButton-root svg {
    color: #00838F !important;
}

/* ================= [ 评论区与分页栏深度适配 ] ================= */
/* 评论区主背景 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background-color: #FAFAFA !important;
    border-top: 2px solid #00BCD4 !important;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05) !important;
}

/* 顶部标题与文字 */
div.text-lg.font-bold {
    color: #00838F !important;
}
p.MuiTypography-body1.text-grey-600,
div.text-xs.text-grey-600 {
    color: #555555 !important;
}

/* 评分星星 */
span.MuiRating-iconEmpty svg {
    color: rgba(0, 188, 212, 0.3) !important;
}
span.MuiRating-iconFilled svg {
    color: #00BCD4 !important;
}

/* 评论输入框 */
div.flex.flex-col.border-gray-200 {
    border-color: rgba(0, 188, 212, 0.4) !important;
}
textarea.rc-textarea {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-weight: bold !important;
}
div.bg-gray-100.text-gray-500 {
    background: #E0F7FA !important;
    color: #00838F !important;
}

/* 评论列表项 */
div.group.ml-0 {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 188, 212, 0.2) !important;
    border-radius: 8px !important;
    padding: 8px !important;
    margin-bottom: 8px !important;
}
div.text-sm.text-grey-600 span.font-bold {
    color: #00838F !important;
}
div.break-all {
    color: #000000 !important; /* 评论正文纯黑确保阅读 */
    font-weight: bold !important;
}
div.style_divider__mW0YX {
    border-color: rgba(0, 188, 212, 0.2) !important;
}

/* 排序按钮 */
button.MuiButton-containedPrimary {
    background: #00BCD4 !important;
    color: #FFFFFF !important;
    font-weight: bold !important;
}
button.MuiButton-outlinedPrimary {
    border-color: #00BCD4 !important;
    color: #00838F !important;
}

/* 分页栏视觉美化 */
.MuiPaginationItem-root {
    color: #00838F !important;
    border: 1px solid rgba(0, 188, 212, 0.3) !important;
}
.MuiPaginationItem-root.Mui-selected {
    background: rgba(0, 188, 212, 0.2) !important;
}
.MuiStack-root.css-1uwir8f .MuiBox-root {
    color: #333333 !important;
}
.MuiInputBase-input {
    color: #000000 !important;
}
/* 输入框充能特效 */
#ai-chat-input:focus {
    outline: none !important;
    animation: magicPulse 2s infinite alternate !important;
}
@keyframes magicPulse {
    0% { text-shadow: 0 0 2px rgba(0, 229, 255, 0.2); }
    100% { text-shadow: 0 0 8px rgba(0, 229, 255, 0.8); }
}