/* =============================================
 * 《静湖小区：夏日变奏》专属沉浸式UI样式表
 * 风格：夏日白月光 / 逐渐腐染的粉色 / 偷窥与背德
 * 包含：聊天气泡、操作按钮、输入栏、状态面板、偷窥心跳加载动画
 * =============================================
 */

/* 
 * ---------------------------------
 * 模块一：对话气泡美化 (AI侧) - 欲念微醺风格
 * ---------------------------------
 */
.group .bg-gray-100\/90 {
    /* 极浅的粉紫色背景，暗示纯洁中掺杂的欲望 */
    background: linear-gradient(145deg, #fdf8fa, #fcf0f5) !important; 
    border: 1px solid #f0d4e3 !important; 
    /* 左上右上的大圆角，右下的直角，体现对话框的流动感 */
    border-radius: 16px 16px 16px 4px !important; 
    box-shadow: 0 4px 15px rgba(199, 21, 133, 0.06) !important;
    color: #2d282a !important; 
    padding: 18px 20px !important; 
    line-height: 1.8 !important;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif !important;
}

/* 
 * ---------------------------------
 * 模块二：平台按钮美化 - 沉沦深红风格
 * ---------------------------------
 */
.flex.items-center.gap-2.pb-2 > button {
    /* 从深粉到暗红的渐变，象征堕落的过程 */
    background: linear-gradient(135deg, #d81b60, #900c3f) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(216, 27, 96, 0.3) !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    letter-spacing: 1px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.flex.items-center.gap-2.pb-2 > button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(216, 27, 96, 0.4) !important;
    background: linear-gradient(135deg, #e91e63, #c70039) !important;
}

.flex.items-center.gap-2.pb-2 > button:active {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 4px rgba(216, 27, 96, 0.3) !important;
}

/* 
 * ---------------------------------
 * 模块三：输入栏美化 - 暧昧粉白风格
 * ---------------------------------
 */
#ai-chat-input {
    background-color: #fdf8fa !important;
    border: 1px solid #e1c6d2 !important;
    border-radius: 12px !important;
    color: #2d282a !important;
    padding: 14px 18px !important;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02) !important;
    transition: all 0.3s ease !important;
}

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

#ai-chat-input:focus {
    background-color: #ffffff !important;
    border-color: #d81b60 !important;
    /* 聚焦时泛起暧昧的粉色光晕 */
    box-shadow: 0 0 0 3px rgba(216, 27, 96, 0.15), inset 0 1px 3px rgba(0,0,0,0.02) !important;
    outline: none !important;
}

#ai-chat-bottom-input {
    background: transparent !important;
    backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(240, 212, 227, 0.5) !important;
}

/* 
 * ---------------------------------
 * 模块四：角色扮演面板专属美化 (状态栏/排版)
 * ---------------------------------
 */

/* 剧情正文排版优化 (视觉小说感) */
plot {
    display: block !important;
    font-size: 15px !important;
    color: #3a3335 !important;
    padding: 5px 0 !important;
    text-align: justify !important;
}

plot p {
    margin-bottom: 14px !important;
    text-indent: 2em !important; /* 首行缩进增强沉浸感 */
}

/* 状态面板毛玻璃卡片设计 */
details.status-box {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(216, 27, 96, 0.15) !important;
    border-radius: 12px !important;
    margin: 14px 0 !important;
    padding: 12px 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

details.status-box:hover {
    box-shadow: 0 6px 16px rgba(216, 27, 96, 0.06) !important;
    border-color: rgba(216, 27, 96, 0.25) !important;
}

details.status-box[open] {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(216, 27, 96, 0.3) !important;
}

/* 状态面板标题栏 */
summary.status-summary {
    cursor: pointer !important;
    list-style: none !important;
    outline: none !important;
    margin: -12px -16px !important;
    padding: 12px 16px !important;
    background: linear-gradient(90deg, rgba(253, 243, 246, 1) 0%, rgba(255,255,255,0) 80%) !important;
    border-left: 4px solid #d81b60 !important;
    transition: background 0.3s ease !important;
}

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

summary.status-summary h1 {
    margin: 0 !important;
    font-size: 15px !important;
    color: #900c3f !important;
    display: flex !important;
    align-items: center !important;
    font-weight: bold !important;
}

/* 状态面板内部字段排版 */
.status-details {
    margin-top: 14px !important;
    font-size: 13.5px !important;
    border-top: 1px dashed #f0d4e3 !important;
    padding-top: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.status-details p {
    margin: 0 !important;
    display: flex !important;
    line-height: 1.6 !important;
    align-items: flex-start !important;
}

.status-details .label {
    font-weight: 600 !important;
    color: #880e4f !important;
    min-width: 85px !important;
    flex-shrink: 0 !important;
    background: rgba(216, 27, 96, 0.06) !important;
    padding: 0 6px !important;
    border-radius: 4px !important;
    margin-right: 8px !important;
    text-align: center !important;
}

.status-details .value {
    color: #3e2723 !important;
    flex-grow: 1 !important;
}

/* 渐变欲念分割线 */
hr.separator {
    border: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, #d81b60, transparent) !important;
    opacity: 0.25 !important;
    margin: 25px 0 !important;
}

/* 系统记忆模块弱化处理 (避免抢戏) */
details:not(.status-box) {
    background: #f5f5f5 !important;
    border-left: 3px solid #bdbdbd !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    margin: 10px 0 !important;
    font-size: 12px !important;
    color: #757575 !important;
}

details:not(.status-box) summary {
    color: #616161 !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

/* 
 * ---------------------------------
 * 模块五：加载动画 - 偷窥视角的悸动心跳
 * ---------------------------------
 */
/* 隐藏默认点状加载 */
.style_dot-flashing__8L91Q.style_text__zGhNq { 
    display: none !important; 
}

/* 创建动画主场域 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 80px !important;
    height: 80px !important;
    margin: 20px auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: visible !important;
}

/* 欲望的呼吸光晕 */
.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important;
    position: absolute !important;
    width: 45px !important;
    height: 45px !important;
    background: radial-gradient(circle, rgba(216, 27, 96, 0.35) 0%, transparent 70%) !important;
    border-radius: 50% !important;
    animation: lustPulse 1.2s infinite alternate ease-in-out !important;
    z-index: 1 !important;
}

/* 核心元素：包含偷窥钥匙孔的心脏 (SVG SMIL动画) */
.flex.items-center.justify-center.w-6.h-5::after {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23D81B60" d="M50 85 C20 60 10 40 10 25 A20 20 0 0 1 50 25 A20 20 0 0 1 90 25 C90 40 80 60 50 85 Z"><animate attributeName="fill" values="%23D81B60;%23900C3F;%23D81B60" dur="1.5s" repeatCount="indefinite"/></path><path fill="%23FFF5F8" d="M50 35 A7 7 0 0 0 43 42 C43 45 44.5 48 47 49.5 L45 62 L55 62 L53 49.5 C55.5 48 57 45 57 42 A7 7 0 0 0 50 35 Z" opacity="0.9"/></svg>') !important;
    position: absolute !important;
    width: 45px !important;
    height: 45px !important;
    z-index: 2 !important;
    animation: heartbeat 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1) !important;
    filter: drop-shadow(0 2px 6px rgba(144, 12, 63, 0.3)) !important;
}

/* 动画关键帧 */
@keyframes lustPulse {
    0% { transform: scale(0.8); opacity: 0.3; }
    100% { transform: scale(1.6); opacity: 0.8; }
}

@keyframes heartbeat {
    0% { transform: scale(0.95); }
    5% { transform: scale(1.12); }
    39% { transform: scale(0.85); }
    45% { transform: scale(1.05); }
    60% { transform: scale(0.95); }
    100% { transform: scale(0.95); }
}

/* 移动端细微调整 */
@media screen and (max-width: 768px) {
    .group .bg-gray-100\/90 {
        padding: 14px 16px !important;
        border-radius: 12px 12px 12px 4px !important;
    }
    plot p {
        text-indent: 1.5em !important;
    }
    details.status-box {
        padding: 10px 12px !important;
    }
}