/* --- 恋爱风格 - 樱花之梦 (Sakura Dream) v2.0 --- */
/* (已内置暗夜模式 "夜樱星梦" 自动切换) */

/* --- 1. 基础亮色模式 (默认) --- */

/* 1.1 移除顶部的默认颜色装饰条 */
[class*="bg-[#F1CBCB]"],
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 1.2 聊天框主体样式：温柔粉色梦境 */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4e1 100%) !important;
    border: 1px solid #ffb6c1 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.25), inset 0 0 10px rgba(255, 255, 255, 0.7) !important;
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* 1.3 主要文本内容样式：深玫瑰色 */
.markdown-body {
    color: #5c374c !important;
    font-family: 'Baskerville', 'Georgia', 'Times New Roman', serif !important;
    line-height: 1.75 !important;
    z-index: 1 !important;
    background: transparent !important;
    transition: color 0.5s ease;
}

/* 1.4 模板元素优化 */
.markdown-body h3 {
    color: #d95383 !important;
    font-weight: bold !important;
    border-bottom: 1px dashed #f4abc4 !important;
    padding-bottom: 8px !important;
    margin-top: 20px !important;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9) !important;
    transition: color 0.5s ease, border-color 0.5s ease;
}

.markdown-body hr {
    border: 0 !important;
    height: 15px !important;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="15"><path d="M0 7.5 H40 L45 12.5 L50 7.5 L55 2.5 L60 7.5 H100" fill="none" stroke="%23ffc0cb" stroke-width="1.5"/></svg>') center repeat-x !important;
    background-size: 100px 15px;
    margin: 24px 0 !important;
    opacity: 0.8 !important;
    transition: background 0.5s ease;
}

.markdown-body details {
    background: rgba(255, 228, 225, 0.7) !important;
    border: 1px solid #ffdde1 !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    margin-bottom: 12px !important;
    transition: background 0.5s ease, border-color 0.5s ease;
}

.markdown-body summary {
    color: #c71585 !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    transition: color 0.3s ease;
}
.markdown-body summary:hover {
    color: #db7093 !important;
}
.markdown-body summary::before {
    content: '♡';
    color: #ff69b4;
    font-size: 1.3em;
    margin-right: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}
.markdown-body details[open] > summary::before {
    content: '♥';
    color: #ff1493;
    transform: scale(1.1);
}

.markdown-body strong {
    color: #c71585 !important;
    font-weight: bold !important;
    transition: color 0.5s ease;
}

/* 1.5 底部按钮 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #a37b8b !important;
    transition: color 0.3s ease !important;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #d95383 !important;
    background: rgba(255, 182, 193, 0.2) !important;
}

/* --- 2. 暗夜模式 (Dark Mode) - "夜樱星梦" --- */
/* 当系统开启暗色模式时，以下样式将自动生效 */

@media (prefers-color-scheme: dark) {
    /* 2.1 聊天框主体：深邃星夜紫 */
    .bg-gray-100\/90.relative.inline-block {
        background: linear-gradient(135deg, #2c1e28 0%, #4a2c3a 100%) !important;
        border: 1px solid #7a4b63 !important;
        box-shadow: 0 0 25px rgba(255, 105, 180, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.6) !important;
    }

    /* 2.2 主要文本内容：明亮的星辰粉 */
    .markdown-body {
        color: #fceef5 !important;
    }
    
    /* 2.3 模板元素优化（暗色版） */
    .markdown-body h3 {
        color: #ff85a2 !important;
        border-bottom-color: #7d4455 !important;
        text-shadow: 0 0 5px rgba(255, 133, 162, 0.5) !important;
    }

    .markdown-body hr {
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="15"><path d="M0 7.5 H40 L45 12.5 L50 7.5 L55 2.5 L60 7.5 H100" fill="none" stroke="%23ff85a2" stroke-width="1.5"/></svg>') center repeat-x !important;
        opacity: 0.6 !important;
    }
    
    .markdown-body details {
        background: rgba(44, 30, 40, 0.7) !important;
        border-color: #5c3a4c !important;
    }

    .markdown-body summary {
        color: #f4abc4 !important;
    }
    .markdown-body summary:hover {
        color: #ffc1d5 !important;
    }
    .markdown-body summary::before,
    .markdown-body details[open] > summary::before {
        text-shadow: 0 0 8px #ff69b4;
    }
    
    .markdown-body strong {
        color: #ffc1d5 !important;
    }

    /* 2.4 底部按钮（暗色版） */
    .MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
    .MuiTypography-root.MuiTypography-body2.css-6c0gf2,
    .text-orange-500 {
        color: #b08faa !important;
    }
    .MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
        color: #f4abc4 !important;
        background: rgba(244, 171, 196, 0.1) !important;
    }
}

/* --- 3. 通用加载动画（无需修改） --- */
/* 隐藏默认加载点 */
.style-module__AtdJSq__dot-flashing.style-module__AtdJSq__text {
    display: none !important;
}
/* 加载动画容器 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 28px !important;
    height: 28px !important;
}
/* 使用伪元素创建SVG动画 */
.flex.items-center.justify-center.w-6.h-5::before {
    content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23FF69B4" d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"><animateTransform attributeName="transform" type="scale" values="1; 1.15; 1; 1.05; 1" dur="1.2s" repeatCount="indefinite" additive="sum" transform-origin="center"/></path></svg>');
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}
/* 尊重用户减弱动态效果的偏好 */
@media (prefers-reduced-motion: reduce) {
    .flex.items-center.justify-center.w-6.h-5::before {
        content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23FF69B4" d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
        animation: none !important;
    }
}