/* 
 * ==========================================
 * 【碧落云光·太虚仙阁】极致美化 + 高透背景版
 * 聊天气泡透明度大幅提升，背景清晰可见
 * ==========================================
 */

/* ========== 全局重置 ========== */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* ==========================================
 * 第一篇章：正文雅韵 (文章内容主体)
 * ========================================== */

/* --- 聊天气泡：高透云阁 (透明度降至0.55~0.6) --- */
.bg-gray-100\/90.relative.inline-block {
    background: 
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0) 0px,
            rgba(255, 255, 255, 0) 8px,
            rgba(200, 220, 245, 0.06) 8px,
            rgba(200, 220, 245, 0.06) 10px
        ),
        linear-gradient(
            165deg, 
            rgba(245, 248, 255, 0.58) 0%, 
            rgba(235, 242, 255, 0.55) 25%, 
            rgba(225, 236, 252, 0.60) 50%, 
            rgba(238, 245, 255, 0.57) 75%, 
            rgba(248, 250, 255, 0.62) 100%
        ) !important;
    border: 1.5px solid rgba(160, 200, 240, 0.55) !important;
    border-radius: 12px !important;
    box-shadow: 
        0 8px 32px rgba(140, 180, 220, 0.15),
        0 2px 6px rgba(160, 200, 240, 0.12),
        inset 0 0 60px rgba(210, 230, 250, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(180, 210, 240, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    position: relative;
    overflow: hidden;
}

/* 气泡顶部流光条 */
.bg-gray-100\/90.relative.inline-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(190, 225, 255, 0.6) 15%, 
        rgba(230, 245, 255, 0.8) 50%, 
        rgba(190, 225, 255, 0.6) 85%, 
        transparent 100%
    );
    border-radius: 50%;
    filter: blur(1px);
    z-index: 2;
    pointer-events: none;
}

/* 气泡底部微光 */
.bg-gray-100\/90.relative.inline-block::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(160, 200, 230, 0.2) 30%, 
        rgba(160, 200, 230, 0.08) 70%, 
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* --- 基础文本 --- */
.markdown-body {
    color: #2a3b50;
    font-weight: 500;
    font-family: "PingFang SC", "Microsoft YaHei", "STKaiti", "KaiTi", serif;
    line-height: 1.9;
    text-shadow: 0 0 1px rgba(200, 225, 250, 0.4);
}

/* --- 属性标签 (strong) --- */
.markdown-body strong {
    color: #3c6080;
    background: linear-gradient(180deg, #6a9fc0 0%, #3c6080 60%, #4a7a9a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-shadow: 0 2px 4px rgba(120, 180, 220, 0.4), 0 0 8px rgba(180, 210, 240, 0.5);
    transition: all 0.2s ease;
}
.markdown-body strong:hover {
    text-shadow: 0 0 12px rgba(140, 200, 240, 0.8), 0 0 20px rgba(180, 220, 255, 0.6);
}

/* --- 表格 --- */
.markdown-body table {
    border: 1.5px solid rgba(160, 200, 230, 0.5);
    box-shadow: 0 0 28px rgba(140, 185, 220, 0.2), inset 0 0 30px rgba(200, 225, 250, 0.15);
    background: rgba(245, 249, 255, 0.65);
    border-radius: 10px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.markdown-body th {
    background: linear-gradient(180deg, rgba(220, 235, 250, 0.8) 0%, rgba(200, 220, 245, 0.7) 100%);
    color: #1c3a52;
    border-bottom: 2px solid rgba(140, 190, 220, 0.7);
    text-shadow: 0 0 8px rgba(180, 210, 240, 0.7);
    text-align: center;
    font-weight: 700;
    letter-spacing: 2.5px;
    padding: 14px 10px;
    position: relative;
}
.markdown-body th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    filter: blur(1px);
}

.markdown-body td {
    border-bottom: 1px dashed rgba(170, 205, 230, 0.25);
    color: #3d5568;
    text-align: center;
    padding: 12px 8px;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.15);
}
.markdown-body tr:nth-child(even) td {
    background: rgba(230, 240, 250, 0.15);
}
.markdown-body tr:hover td {
    background: rgba(200, 225, 245, 0.4);
    color: #1c3a52;
    text-shadow: 0 0 5px rgba(160, 200, 230, 0.5);
}

/* --- 无序列表 --- */
.markdown-body ul {
    list-style: none;
    padding-left: 1.5em;
}
.markdown-body ul li {
    position: relative;
    margin-bottom: 6px;
}
.markdown-body ul li::before {
    content: "◇";
    position: absolute;
    left: -1.3em;
    color: rgba(140, 190, 225, 0.8);
    font-size: 1em;
    text-shadow: 0 0 6px rgba(160, 200, 230, 0.8);
    transition: transform 0.2s ease;
}
.markdown-body ul li:hover::before {
    transform: scale(1.3);
    color: rgba(100, 160, 210, 1);
}

/* --- 分割线 --- */
.markdown-body hr {
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(170, 205, 235, 0.3) 15%,
        rgba(200, 225, 245, 0.8) 50%, 
        rgba(170, 205, 235, 0.3) 85%,
        transparent 100%);
    border: none;
    box-shadow: 0 0 12px rgba(170, 205, 235, 0.7), 0 0 30px rgba(160, 200, 230, 0.4);
    margin: 30px 0;
    position: relative;
}
.markdown-body hr::before {
    content: "❄";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(245, 248, 255, 0.7);
    padding: 0 12px;
    color: rgba(140, 190, 220, 0.9);
    font-size: 14px;
    text-shadow: 0 0 8px rgba(180, 210, 240, 0.8);
}

/* --- 引用块 --- */
.markdown-body blockquote {
    border-left: 4px solid rgba(160, 200, 230, 0.6);
    background: linear-gradient(90deg, rgba(235, 245, 255, 0.5) 0%, rgba(245, 250, 255, 0.3) 100%);
    color: #405a72;
    padding: 14px 22px;
    margin: 18px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    box-shadow: 0 0 15px rgba(160, 200, 230, 0.1);
}

/* --- 代码块 --- */
.markdown-body code {
    background: rgba(225, 240, 252, 0.5);
    color: #2c5070;
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px solid rgba(170, 200, 225, 0.35);
    font-family: "SF Mono", "Consolas", monospace;
    box-shadow: inset 0 1px 3px rgba(160, 200, 230, 0.15);
}
.markdown-body pre {
    background: rgba(240, 246, 255, 0.7);
    border: 1.5px solid rgba(160, 200, 230, 0.5);
    border-radius: 10px;
    box-shadow: inset 0 0 25px rgba(200, 225, 250, 0.3), 0 4px 15px rgba(140, 180, 215, 0.15);
}

/* --- 链接 --- */
.markdown-body a {
    color: #4a8ab5;
    text-decoration: none;
    border-bottom: 1px dashed rgba(140, 190, 225, 0.5);
    transition: all 0.25s ease;
}
.markdown-body a:hover {
    color: #205072;
    border-bottom: 1px solid rgba(120, 175, 215, 0.8);
    text-shadow: 0 0 10px rgba(160, 200, 230, 0.8);
}

/* --- 图片 --- */
.markdown-body img {
    border-radius: 12px;
    border: 2px solid rgba(170, 205, 230, 0.5);
    box-shadow: 0 6px 25px rgba(140, 180, 215, 0.2), 0 0 0 4px rgba(210, 230, 250, 0.25);
    transition: all 0.35s ease;
}
.markdown-body img:hover {
    box-shadow: 0 10px 35px rgba(150, 195, 230, 0.35), 0 0 0 6px rgba(200, 225, 250, 0.4);
    transform: scale(1.01);
}

/* ==========================================
 * 第二篇章：状态栏 (details 卷宗面板)
 * ========================================== */

.markdown-body details {
    background: linear-gradient(
        180deg, 
        rgba(248, 251, 255, 0.7) 0%, 
        rgba(238, 245, 255, 0.65) 30%,
        rgba(230, 240, 252, 0.72) 60%,
        rgba(240, 246, 255, 0.78) 100%);
    border: 1.5px solid rgba(170, 205, 235, 0.55);
    border-radius: 12px;
    margin: 22px 0;
    padding: 0 0 16px 0;
    overflow: visible;
    position: relative;
    box-shadow: 
        0 4px 20px rgba(140, 180, 215, 0.12),
        inset 0 0 40px rgba(200, 225, 250, 0.2);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.markdown-body details:hover {
    box-shadow: 
        0 8px 30px rgba(140, 185, 225, 0.2),
        inset 0 0 50px rgba(200, 225, 250, 0.28);
    border-color: rgba(150, 200, 240, 0.8);
    transform: translateY(-2px);
}

/* 面板角落冰晶 */
.markdown-body details::before {
    content: "❄";
    position: absolute;
    top: -8px;
    left: -8px;
    font-size: 20px;
    color: rgba(160, 200, 230, 0.6);
    text-shadow: 0 0 10px rgba(180, 210, 240, 0.7);
    z-index: 1;
    pointer-events: none;
    transform: rotate(-15deg);
    transition: all 0.3s ease;
}
.markdown-body details::after {
    content: "❄";
    position: absolute;
    bottom: -8px;
    right: -8px;
    font-size: 20px;
    color: rgba(160, 200, 230, 0.6);
    text-shadow: 0 0 10px rgba(180, 210, 240, 0.7);
    z-index: 1;
    pointer-events: none;
    transform: rotate(15deg);
    transition: all 0.3s ease;
}
.markdown-body details:hover::before {
    color: rgba(100, 160, 220, 0.85);
    text-shadow: 0 0 15px rgba(140, 200, 240, 1);
    transform: rotate(-20deg) scale(1.2);
}
.markdown-body details:hover::after {
    color: rgba(100, 160, 220, 0.85);
    text-shadow: 0 0 15px rgba(140, 200, 240, 1);
    transform: rotate(20deg) scale(1.2);
}

/* 五行灵光阵 */
.markdown-body details:nth-of-type(1) { 
    border-color: rgba(200, 190, 170, 0.6);
    box-shadow: 0 0 22px rgba(210, 200, 180, 0.15), inset 0 0 30px rgba(220, 210, 190, 0.2); 
}
.markdown-body details:nth-of-type(2) { 
    border-color: rgba(140, 200, 235, 0.6);
    box-shadow: 0 0 22px rgba(150, 205, 230, 0.15), inset 0 0 30px rgba(170, 215, 240, 0.2); 
}
.markdown-body details:nth-of-type(3) { 
    border-color: rgba(175, 155, 210, 0.6);
    box-shadow: 0 0 22px rgba(175, 160, 210, 0.15), inset 0 0 30px rgba(185, 170, 220, 0.2); 
}
.markdown-body details:nth-of-type(4) { 
    border-color: rgba(220, 170, 160, 0.6);
    box-shadow: 0 0 22px rgba(220, 175, 165, 0.15), inset 0 0 30px rgba(225, 185, 175, 0.2); 
}
.markdown-body details:nth-of-type(5) { 
    border-color: rgba(130, 195, 175, 0.6);
    box-shadow: 0 0 22px rgba(135, 195, 175, 0.15), inset 0 0 30px rgba(150, 205, 185, 0.2); 
}

/* ==========================================
 * 第三篇章：状态栏标题 (summary)
 * ========================================== */

.markdown-body summary {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(180, 210, 240, 0.25) 15%,
        rgba(200, 225, 248, 0.45) 50%, 
        rgba(180, 210, 240, 0.25) 85%,
        transparent 100%);
    color: #305575;
    text-align: center;
    font-size: 1.2em;
    font-weight: 800;
    padding: 16px 0;
    letter-spacing: 6px;
    text-shadow: 0 0 12px rgba(180, 210, 240, 0.6), 0 1px 2px rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid rgba(160, 200, 230, 0.5);
    list-style: none;
    cursor: pointer;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

/* 标题流光 */
.markdown-body summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    transition: left 0.6s ease;
    z-index: 0;
}
.markdown-body summary:hover::before {
    left: 100%;
}

.markdown-body summary:hover {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(190, 215, 242, 0.35) 15%,
        rgba(210, 232, 250, 0.55) 50%, 
        rgba(190, 215, 242, 0.35) 85%,
        transparent 100%);
    color: #1c3a52;
    text-shadow: 0 0 20px rgba(180, 215, 245, 0.9), 0 2px 4px rgba(255, 255, 255, 0.7);
    letter-spacing: 7px;
}

.markdown-body summary::-webkit-details-marker { display: none; }
.markdown-body summary {
    display: flex;
    align-items: center;
    justify-content: center;
}
.markdown-body summary::after {
    content: "";
    margin-left: 14px;
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2379a9c7'%3E%3Cpath d='M12 2L15 9H22L16 14L18 21L12 17L6 21L8 14L2 9H9L12 2Z'/%3E%3C/svg%3E") center/cover no-repeat;
    filter: drop-shadow(0 0 4px rgba(140, 190, 220, 0.8));
    transition: transform 0.3s ease;
}
.markdown-body details[open] summary::after {
    transform: rotate(180deg);
}

.markdown-body details[open] summary {
    animation: cloudPart 0.6s ease-out;
}
@keyframes cloudPart {
    0% { letter-spacing: 10px; opacity: 0.6; text-shadow: 0 0 30px rgba(180, 210, 240, 1); }
    100% { letter-spacing: 6px; opacity: 1; text-shadow: 0 0 12px rgba(180, 210, 240, 0.6); }
}

/* ==========================================
 * 第四篇章：全局点缀
 * ========================================== */

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #5b8cae !important;
    font-weight: 600;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #3c6080 !important;
    text-shadow: 0 0 10px rgba(140, 190, 230, 0.8);
}

::selection {
    background: rgba(180, 210, 240, 0.4);
    color: #1c3a52;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { 
    background: rgba(235, 242, 252, 0.4); 
    border-radius: 4px;
    box-shadow: inset 0 0 6px rgba(160, 200, 230, 0.15);
}
::-webkit-scrollbar-thumb { 
    background: linear-gradient(180deg, rgba(160, 200, 230, 0.6), rgba(120, 170, 210, 0.7));
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(140, 190, 220, 0.4);
}
::-webkit-scrollbar-thumb:hover { 
    background: linear-gradient(180deg, rgba(130, 180, 215, 0.8), rgba(90, 150, 200, 0.8));
}

/* ==========================================
 * 第五篇章：暗色模式 (高透同步)
 * ========================================== */

@media (prefers-color-scheme: dark) {
    .bg-gray-100\/90.relative.inline-block {
        background: 
            repeating-linear-gradient(
                45deg,
                rgba(255, 255, 255, 0) 0px,
                rgba(255, 255, 255, 0) 8px,
                rgba(100, 150, 200, 0.06) 8px,
                rgba(100, 150, 200, 0.06) 10px
            ),
            linear-gradient(
                165deg, 
                rgba(15, 25, 40, 0.55) 0%, 
                rgba(20, 32, 50, 0.52) 25%, 
                rgba(12, 22, 38, 0.58) 50%, 
                rgba(18, 30, 48, 0.55) 75%, 
                rgba(15, 25, 40, 0.60) 100%
            ) !important;
        border-color: rgba(100, 150, 200, 0.5);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.35),
            inset 0 0 60px rgba(70, 110, 160, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
    
    .markdown-body {
        color: #c8d8e8;
    }
    
    .markdown-body strong {
        background: linear-gradient(180deg, #b0d0e8 0%, #80a8c8 60%, #90b8d0 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .markdown-body details {
        background: linear-gradient(
            180deg, 
            rgba(15, 25, 40, 0.65) 0%, 
            rgba(18, 28, 45, 0.60) 30%,
            rgba(12, 22, 38, 0.68) 60%,
            rgba(16, 26, 42, 0.72) 100%);
        border-color: rgba(100, 150, 200, 0.45);
    }
    
    .markdown-body summary {
        color: #b0d0e8;
    }
    
    .markdown-body td {
        color: #b8c8d8;
    }
    
    .markdown-body table {
        background: rgba(15, 25, 40, 0.65);
    }
    
    .markdown-body th {
        background: linear-gradient(180deg, rgba(30, 50, 70, 0.8) 0%, rgba(25, 42, 60, 0.7) 100%);
        color: #c8dff0;
    }
    
    .markdown-body hr::before {
        background: rgba(20, 30, 45, 0.7);
        color: rgba(140, 190, 220, 0.9);
    }
    
    ::-webkit-scrollbar-track {
        background: rgba(20, 35, 55, 0.4);
    }
    ::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, rgba(100, 150, 200, 0.45), rgba(80, 130, 180, 0.5));
    }
    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, rgba(120, 170, 215, 0.6), rgba(90, 140, 190, 0.6));
    }
}