/* =========================================
   《熏香草花朵凛然绽放》纯爱主题 CSS
   内核：坦诚、柔软、明亮青春
   ========================================= */

/* -----------------------------------------
   一、消息气泡区 (温柔蓝 vs 灿烂粉)
----------------------------------------- */

/* 用户消息气泡 (凛太郎 - 晴空蓝与包容) */
#customized-question-content {
    background: linear-gradient(135deg, #F0F8FF, #E6F2FF) !important;
    border-radius: 20px 20px 4px 20px !important;
    box-shadow: 0 4px 15px rgba(174, 198, 207, 0.15) !important;
    border: 1px solid rgba(174, 198, 207, 0.3) !important;
    padding: 14px 18px !important;
}
#customized-question-content .text-gray-900,
#customized-question-content .markdown-body {
    color: #2F4F4F !important; /* 深青灰，高对比度 */
    font-family: "Nunito", "Helvetica Neue", sans-serif !important;
    line-height: 1.6 !important;
}
/* 用户顶部装饰条 */
#customized-question-content .bg-\[\#c9e1e9\] {
    background-color: #AEC6CF !important;
    border-radius: 20px 20px 0 0 !important;
    height: 6px !important;
}

/* AI消息气泡 (薰子 - 樱花粉与桔梗) */
#customized-answer-content {
    background: linear-gradient(135deg, #FFF0F5, #FFE4E1) !important;
    border-radius: 20px 20px 20px 4px !important;
    box-shadow: 0 4px 15px rgba(255, 166, 201, 0.15) !important;
    border: 1px solid rgba(255, 166, 201, 0.3) !important;
    padding: 14px 18px !important;
}
#customized-answer-content .text-gray-900,
#customized-answer-content .markdown-body {
    color: #5C4033 !important; /* 巧克力暖棕，高对比度 */
    font-family: "Nunito", "Helvetica Neue", sans-serif !important;
    line-height: 1.6 !important;
}
/* AI顶部装饰条 */
#customized-answer-content .bg-\[\#F1CBCB\] {
    background-color: #FFA6C9 !important;
    border-radius: 20px 20px 0 0 !important;
    height: 6px !important;
}

/* 气泡操作按钮柔化 */
#customized-answer-content button, 
#customized-question-content button {
    color: #D2B48C !important;
    transition: all 0.2s ease !important;
}
#customized-answer-content button:hover {
    color: #FFA6C9 !important;
    transform: scale(1.1) !important;
}

/* -----------------------------------------
   二、加载动画 (修复：CSS旋转 + 静态SVG)
----------------------------------------- */

/* 1. 隐藏加载容器内的所有直接子元素（原闪烁点和文字） */
#customized-answer-content .flex.items-center.justify-center.w-6.h-5 > * {
    display: none !important;
}

/* 2. 设置容器尺寸并确保相对定位 */
#customized-answer-content .flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 32px !important;
    height: 32px !important;
    margin: 4px 0 !important;
}

/* 3. 用 ::before 插入静态花朵 SVG，并通过 CSS 旋转 */
#customized-answer-content .flex.items-center.justify-center.w-6.h-5::before {
    content: '';
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFA6C9' opacity='0.8' d='M12 2C12 2 9 7 9 12C9 17 12 22 12 22C12 22 15 17 15 12C15 7 12 2 12 2Z'/%3E%3Cpath fill='%23AEC6CF' opacity='0.8' d='M2 12C2 12 7 9 12 9C17 9 22 12 22 12C22 12 17 15 12 15C7 15 2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%23FFD700'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    /* 应用 CSS 旋转动画，替代 SMIL */
    animation: spin-flower 3s linear infinite !important;
}

/* 4. 双花交错效果：使用 ::after 反向旋转另一层（可选） */
#customized-answer-content .flex.items-center.justify-center.w-6.h-5::after {
    content: '';
    display: block !important;
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFA6C9' opacity='0.5' d='M12 2C12 2 9 7 9 12C9 17 12 22 12 22C12 22 15 17 15 12C15 7 12 2 12 2Z'/%3E%3Cpath fill='%23AEC6CF' opacity='0.5' d='M2 12C2 12 7 9 12 9C17 9 22 12 22 12C22 12 17 15 12 15C7 15 2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23FFD700'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    animation: spin-flower-reverse 4s linear infinite !important;
    opacity: 0.6 !important;
}

/* 5. 定义两个方向的旋转关键帧 */
@keyframes spin-flower {
    to { transform: rotate(360deg); }
}
@keyframes spin-flower-reverse {
    to { transform: rotate(-360deg); }
}

/* -----------------------------------------
   三、界面控制区 (奶油白与柔软交互)
----------------------------------------- */

/* 顶部控制栏 */
.sticky.top-0 {
    background: rgba(255, 250, 240, 0.85) !important; /* 奶油白 */
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 166, 201, 0.2) !important;
}
#customized-model-selector {
    color: #5C4033 !important;
    font-weight: 600 !important;
}

/* 底部输入区背景渐变 */
.bg-gradient-to-t {
    background: linear-gradient(to top, #FFFAF0 70%, transparent) !important;
}

/* 输入框主体 */
.bg-white.border-\[1\.5px\] {
    background: #FFFFFF !important;
    border-color: rgba(255, 166, 201, 0.4) !important;
    border-radius: 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.3s ease !important;
}
.bg-white.border-\[1\.5px\]:focus-within {
    border-color: #FFA6C9 !important;
    box-shadow: 0 4px 20px rgba(255, 166, 201, 0.2) !important;
}
#ai-chat-input {
    color: #5C4033 !important;
}
#ai-chat-input::placeholder {
    color: #D2B48C !important;
}

/* 发送按钮 (直球出击) */
#ai-send-button {
    background: linear-gradient(135deg, #FFA6C9, #FFB7B2) !important;
    border-radius: 50% !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
#ai-send-button:hover {
    transform: scale(1.15) rotate(5deg) !important;
    box-shadow: 0 4px 12px rgba(255, 166, 201, 0.4) !important;
}
#ai-send-button .icon-icon-send {
    color: #FFFFFF !important;
}

/* 快捷按钮组 */
#ai-mod-button2 .MuiButton-outlinedPrimary {
    border-color: rgba(174, 198, 207, 0.5) !important;
    color: #5C4033 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.7) !important;
}
#ai-mod-button2 .MuiButton-outlinedPrimary:hover {
    background: rgba(174, 198, 207, 0.15) !important;
    border-color: #AEC6CF !important;
}

/* -----------------------------------------
   四、评论区 (柔和暖心的交流空间)
----------------------------------------- */

/* 面板主容器 */
.absolute.bottom-0.z-20.inset-x-0.bg-white {
    background: #FFFAF0 !important; /* 蛋糕店的奶油色底 */
    border-radius: 24px 24px 0 0 !important;
    box-shadow: 0 -10px 30px rgba(255, 166, 201, 0.1) !important;
}

/* 评分星星 (明亮温暖) */
.MuiRating-iconFilled {
    color: #FFB347 !important;
    filter: drop-shadow(0 0 2px rgba(255, 179, 71, 0.4)) !important;
}

/* 评论输入框 */
.flex.flex-col.border-\[1\.5px\].border-gray-200 {
    border-color: rgba(255, 166, 201, 0.3) !important;
    border-radius: 16px !important;
    background: #FFFFFF !important;
    transition: border-color 0.3s !important;
}
.flex.flex-col.border-\[1\.5px\].border-gray-200:focus-within {
    border-color: #FFA6C9 !important;
}
textarea[placeholder="发表评论"] {
    color: #5C4033 !important;
}

/* 评论列表项 */
.group.ml-0 {
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 16px !important;
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
    border: 1px solid rgba(174, 198, 207, 0.15) !important;
    transition: all 0.2s ease !important;
}
.group.ml-0:hover {
    background: #FFFFFF !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    transform: translateY(-1px) !important;
}

/* 评论区滚动条柔化 */
.p-3.overflow-y-auto.h-full::-webkit-scrollbar {
    width: 6px !important;
}
.p-3.overflow-y-auto.h-full::-webkit-scrollbar-thumb {
    background: rgba(255, 166, 201, 0.4) !important;
    border-radius: 3px !important;
}
.p-3.overflow-y-auto.h-full::-webkit-scrollbar-track {
    background: transparent !important;
}