/* 1. 全局正文与容器美化 */
.markdown-body {
    color: #5d4037 !important;
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
    line-height: 1.6 !important;
    /* 字体缩小一号 */
    font-size: 14px !important;
}

/* 分隔线美化 */
.markdown-body hr {
    height: 2px !important;
    background: linear-gradient(to right, #ff9a9e, #fad0c4, #ffd1ff) !important;
    border: none !important;
    border-radius: 2px !important;
    margin: 20px 0 !important;
}

/* 详情折叠框美化 (Details/Summary) */
.markdown-body details {
    border: 1.5px solid #ffcad4 !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    margin-bottom: 12px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s ease !important;
    font-size: 13.5px !important;
}

.markdown-body details[open] {
    border-color: #ff9a9e !important;
    background: #fffafb !important;
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.1) !important;
}

.markdown-body summary {
    font-weight: bold !important;
    color: #ff6b6b !important;
    cursor: pointer !important;
    outline: none !important;
    list-style: none !important;
}

.markdown-body summary::before {
    content: '💌 ';
}

/* 2. 代码块根容器 (S1, S2) */
.markdown-body pre {
    border-radius: 12px !important;
    border: 1.5px solid #ffcad4 !important;
    overflow: hidden !important;
    box-shadow: 0 6px 15px rgba(255, 182, 193, 0.12) !important;
    background: #ffffff !important;
    margin: 10px 0 !important;
}

/* 3. 头部栏美化 (S3, S4) */
.markdown-body pre > div > div.flex.justify-between.h-8 {
    background: linear-gradient(90deg, #ff9a9e 0%, #fecfef 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    height: 32px !important; /* 略微收窄 */
}

/* 语言标签 (S4) */
.markdown-body pre > div > div.flex.justify-between > div.text-\[13px\] {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    font-size: 11px !important; /* 标签也相应缩小 */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1) !important;
}

/* 4. 复制按钮联动 (R3, S7, S8) */
.markdown-body pre div[data-tooltip-id^="copy-tooltip"] {
    background: rgba(255, 255, 255, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 6px !important;
    transition: all 0.2s !important;
}

.markdown-body pre div[data-tooltip-id^="copy-tooltip"]:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

/* 5. 代码内容区 (R4, S9, S10) */
.markdown-body pre > div > div[node] {
    background: #fffafa !important; 
    padding: 1.2em !important;
    font-family: 'Consolas', 'Monaco', monospace !important;
}

.markdown-body pre code {
    color: #e91e63 !important; 
    /* 代码字体缩小一号 */
    font-size: 12.5px !important;
    line-height: 1.5 !important;
}

/* 针对特定内容的语法高亮色彩 (S11) */
.markdown-body pre code span {
    color: #ff8c00 !important; 
}

/* 6. 无语言标识代码块 (TYPE_B, S12) */
.markdown-body pre > code[node] {
    background: #fff3e0 !important; 
    color: #e65100 !important;
    border-left: 4px solid #ff9800 !important;
    padding: 12px !important;
    display: block !important;
    font-size: 12.5px !important;
}

/* 7. 文本高亮与交互 */
::selection {
    background: #ffc1cc !important;
    color: #fff !important;
}