/* --- 核心修复：强制亮色模式 & 移动端重置 --- */
:root {
    color-scheme: light !important;
}
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}
*:focus, *:active {
    outline: none !important;
    box-shadow: none !important;
}

/* --- 整体风格：云朵蓝莓 (Cloudy Blueberry) --- */

/* 1. 主容器：清新的蓝白渐变 */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(180deg, #E0F7FA 0%, #E6E6FA 100%) !important;
    border: 3px solid #B0E0E6 !important;
    border-radius: 20px !important;
    padding: 20px !important;
    margin: 10px auto !important;
    box-shadow: 0 8px 20px rgba(176, 224, 230, 0.5) !important;
}

/* 2. 文本区域：纯净白色 */
.markdown-body {
    background-color: #FFFFFF !important;
    color: #5F6368 !important;
    border-radius: 15px !important;
    padding: 15px !important;
    font-family: 'Nunito', 'Segoe UI', sans-serif !important;
    line-height: 1.7 !important;
    border: 1px solid #F0F8FF !important;
}

/* 3. 标题：天空蓝 */
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: #6495ED !important;
    border-bottom: 2px dashed #B0E0E6 !important;
    padding-bottom: 5px !important;
    margin-top: 1.2em !important;
}

/* --- 核心优化：状态栏 (Details) - 晨曦微光风格 --- */
details {
    /* 背景：极淡的云雾渐变，通透感 */
    background: linear-gradient(135deg, #F0F8FF 0%, #FFFFFF 100%) !important;
    /* 边框：天空蓝虚线，精致且不沉重 */
    border: 2px dashed #87CEEB !important;
    color: #5F6368 !important; /* 深灰字，保证阅读舒适 */
    border-radius: 16px !important; /* 更圆润的胶囊角 */
    margin: 15px 0 !important;
    padding: 12px 18px !important;
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.2) !important; /* 淡淡的蓝色光晕 */
    transition: all 0.3s ease !important;
}

/* 展开时的交互微调 */
details[open] {
    border-color: #6495ED !important; /* 展开后边框变深一点 */
    background: #F0F8FF !important;
}

/* 状态栏标题 (Summary) */
summary {
    color: #4682B4 !important; /* 钢蓝标题，优雅清晰 */
    font-weight: 700 !important;
    font-size: 1.05em !important;
    cursor: pointer !important;
    outline: none !important;
    list-style: none !important;
    padding: 5px 0 !important;
    letter-spacing: 0.5px !important;
}

summary::-webkit-details-marker {
    display: none !important;
}

/* 自定义图标：闪烁的星星 */
summary::before {
    content: '✨ ' !important;
    margin-right: 8px !important;
    filter: drop-shadow(0 0 2px gold) !important;
}
details[open] summary::before {
    content: '💫 ' !important;
}

/* 状态栏内的链接颜色适配（背景变亮，链接要深色） */
details a {
    color: #1E90FF !important; /* 闪避蓝 */
    text-decoration: none !important;
    border-bottom: 1px dotted #1E90FF !important;
}

/* 状态栏内的代码块适配 */
details code, details pre {
    background-color: #E6F2FF !important; /* 极淡蓝底 */
    color: #4682B4 !important; /* 钢蓝字 */
    border: 1px solid #D1E9FF !important;
}

/* --- 普通代码块 (非状态栏内) --- */
.markdown-body pre, .markdown-body code {
    background-color: #F0F8FF !important;
    color: #4682B4 !important;
    border-radius: 8px !important;
    font-family: Consolas, monospace !important;
    padding: 5px !important;
    border: 1px solid #B0C4DE !important;
    
    /* 手机端防黑边 */
    outline: none !important;
    box-shadow: none !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
}

/* --- 其他元素美化 --- */

/* 链接 */
.markdown-body a {
    color: #1E90FF !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

/* 列表 */
.markdown-body ul li::before {
    content: '☁️ ' !important;
    margin-right: 5px !important;
}
.markdown-body ul {
    list-style: none !important;
    padding-left: 10px !important;
}

/* 按钮 */
.MuiButtonBase-root.MuiButton-root {
    background-color: #87CEEB !important;
    color: #FFFFFF !important;
    border-radius: 20px !important;
    font-weight: bold !important;
    box-shadow: 0 4px 6px rgba(135, 206, 235, 0.3) !important; /* 增加一点立体感 */
    border: none !important;
}
.MuiButtonBase-root.MuiButton-root:hover {
    background-color: #00BFFF !important;
    transform: translateY(-1px) !important; /* 悬停微动 */
}

/* 输入框 */
textarea, input[type="text"] {
    background: #FFFFFF !important; /* 纯白背景更干净 */
    border: 2px solid #E6E6FA !important;
    border-radius: 12px !important;
    color: #483D8B !important;
    padding: 12px !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    -webkit-appearance: none !important;
}
textarea:focus, input[type="text"]:focus {
    border-color: #87CEEB !important;
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.2) !important;
}

/* 隐藏顶部颜色条 */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* === 强制清除移动端所有默认黑边/黑底 === */

input, textarea, select, button, pre, code {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

input, textarea, button, pre, code {
    background-color: #FFFFFF !important;
    background: #FFFFFF !important;
}

pre, code {
    color: #4682B4 !important;
    background-color: #F0F8FF !important;
    -webkit-text-fill-color: #4682B4 !important;
    -webkit-background-clip: padding-box !important;
}

:root {
    color-scheme: light !important;
}

button, [role="button"] {
    -webkit-tap-highlight-color: transparent !important;
    background-color: #87CEEB !important;
}

/* === 强制清除移动端代码块黑底 === */
pre,
code,
pre[class*="language-"],
code[class*="language-"],
.language-python,
.language-time,
.hljs {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: #F0F8FF !important;
    color: #4682B4 !important;
    -webkit-text-fill-color: #4682B4 !important;
    -webkit-background-clip: padding-box !important;
    background-clip: padding-box !important;
    background: #F0F8FF !important;
    border: 1px solid #B0C4DE !important;
    outline: none !important;
    box-shadow: none !important;
}

div > pre,
.markdown-body > pre,
.markdown-body pre {
    background-color: #F0F8FF !important;
    background: #F0F8FF !important;
}