/* ===== 思维链隐藏 ===== */
think {
    display: none;
}

/* ===== 字体加载：霞鹜文楷 ===== */
@import url('https://chinese-fonts-cdn.deno.dev/packages/lxgwwenkai/dist/LXGWWenKai-Regular/result.css');

/* ===== 主容器：月白雪青底 ===== */
.chat-container {
    background: 
        linear-gradient(180deg, rgba(30, 50, 78, 0.42) 0%, rgba(48, 70, 100, 0.5) 100%),
        url('https://img.pagehost.cn/autoupload/tbaNrhnFevxxT19cDXDwbtiO_OyvX7mIgxFBfDMDErs/20260628/0xSU/1080X1921/f46751da-9240-4ffd-a0a3-aa6f079e014d.png/webp') center/cover no-repeat fixed !important;
    font-family: 'LXGW WenKai', '霞鹜文楷', 'KaiTi', serif !important;
}

/* ===== 顶部模型选择栏：雾蓝 ===== */
.chat-container > div:first-child,
div[class*="sticky"][class*="top-0"] {
    background: linear-gradient(135deg, rgba(58, 90, 122, 0.78), rgba(90, 122, 152, 0.65)) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(168, 189, 208, 0.42) !important;
}

/* ===== AI回复卡片：雪青宣纸 ===== */
#customized-answer-content,
#ai-chat-answer #customized-answer-content {
    background: linear-gradient(160deg, rgba(238, 242, 245, 0.93), rgba(220, 228, 236, 0.87)) !important;
    border: 1px solid rgba(90, 122, 152, 0.5) !important;
    border-radius: 18px !important;
    box-shadow: 
        0 10px 36px rgba(30, 50, 78, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.55),
        0 0 28px rgba(168, 189, 208, 0.25);
    backdrop-filter: blur(8px);
    padding: 22px 24px !important;
    position: relative;
    overflow: hidden;
}

/* 卡片右上角水雾装饰（图6） */
#customized-answer-content::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 160px;
    height: 160px;
    background: url('https://img.pagehost.cn/autoupload/tbaNrhnFevxxT19cDXDwbtiO_OyvX7mIgxFBfDMDErs/20260628/9qxS/1080X1921/6454b1c8-dd54-406f-a0ca-6664f175f168.png/webp') center/contain no-repeat;
    opacity: 0.12;
    pointer-events: none;
    transform: rotate(6deg);
    z-index: 0;
}

/* 卡片右下角符号 */
#customized-answer-content::after {
    content: '※';
    position: absolute;
    bottom: 10px;
    right: 18px;
    font-size: 20px;
    color: rgba(58, 90, 122, 0.28);
    pointer-events: none;
    z-index: 0;
}

/* markdown 主体 */
.markdown-body {
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
    color: #1a2c40 !important;
    line-height: 1.9 !important;
    font-size: 15px !important;
    position: relative;
    z-index: 1;
}

/* ===== 自定义标签 ===== */
scene {
    display: block;
}

/* 顶部状态栏：雪青胶带 */
status-top {
    display: block;
    background: linear-gradient(90deg, rgba(90, 122, 152, 0.22), rgba(168, 189, 208, 0.14), rgba(90, 122, 152, 0.22));
    border: 1px solid rgba(90, 122, 152, 0.4);
    border-radius: 22px;
    padding: 9px 16px;
    margin: 0 0 14px 0;
    font-size: 13px;
    color: #1f3a5c;
    text-align: center;
    letter-spacing: 0.6px;
    box-shadow: 
        inset 0 0 10px rgba(90, 122, 152, 0.08),
        0 2px 8px rgba(30, 50, 78, 0.08);
}

/* 正文 text：青卷 */
text {
    display: block;
    background: linear-gradient(180deg, rgba(244, 247, 250, 0.74), rgba(228, 235, 242, 0.64));
    border-left: 4px solid #5a7a98;
    border-right: 1px solid rgba(120, 150, 178, 0.32);
    padding: 18px 22px;
    margin: 14px 0;
    border-radius: 4px 14px 14px 4px;
    box-shadow: 
        inset 0 0 16px rgba(90, 122, 152, 0.08),
        0 2px 10px rgba(30, 50, 78, 0.06);
    position: relative;
}

text::before {
    content: '◈';
    position: absolute;
    top: 10px;
    right: 16px;
    color: rgba(58, 90, 122, 0.34);
    font-size: 13px;
}

text::after {
    content: '〜';
    position: absolute;
    bottom: 6px;
    right: 18px;
    color: rgba(58, 90, 122, 0.3);
    font-size: 16px;
    font-style: italic;
}

text p {
    text-indent: 2em;
    margin: 10px 0;
    color: #1a2c40;
    line-height: 1.96;
    font-size: 15px;
}

/* ===== details 折叠卡：月白霜青 ===== */
.markdown-body details {
    background: linear-gradient(135deg, rgba(238, 242, 245, 0.9), rgba(216, 226, 236, 0.8));
    border: 1px solid rgba(90, 122, 152, 0.42);
    border-radius: 14px;
    margin: 14px 0;
    padding: 0;
    overflow: hidden;
    box-shadow: 
        0 4px 14px rgba(30, 50, 78, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: all 0.3s ease;
}

.markdown-body details:hover {
    box-shadow: 
        0 6px 22px rgba(30, 50, 78, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 0 20px rgba(168, 189, 208, 0.4);
    transform: translateY(-1px);
}

.markdown-body details summary {
    cursor: pointer;
    padding: 11px 18px;
    background: linear-gradient(90deg, rgba(90, 122, 152, 0.3), rgba(168, 189, 208, 0.1));
    color: #1f3a5c;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px dashed rgba(58, 90, 122, 0.42);
    list-style: none;
    position: relative;
    user-select: none;
    letter-spacing: 0.5px;
}

.markdown-body details summary::-webkit-details-marker {
    display: none;
}

.markdown-body details summary::before {
    content: '✦';
    display: inline-block;
    margin-right: 8px;
    color: #5a7a98;
    transition: transform 0.4s ease;
}

.markdown-body details[open] summary::before {
    transform: rotate(180deg) scale(1.1);
    color: #3a5a7a;
}

.markdown-body details[open] summary {
    background: linear-gradient(90deg, rgba(90, 122, 152, 0.4), rgba(168, 189, 208, 0.18));
}

.markdown-body details > p,
.markdown-body details > ol,
.markdown-body details > ul {
    padding: 4px 20px;
    margin: 4px 0;
    color: #1a2c40;
}

.markdown-body details > p:first-of-type {
    padding-top: 12px;
}

.markdown-body details > p:last-of-type,
.markdown-body details > ul:last-of-type,
.markdown-body details > ol:last-of-type {
    padding-bottom: 14px;
}

.markdown-body details strong {
    color: #3a5a7a;
    font-weight: 600;
}

.markdown-body details ul,
.markdown-body details ol {
    padding-left: 40px;
}

.markdown-body details li {
    margin: 5px 0;
    line-height: 1.85;
}

.markdown-body details ul li::marker {
    color: #5a7a98;
}

/* ===== 表格 ===== */
.markdown-body details table {
    width: calc(100% - 28px);
    margin: 10px 14px 14px;
    border-collapse: collapse;
    background: rgba(244, 247, 250, 0.55);
    border-radius: 10px;
    overflow: hidden;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(30, 50, 78, 0.1);
}

.markdown-body details table thead {
    background: linear-gradient(135deg, rgba(90, 122, 152, 0.42), rgba(58, 90, 122, 0.32));
}

.markdown-body details table th {
    color: #eef2f5;
    padding: 9px 11px;
    text-align: left;
    border: 1px solid rgba(90, 122, 152, 0.4);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.markdown-body details table td {
    padding: 8px 11px;
    border: 1px solid rgba(120, 150, 178, 0.3);
    color: #1a2c40;
}

.markdown-body details table tbody tr:nth-child(even) {
    background: rgba(216, 226, 236, 0.55);
}

.markdown-body details table tbody tr:hover {
    background: rgba(168, 189, 208, 0.32);
    transition: background 0.2s ease;
}

/* ===== 用户输入气泡：深远山黛 ===== */
#ai-chat-question,
[id*="user-message"] {
    background: linear-gradient(135deg, rgba(26, 44, 64, 0.92), rgba(48, 72, 100, 0.85)) !important;
    color: #eef2f5 !important;
    border: 1px solid rgba(168, 189, 208, 0.42) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(26, 44, 64, 0.4);
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

/* ===== 底部渐变遮罩 ===== */
.bg-gradient-to-t.from-white.via-white.to-transparent {
    background: linear-gradient(
        to top,
        rgba(30, 50, 78, 0.88) 0%,
        rgba(48, 70, 100, 0.55) 50%,
        transparent 100%
    ) !important;
}

/* ===== 输入框容器 ===== */
#ai-chat-input-container,
div:has(> #ai-chat-input) {
    background: rgba(216, 226, 236, 0.82) !important;
    border: 1.5px solid #5a7a98 !important;
    border-radius: 16px !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(30, 50, 78, 0.28);
    transition: all 0.3s ease;
    position: relative;
}

div:has(> #ai-chat-input):focus-within {
    border-color: #3a5a7a !important;
    box-shadow: 
        0 0 20px rgba(90, 122, 152, 0.55), 
        0 4px 20px rgba(30, 50, 78, 0.32);
}

/* 输入框右上贴图（图9） */
#ai-chat-input-container::after {
    content: '';
    position: absolute;
    top: -22px;
    right: 12px;
    width: 44px;
    height: 44px;
    background: url('https://img.pagehost.cn/autoupload/tbaNrhnFevxxT19cDXDwbtiO_OyvX7mIgxFBfDMDErs/20260628/ou9x/638X1004/4cf8b555-0b84-42a0-90f2-32c49243053d.png') center/contain no-repeat;
    opacity: 0.85;
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(30, 50, 78, 0.35));
    transform: rotate(-8deg);
}

#ai-chat-input {
    background: transparent !important;
    color: #1a2c40 !important;
    border: none;
    font-size: 14px;
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

#ai-chat-input::placeholder {
    color: #5a7a98;
    font-style: italic;
}

/* ===== 发送按钮 ===== */
#ai-send-button {
    background: linear-gradient(135deg, #5a7a98, #3a5a7a) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(58, 90, 122, 0.5);
}

#ai-send-button:hover {
    background: linear-gradient(135deg, #6a8aa8, #4a6a8a) !important;
    box-shadow: 0 0 20px rgba(90, 122, 152, 0.75);
    transform: scale(1.07);
}

#ai-send-button svg {
    color: #fff !important;
    fill: #fff !important;
}

/* ===== 第一排工具栏 ===== */
.MuiButton-textPrimary {
    color: #5a7a98 !important;
    transition: all 0.25s ease;
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

.MuiButton-textPrimary:hover {
    background: rgba(90, 122, 152, 0.2) !important;
    color: #3a5a7a !important;
}

/* ===== 第二排工具栏 ===== */
.MuiButton-outlinedPrimary {
    border-color: rgba(90, 122, 152, 0.7) !important;
    color: #3a5a7a !important;
    background: rgba(238, 242, 245, 0.55) !important;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

.MuiButton-outlinedPrimary:hover {
    background: rgba(90, 122, 152, 0.22) !important;
    border-color: #3a5a7a !important;
    color: #1f3a5c !important;
    box-shadow: 0 0 14px rgba(90, 122, 152, 0.42);
}

/* ===== 翻页 ===== */
.MuiPaginationItem-root {
    color: #3a5a7a !important;
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

.MuiPaginationItem-root:hover {
    background: rgba(90, 122, 152, 0.22) !important;
}

.MuiPaginationItem-root.Mui-selected {
    background: linear-gradient(135deg, rgba(90, 122, 152, 0.62), rgba(58, 90, 122, 0.52)) !important;
    color: #eef2f5 !important;
    border: 1px solid rgba(90, 122, 152, 0.65);
}

button[class*="MuiButton"] {
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

/* ===== 滚动条 ===== */
.chat-container ::-webkit-scrollbar {
    width: 8px;
}

.chat-container ::-webkit-scrollbar-track {
    background: rgba(30, 50, 78, 0.22);
    border-radius: 4px;
}

.chat-container ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #5a7a98, #3a5a7a);
    border-radius: 4px;
}

.chat-container ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6a8aa8, #4a6a8a);
}