/* 隐藏浅蓝色条 */
div[class*="bg-[#c9e1e9]"][class*="top-0"][class*="h-0.5"] {
  display: none !important;
}

/* 隐藏浅粉色条 */
div[class*="bg-[#F1CBCB]"][class*="top-0"][class*="h-0.5"] {
  display: none !important;
}
/* 
 * =================================
 *   模块一：对话气泡美化 (AI侧)
 *   风格：温暖奶油卡片 · 精致边框
 * =================================
 */
.group .bg-gray-100\/90 {
    /* 温暖奶油色背景，不透明 */
    background: #fdf8f3 !important;
    
    /* 实线边框 */
    border: 2px solid #c8b5a0 !important;
    border-radius: 10px !important;
    
    /* 柔和阴影，营造卡片悬浮感 */
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06), 
                0 1px 3px rgba(0, 0, 0, 0.04) !important;
    
    /* 深色文字，确保可读性 */
    color: #2b2a27 !important;
    
    /* 舒适内边距 */
    padding: 14px 16px !important;
    
    /* 平滑过渡 */
    transition: all 0.2s ease;
}

/* 气泡悬停 —— 轻微上浮 */
.group .bg-gray-100\/90:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 
                0 2px 5px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-1px);
}


/* 
 * =================================
 *   模块二：平台按钮美化
 *   风格：圆形按钮 · 实阴影
 * =================================
 */
.flex.items-center.gap-2.pb-2 > button {
    /* 温暖灰调背景 */
    background: #e8e2da !important;
    
    /* 深色文字 */
    color: #3e3a36 !important;
    
    /* 实线边框 */
    border: 1.5px solid #c8b5a0 !important;
    
    /* 圆形按钮 */
    border-radius: 50px !important;
    
    /* 实阴影 —— 紧贴按钮下方 */
    box-shadow: 0 4px 0px #b8a088 !important;
    
    /* 字体设置 */
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    text-transform: none !important;
    letter-spacing: 0.03em;
    
    /* 平滑过渡 */
    transition: all 0.15s ease-in-out !important;
    
    /* 统一内边距 */
    padding: 8px 22px !important;
    
    /* 光标样式 */
    cursor: pointer;
}

/* 按钮悬停 —— 优雅加深 */
.flex.items-center.gap-2.pb-2 > button:hover {
    background: #dcd4c8 !important;
    color: #2b2a27 !important;
    border-color: #a09182 !important;
    box-shadow: 0 5px 0px #a09182 !important;
    transform: translateY(-1px);
}

/* 按钮按下 —— 阴影消失，模拟按下 */
.flex.items-center.gap-2.pb-2 > button:active {
    background: #d0c8bb !important;
    box-shadow: 0 1px 0px #a09182 !important;
    transform: translateY(3px);
}


/* 
 * =================================
 *   模块三：多余元素隐藏
 *   （保持原样，不修改）
 * =================================
 */
.MuiButtonBase-root.MuiButton-root.MuiButton-default.css-w13mdt,
.absolute.z-40 .px-4.py-2.hover\:bg-indigo-100:nth-child(5),
.css-nkqe49 {
    /* display: none !important; */ /* 保持注释状态 */
}


/* 
 * =================================
 *   模块四：输入栏美化
 *   风格：纯净卡片 · 精致边框
 * =================================
 */
#ai-chat-input {
    /* 纯净白色背景 */
    background-color: #ffffff !important;
    
    /* 实线边框 */
    border: 1.5px solid #c8b5a0 !important;
    border-radius: 8px !important;
    
    /* 深色文字 */
    color: #2b2a27 !important;
    
    /* 内阴影 —— 模拟轻微凹陷 */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04),
                0 0 0 3px rgba(200, 181, 160, 0.08) !important;
    
    /* 过渡 */
    transition: all 0.2s ease;
}

/* 输入框聚焦 —— 柔和发光 */
#ai-chat-input:focus {
    border-color: #a09182 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04),
                0 0 0 5px rgba(160, 145, 130, 0.12) !important;
    outline: none;
}

/* 输入框容器 —— 不透明背景 */
#ai-chat-bottom-input {
    background: #f4f2ef !important;
    backdrop-filter: none !important;
}


/* 
 * =================================
 *   模块五：移动端适配
 * =================================
 */
@media (max-width: 768px) {
    /* 气泡在移动端缩小内边距 */
    .group .bg-gray-100\/90 {
        padding: 10px 12px !important;
        border-radius: 8px !important;
    }
    
    /* 圆形按钮在移动端调整 */
    .flex.items-center.gap-2.pb-2 > button {
        padding: 7px 18px !important;
        font-size: 0.8rem !important;
        border-radius: 50px !important;
        box-shadow: 0 3px 0px #b8a088 !important;
    }
    
    .flex.items-center.gap-2.pb-2 > button:hover {
        box-shadow: 0 4px 0px #a09182 !important;
    }
    
    .flex.items-center.gap-2.pb-2 > button:active {
        box-shadow: 0 1px 0px #a09182 !important;
        transform: translateY(2px);
    }
    
    /* 输入框在移动端保持舒适 */
    #ai-chat-input {
        border-radius: 6px !important;
    }
}

@media (max-width: 480px) {
    /* 更小屏幕进一步优化 */
    .group .bg-gray-100\/90 {
        padding: 8px 10px !important;
    }
    
    .flex.items-center.gap-2.pb-2 > button {
        padding: 6px 16px !important;
        font-size: 0.75rem !important;
        box-shadow: 0 3px 0px #b8a088 !important;
    }
}











/* 
 * =================================
 *   模块四：底部栏 · 温暖卡片风格
 * =================================
 */

/* --- 底部栏容器 --- */
.bg-gradient-to-t {
    /* 温暖浅色背景，不透明 */
    background: #f4f2ef !important;
    /* 精致上边框 */
    border-top: 1.5px solid #c8b5a0 !important;
    /* 柔和阴影 */
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.06), 
                0 -1px 3px rgba(0, 0, 0, 0.04) !important;
    /* 内边距 */
    padding: 12px 16px !important;
}

/* --- 底部输入框 --- */
#ai-chat-input {
    /* 白色背景，不透明 */
    background: #ffffff !important;
    /* 精致边框 */
    border: 1.5px solid #c8b5a0 !important;
    /* 深色文字 */
    color: #2b2a27 !important;
    /* 圆角 */
    border-radius: 10px !important;
    /* 内阴影 */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04),
                0 0 0 3px rgba(200, 181, 160, 0.08) !important;
    /* 内边距 */
    padding: 10px 14px !important;
    transition: all 0.2s ease;
}

/* 占位符文字 */
#ai-chat-input::placeholder {
    color: #a09182 !important;
    opacity: 0.7;
}

/* 输入框聚焦 */
#ai-chat-input:focus {
    border-color: #a09182 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04),
                0 0 0 5px rgba(160, 145, 130, 0.12) !important;
    outline: none;
}

/* 输入框容器透明化 */
#ai-chat-bottom-input {
    background: transparent !important;
    backdrop-filter: none !important;
}


/* 
 * =================================
 *   移动端适配
 * =================================
 */
@media (max-width: 768px) {
    .bg-gradient-to-t {
        padding: 10px 12px !important;
    }
    
    #ai-chat-input {
        padding: 8px 12px !important;
        border-radius: 8px !important;
    }
}

@media (max-width: 480px) {
    .bg-gradient-to-t {
        padding: 8px 10px !important;
    }
    
    #ai-chat-input {
        padding: 7px 10px !important;
        border-radius: 6px !important;
    }
}






/* 
 * =================================
 *   模块一：顶部栏 · 温暖卡片风格
 * =================================
 */

/* --- 顶部导航栏容器 --- */
.sticky.w-full.top-0.flex.items-center {
    /* 温暖米白背景，不透明 */
    background: #fdf8f3 !important;
    /* 禁用模糊与透明效果 */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* 精致底部边框 */
    border-bottom: 1.5px solid #c8b5a0 !important;
    /* 柔和阴影 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05),
                0 1px 3px rgba(0, 0, 0, 0.03) !important;
    /* 舒适内边距（可保留原值或微调） */
    padding: 8px 16px !important;
    /* 确保文字深色 */
    color: #2b2a27 !important;
    transition: all 0.2s ease;
}

/* --- 模型选择器按钮容器 --- */
#ai-model-selector .group.flex.items-center {
    /* 白色背景，不透明 */
    background: #ffffff !important;
    /* 精致实线边框 */
    border: 1.5px solid #c8b5a0 !important;
    border-radius: 8px !important;
    /* 内边距 */
    padding: 6px 14px !important;
    /* 柔和阴影 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    /* 平滑过渡 */
    transition: all 0.2s ease !important;
    /* 光标 */
    cursor: pointer;
}

/* 模型选择器悬停效果 */
#ai-model-selector .group.flex.items-center:hover {
    /* 暖灰背景加深 */
    background: #f0ede8 !important;
    /* 边框颜色微调 */
    border-color: #a09182 !important;
    /* 阴影增强 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-1px);
}

/* 模型选择器按下效果 */
#ai-model-selector .group.flex.items-center:active {
    background: #e8e2da !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transform: translateY(0);
}

/* --- 模型选择器文字 --- */
#ai-model-selector .truncate.text-\[13px\] {
    /* 深色文字，高可读性 */
    color: #2b2a27 !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}


/* 
 * =================================
 *   移动端适配
 * =================================
 */
@media (max-width: 768px) {
    .sticky.w-full.top-0.flex.items-center {
        padding: 6px 12px !important;
    }
    
    #ai-model-selector .group.flex.items-center {
        padding: 5px 12px !important;
        border-radius: 6px !important;
    }
}

@media (max-width: 480px) {
    .sticky.w-full.top-0.flex.items-center {
        padding: 4px 10px !important;
    }
    
    #ai-model-selector .group.flex.items-center {
        padding: 4px 10px !important;
        font-size: 0.8rem !important;
    }
}

/* =========================================
   折叠状态栏美化 · 温暖卡片风格
   适用：<details> 包裹的任意内容
   特点：圆角边框、鬼魂图标、表格自适应
   ========================================= */

/* --- 整体容器：圆角卡片框 --- */
details {
    background: #fdf8f3;          /* 温暖奶油背景 */
    border: 1.5px solid #c8b5a0;  /* 精致边框 */
    border-radius: 12px;          /* 圆角 */
    padding: 12px 16px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    color: #2b2a27;               /* 主文字颜色，深色 */
    font-size: 0.95em;            /* 舒适阅读字号 */
    line-height: 1.6;
}

/* 展开状态下加强阴影 */
details[open] {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* --- 标题栏：隐藏原生三角，使用👻图标 --- */
summary {
    list-style: none;            /* 隐藏默认三角 */
    cursor: pointer;
    font-weight: 600;
    color: #3e3a36;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

/* 针对Webkit内核浏览器额外隐藏 */
summary::-webkit-details-marker {
    display: none;
}

/* 使用伪元素放置鬼魂图标 */
summary::before {
    content: "👻";
    font-size: 1.1em;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* 展开时让图标微微旋转 */
details[open] > summary::before {
    transform: rotate(15deg);
}

/* --- 内容区域 --- */
details > *:not(summary) {
    margin-top: 8px;
}

/* -----------------------------------------
   Markdown 表格特殊美化
   确保黑白背景下均可读，自适应移动端
   ----------------------------------------- */

details table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.9em;
    color: #2b2a27;               /* 深色文字，白底清晰 */
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: block;               /* 允许横向滚动 */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    word-break: normal;
}

/* 表头 */
details table thead {
    background: #e8e2da;
    color: #2b2a27;
    font-weight: 600;
}

details table th {
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid #c8b5a0;
    background: #ede8e0;
}

/* 表格行 */
details table td {
    padding: 8px 12px;
    border-bottom: 1px solid #ddd8d2;
    background: #ffffff;
}

/* 偶数行斑马纹 */
details table tr:nth-child(even) td {
    background: #f8f6f4;
}

/* 悬停高亮 */
details table tr:hover td {
    background: #f0ede8;
}

/* 确保表格在黑色背景下的可读性（如果外部强制深色背景） */
@media (prefers-color-scheme: dark) {
    /* 当系统为暗色模式时，表格文字仍保持可读 */
    details table {
        color: #1e1e1e;           /* 强制深色文字 */
        background: #ffffff;
    }
    details table thead {
        background: #dcd4c8;
        color: #1e1e1e;
    }
    details table th {
        background: #d0c8bb;
        border-bottom-color: #a09182;
    }
    details table td {
        background: #ffffff;
    }
    details table tr:nth-child(even) td {
        background: #f4f1ed;
    }
    details table tr:hover td {
        background: #ede8e0;
    }
}

/* 也可通过类名强制深色适配，无侵入 */
.theme-dark details table,
.dark details table {
    color: #1e1e1e !important;
    background: #ffffff !important;
}
.theme-dark details table thead,
.dark details table thead {
    background: #dcd4c8 !important;
}
.theme-dark details table th,
.dark details table th {
    background: #d0c8bb !important;
    border-bottom-color: #a09182 !important;
}
.theme-dark details table td,
.dark details table td {
    background: #ffffff !important;
}
.theme-dark details table tr:nth-child(even) td,
.dark details table tr:nth-child(even) td {
    background: #f4f1ed !important;
}

/* -----------------------------------------
   响应式：移动端舒适体验
   ----------------------------------------- */
@media (max-width: 768px) {
    details {
        padding: 10px 12px;
        font-size: 0.9em;
        border-radius: 10px;
    }
    summary {
        font-size: 1em;
    }
    details table {
        font-size: 0.8em;
    }
    details table th,
    details table td {
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    details {
        padding: 8px 10px;
        font-size: 0.85em;
    }
    summary::before {
        font-size: 1em;
    }
}