/* =========================================
   日漫波普风 UI (Comic & Pop Art Style) - 字体优化版
   ========================================= */

/* 1. 基础容器与漫画网点背景 */
#customized-answer-content {
    background-color: #FFEB3B !important; /* 高饱和亮黄 */
    /* 漫画半调网点效果 */
    background-image: 
        radial-gradient(rgba(0,0,0,0.08) 15%, transparent 15%), 
        radial-gradient(rgba(0,0,0,0.08) 15%, transparent 15%) !important;
    background-size: 16px 16px !important;
    background-position: 0 0, 8px 8px !important;
    border: 4px solid #000 !important;
    border-radius: 0 !important; /* 强制直角 */
    box-shadow: 8px 8px 0 #000 !important; /* 漫画硬阴影 */
    padding: 24px !important;
    /* 【优化】使用清晰的无衬线黑体，去除 Impact */
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif !important;
}

/* 隐藏原本的细线装饰 */
#customized-answer-content > .absolute.top-0 {
    display: none !important;
}

/* 2. 正文段落与基础文字 */
.markdown-body {
    color: #000 !important;
}

.markdown-body p {
    background: #FFF !important;
    border: 3px solid #000 !important;
    border-radius: 0 !important;
    padding: 14px 18px !important;
    margin: 16px 0 !important;
    box-shadow: 4px 4px 0 #000 !important;
    /* 【优化】字重改为中等，提升中文字符清晰度 */
    font-weight: 500 !important; 
    font-size: 15px !important;
    line-height: 1.7 !important; /* 【优化】增加行高，让阅读更舒适 */
    position: relative !important;
}

/* 3. 折叠面板 (Details & Summary) - 高饱和度色彩分区 */
.markdown-body details {
    background: #FFF !important;
    border: 3px solid #000 !important;
    border-radius: 0 !important;
    margin: 20px 0 !important;
    box-shadow: 6px 6px 0 #000 !important;
    transition: transform 0.15s, box-shadow 0.15s !important;
}

.markdown-body details:hover {
    transform: translate(-3px, -3px) !important;
    box-shadow: 9px 9px 0 #000 !important;
}

.markdown-body details summary {
    padding: 14px 18px !important;
    /* 【优化】标题保留标准粗体 */
    font-weight: bold !important; 
    font-size: 16px !important;
    border-bottom: 3px solid #000 !important;
    cursor: pointer !important;
    list-style: none !important;
    position: relative !important;
    overflow: hidden !important;
    letter-spacing: 0.5px !important;
}

/* 隐藏默认箭头并自定义漫画风箭头 */
.markdown-body details summary::-webkit-details-marker {
    display: none !important;
}
.markdown-body details summary::after {
    content: '▼' !important;
    position: absolute !important;
    right: 18px !important;
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}
.markdown-body details[open] summary::after {
    transform: rotate(180deg) !important;
}

/* 为 Summary 添加反光扫过动画 */
.markdown-body details summary::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 50% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent) !important;
    transform: skewX(-25deg) !important;
    transition: left 0.5s ease-in-out !important;
}
.markdown-body details:hover summary::before {
    left: 200% !important;
}

/* --- 各个面板的专属色彩 --- */
.markdown-body > details:nth-of-type(1) summary { background: #D500F9 !important; color: #FFF !important; text-shadow: 2px 2px 0 #000 !important; }
.markdown-body > details:nth-of-type(2) summary { background: #00E5FF !important; color: #000 !important; text-shadow: 2px 2px 0 #FFF !important; }
.markdown-body > details:nth-of-type(3) summary { background: #00E676 !important; color: #000 !important; text-shadow: 2px 2px 0 #FFF !important; }
.markdown-body > details:nth-of-type(4) summary { background: #FF1744 !important; color: #FFF !important; text-shadow: 2px 2px 0 #000 !important; }
.markdown-body > details:nth-of-type(5) > summary { background: #FF6D00 !important; color: #FFF !important; text-shadow: 2px 2px 0 #000 !important; }
.markdown-body > details:nth-of-type(6) summary { background: #F50057 !important; color: #FFF !important; text-shadow: 2px 2px 0 #000 !important; }

/* 4. 嵌套记忆区面板 */
.markdown-body details details {
    margin: 12px !important;
    box-shadow: 4px 4px 0 #000 !important;
}
.markdown-body details details summary {
    background: #FFFF00 !important; 
    color: #000 !important;
    font-size: 14px !important;
    text-shadow: none !important;
    border-bottom: 3px solid #000 !important;
}

/* 5. 预格式化文本与代码块 (属性栏) */
.markdown-body pre {
    background: transparent !important;
    border: none !important;
    margin: 16px !important;
    padding: 0 !important;
}
/* 工具栏 */
.markdown-body pre > div > div:first-child {
    background: #000 !important;
    border: 3px solid #000 !important;
    border-bottom: none !important;
}
.markdown-body pre .text-\[13px\] {
    color: #00E5FF !important; 
    font-weight: bold !important;
    letter-spacing: 1px !important;
}
/* 内容区 */
.markdown-body pre > div > div:last-child {
    background: #FFF !important;
    border: 3px solid #000 !important;
    background-image: repeating-linear-gradient(45deg, #F8F9FA, #F8F9FA 10px, #FFF 10px, #FFF 20px) !important;
}
.markdown-body pre code {
    color: #000 !important;
    font-family: 'Consolas', 'Courier New', monospace !important;
    /* 【优化】代码块字体粗细调整为正常，防止属性文字粘连 */
    font-weight: 500 !important; 
    line-height: 1.6 !important;
}
.markdown-body span[style*="color: rgb(145, 139, 59)"] {
    color: #FF1744 !important; 
}

/* 6. 表格样式 */
.markdown-body table {
    width: calc(100% - 24px) !important;
    margin: 12px !important;
    border-collapse: collapse !important;
    border: 3px solid #000 !important;
    box-shadow: 4px 4px 0 #000 !important;
}
.markdown-body th {
    background: #00E5FF !important;
    color: #000 !important;
    border: 3px solid #000 !important;
    padding: 10px !important;
    font-weight: bold !important;
}
.markdown-body td {
    background: #FFF !important;
    border: 3px solid #000 !important;
    padding: 10px !important;
    /* 【优化】表格内容字重调整为正常 */
    font-weight: normal !important; 
}

/* 7. 思维链自定义标签处理 */
chain {
    display: block !important;
    background: #F3E5F5 !important;
    border: 3px dashed #D500F9 !important;
    padding: 16px !important;
    margin: 16px !important;
    color: #000 !important;
    /* 【优化】 */
    font-weight: 500 !important; 
}

/* 8. 底部元信息与操作按钮 */
/* 时间标签 */
.text-xs.text-text-secondary.mt-1 {
    display: inline-block !important;
    background: #000 !important;
    color: #FFF !important;
    padding: 6px 12px !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
    border: 3px solid #000 !important;
    box-shadow: 3px 3px 0 #FF1744 !important;
    margin-top: 24px !important;
    border-radius: 0 !important;
}

/* 积分消耗面板 */
.MuiStack-root.text-purple-500 {
    background: #FFF !important;
    border: 3px solid #000 !important;
    border-radius: 0 !important;
    padding: 16px !important;
    box-shadow: 5px 5px 0 #000 !important;
    margin-top: 16px !important;
    background-image: repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(0,0,0,0.03) 10px, rgba(0,0,0,0.03) 20px) !important;
}
.MuiStack-root.text-purple-500 p {
    font-weight: bold !important;
    margin: 4px 0 !important;
}
.MuiStack-root.text-purple-500 p:first-child {
    color: #D500F9 !important;
    font-size: 16px !important;
    border-bottom: 3px dashed #000 !important;
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
}
.MuiStack-root.text-purple-500 p.text-orange-500 {
    color: #FF6D00 !important;
}

/* 操作按钮组 */
.MuiStack-root.css-1ajg1ui {
    margin-top: 20px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}
.MuiStack-root.css-1ajg1ui button {
    background: #FFFF00 !important; 
    color: #000 !important;
    border: 3px solid #000 !important;
    border-radius: 0 !important; 
    font-weight: bold !important; /* 【优化】按钮恢复常规粗体 */
    font-family: inherit !important;
    padding: 8px 16px !important;
    box-shadow: 4px 4px 0 #000 !important;
    text-transform: none !important;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.MuiStack-root.css-1ajg1ui button:hover {
    background: #00E5FF !important; 
    transform: translate(-2px, -2px) !important;
    box-shadow: 6px 6px 0 #000 !important;
}
.MuiStack-root.css-1ajg1ui button:active {
    transform: translate(2px, 2px) !important;
    box-shadow: 2px 2px 0 #000 !important;
}
.MuiStack-root.css-1ajg1ui button svg {
    color: #000 !important;
}