/* ===== 思维链隐藏 ===== */
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(245, 241, 232, 0.55) 0%, rgba(200, 212, 224, 0.45) 100%),
        url('https://aly2.tuchuangyun.top/autoupload/tbaNrhnFevxxT19cDXDwbtiO_OyvX7mIgxFBfDMDErs/20260725/EcBA/1080X1441/QQ%E5%9B%BE%E7%89%8720260725161644%289%29.jpeg') center/cover no-repeat fixed !important;
    font-family: 'LXGW WenKai', '霞鹜文楷', 'PingFang SC', serif !important;
}

/* ===== 顶部模型选择栏：雾蓝金属条 ===== */
.chat-container > div:first-child,
div[class*="sticky"][class*="top-0"] {
    background: linear-gradient(135deg, rgba(44, 74, 124, 0.82), rgba(107, 143, 184, 0.72)) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(201, 169, 97, 0.35) !important;
    box-shadow: 0 2px 12px rgba(30, 42, 58, 0.25);
}

/* ===== 底部渐变遮罩：淡雾蓝过渡 ===== */
.bg-gradient-to-t.from-white.via-white.to-transparent {
    background: linear-gradient(
        to top,
        rgba(200, 212, 224, 0.88) 0%,
        rgba(200, 212, 224, 0.55) 50%,
        transparent 100%
    ) !important;
}

/* ===== 正文回复卡片（核心容器） ===== */
#customized-answer-content,
#ai-chat-answer #customized-answer-content {
    background: linear-gradient(160deg, rgba(245, 241, 232, 0.92), rgba(232, 228, 216, 0.88)) !important;
    border: 1px solid rgba(107, 143, 184, 0.55) !important;
    border-radius: 18px !important;
    box-shadow: 
        0 10px 36px rgba(30, 42, 58, 0.28),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4),
        0 0 28px rgba(107, 143, 184, 0.18);
    backdrop-filter: blur(8px);
    padding: 22px 24px !important;
    position: relative;
    overflow: hidden;
}

/* 卡片右上角光晕（像窗外的城市光） */
#customized-answer-content::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(107, 143, 184, 0.32), transparent 70%);
    pointer-events: none;
}

/* 卡片左下角暗金印章感（暗示他的另一重身份） */
#customized-answer-content::after {
    content: '屿';
    position: absolute;
    bottom: 10px;
    right: 18px;
    font-size: 22px;
    color: rgba(201, 169, 97, 0.22);
    pointer-events: none;
    font-family: 'STKaiti', 'KaiTi', serif;
    letter-spacing: 2px;
}

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

/* ===== 正文 text 标签：影帝的独白页 ===== */
text {
    display: block;
    background: linear-gradient(180deg, rgba(250, 247, 240, 0.72), rgba(240, 236, 226, 0.6));
    border-left: 3px solid #2c4a7c;
    border-right: 1px solid rgba(107, 143, 184, 0.3);
    padding: 16px 20px;
    margin: 14px 0;
    border-radius: 4px 14px 14px 4px;
    box-shadow: inset 0 0 14px rgba(44, 74, 124, 0.08);
    position: relative;
}

text::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 20%;
    height: 60%;
    width: 3px;
    background: linear-gradient(180deg, transparent, #c9a961, transparent);
    opacity: 0.7;
}

text p {
    text-indent: 2em;
    margin: 10px 0;
    color: #1e2a3a;
    line-height: 1.95;
}

/* ===== details 折叠卡：夜色公寓的抽屉感 ===== */
.markdown-body details {
    background: linear-gradient(135deg, rgba(232, 236, 244, 0.88), rgba(212, 222, 236, 0.8));
    border: 1px solid rgba(44, 74, 124, 0.4);
    border-radius: 14px;
    margin: 14px 0;
    padding: 0;
    overflow: hidden;
    box-shadow: 
        0 4px 14px rgba(30, 42, 58, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.markdown-body details:hover {
    box-shadow: 
        0 8px 22px rgba(30, 42, 58, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 0 20px rgba(107, 143, 184, 0.35);
    transform: translateY(-2px);
    border-color: rgba(44, 74, 124, 0.6);
}

.markdown-body details summary {
    cursor: pointer;
    padding: 11px 18px;
    background: linear-gradient(90deg, rgba(44, 74, 124, 0.32), rgba(107, 143, 184, 0.12));
    color: #1a2438;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px dashed rgba(44, 74, 124, 0.35);
    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::after {
    content: '▾';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #2c4a7c;
    font-size: 13px;
    transition: transform 0.3s ease;
}

.markdown-body details[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
    color: #c9a961;
}

.markdown-body details[open] summary {
    background: linear-gradient(90deg, rgba(44, 74, 124, 0.42), rgba(107, 143, 184, 0.18));
    border-bottom: 1px solid rgba(201, 169, 97, 0.35);
}

.markdown-body details > p {
    padding: 4px 20px;
    margin: 4px 0;
    color: #1e2a3a;
    line-height: 1.85;
    font-size: 14.5px;
}

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

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

.markdown-body details strong {
    color: #2c4a7c;
    font-weight: 600;
}

/* ===== 用户输入气泡：深蓝墨调 ===== */
#ai-chat-question,
[id*="user-message"] {
    background: linear-gradient(135deg, rgba(30, 42, 58, 0.88), rgba(44, 74, 124, 0.82)) !important;
    color: #f5f1e8 !important;
    border: 1px solid rgba(201, 169, 97, 0.35) !important;
    border-radius: 16px !important;
    box-shadow: 
        0 4px 16px rgba(30, 42, 58, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

/* ===== 输入框区域 ===== */
#ai-chat-input {
    background: rgba(250, 247, 240, 0.92) !important;
    color: #1e2a3a !important;
    border: none;
    font-size: 14px;
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

#ai-chat-input::placeholder {
    color: #6b8fb8;
    font-style: italic;
}

#ai-chat-input-container,
div:has(> #ai-chat-input) {
    background: rgba(232, 236, 244, 0.82) !important;
    border: 1.5px solid rgba(44, 74, 124, 0.7) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(12px);
    box-shadow: 
        0 4px 18px rgba(30, 42, 58, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

div:has(> #ai-chat-input):focus-within {
    border-color: #c9a961 !important;
    box-shadow: 
        0 0 18px rgba(201, 169, 97, 0.4),
        0 4px 20px rgba(30, 42, 58, 0.28);
}

/* ===== 发送按钮：暗夜金 ===== */
#ai-send-button {
    background: linear-gradient(135deg, #2c4a7c, #1a2438) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 10px rgba(30, 42, 58, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

#ai-send-button:hover {
    background: linear-gradient(135deg, #3a5a8c, #2c4a7c) !important;
    box-shadow: 
        0 0 20px rgba(201, 169, 97, 0.55),
        0 2px 12px rgba(30, 42, 58, 0.5);
    transform: scale(1.08);
}

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

/* ===== 第一排工具栏（文字按钮） ===== */
.MuiButton-textPrimary {
    color: #2c4a7c !important;
    transition: all 0.25s ease;
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
    border-radius: 8px !important;
}

.MuiButton-textPrimary:hover {
    background: rgba(44, 74, 124, 0.15) !important;
    color: #1a2438 !important;
}

/* ===== 第二排工具栏（描边按钮） ===== */
.MuiButton-outlinedPrimary {
    border: 1px solid rgba(44, 74, 124, 0.65) !important;
    color: #1e2a3a !important;
    background: rgba(232, 236, 244, 0.6) !important;
    backdrop-filter: blur(10px);
    transition: all 0.25s ease;
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
    border-radius: 10px !important;
}

.MuiButton-outlinedPrimary:hover {
    background: rgba(44, 74, 124, 0.18) !important;
    border-color: #c9a961 !important;
    color: #1a2438 !important;
    box-shadow: 0 0 14px rgba(201, 169, 97, 0.35);
}

/* ===== 翻页控件 ===== */
.MuiPaginationItem-root {
    color: #2c4a7c !important;
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
    transition: all 0.25s ease;
}

.MuiPaginationItem-root:hover {
    background: rgba(44, 74, 124, 0.18) !important;
}

.MuiPaginationItem-root.Mui-selected {
    background: linear-gradient(135deg, rgba(44, 74, 124, 0.65), rgba(30, 42, 58, 0.55)) !important;
    color: #f5f1e8 !important;
    border: 1px solid rgba(201, 169, 97, 0.5);
    box-shadow: 0 2px 8px rgba(30, 42, 58, 0.3);
}

/* ===== 通用按钮字体统一 ===== */
button[class*="MuiButton"] {
    font-family: 'LXGW WenKai', '霞鹜文楷', serif !important;
}

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

.chat-container ::-webkit-scrollbar-track {
    background: rgba(200, 212, 224, 0.35);
    border-radius: 4px;
}

.chat-container ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2c4a7c, #1a2438);
    border-radius: 4px;
    border: 1px solid rgba(201, 169, 97, 0.25);
}

.chat-container ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3a5a8c, #2c4a7c);
}