/* 通用字体设置，确保可读性 */
* {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

/* 顶部栏相关 */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(to right, #1a202c, #2d3748) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    color: #e0e0e0 !important;
    border-bottom: 1px solid rgba(0, 206, 209, 0.2) !important;
}

#ai-model-selector .group.flex.items-center {
    background-color: rgba(74, 85, 104, 0.3) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(0, 206, 209, 0.3) !important;
    padding: 4px 8px !important;
    transition: all 0.3s ease !important;
}

#ai-model-selector .group.flex.items-center:hover {
    background-color: rgba(0, 206, 209, 0.1) !important;
    box-shadow: 0 0 10px rgba(0, 206, 209, 0.5) !important;
}

#ai-model-selector .truncate.text-\[13px\] {
    color: #f8f8f8 !important;
    font-weight: bold !important;
}

#ai-model-selector .shrink-0.flex.items-center svg {
    color: #00CED1 !important;
}

.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: #a0aec0 !important;
    transition: color 0.3s ease !important;
}

.sticky.w-full.top-0 svg.lucide-clock-8:hover,
.sticky.w-full.top-0 button.MuiIconButton-root:hover svg.lucide-music-2,
.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]):hover,
#header-setting-button:hover svg {
    color: #00CED1 !important;
}

.sticky.w-full.top-0 span.MuiBadge-dot.md\:hidden {
    background-color: #DAA520 !important;
    box-shadow: 0 0 8px #DAA520 !important;
}

/* 开场白选择器相关 */
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: linear-gradient(to right, #2d3748, #4a5568) !important;
    border: 1px solid rgba(0, 206, 209, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s ease !important;
}

div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover,
div.h-9.rounded-md.cursor-pointer.group:has(svg[data-icon="SlidersH"]):hover {
    background: linear-gradient(to right, #4a5568, #2d3748) !important;
    box-shadow: 0 0 15px rgba(0, 206, 209, 0.5) !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: #00CED1 !important;
}

/* 按钮栏相关 */
#ai-mod-button2 button.MuiButton-root {
    background: linear-gradient(to right, #4B0082, #8A2BE2) !important;
    color: #f8f8f8 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
    background: linear-gradient(to right, #8A2BE2, #4B0082) !important;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6) !important;
    transform: translateY(-2px) !important;
}

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

/* 底部栏相关 */
#ai-chat-bottom-input {
    background: linear-gradient(to top, #1a202c, #2d3748) !important;
    border-top: 1px solid rgba(0, 206, 209, 0.2) !important;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4) !important;
}

#ai-chat-input {
    background-color: rgba(74, 85, 104, 0.3) !important;
    color: #f8f8f8 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 206, 209, 0.3) !important;
    caret-color: #00CED1 !important;
}

#ai-chat-input::placeholder {
    color: #a0aec0 !important;
    opacity: 0.7 !important;
}

#ai-chat-input::selection {
    background-color: rgba(0, 206, 209, 0.5) !important;
    color: #f8f8f8 !important;
}

/* 分页栏相关 */
.MuiPaginationItem-root {
    color: #a0aec0 !important;
    background-color: transparent !important;
    border: 1px solid rgba(74, 85, 104, 0.5) !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.MuiPaginationItem-root:hover {
    background-color: rgba(0, 206, 209, 0.1) !important;
    color: #00CED1 !important;
    box-shadow: 0 0 10px rgba(0, 206, 209, 0.3) !important;
}

.MuiPaginationItem-root.Mui-selected {
    background: linear-gradient(to right, #4B0082, #8A2BE2) !important;
    color: #f8f8f8 !important;
    border-color: #8A2BE2 !important;
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.6) !important;
}

.MuiPaginationItem-root.Mui-disabled {
    color: rgba(160, 174, 192, 0.5) !important;
    border-color: rgba(74, 85, 104, 0.3) !important;
    opacity: 0.6 !important;
}

.MuiPaginationItem-icon {
    color: #00CED1 !important;
}

.MuiStack-root.css-1uwir8f .MuiBox-root {
    color: #e0e0e0 !important;
}

.MuiStack-root.css-1uwir8f .MuiInputBase-input {
    background-color: rgba(74, 85, 104, 0.3) !important;
    color: #f8f8f8 !important;
    border: 1px solid rgba(0, 206, 209, 0.3) !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
}

/* 评论区相关 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background: linear-gradient(to bottom, #1a202c, #2d3748) !important;
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.6) !important;
    color: #e0e0e0 !important;
}

div.text-lg.font-bold {
    color: #f8f8f8 !important;
    text-shadow: 0 0 5px rgba(0, 206, 209, 0.3) !important;
}

p.MuiTypography-body1.text-grey-600 {
    color: #a0aec0 !important;
}

span.MuiRating-iconEmpty svg {
    color: #a0aec0 !important;
    opacity: 0.6 !important;
}

span.MuiRating-iconFilled svg {
    color: #DAA520 !important;
    filter: drop-shadow(0 0 5px rgba(218, 165, 32, 0.8)) !important;
}

span.text-orange-500 {
    color: #DAA520 !important;
    font-weight: bold !important;
}

div.flex.flex-col.border-gray-200 {
    background-color: rgba(74, 85, 104, 0.3) !important;
    border: 1px solid rgba(0, 206, 209, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5) !important;
    padding: 10px !important;
}

textarea.rc-textarea {
    background-color: transparent !important;
    color: #f8f8f8 !important;
    border: none !important;
    resize: vertical !important;
}

textarea.rc-textarea::placeholder {
    color: #a0aec0 !important;
    opacity: 0.7 !important;
}

div.bg-gray-100.text-gray-500 {
    background-color: rgba(74, 85, 104, 0.5) !important;
    color: #a0aec0 !important;
    border-radius: 0 0 10px 10px !important;
    padding: 5px 10px !important;
}

div.cursor-pointer.group.flex.items-center.justify-center {
    background: linear-gradient(to right, #00CED1, #4B0082) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.3s ease !important;
}

div.cursor-pointer.group.flex.items-center.justify-center:hover {
    background: linear-gradient(to right, #4B0082, #00CED1) !important;
    box-shadow: 0 0 20px rgba(0, 206, 209, 0.6) !important;
    transform: translateY(-2px) !important;
}

div[data-state="closed"] svg[data-icon="Send03"] {
    color: #f8f8f8 !important;
}

div.style_divider__mW0YX {
    background-color: rgba(0, 206, 209, 0.3) !important;
    height: 1px !important;
    margin: 15px 0 !important;
}

button.MuiButton-containedPrimary {
    background: linear-gradient(to right, #4B0082, #8A2BE2) !important;
    color: #f8f8f8 !important;
    border: none !important;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5) !important;
    border-radius: 8px !important;
}

button.MuiButton-outlinedPrimary {
    background-color: transparent !important;
    color: #00CED1 !important;
    border: 1px solid #00CED1 !important;
    border-radius: 8px !important;
}

div.group.ml-0 {
    background-color: rgba(74, 85, 104, 0.2) !important;
    border-radius: 12px !important;
    padding: 15px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(74, 85, 104, 0.5) !important;
}

div.group img.rounded-full {
    border: 2px solid #00CED1 !important;
    box-shadow: 0 0 8px rgba(0, 206, 209, 0.5) !important;
}

div.text-sm.text-grey-600 span.font-bold {
    color: #DAA520 !important;
}

span.text-\[10px\] {
    background-color: rgba(0, 206, 209, 0.2) !important;
    color: #00CED1 !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    margin-left: 5px !important;
}

div.break-all {
    color: #f8f8f8 !important;
}

div.text-xs.text-grey-600 {
    color: #a0aec0 !important;
}

button.text-gray-400 {
    color: #a0aec0 !important;
    transition: color 0.3s ease !important;
}

button.text-gray-400:hover {
    color: #00CED1 !important;
}

button.text-gray-400 svg {
    color: #a0aec0 !important;
    transition: color 0.3s ease !important;
}

button.text-gray-400:hover svg {
    color: #00CED1 !important;
}

span.cursor-pointer {
    color: #8A2BE2 !important;
    transition: color 0.3s ease !important;
}

span.cursor-pointer:hover {
    color: #00CED1 !important;
}

div.ml-8.border-l {
    border-left: 1px solid rgba(0, 206, 209, 0.3) !important;
}
/* 美化滚动条 (适用于Webkit内核浏览器) */
::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}
::-webkit-scrollbar-track {
    background: #2d3748 !important;
    border-radius: 10px !important;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #00CED1, #4B0082) !important;
    border-radius: 10px !important;
    border: 2px solid #2d3748 !important;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #4B0082, #00CED1) !important;
}

/* 隐藏顶部的颜色装饰条，以确保整体美观 */
[class*="bg-[#F1CBCB]"],
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 统一聊天框（输入与输出）的修仙风格美化 */
.bg-gray-100\/90.relative.inline-block {
    /* 深邃的渐变紫色背景，营造神秘的修仙氛围 */
    background: linear-gradient(145deg, #2c0b46 0%, #5a189a 100%) !important;
    /* 柔和的边框，带有微光 */
    border: 1px solid rgba(180, 140, 255, 0.5) !important;
    /* 强烈的紫色辉光，增强仙侠感 */
    box-shadow: 0 0 25px rgba(180, 140, 255, 0.9), inset 0 0 10px rgba(180, 140, 255, 0.3) !important;
    /* 圆润的边角，增添古朴与柔和 */
    border-radius: 18px !important;
    /* 增加内边距，使内容更舒适 */
    padding: 18px !important;
    /* 建立新的层叠上下文，确保内部元素渲染顺序 */
    isolation: isolate !important;
    position: relative !important;
    z-index: 1 !important;
    overflow: hidden !important; /* 防止内容溢出圆角 */
}

/* 聊天框内的主要文本内容美化 */
.markdown-body {
    /* 浅色文本，确保在深色背景下清晰可读，营造仙气飘渺感 */
    color: #E0E0E0 !important;
    /* 选用系统默认的无衬线字体，保持现代感与可读性 */
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif !important;
    /* 增加行高，提升阅读舒适度 */
    line-height: 1.6 !important;
    /* 确保文本内容在聊天框的Z轴上，并移除默认背景 */
    position: relative !important;
    z-index: 2 !important;
    background: transparent !important;
}

/* 底部操作按钮（复制、编辑、删除等）美化 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    /* 按钮文本颜色与整体风格协调 */
    color: #C0C0C0 !important;
    /* 鼠标悬停时的微光效果过渡 */
    transition: background-color 0.3s ease !important;
}

/* 底部操作按钮悬停效果 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    background-color: rgba(180, 140, 255, 0.2) !important; /* 悬停时背景微亮 */
}

/* 模型名称文本（例如 gemini2.5pro）美化 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    /* 模型名称颜色与底部按钮保持一致 */
    color: #C0C0C0 !important;
    /* 字体大小可以略微调整，保持信息层级 */
    font-size: 0.85rem !important;
}

/* Token消耗文本美化 */
.text-orange-500 {
    /* 将橙色改为金色，更符合仙侠的“珍贵”和“灵力”感 */
    color: #FFC107 !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;
    width: auto !important; /* 允许内容决定宽度 */
    height: auto !important; /* 允许内容决定高度 */
    display: flex !important; /* 保持flex布局 */
    align-items: center !important;
    justify-content: center !important;
    min-height: 20px !important; /* 确保有足够空间显示动画 */
}

/* 自定义加载动画：使用SVG实现仙气飘渺的光点或符文效果 */
.flex.items-center.justify-center.w-6.h-5::before,
.flex.items-center.justify-center.w-6.h-5::after {
    content: '';
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    opacity: 0 !important;
    animation: none !important; /* 优先SMIL动画，禁用CSS动画 */
}

/* 第一个光点动画 (SMIL SVG) */
.flex.items-center.justify-center.w-6.h-5::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='0' fill='%23B082FF'%3E%3Canimate attributeName='r' from='0' to='10' dur='2s' repeatCount='indefinite' begin='0s' fill='freeze'/%3E%3Canimate attributeName='opacity' from='1' to='0' dur='2s' repeatCount='indefinite' begin='0s' fill='freeze'/%3E%3C/circle%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    animation: xianxia-pulse 2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) !important; /* CSS动画作为增强/备用 */
}

/* 第二个光点动画 (SMIL SVG) */
.flex.items-center.justify-center.w-6.h-5::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='0' fill='%238A2BE2'%3E%3Canimate attributeName='r' from='0' to='10' dur='2s' repeatCount='indefinite' begin='1s' fill='freeze'/%3E%3Canimate attributeName='opacity' from='1' to='0' dur='2s' repeatCount='indefinite' begin='1s' fill='freeze'/%3E%3C/circle%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    animation: xianxia-pulse 2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s !important; /* CSS动画作为增强/备用，并延迟启动 */
}

/* CSS @keyframes 定义 (作为SMIL的增强或无法加载时的备用方案) */
@keyframes xianxia-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

/* 移动端适配：调整尺寸和阴影，确保在小屏幕上良好显示 */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block {
        border-radius: 12px !important;
        padding: 12px !important;
        box-shadow: 0 0 15px rgba(180, 140, 255, 0.8), inset 0 0 5px rgba(180, 140, 255, 0.2) !important;
    }
    .markdown-body {
        font-size: 0.95rem !important; /* 移动端字体略小 */
    }
    .flex.items-center.justify-center.w-6.h-5::before,
    .flex.items-center.justify-center.w-6.h-5::after {
        width: 15px !important;
        height: 15px !important; /* 移动端加载动画尺寸略小 */
    }
}

/* 低动效模式适配：降低动画的频率和幅度，但仍保留部分视觉反馈 */
@media (prefers-reduced-motion: reduce) {
    .flex.items-center.justify-center.w-6.h-5::before,
    .flex.items.center.justify-center.w-6.h-5::after {
        animation-duration: 4s !important; /* 减慢动画速度 */
        transform: translate(-50%, -50%) scale(0.5) !important; /* 减小扩散幅度 */
    }
    .bg-gray-100\/90.relative.inline-block {
        transition: none !important; /* 禁用背景和阴影的平滑过渡 */
    }
}

