/* =============================================
   雪宣 · 清韵修仙 (极白浅色主题)
   主色：雪白、纸白、淡青、茶染
   适配：主角信息/NPC信息/修仙日志/记忆区/行动推荐 面板
   ============================================= */

/* ===== 危险区域优先 ===== */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"] { display: none !important; }

/* ===== 全局背景 & 文字 ===== */
body, #root, .h-screen, .markdown-body {
    background: #ffffff !important;      /* 纯白基底 */
    color: #2c2b28 !important;
}
.markdown-body p, .markdown-body li, .markdown-body div {
    color: #3e3a35 !important;
}

/* 可选：增加极淡米白底色，避免刺眼（仍属于白色系） */
.markdown-body {
    background: #fefefe !important;
}

/* ===== 代码块 ===== */
.markdown-body pre {
    background: #f8f8f8 !important;
    border: 1px solid #ececec !important;
    border-left: 3px solid #b3d4d0 !important;
    border-radius: 12px;
    padding: 1em 1.2em;
}
.markdown-body pre code {
    background: transparent !important;
    color: #5a564c !important;
}
.markdown-body :not(pre)>code {
    background: #f0f0f0 !important;
    color: #8f8b80 !important;
    padding: 0.15em 0.45em;
    border-radius: 6px;
}

/* ===== details 折叠面板（纯白卡片）===== */
details {
    background: #ffffff !important;
    border: 1px solid #eaeaea !important;
    border-radius: 16px;
    margin: 14px 0;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
details[open] {
    border-color: #cce3e0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
details summary {
    background: #fefefe !important;
    color: #6b685d !important;
    padding: 14px 20px 14px 44px;
    display: block;
    position: relative;
    border-bottom: 1px solid #f0f0f0 !important;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    font-size: 1.05em;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
    content: '▶';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #b3d4d0 !important;
    font-size: 11px;
    transition: transform 0.2s;
}
details[open] summary::before {
    transform: translateY(-50%) rotate(90deg);
}
/* 修仙符号：标题后添加 ✦ */
details summary::after {
    content: ' ✦';
    color: #d4c5a3;
    font-size: 0.85em;
    margin-left: 6px;
    opacity: 0.5;
}
details:hover summary::after {
    opacity: 0.9;
}
/* 右下角淡墨符号 ⚛ */
details::before {
    content: '⚛';
    position: absolute;
    bottom: 8px;
    right: 14px;
    font-size: 12px;
    color: #e2e2e2;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}
details:hover::before {
    opacity: 0.7;
    color: #c8c2b0;
}

/* 面板内容区 */
details > pre, details > table, details > .content-wrapper {
    margin: 0;
    border-top: 1px solid #f0f0f0;
    background: #ffffff;
}
details pre {
    padding: 18px 24px;
}
details pre code {
    font-size: 14px;
    line-height: 1.7;
    color: #4a4840;
}

/* ===== 滚动条（浅灰）===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f5;
}
::-webkit-scrollbar-thumb {
    background: #ddd8cc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c2bba8;
}

/* ===== 聊天气泡 ===== */
.bg-gray-100\/90.relative.inline-block {
    background: #ffffff !important;
    border: 1px solid #ebebeb !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    border-radius: 16px !important;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: #6b685d !important;
    border-bottom: 1px solid #ececec !important;
}
.markdown-body blockquote {
    border-left: 4px solid #b3d4d0 !important;
    background: #fafaf8 !important;
    color: #7f7a6e !important;
    font-style: italic;
    padding: 8px 18px;
    border-radius: 0 12px 12px 0;
}
.markdown-body table {
    border: 1px solid #ececec;
    border-collapse: collapse;
    width: 100%;
}
.markdown-body th, .markdown-body td {
    border: 1px solid #ececec;
    padding: 8px 14px;
    color: #4a4840;
}
.markdown-body th {
    background: #fafafa;
    font-weight: 600;
}
.markdown-body a {
    color: #b3d4d0;
    text-decoration: none;
}
.markdown-body a:hover {
    text-decoration: underline;
    color: #8cb9b4;
}
.markdown-body strong {
    color: #9b8e70;
}
.markdown-body em {
    color: #b0aa98;
}

/* ===== 输入框（白底浅框）===== */
#ai-chat-input, textarea.rc-textarea {
    background: #ffffff !important;
    color: #3e3a35 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 32px;
    caret-color: #b3d4d0;
}
#ai-chat-input:focus {
    border-color: #b3d4d0;
    box-shadow: 0 0 0 2px rgba(179, 212, 208, 0.2);
}
#ai-send-button {
    background: #b3d4d0 !important;
    color: white !important;
}
#ai-send-button:hover {
    background: #9ac2bd !important;
}

/* ===== 加载动画（淡青灵气光点）===== */
.style_dot-flashing__8L91Q.style_text__zGhNq { display: none !important; }
.flex.items-center.justify-center.w-6.h-5 {
    position: relative;
    width: 24px;
    height: 20px;
}
.flex.items-center.justify-center.w-6.h-5::before,
.flex.items-center.justify-center.w-6.h-5::after {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10px' height='10px' viewBox='0 0 10 10'%3E%3Ccircle cx='5' cy='5' r='2' fill='%23b3d4d0'%3E%3Canimate attributeName='r' values='2;4;2' dur='1.5s' repeatCount='indefinite' /%3E%3Canimate attributeName='opacity' values='1;0.5;1' dur='1.5s' repeatCount='indefinite' /%3E%3C/circle%3E%3C/svg%3E") !important;
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
}
.flex.items-center.justify-center.w-6.h-5::before { left: 0; }
.flex.items-center.justify-center.w-6.h-5::after {
    right: 0;
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10px' height='10px' viewBox='0 0 10 10'%3E%3Ccircle cx='5' cy='5' r='2' fill='%23b3d4d0'%3E%3Canimate attributeName='r' values='2;4;2' dur='1.5s' begin='0.75s' repeatCount='indefinite' /%3E%3Canimate attributeName='opacity' values='1;0.5;1' dur='1.5s' begin='0.75s' repeatCount='indefinite' /%3E%3C/circle%3E%3C/svg%3E") !important;
}

/* ===== 顶部导航 & 侧边栏（白色）===== */
.sticky.w-full.top-0.flex.items-center {
    background: #ffffff !important;
    border-bottom: 1px solid #ececec !important;
    box-shadow: none;
}
.shadow-lg.border-r.border-gray-200 {
    background: #ffffff !important;
    border-right: 1px solid #ececec !important;
}
.MuiList-root { background: #ffffff !important; }
.conversation-text { color: #6b685d !important; }

/* ===== 按钮（浅色）===== */
button.MuiButton-root {
    color: #6b685d !important;
}
#ai-mod-button2 button.MuiButton-root,
#ai-mod-button2 button.MuiButton-root svg {
    background: #b3d4d0 !important;
    color: white !important;
}
.MuiButton-containedPrimary {
    background: #b3d4d0 !important;
    color: white !important;
}
.MuiButton-outlinedPrimary {
    border-color: #b3d4d0 !important;
    color: #b3d4d0 !important;
}

/* ===== 分隔线（极细茶色）===== */
div.style_divider__mW0YX {
    border-bottom: 1px solid transparent;
    background-image: linear-gradient(to right, transparent, #e3dfd3, #cbc3ad, #e3dfd3, transparent);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 100% 1px;
    height: 1px;
    margin: 16px 0;
}

/* ===== 表格、引用等细节 ===== */
.markdown-body table tr:hover td {
    background: #fefefe;
}
.MuiPaginationItem-root.Mui-selected {
    background: #b3d4d0 !important;
    color: white !important;
}
::selection {
    background: #e8e0d0 !important;
    color: #3e3a35 !important;
}

/* ===== 响应式保留 ===== */
@media (max-width: 480px) {
    /* 无需额外调整 */
}