/* 隐藏浅蓝色条 */
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: #f2e8d5 !important;
    border: 1px solid #b89a6b !important;
    border-radius: 8px 3px 8px 3px !important;   /* 左上/左下圆润，右上/右下微尖 */
    box-shadow: 
        0 2px 6px rgba(90, 60, 20, 0.2),          /* 外层自然投影 */
        inset 0 0 0 2px rgba(200, 169, 110, 0.15), /* 内层淡金边 */
        inset 0 0 12px rgba(100, 70, 20, 0.08) !important; /* 纤维暗纹 */
    padding: 16px !important;
    /* 不设置color，保留<p>和<details>原始颜色 */
}

/* 模块二：功能按钮 → 与气泡完全一致的质感 */
.flex.items-center.gap-2.pb-2 > button {
    background: #f2e8d5 !important;              /* 同色纸底 */
    color: #3a2a1a !important;                  /* 深棕文字 */
    border: 1px solid #b89a6b !important;       /* 同色细边 */
    border-radius: 8px 3px 8px 3px !important;  /* 同样叶片角 */
    box-shadow: 
        0 2px 6px rgba(90, 60, 20, 0.2),
        inset 0 0 0 2px rgba(200, 169, 110, 0.15),
        inset 0 0 10px rgba(100, 70, 20, 0.08) !important;
    font-weight: bold !important;
    text-transform: none !important;
    transition: all 0.15s ease !important;
    padding: 6px 18px !important;
}
.flex.items-center.gap-2.pb-2 > button:hover {
    background: #e8d7b8 !important;             /* 按下时稍深，但保持古朴 */
    color: #1a0f05 !important;
    transform: translateY(1px) !important;
    box-shadow: 
        0 1px 4px rgba(80, 40, 15, 0.2),
        inset 0 0 0 2px rgba(180, 140, 80, 0.2),
        inset 0 0 8px rgba(100, 70, 20, 0.1) !important;
}

/* 模块三：隐藏元素（保持原注释状态） */
/* .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: #f2e8d5 !important;              /* 统一纸色 */
    color: #2a1a0a !important;                  /* 深棕文字 */
    border: 1px solid #b89a6b !important;
    border-radius: 8px 3px 8px 3px !important;  /* 叶片尖角 */
    box-shadow: 
        0 2px 6px rgba(90, 60, 20, 0.2),
        inset 0 0 0 2px rgba(200, 169, 110, 0.15),
        inset 0 0 12px rgba(100, 70, 20, 0.08) !important;
    caret-color: #c8963e;
}

/* 输入框容器 → 浅色不透明 */
#ai-chat-bottom-input {
    background: #faf3e0 !important;  /* 与整体背景融合，非透明 */
    backdrop-filter: none !important;
    padding: 4px !important;
}


/* ============================================
   折叠状态栏美化 · 日式西幻古朴纸质风格
   (直角框 · 无三角图标 · 表格自适应)
   ============================================ */

details {
    border: 1px solid #b89a6b;
    background: #f2e8d5;
    box-shadow: 
        0 2px 6px rgba(90, 60, 20, 0.2),
        inset 0 0 0 2px rgba(200, 169, 110, 0.15);
    border-radius: 0;
    padding: 0;
    margin-bottom: 1em;
    overflow-x: auto;
    font-size: 0.95em;
}

details summary {
    display: block;
    padding: 10px 16px;
    background: #e8d7b8;
    cursor: pointer;
    font-weight: bold;
    color: #3a2a1a;
    border-bottom: 1px solid #b89a6b;
    border-radius: 0;
    list-style: none;
    user-select: none;
}

/* 移除默认三角图标（完全删除） */
details summary::-webkit-details-marker {
    display: none;
}
details summary::before {
    content: none !important;       /* 不再显示任何自定义图标 */
}

details > *:not(summary) {
    padding: 12px 16px;
    color: #3a2a1a;
}

/* 表格美化 */
details table {
    width: auto;
    max-width: 100%;
    margin: 8px 0;
    border-collapse: collapse;
    background: #fdf8ed;
    color: #2a1a0a;
    font-size: 0.9em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

details th,
details td {
    border: 1px solid #b89a6b;
    padding: 7px 12px;
    text-align: left;
    word-break: break-word;
}

details th {
    background: #e8d7b8;
    font-weight: bold;
    color: #1a0f05;
}

details tr:nth-child(even) {
    background: #f5ecd7;
}

@media (max-width: 600px) {
    details {
        font-size: 0.9em;
    }
    details table {
        font-size: 0.85em;
    }
    details th,
    details td {
        padding: 5px 8px;
    }
}


/* ========== 评分星星替换为 💎（完整显示、不影响点击） ========== */
.MuiRating-root .MuiRating-icon {
    position: relative;
    width: 28px !important;      /* 稍微加大容器，给胶囊更多空间 */
    height: 28px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0 !important;     /* 隐藏原有星星文字 */
}

.MuiRating-root .MuiRating-icon svg {
    display: none !important;    /* 隐藏原始星星图标 */
}

/* 使用伪元素绘制胶囊，pointer-events: none 保证点击穿透 */
.MuiRating-root .MuiRating-iconFilled::before,
.MuiRating-root .MuiRating-iconEmpty::before,
.MuiRating-root .MuiRating-iconHover::before {
    content: "💎";
    font-size: 24px;            /* 胶囊大小，比容器小一点点 */
    line-height: 1;
    display: block;
    pointer-events: none;       /* 关键：不阻挡点击 */
}

/* 未选中胶囊：低透明度+灰度 */
.MuiRating-root .MuiRating-iconEmpty {
    opacity: 0.3 !important;
    filter: grayscale(100%);
}

/* 选中胶囊：完全显示 */
.MuiRating-root .MuiRating-iconFilled {
    opacity: 1 !important;
    filter: none !important;
}

/* 悬停胶囊：稍微亮显 */
.MuiRating-root .MuiRating-iconHover {
    opacity: 0.85 !important;
}