
text, top-status, bottom-status {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', Georgia, serif;
    color: #5c2d4a;
    box-sizing: border-box;
}

@keyframes sakura-fall {
    0%   { transform: translateY(-10px) rotate(0deg);   opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 0.8; }
    100% { transform: translateY(20px) rotate(25deg);   opacity: 0; }
}

@keyframes float-glow {
    0%   { box-shadow: 0 4px 20px rgba(255,133,161,0.25), 0 0 0 1px rgba(255,183,197,0.4); }
    50%  { box-shadow: 0 8px 32px rgba(255,133,161,0.45), 0 0 0 2px rgba(255,183,197,0.7); }
    100% { box-shadow: 0 4px 20px rgba(255,133,161,0.25), 0 0 0 1px rgba(255,183,197,0.4); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.7; transform: scale(1);    }
    50%       { opacity: 1;   transform: scale(1.15); }
}

text {
    display: block;
    position: relative;
    background:
        repeating-linear-gradient(0deg,  transparent 0px, rgba(255,183,197,0.07) 1px, transparent 2px),
        repeating-linear-gradient(90deg, transparent 0px, rgba(255,183,197,0.07) 1px, transparent 2px),
        /* 中心柔光晕 */
        radial-gradient(ellipse at 60% 20%, rgba(255,221,230,0.55) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(179,136,255,0.12) 0%, transparent 50%),
        /* 主底色 */
        linear-gradient(160deg, #fff8fb 0%, #fff0f5 40%, #fce4ec 100%);
    border: none;
    border-radius: 18px;
    padding: 30px 34px;
    margin: 16px 0;
    line-height: 2;
    font-size: 16px;
    text-align: justify;
    overflow: hidden;
    animation: float-glow 4s ease-in-out infinite;
    transition: transform 0.3s ease;
}

/* 顶部粉色渐变高光条 */
text::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        #FFB7C5 0%,
        #FF85A1 30%,
        #B388FF 60%,
        #FFB7C5 100%);
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
    border-radius: 18px 18px 0 0;
}

/* 右上角樱花装饰 */
text::after {
    content: '🌸';
    position: absolute;
    top: 10px; right: 16px;
    font-size: 1.3em;
    opacity: 0.45;
    animation: sakura-fall 5s ease-in-out infinite;
    pointer-events: none;
}

text:hover {
    transform: translateY(-3px);
}

text p {
    margin-bottom: 1.15em;
    color: #6d3a52;
    text-shadow: 0 1px 3px rgba(255,133,161,0.15);
}

text p:last-child { margin-bottom: 0; }

/* ==================== 2. 顶部状态栏 (top-status) ==================== */
top-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(90deg,
        rgba(255,221,230,0.92) 0%,
        rgba(255,240,245,0.96) 50%,
        rgba(255,221,230,0.92) 100%);
    border-radius: 50px;
    padding: 10px 24px;
    margin-bottom: 16px;
    border: 1.5px solid rgba(255,133,161,0.5);
    box-shadow:
        0 3px 14px rgba(255,133,161,0.2),
        inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

/* 胶囊高光 */
top-status::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.6), transparent);
    border-radius: 0 0 50% 50%;
    pointer-events: none;
}

top-status p {
    margin: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #c2185b;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(255,133,161,0.4);
    letter-spacing: 0.5px;
}

/* ==================== 3. 底部状态栏 (bottom-status) ==================== */
bottom-status {
    display: block;
    margin-top: 20px;
    padding: 0;
}

/* 每个折叠面板 */
bottom-status details {
    background: linear-gradient(135deg,
        rgba(255,248,251,0.97) 0%,
        rgba(252,228,236,0.97) 100%);
    border: 1.5px solid rgba(255,183,197,0.55);
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow:
        0 4px 18px rgba(255,133,161,0.12),
        inset 0 1px 0 rgba(255,255,255,0.9);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

bottom-status details[open] {
    border-color: rgba(255,133,161,0.8);
    box-shadow:
        0 6px 24px rgba(255,133,161,0.25),
        inset 0 0 20px rgba(255,221,230,0.3);
    transform: scale(1.005);
}

/* Summary 标题 */
bottom-status summary {
    display: block;
    padding: 14px 20px 14px 46px;
    font-weight: 800;
    font-size: 14.5px;
    color: #c2185b;
    cursor: pointer;
    outline: none;
    user-select: none;
    position: relative;
    list-style: none;
    background: linear-gradient(90deg,
        rgba(255,183,197,0.35) 0%,
        rgba(255,240,245,0.6) 100%);
    border-bottom: 1px solid transparent;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 4px rgba(255,133,161,0.3);
    transition: all 0.25s ease;
}

bottom-status summary::before {
    content: '✿';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 1.1em;
    color: #FF85A1;
    transition: transform 0.4s cubic-bezier(0.68,-0.55,0.27,1.55),
                color 0.3s ease;
    text-shadow: 0 0 6px rgba(255,133,161,0.6);
    animation: pulse-soft 3s ease-in-out infinite;
}

bottom-status details[open] summary::before {
    transform: translateY(-50%) rotate(135deg);
    color: #c2185b;
}

bottom-status summary:hover {
    background: linear-gradient(90deg,
        rgba(255,133,161,0.25) 0%,
        rgba(255,221,230,0.5) 100%);
    border-bottom-color: rgba(255,183,197,0.6);
    color: #ad1457;
}

bottom-status details[open] summary {
    border-bottom-color: rgba(255,183,197,0.7);
}

/* 折叠内部p标签 */
bottom-status details p {
    padding: 9px 20px 9px 46px;
    margin: 0;
    color: #7b3f5e;
    border-top: 1px solid rgba(255,183,197,0.25);
    line-height: 1.75;
    font-size: 14.5px;
}

bottom-status details p:first-of-type {
    border-top: none;
    padding-top: 14px;
}

bottom-status details p:last-of-type {
    padding-bottom: 16px;
}

/* ==================== 4. 记忆区 - "爱莉的日记" ==================== */
bottom-status summary:contains("记忆"),
bottom-status summary:contains("日记"),
bottom-status summary:contains("Memory") {
    background: linear-gradient(90deg,
        rgba(179,136,255,0.2) 0%,
        rgba(255,221,230,0.5) 100%);
    color: #7b1fa2;
}

bottom-status summary:contains("记忆")::before,
bottom-status summary:contains("日记")::before,
bottom-status summary:contains("Memory")::before {
    content: '📖';
    animation: none;
}

/* 二级记忆details（长/短期记忆） */
bottom-status details details {
    background: rgba(255,240,245,0.8);
    border: 1.5px dashed rgba(179,136,255,0.45);
    border-radius: 10px;
    margin: 10px 16px;
    box-shadow: inset 0 0 8px rgba(179,136,255,0.1);
}

bottom-status details details summary {
    padding: 10px 16px 10px 40px;
    background: rgba(179,136,255,0.12);
    color: #7b1fa2;
    font-size: 0.92em;
    letter-spacing: 0.5px;
    border-bottom: none;
}

bottom-status details details summary::before {
    content: '✦';
    left: 14px;
    font-size: 0.85em;
    color: #B388FF;
    animation: pulse-soft 4s ease-in-out infinite;
}

bottom-status details details p {
    padding: 5px 14px 5px 34px;
    font-size: 0.89em;
    color: #9c6ea0;
    border-top: 1px dotted rgba(179,136,255,0.25);
}

/* ==================== 5. 行动建议 - "爱莉的小提示" ==================== */
bottom-status summary:contains("行动"),
bottom-status summary:contains("建议"),
bottom-status summary:contains("Action") {
    background: linear-gradient(90deg,
        rgba(255,183,197,0.45) 0%,
        rgba(255,240,245,0.7) 100%);
    color: #e91e8c;
}

bottom-status summary:contains("行动")::before,
bottom-status summary:contains("建议")::before,
bottom-status summary:contains("Action")::before {
    content: '💌';
    animation: none;
    font-size: 1em;
}

/* 行动建议条目 - 每条加小心形 */
bottom-status details:has(summary:contains("行动")) p,
bottom-status details:has(summary:contains("建议")) p,
bottom-status details:has(summary:contains("Action")) p {
    padding-left: 50px;
    position: relative;
    color: #8d3360;
}

bottom-status details:has(summary:contains("行动")) p::before,
bottom-status details:has(summary:contains("建议")) p::before,
bottom-status details:has(summary:contains("Action")) p::before {
    content: '♡';
    position: absolute;
    left: 30px;
    color: #FF85A1;
    font-size: 0.95em;
}

/* 特殊条目：第四个（"顺其自然"类描述性选项） */
bottom-status details:has(summary:contains("行动")) p:nth-of-type(4),
bottom-status details:has(summary:contains("建议")) p:nth-of-type(4) {
    font-style: italic;
    color: #c48ba0;
    opacity: 0.85;
}

/* 特殊条目：第五个（"自定义行动"强调选项） */
bottom-status details:has(summary:contains("行动")) p:nth-of-type(5),
bottom-status details:has(summary:contains("建议")) p:nth-of-type(5) {
    font-weight: 800;
    color: #c2185b;
    text-shadow: 0 0 6px rgba(255,133,161,0.4);
}

/* ==================== 6. 响应式移动端适配 ==================== */
@media (max-width: 768px) {
    text {
        padding: 22px 20px;
        border-radius: 14px;
        font-size: 15.5px;
    }
    top-status {
        border-radius: 14px;
        justify-content: flex-start;
        padding: 10px 16px;
    }
    top-status p {
        white-space: normal;
        margin-bottom: 4px;
        font-size: 12.5px;
    }
    bottom-status details p {
        padding-left: 36px;
        font-size: 14px;
    }
}
/* ========================================================
   警告：请勿美化全局 p / div / body / html
   所有样式仅作用于 <text> <top-status> <bottom-status>
   ======================================================== */

/* 示例：在内置CSS区域填写的样式 */
.player-choices-container {
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid #ff66cc; /* 给爱莉希雅配个粉色边框不过分吧？ */
    border-radius: 8px;
    padding: 10px;
    margin-top: 15px;
}
.choices-header {
    color: #ff66cc;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}
.choice-item {
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.choice-item:hover {
    background-color: rgba(255, 102, 204, 0.2); /* 鼠标放上去有粉色高亮反馈 */
}
.choice-letter {
    color: #ffcc00;
    font-weight: bold;
    margin-right: 5px;
}
/* 隐藏顶部默认颜色条，保持界面纯净 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* ==========================================
   爱莉希雅主题 - 聊天框基础与背景美化
   ========================================== */
.bg-gray-100\/90.relative.inline-block {
    /* 柔和的粉白水晶渐变背景 */
    background: linear-gradient(135deg, #fffafb 0%, #ffe4e8 50%, #fce1e6 100%) !important;
    /* 水晶边缘质感 */
    border: 1px solid rgba(255, 182, 193, 0.7) !important;
    /* 柔和的粉色发光阴影与内发光 */
    box-shadow: 0 6px 16px rgba(255, 166, 193, 0.2), 
                inset 0 0 12px rgba(255, 255, 255, 0.9) !important;
    /* 优雅的圆角设计 */
    border-radius: 20px 20px 20px 6px !important;
    /* 建立层叠上下文，保护文字不被背景特效遮挡 */
    isolation: isolate !important;
    /* 平滑过渡 */
    transition: all 0.3s ease !important;
    overflow: hidden !important;
}

/* 聊天框右上角的水晶反光特效 */
.bg-gray-100\/90.relative.inline-block::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.8) 0%, transparent 50%) !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

/* 单独针对输入框的圆角微调 */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
    border-radius: 20px 20px 6px 20px !important;
    background: linear-gradient(135deg, #ffffff 0%, #fff0f3 100%) !important;
}

/* ==========================================
   文本与排版 - Absolute Readability First
   ========================================== */
.markdown-body {
    /* 确保背景透明，不遮挡水晶框 */
    background: transparent !important;
    /* 高对比度的暖深褐色，在浅粉色背景上极其清晰 */
    color: #4a363a !important;
    z-index: 1 !important;
    /* 优化字体，提升优雅感 */
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif !important;
    line-height: 1.6 !important;
}

/* 加粗文字使用更深的强调色 */
.markdown-body strong {
    color: #b05c6f !important;
    font-weight: 700 !important;
}

/* ==========================================
   底部附加元素 (模型名称, Token, 按钮等)
   ========================================== */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    /* 柔和且清晰的暗紫粉色 */
    color: #8c6b73 !important;
    transition: color 0.2s ease !important;
}

/* 按钮悬停效果 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #d1758f !important;
    background-color: rgba(255, 182, 193, 0.15) !important;
}

/* ==========================================
/* ==========================================
   羽毛笔书写 加载动画 (纯SVG SMIL驱动) + 底部轮播
   ========================================== */

/* 1. 强制隐藏默认的无聊加载点 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 2. 调整加载容器尺寸以容纳羽毛笔和下方文字 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 140px !important; /* 适当加宽以容纳文字 */
    height: 80px !important; /* 增加高度给文字留出空间，原为35px */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 3. 注入羽毛笔书写 SVG 动画 */
.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important;
    position: absolute !important;
    width: 70px !important;
    height: 35px !important;
    top: 0 !important; /* 将羽毛笔固定在顶部 */
    /* 
       使用 Data URI 内嵌 SVG。
       包含两个部分：
       1. stroke-dasharray 驱动的墨水线条绘制。
       2. animateTransform 驱动的羽毛笔平移与书写抖动。
    */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50'%3E%3C!-- 墨水轨迹 --%3E%3Cpath d='M 15 35 Q 30 45 45 35 T 75 35 T 90 35' fill='none' stroke='%23f1a3b5' stroke-width='2.5' stroke-linecap='round' stroke-dasharray='100' stroke-dashoffset='100'%3E%3Canimate attributeName='stroke-dashoffset' values='100;0;100' dur='2s' repeatCount='indefinite' /%3E%3C/path%3E%3C!-- 羽毛笔主体 --%3E%3Cg%3E%3CanimateTransform attributeName='transform' type='translate' values='0,0; 75,0; 0,0' dur='2s' repeatCount='indefinite' /%3E%3CanimateTransform attributeName='transform' type='rotate' values='0 15 35; 12 15 35; 0 15 35' dur='0.3s' repeatCount='indefinite' additive='sum' /%3E%3C!-- 羽毛轮廓 --%3E%3Cpath d='M15,35 C20,15 45,0 55,5 C45,15 35,30 15,35' fill='%23fce1e6' stroke='%23e8a5b0' stroke-width='1.5'/%3E%3C!-- 羽毛高光/纹理 --%3E%3Cpath d='M15,35 C25,25 45,15 50,15 C40,20 25,30 15,35' fill='%23ffffff' opacity='0.9'/%3E%3C/g%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    z-index: 10 !important;
}

/* 4. 定义文字轮播与淡入淡出动画 */
@keyframes loading-text-carousel {
    0%, 20%   { content: "爱莉希雅的贴心提示：你可以尽情依赖爱莉希雅，而她也会以全部的真心回应你。"; opacity: 1; }
    22%, 24%  { opacity: 0; } /* 切换时的淡出效果 */
    25%, 45%  { content: "爱莉希雅的贴心提示：伊甸就像天使一样温柔，也总会予人以天使般的馈赠。"; opacity: 1; }
    47%, 49%  { opacity: 0; }
    50%, 70%  { content: "如果遇到消耗太高、报错、截断等问题，可以试试换个模型呢。"; opacity: 1; }
    72%, 74%  { opacity: 0; }
    75%, 95%  { content: "Claude的描写真的很细腻呢，就是太贵了。"; opacity: 1; }
    97%, 100% { opacity: 0; }
}

/* 5. 注入底部轮播文字 */
.flex.items-center.justify-center.w-6.h-5::after {
    content: "爱莉希雅的贴心提示：你可以尽情依赖爱莉希雅，而她也会以全部的真心回应你。"!important; /* 默认保底文字 */
    position: absolute !important;
    bottom: -2px !important; /* 放置在羽毛笔下方 */
    font-size: 12px !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    color: #e8a5b0 !important; /* 与羽毛笔相呼应的柔和粉色 */
    white-space: nowrap !important;
    letter-spacing: 0.5px !important;
    /* 8秒循环一次，每2秒展示一个句子并附带淡入淡出 */
    animation: loading-text-carousel 8s infinite !important; 
}

/* --- 爱莉希雅主题：顶部栏美化 --- */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(90deg, rgba(255, 209, 220, 0.9) 0%, rgba(255, 240, 245, 0.8) 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 182, 193, 0.5) !important;
    box-shadow: 0 2px 15px rgba(255, 182, 193, 0.2) !important;
}

/* 模型选择器水晶化 */
#ai-model-selector .group.flex.items-center {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid #ffb7c5 !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    transition: all 0.3s ease;
}

#ai-model-selector .truncate.text-\[13px\] {
    color: #d87093 !important;
    font-weight: bold !important;
    font-family: "Microsoft YaHei", sans-serif !important;
}

/* 设置按钮与图标 */
#header-setting-button svg, 
.sticky.w-full.top-0 svg.lucide-clock-8,
.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]) {
    color: #ff69b4 !important;
    filter: drop-shadow(0 0 2px rgba(255, 105, 180, 0.5));
}

/* --- 爱莉希雅主题：按钮栏美化 --- */
#ai-mod-button2 button.MuiButton-root {
    background: linear-gradient(135deg, #ffb7c5 0%, #fbc2eb 100%) !important;
    color: white !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 10px rgba(255, 183, 197, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    font-weight: bold !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 183, 197, 0.6) !important;
    filter: brightness(1.1);
}

#ai-mod-button2 button.MuiButton-root svg {
    color: white !important;
}

/* --- 爱莉希雅主题：底部输入栏美化 --- */
/* 底部背景渐变 */
.bg-gradient-to-t {
    background: linear-gradient(to top, rgba(255, 240, 245, 1) 0%, rgba(255, 255, 255, 0) 100%) !important;
}

#ai-chat-bottom-input {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 2px solid #ffdae0 !important;
    border-radius: 18px !important;
    box-shadow: 0 -2px 15px rgba(255, 182, 193, 0.15) !important;
    backdrop-filter: blur(5px);
}

#ai-chat-input {
    color: #8b4c5d !important;
    font-family: "Microsoft YaHei", sans-serif !important;
}

#ai-chat-input::placeholder {
    color: #dca7b0 !important;
    font-style: italic;
}

#ai-chat-input::selection {
    background: #ffb7c5 !important;
    color: white !important;
}

/* --- 爱莉希雅主题：页码美化 --- */
/* 普通页码 */
.MuiPaginationItem-root {
    color: #d87093 !important;
    border: 1px solid transparent !important;
    transition: all 0.2s ease !important;
}

/* 选中页码 - 真我之花 */
.MuiPaginationItem-root.Mui-selected {
    background: linear-gradient(135deg, #ffb7c5 0%, #ff8da1 100%) !important;
    color: white !important;
    font-weight: bold !important;
    box-shadow: 0 0 10px rgba(255, 141, 161, 0.5) !important;
    transform: scale(1.1);
}

/* 禁用与箭头 */
.MuiPaginationItem-root.Mui-disabled {
    opacity: 0.4 !important;
}

.MuiPaginationItem-icon {
    color: #ff69b4 !important;
}

/* 跳转输入框 */
.MuiInputBase-input {
    color: #d87093 !important;
    text-align: center !important;
}

.MuiStack-root.css-1uwir8f {
    border: 1px solid #ffdae0 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.5) !important;
}