/* ====== 绿帽美学重构 ====== */
/* 核心理念：精致的和纸与墨迹下，渗透着不洁的粉紫与罪恶的暗金。 */

/* 整体：被玷污的和纸 + 罪恶墨色 */
body, .tw-text {
    background: transparent !important;
    color: #3a2c25;                     /* 更深、更压抑的古墨色，象征被玷污的道德底色 */
    font-family: 'Noto Serif SC', 'SimSun', 'Songti SC', serif;
    letter-spacing: 0.6px;
    /* 增加一点微妙的扭曲感 */
    text-rendering: optimizeLegibility;
}

/* 正文 - 细腻文字下涌动的背德感 */
.tw-text p {
    text-indent: 2em;
    margin: 14px 0;
    line-height: 1.95;
    font-size: 15.2px;
    color: #3a2c25;
    font-weight: 500;
    /* 关键改动：背景渐变加入象征欲望与污渍的淡粉和暗金 */
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 228, 255, 0.05) 20%,  /* 极淡的欲望粉 */
        transparent 40%,
        rgba(245, 236, 220, 0.4) 60%,
        transparent 80%,
        rgba(255, 215, 0, 0.03)        /* 象征金钱/交易的暗金污渍 */
    ) !important;
    padding: 2px 8px;
    border-radius: 2px;
    /* 文字阴影改成更暧昧的紫色调 */
    text-shadow: 0 1px 2px rgba(139, 69, 19, 0.12);
}

/* 对话 - 从温柔樱红改为"禁忌的潮红"与"懦弱的淡绿" */
.tw-text .f {
    color: #d45d79;                     /* 更艳、更不健康的桃红，象征禁忌的快感 */
    font-weight: 700;
    text-shadow: 0 0 12px rgba(212, 93, 121, 0.35); /* 阴影加强，更显糜烂 */
}

.tw-text .f em {
    color: #b03060;                     /* 深玫红，象征更深层的堕落 */
    font-style: italic;
}

/* ===== 折叠面板 - 偷窥的视角/被打开的潘多拉魔盒 ===== */
details {
    margin: 12px 0;
    background: rgba(255, 245, 245, 0.75); /* 底色带一丝不自然的粉红 */
    border: 1px solid #e8a2a2;          /* 边框改为暧昧的肉粉色 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(139, 69, 19, 0.1),
        inset 0 0 20px rgba(255, 182, 193, 0.1); /* 内发光，模拟被窥视的光感 */
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
}

details:hover {
    border-color: #ff6b9d;               /* 悬停时变为更刺眼的艳粉 */
    box-shadow:
        0 6px 20px rgba(255, 107, 157, 0.25),
        inset 0 0 30px rgba(255, 182, 193, 0.2);
    background: rgba(255, 235, 235, 0.85);
}

details > summary {
    background: linear-gradient(to right, rgba(255, 240, 245, 0.95), rgba(255, 228, 230, 0.9));
    color: #8b2252;                     /* 深紫红色，标题即暗示内容的不洁 */
    font-size: 14px;
    font-weight: 700;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid #e8a2a2;
    position: relative;
}

details > summary::after {
    content: "▶";
    position: absolute;
    right: 18px;
    color: #d45d79;
    transition: transform 0.3s;
}

details[open] > summary::after {
    transform: rotate(90deg);
}

details[open] > summary {
    color: #b03060;                     /* 展开后颜色更深，象征秘密被揭开 */
    background: linear-gradient(to right, rgba(255, 220, 225, 0.98), rgba(255, 200, 210, 0.95));
}

/* 记忆回廊 - 改为"扭曲的执念" */
details.star-memory {
    background: rgba(255, 240, 250, 0.7);
    border-color: #e8b4d8;              /* 更偏紫的粉色 */
    box-shadow: inset 0 0 25px rgba(232, 180, 216, 0.15);
}

details.star-memory > summary {
    color: #d45d79;
    background: rgba(255, 235, 245, 0.9);
}

/* 行动推荐 - 改为"罪恶的指引" */
details.action {
    background: rgba(245, 230, 250, 0.8) !important; /* 淡紫底 */
    border-color: #ba8fd0 !important;   /* 薰衣草紫 */
    box-shadow: 0 4px 10px rgba(186, 143, 208, 0.2);
}

details.action > summary {
    color: #6a0dad !important;          /* 深紫色 */
    background: rgba(240, 225, 255, 0.9) !important;
}

/* 表格美化 - 交易/记录罪恶的账本 */
details table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13.8px;
    background: rgba(255, 250, 250, 0.6); /* 非常浅的粉白 */
}

details th {
    background: linear-gradient(to bottom, #f0d6e8, #e8c6d8);
    color: #5d2d4f;                     /* 深紫红 */
    padding: 10px;
    font-weight: 700;
    border-bottom: 2px solid #d45d79;   /* 艳粉边框 */
}

details td {
    padding: 9px 12px;
    border-bottom: 1px solid #e8b4d8;   /* 淡紫分隔线 */
}

details tr:hover td {
    background: rgba(212, 93, 121, 0.12); /* 悬停高亮用桃红 */
}

/* 角色卡 - "被标注的猎物" */
.character-block {
    background: rgba(255, 245, 250, 0.85);
    border: 1px solid #e8b4d8;
    border-radius: 10px;
    padding: 14px;
    margin: 12px 0;
    box-shadow:
        0 3px 10px rgba(139, 69, 169, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

/* 思维链 - "精密的堕落计划" */
.chain-block {
    padding: 12px;
    margin: 10px 0;
    border-left: 4px solid #ba8fd0;     /* 薰衣草紫 */
    background: rgba(245, 230, 250, 0.7);
    border-radius: 0 6px 6px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13.5px;
    color: #5d2d4f;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .tw-text p {
        font-size: 14.5px;
        line-height: 1.9;
    }
    details > summary {
        font-size: 13.5px;
        padding: 11px 16px;
    }
    /* 在窄屏幕上，让不洁感更集中 */
    details {
        box-shadow:
            0 2px 8px rgba(212, 93, 121, 0.15),
            inset 0 0 15px rgba(255, 182, 193, 0.1);
    }
}