/* --- 平台禁用body，全局字体设定已移至下方 ai 标签中 --- */

/* --- 顶部栏：玄金天顶 --- */
.sticky.w-full.top-0.flex.items-center {
background: linear-gradient(180deg, #1a2536, #0b0f12) !important;
border-bottom: 1px solid rgba(212, 175, 55, 0.4) !important;
box-shadow: 0 2px 15px rgba(212, 175, 55, 0.2) !important;
transition: all 0.3s ease;
}

/* 顶部栏图标通用样式 */
.sticky.w-full.top-0 svg, #header-setting-button svg {
color: #bfa040 !important;
transition: all 0.3s ease;
}
.sticky.w-full.top-0 svg:hover, #header-setting-button:hover svg {
filter: drop-shadow(0 0 4px #d4af37);
transform: scale(1.1);
}

/* 模型选择器 */
#ai-model-selector .group.flex.items-center {
background-color: rgba(212, 175, 55, 0.1) !important;
border: 1px solid rgba(212, 175, 55, 0.3) !important;
border-radius: 6px;
transition: all 0.3s ease;
}
#ai-model-selector .group.flex.items-center:hover {
background-color: rgba(212, 175, 55, 0.2) !important;
border-color: #d4af37 !important;
}
#ai-model-selector .truncate.text-[13px] {
color: #d4af37 !important;
font-weight: bold;
}

/* --- 开场白/预设栏：天机卷轴 --- */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class="border-gray"] {
background: #131a22 !important;
border: 1px solid rgba(212, 175, 55, 0.3) !important;
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
transition: all 0.3s ease;
}
div.flex.items-center.h-9.cursor-pointer.group:hover {
border-color: #d4af37 !important;
box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}
div.flex.items-center.h-9.cursor-pointer.group svg {
color: #bfa040 !important;
}

/* --- 底部输入栏：墨玉宝匣 --- */
.bg-gradient-to-t {
background: none !important; /* 移除默认渐变 */
}
#ai-chat-bottom-input {
background: #131a22 !important;
border: 1px solid rgba(212, 175, 55, 0.4) !important;
border-radius: 8px !important;
box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
transition: all 0.3s ease;
}
#ai-chat-bottom-input:focus-within {
border-color: #d4af37 !important;
box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}
#ai-chat-input {
color: #e0e6ed !important;
font-size: 16px !important;
caret-color: #d4af37;
}
#ai-chat-input::placeholder {
color: #8a9aa7 !important;
font-style: italic;
}
#ai-chat-input::selection {
background: #d4af37 !important;
color: #0b0f12 !important;
}

/* --- 功能按钮栏：符文铭刻 --- */
#ai-mod-button2 button.MuiButton-root {
background: transparent !important;
border: 1px solid rgba(212, 175, 55, 0.5) !important;
color: #d4af37 !important;
transition: all 0.3s ease !important;
backdrop-filter: blur(2px);
}
#ai-mod-button2 button.MuiButton-root:hover {
background: rgba(212, 175, 55, 0.15) !important;
border-color: #d4af37 !important;
transform: translateY(-2px);
}
#ai-mod-button2 button.MuiButton-root svg {
color: #d4af37 !important;
}

/* --- 评论区：太虚古碑 --- */
div[class="w-full"][class*="bg-white"][class*="bottom-0"] {
background: #0b0f12 !important;
color: #e0e6ed !important;
border-top: 2px solid #d4af37 !important;
box-shadow: 0 -5px 20px rgba(212, 175, 55, 0.2);
}

/* 评论区标题 */
div.text-lg.font-bold {
color: #d4af37 !important;
text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
padding-bottom: 10px;
border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* 个人评分文字 */
p.MuiTypography-body1.text-grey-600 {
color: #b0bec5 !important;
}

/* 评分星星 */
span.MuiRating-iconEmpty svg {
color: #455a64 !important;
}
span.MuiRating-iconFilled svg {
color: #f1c40f !important;
filter: drop-shadow(0 0 3px #f1c40f);
}
span.text-orange-500 {
color: #f1c40f !important;
font-weight: bold;
}

/* 评论输入框 */
div.flex.flex-col.border-gray-200 {
border-color: rgba(212, 175, 55, 0.3) !important;
}
textarea.rc-textarea {
background: #1b242f !important;
color: #e0e6ed !important;
border: 1px solid #2c3e50 !important;
border-radius: 4px;
transition: border-color 0.3s ease;
}
textarea.rc-textarea:focus {
border-color: #d4af37 !important;
}
div.bg-gray-100.text-gray-500 {
background: #1b242f !important;
color: #8a9aa7 !important;
}

/* 发送评论按钮 */
div.cursor-pointer.group.flex.items-center.justify-center {
background: linear-gradient(135deg, #d4af37, #aa8416) !important;
border-radius: 50%;
transition: all 0.3s ease;
}
div.cursor-pointer.group.flex.items-center.justify-center:hover {
box-shadow: 0 0 12px rgba(212, 175, 55, 0.8);
transform: scale(1.1);
}
div[data-state="closed"] svg[data-icon="Send03"] {
color: #000 !important;
}

/* 分割线 */
div.style_divider__mW0YX {
background-color: rgba(212, 175, 55, 0.2) !important;
}

/* 排序按钮 */
button.MuiButton-containedPrimary, button.MuiButton-outlinedPrimary {
border-radius: 16px !important;
border-width: 1px !important;
}
button.MuiButton-containedPrimary {
background-color: #d4af37 !important;
color: #000 !important;
border-color: #d4af37 !important;
}
button.MuiButton-outlinedPrimary {
color: #d4af37 !important;
border-color: rgba(212, 175, 55, 0.7) !important;
}

/* 评论列表 */
div.group.ml-0 {
border-bottom: 1px solid rgba(212, 175, 55, 0.15) !important;
padding-bottom: 12px !important;
margin-bottom: 12px !important;
}
div.group img.rounded-full {
border: 2px solid rgba(212, 175, 55, 0.3);
}
div.text-sm.text-grey-600 span.font-bold {
color: #a1b5cc !important;
}
span.text-[10px] {
color: #d4af37 !important;
background: rgba(212, 175, 55, 0.1);
border: 1px solid rgba(212, 175, 55, 0.2);
padding: 1px 4px;
border-radius: 4px;
}
div.break-all {
color: #e0e6ed !important;
line-height: 1.7;
}
div.text-xs.text-grey-600 {
color: #8a9aa7 !important;
}
button.text-gray-400 {
color: #8a9aa7 !important;
transition: color 0.3s ease;
}
button.text-gray-400:hover {
color: #d4af37 !important;
}
span.cursor-pointer {
color: #8a9aa7 !important;
font-weight: bold;
transition: color 0.3s ease;
}
span.cursor-pointer:hover {
color: #d4af37 !important;
}
div.ml-8.border-l {
border-color: rgba(212, 175, 55, 0.2) !important;
}

/* --- 分页栏：星盘轨迹 --- */
.MuiPaginationItem-root {
color: #8a9aa7 !important;
border: 1px solid transparent !important;
}
.MuiPaginationItem-root:hover {
background-color: rgba(212, 175, 55, 0.1) !important;
border-color: rgba(212, 175, 55, 0.3) !important;
}
.MuiPaginationItem-root.Mui-selected {
background-color: #d4af37 !important;
color: #000 !important;
font-weight: bold;
border-color: #d4af37 !important;
}
.MuiPaginationItem-root.Mui-disabled {
opacity: 0.3;
}
.MuiStack-root.css-1uwir8f .MuiBox-root {
color: #8a9aa7 !important;
}
.MuiInputBase-input {
background: #1b242f !important;
color: #e0e6ed !important;
border: 1px solid #2c3e50 !important;
}

/* --- AI聊天平台古风修仙UI --- */
/* --- 主题：玄金墨染 --- */

ai {
/* --- 优先使用更具古典韵味的系统字体 --- */
font-family: 'PingFang SC', 'Microsoft YaHei', 'Kaiti SC', STKaiti, sans-serif !important;

/* --- 颜色与样式变量 --- */
--bg: #0a0c14; /* 玄黑背景 */
--text: #dde; /* 月白正文 */
--text-dim: #8899a6; /* 尘灰次要文字 */
--border-gold: linear-gradient(135deg, #a8882e, #ffec8a, #d4af37, #a8882e); /* 流金边框 */
--title-gold: linear-gradient(135deg, #ffec8a, #d4af37); /* 华金标题 */
--accent-jade: #4a7c85; /* 青玉点缀 */
--accent-jade-light: #6aa8b5; /* 亮青玉 */
--warn-red: #9a2a2a; /* 朱砂警示 */
--panel-bg: rgba(20, 24, 40, 0.5); /* 面板背景 */
--divider: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.5), transparent); /* 金色分隔线 */

/* --- 整体容器 --- */
background: var(--bg);
color: var(--text);
font-size: 16px;
line-height: 1.7;
border: 2px solid transparent;
border-image: var(--border-gold) 1;
padding: 8px 12px;
box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
display: block;
position: relative;
}

/* --- 部分一：思维链 (默认折叠) --- */
ai details.log {
position: absolute;
top: 4px;
right: 4px;
z-index: 10;
}
ai details.log summary {
cursor: pointer;
font-size: 20px;
opacity: 0.6;
transition: opacity 0.3s;
list-style: none;
}
ai details.log summary::-webkit-details-marker { display: none; }
ai details.log summary:hover { opacity: 1; }
ai details.log[open] {
background: rgba(0,0,0,0.7);
padding: 10px;
border-radius: 5px;
max-width: 90%;
}
ai details.log p {
font-size: 13px;
color: var(--text-dim);
margin: 0;
line-height: 1.5;
}

/* --- 部分二：当前信息 (时间/地点) --- */
ai header p {
text-align: center;
font-size: 14px;
color: var(--text-dim);
margin: 8px 0;
letter-spacing: 1px;
}

/* --- 部分三：内容回复 --- */
ai main p {
margin: 1em 8px;
text-indent: 2em;
}

/* --- 状态总览 (默认折叠) --- */
ai details.st {
border-top: 1px solid;
border-image: var(--divider) 1;
margin-top: 16px;
padding-top: 8px;
}
ai details.st summary {
cursor: pointer;
font-weight: bold;
font-size: 18px;
padding: 5px 10px;
background: var(--panel-bg);
border-radius: 3px;
list-style: none;
transition: background 0.3s;
}
ai details.st summary::-webkit-details-marker { display: none; }
ai details.st summary:hover { background: var(--accent-jade); }

/* --- 状态栏内部Tab切换系统 --- */
ai .tabs {
display: flex;
justify-content: space-around;
border-bottom: 1px solid rgba(212, 175, 55, 0.3);
margin: 10px 0;
}
ai .tabs a {
padding: 8px 12px;
color: var(--text-dim);
text-decoration: none;
border-bottom: 2px solid transparent;
transition: all 0.3s ease;
}
ai .tabs a:hover {
color: var(--text);
border-bottom-color: var(--accent-jade-light);
}

/* --- Tab面板 --- */
ai .panels section {
display: none; /* 默认隐藏所有面板 */
padding: 0 5px;
animation: fadeIn 0.5s ease;
}
/* 点击Tab链接时，显示对应的section */
ai .panels section:target {
display: block;
}
/* 注意: 此纯CSS方案下，初始状态不会显示任何Tab内容，需用户点击后才显示。*/

@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}

/* --- 面板内通用样式 --- */
ai section p {
background: var(--panel-bg);
border-radius: 4px;
padding: 12px;
margin: 10px 0;
border-left: 3px solid var(--accent-jade);
}
/* 抓取p标签的t属性作为标题 */
ai section p[t]::before {
content: attr(t);
display: block;
font-weight: bold;
color: var(--text);
margin-bottom: 10px;
padding-bottom: 5px;
border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

/* --- 属性列表 --- */
ai section d {
display: grid;
grid-template-columns: 70px 1fr; /* 标签与数值对齐 */
font-size: 14px;
padding: 2px 0;
align-items: center;
}
ai section d span { color: var(--text-dim); }

/* --- 玩家姓名 特效 --- */
ai f {
font-size: 20px;
font-weight: bold;
background: var(--title-gold);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
display: block;
margin-bottom: 8px;
}

/* --- 部分六：关系列表好感度 --- */
ai i[c] { font-style: normal; font-weight: bold; }
/* 根据c属性值(0-100)显示不同颜色 */
ai i[c^="10"], ai i[c^="9"], ai i[c^="8"] { color: #28a745; } /* 80-100 友善-绿 */
ai i[c^="7"], ai i[c^="6"], ai i[c^="5"] { color: #ffc107; } /* 50-79 中立-黄 */
ai i[c^="4"], ai i[c^="3"], ai i[c^="2"] { color: #fd7e14; } /* 20-49 疏远-橙 */
ai i[c^="1"], ai i[c^="0"], ai i[c^="-"] { color: var(--warn-red); } /* <20 敌对-红 */

#rel d { /* 关系列表采用更紧凑的布局 */
display: block;
border-bottom: 1px dashed rgba(74, 124, 133, 0.5);
padding: 6px 0;
font-size: 14px;
}
#rel d:last-child { border: none; }
#rel d span {
color: var(--text);
font-weight: bold;
margin-right: 8px;
}

/* --- 部分七：记忆区 --- */
#mem d {
display: block;
font-size: 13px;
padding: 6px 8px;
background: rgba(0,0,0,0.2);
border-radius: 3px;
margin: 4px 0;
}

/* --- 部分八：行动选项 --- */
#act p { background: none; border: none; padding: 0; }
#act a {
display: flex;
align-items: center;
background: var(--panel-bg);
padding: 10px 15px;
margin: 8px 0;
border-radius: 4px;
text-decoration: none;
color: var(--text);
border: 1px solid transparent;
transition: all 0.3s ease;
cursor: pointer;
}
#act a:hover {
border-color: var(--accent-jade-light);
background: var(--accent-jade);
}
#act a span {
flex-shrink: 0;
background: var(--accent-jade);
color: var(--bg);
border-radius: 50%;
width: 24px;
height: 24px;
text-align: center;
line-height: 24px;
font-weight: bold;
margin-right: 12px;
}

/* 五行天道色彩映射 */
.mu-text { color: #2ecc71; font-weight: bold; text-shadow: 0 0 4px rgba(46,204,113,0.3); }
.huo-text { color: #e74c3c; font-weight: bold; text-shadow: 0 0 4px rgba(231,76,60,0.3); }
.tu-text { color: #f1c40f; font-weight: bold; text-shadow: 0 0 4px rgba(241,196,15,0.3); }
.shui-text { color: #66ccff; font-weight: bold; text-shadow: 0 0 4px rgba(102,204,255,0.3); }
.dao-text { color: #9b59b6; font-weight: bold; text-shadow: 0 0 4px rgba(155,89,182,0.3); }
.bold-text { font-weight: bold; }
.dim-text { opacity: 0.7; }

/* 基础折叠框架 */
.sys-details { margin-top: 8px; }
.sys-summary { cursor: pointer; font-size: 15px; }
.sys-line { margin-bottom: 5px; }
.sys-mt { margin-top: 12px; }

/* 各大板块专属容器 */
.dao-box { border: 1px dashed #9b59b6; padding: 10px; background: rgba(155,89,182,0.05); border-radius: 5px; margin-top: 5px; }
.dao-box-double { border: 1px double #9b59b6; padding: 12px; background: rgba(155,89,182,0.03); border-radius: 5px; margin-top: 5px; font-family: 'Noto Serif SC', serif; }
.tu-box { border: 1px double #f1c40f; padding: 10px; background: rgba(241,196,15,0.05); border-radius: 5px; margin-top: 5px; font-family: 'Noto Serif SC', serif; }
.mu-box { border: 2px solid #2ecc71; border-radius: 8px; padding: 12px; background: rgba(46,204,113,0.02); margin-top: 5px; }
.huo-box { border: 2px solid #e74c3c; border-radius: 8px; padding: 12px; background: rgba(231,76,60,0.02); margin-top: 5px; }
.shui-box { border: 2px solid #66ccff; border-radius: 8px; padding: 12px; background: rgba(102,204,255,0.02); margin-top: 5px; }

/* 标题与分割线 */
.mu-header { color: #2ecc71; border-bottom: 1px solid #2ecc71; padding-bottom: 4px; font-weight: bold; margin-bottom: 8px; }
.dao-header { color: #9b59b6; font-weight: bold; border-bottom: 1px dashed #e74c3c; padding-bottom: 2px; margin-bottom: 6px; }
.shui-header { color: #66ccff; font-weight: bold; border-bottom: 1px solid #66ccff; padding-bottom: 4px; margin-bottom: 6px; }

/* 正文演义区域 (画卷边框) */
.main-title { text-align: center; color: #d4ac0d; font-size: 16px; font-weight: bold; margin-bottom: 10px; letter-spacing: 2px; }
.main-content { line-height: 1.8; letter-spacing: 1px; font-size: 15px; color: #f3f3f3; background: #1a1a2e; padding: 15px; border-radius: 6px; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); font-family: 'Long Cang', 'Noto Serif SC', serif; }
.main-divider { text-align: center; color: #d4ac0d; font-size: 16px; font-weight: bold; margin-top: 10px; margin-bottom: 15px; }

/* 因果簿纯HTML表格样式 (取代Markdown防崩溃) */
.table-box { margin-top: 5px; overflow-x: auto; }
.karma-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.karma-table th { border-bottom: 2px solid #f1c40f; padding: 8px; color: #f1c40f; }
.karma-table td { border-bottom: 1px dashed rgba(255,255,255,0.2); padding: 8px; }

/* 逆天改命引用块 */
.custom-quote { margin: 5px 0 0 20px; color: #888; border-left: 2px solid #9b59b6; padding-left: 10px; }