/* =========================================
   Theme: 暖煦日常 - 对话框美化 (Warm Daily - Chat Box)
   Description: 新颖不对称圆角，极简留白，高对比度护眼
========================================= */

/* -----------------------------------------
   1. User 用户输入气泡 (浅焙奶茶色)
----------------------------------------- */
.group.is-user > div:first-child {
    /* 柔和的肉色/奶茶色渐变，带来温暖包裹感 */
    background: linear-gradient(135deg, #F9E4D4 0%, #F1D3B8 100%) !important;
    /* 右下角小圆角，形成气泡发出方向的视觉引导 */
    border-radius: 24px 24px 4px 24px !important; 
    /* 纯白高光内发光边框，增加新颖的果冻质感 */
    border: 1px solid #FFFFFF !important;
    box-shadow: 0 4px 15px rgba(210, 155, 122, 0.15), inset 0 2px 4px rgba(255,255,255,0.4) !important;
    transition: all 0.3s ease !important;
}

/* 强制接管 User 气泡内的正文文字颜色 (深咖啡色，绝对可读) */
.group.is-user .rili-markdown-renderer,
.group.is-user .rili-markdown-renderer * {
    color: #5C4333 !important;
}

/* -----------------------------------------
   2. Assistant AI输出气泡 (纯净奶油白)
----------------------------------------- */
.group.is-assistant > div:first-child {
    /* 极简的奶油白，象征阳光下干净的纸张 */
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFDFB 100%) !important;
    /* 左下角小圆角，与用户侧对称呼应 */
    border-radius: 24px 24px 24px 4px !important;
    /* 温和的肉色细边框 */
    border: 1px solid #F5DEC9 !important;
    box-shadow: 0 4px 20px rgba(220, 190, 175, 0.1) !important;
    transition: all 0.3s ease !important;
}

/* 强制接管 Assistant 气泡内的正文文字颜色 */
.group.is-assistant .rili-markdown-renderer,
.group.is-assistant .rili-markdown-renderer * {
    color: #4A3629 !important;
    line-height: 1.7 !important; /* 略微增加行高，提升阅读整洁度 */
}

/* -----------------------------------------
   3. AI 气泡底部信息与操作按钮区重构
----------------------------------------- */
/* 消耗 Token / 模型信息的浅色显示 */
.group .text-xs.font-mono.text-muted-foreground {
    color: #CBAA96 !important; 
}

/* 将底部长条操作栏拆解为空白背景 */
.group .bg-muted.rounded.flex {
    background-color: transparent !important;
    box-shadow: none !important;
    gap: 4px !important; /* 按钮间距 */
}

/* 重构单个操作按钮 (复制/编辑/刷新等) 为精致的圆形小按钮 */
.group .bg-muted.rounded.flex button {
    background-color: #FFFDFB !important;
    border: 1px solid #F5DEC9 !important;
    border-radius: 50% !important; /* 新颖的圆形设计 */
    padding: 6px !important;
    box-shadow: 0 2px 6px rgba(210, 155, 122, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 按钮内图标颜色统一为浅肉色 */
.group .bg-muted.rounded.flex button svg.lucide {
    color: #B5937F !important;
    width: 14px !important;
    height: 14px !important;
}

/* 按钮悬浮互动效果：浮起并变色 */
.group .bg-muted.rounded.flex button:hover {
    background-color: #FDF4ED !important;
    border-color: #D29B7A !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(210, 155, 122, 0.25) !important;
}
.group .bg-muted.rounded.flex button:hover svg.lucide {
    color: #D29B7A !important;
}

/* -----------------------------------------
   4. 加载动画 (Loading) 暖阳呼吸重构
----------------------------------------- */
/* 隐藏原生生硬的跳动黑点 */
.flex.gap-2.w-full.h-full.items-center.justify-center > span {
    display: none !important;
}

/* 植入基于内联 SVG 的柔和肉色呼吸圆圈，无视平台动画过滤 */
.flex.gap-2.w-full.h-full.items-center.justify-center::before {
    content: "" !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='8' fill='%23F1D3B8'><animate attributeName='r' values='6;10;6' dur='1.5s' repeatCount='indefinite'/><animate attributeName='opacity' values='0.5;1;0.5' dur='1.5s' repeatCount='indefinite'/></circle></svg>") !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}
/* =========================================
   Theme: 暖煦日常 (Warm Daily)
   Description: 温馨柔和的肉色系UI美化
========================================= */

/* 1. 顶部栏美化 (奶油暖色渐变背景与悬浮质感) */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(135deg, #FFFDFB 0%, #FDF4ED 100%) !important;
    border-bottom: 1px solid #F5DEC9 !important;
    box-shadow: 0 4px 20px rgba(220, 190, 175, 0.2) !important;
    backdrop-filter: blur(8px) !important;
    transition: all 0.3s ease !important;
}

/* 顶部栏模型选择器 & 设置按钮 (圆润胶囊风格) */
#ai-model-selector .group.flex.items-center,
#header-setting-button {
    background-color: #FFFFFF !important;
    border: 1px solid #F5DEC9 !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    color: #7A6355 !important;
    box-shadow: 0 2px 6px rgba(220, 190, 175, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 顶部按钮交互效果 */
#ai-model-selector .group.flex.items-center:hover,
#header-setting-button:hover {
    background-color: #FEF7F2 !important;
    border-color: #E6BBA0 !important;
    color: #5C4333 !important;
    box-shadow: 0 4px 12px rgba(230, 187, 160, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* 顶部图标统一暖色调 */
.sticky.w-full.top-0 svg {
    color: #B5937F !important;
    transition: all 0.3s ease !important;
}
.sticky.w-full.top-0 svg:hover {
    color: #D29B7A !important;
}

/* 2. 底部栏渐变遮罩 (去除生硬黑白渐变，改为柔和过渡) */
.bg-gradient-to-t {
    background: linear-gradient(to top, #FFFDFB 50%, rgba(255,253,251,0) 100%) !important;
}

/* 底部输入框容器 (饱满的肉色系描边与云朵阴影) */
#ai-chat-bottom-input {
    background: #FFFFFF !important;
    border: 1.5px solid #F0D4C0 !important;
    border-radius: 24px !important;
    box-shadow: 0 6px 24px rgba(215, 185, 165, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 输入框激活状态：加深焦糖色边框，提升专注度 */
#ai-chat-bottom-input:focus-within {
    border-color: #D29B7A !important;
    box-shadow: 0 8px 30px rgba(210, 155, 122, 0.25) !important;
    transform: translateY(-2px) !important;
}

/* 输入框文字与光标样式 (保证绝对高可读性) */
#ai-chat-input {
    color: #5C4333 !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    caret-color: #D29B7A !important;
}

/* 占位符颜色：温柔的奶茶色 */
#ai-chat-input::placeholder {
    color: #CBAA96 !important;
}

/* 文本被选中的效果：暖肤色背景 */
#ai-chat-input::selection {
    background-color: #F5DEC9 !important;
    color: #5C4333 !important;
}

/* 3. 底部按钮栏 (Mod按钮、流式按钮等) */
#ai-mod-button2 button.MuiButton-root {
    background: linear-gradient(135deg, #FFFFFF 0%, #FEF7F2 100%) !important;
    border: 1px solid #F0D4C0 !important;
    border-radius: 12px !important; /* 微圆角，区别于输入框的胶囊形状 */
    color: #8C6F5D !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(215, 185, 165, 0.15) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 6px 14px !important;
}

/* 按钮悬浮互动效果 */
#ai-mod-button2 button.MuiButton-root:hover {
    background: linear-gradient(135deg, #FEF7F2 0%, #F5DEC9 100%) !important;
    border-color: #E6BBA0 !important;
    color: #5C4333 !important;
    box-shadow: 0 6px 16px rgba(210, 155, 122, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* 按钮内图标颜色及交互 */
#ai-mod-button2 button.MuiButton-root svg {
    color: #CBAA96 !important;
    transition: all 0.3s ease !important;
}
#ai-mod-button2 button.MuiButton-root:hover svg {
    color: #D29B7A !important;
    transform: scale(1.1) !important;
}