/* ====== 淡紫基底 · 黑字 ====== */
/* 核心理念：淡紫朦胧基底上，黑色文字清晰利落 */

/* 整体 - 淡紫透明基底 + 黑色文字 */
body, .tw-text {
    background: rgba(212, 192, 224, 0.50) !important;
    color: #000000 !important;           /* 纯黑 */
    font-family: 'Noto Serif SC', 'SimSun', 'Songti SC', serif;
    letter-spacing: 0.8px;
    text-shadow: none;
}

/* 正文 - 黑色文字 + 淡紫底纹 */
.tw-text p {
    text-indent: 2em;
    margin: 14px 0;
    line-height: 1.95;
    font-size: 15.2px;
    color: #000000 !important;           /* 纯黑 */
    font-weight: 500;
    text-shadow: none;
    background: rgba(212, 192, 224, 0.50) !important;
    padding: 2px 8px;
    border-radius: 2px;
    border-left: 2px solid rgba(0, 0, 0, 0.10);
}

/* 对话 - 黑色加粗 */
.tw-text .f {
    color: #000000 !important;           /* 纯黑 */
    font-weight: 700;
    text-shadow: none;
}

.tw-text .f em {
    color: #000000 !important;
    font-style: italic;
    text-shadow: none;
}

/* ===== 折叠面板 - 淡紫玻璃 ===== */
details {
    margin: 12px 0;
    background: rgba(212, 192, 224, 0.50) !important;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px 4px 12px 4px;
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.04),
        inset 0 0 40px rgba(212, 192, 224, 0.10);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

details:hover {
    border-color: rgba(0, 0, 0, 0.25);
    box-shadow:
        0 6px 30px rgba(0, 0, 0, 0.06),
        inset 0 0 60px rgba(212, 192, 224, 0.15);
}

details > summary {
    background: rgba(212, 192, 224, 0.55) !important;
    color: #000000 !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-shadow: none;
    letter-spacing: 1px;
}

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

details[open] > summary {
    color: #000000 !important;
    background: rgba(212, 192, 224, 0.60) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

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

/* 记忆回廊 - 淡紫偏粉 */
details.star-memory {
    background: rgba(212, 192, 224, 0.50) !important;
    border-color: rgba(0, 0, 0, 0.10);
    box-shadow: inset 0 0 40px rgba(212, 192, 224, 0.08);
}

details.star-memory > summary {
    color: #000000 !important;
    background: rgba(212, 192, 224, 0.55) !important;
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

details.star-memory > summary::after {
    color: #000000;
}

details.star-memory[open] > summary {
    color: #000000 !important;
    background: rgba(212, 192, 224, 0.60) !important;
}

/* 行动推荐 - 淡紫偏蓝紫 */
details.action {
    background: rgba(212, 192, 224, 0.50) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    box-shadow: inset 0 0 40px rgba(212, 192, 224, 0.08) !important;
}

details.action > summary {
    color: #000000 !important;
    background: rgba(212, 192, 224, 0.55) !important;
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

details.action > summary::after {
    color: #000000 !important;
}

details.action[open] > summary {
    color: #000000 !important;
    background: rgba(212, 192, 224, 0.60) !important;
}

/* ===== 表格美化 - 淡紫数据面板 ===== */
details table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13.8px;
    background: rgba(212, 192, 224, 0.50) !important;
}

details th {
    background: rgba(212, 192, 224, 0.60) !important;
    color: #000000 !important;
    padding: 10px;
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 0, 0, 0.10);
    text-shadow: none;
    letter-spacing: 1px;
}

details td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #000000 !important;
}

details tr:hover td {
    background: rgba(212, 192, 224, 0.60) !important;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.02);
}

/* ===== 角色卡 - 淡紫轮廓 ===== */
.character-block {
    background: rgba(212, 192, 224, 0.50) !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px 4px 12px 4px;
    padding: 14px;
    margin: 12px 0;
    box-shadow:
        0 3px 20px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(4px);
}

.character-block:hover {
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 3px 30px rgba(0, 0, 0, 0.04);
}

/* ===== 思维链 - 黑色光带 ===== */
.chain-block {
    padding: 12px;
    margin: 10px 0;
    border-left: 4px solid #000000;
    background: rgba(212, 192, 224, 0.50) !important;
    border-radius: 0 6px 6px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13.5px;
    color: #000000 !important;
    box-shadow: inset 0 0 30px rgba(212, 192, 224, 0.06);
}

.chain-block:hover {
    border-left-color: #000000;
    background: rgba(212, 192, 224, 0.55) !important;
}

/* ===== 移动端优化 ===== */
@media (max-width: 480px) {
    .tw-text p {
        font-size: 14.5px;
        line-height: 1.9;
        border-left-width: 1px;
    }
    details > summary {
        font-size: 13.5px;
        padding: 11px 16px;
    }
    details {
        border-radius: 8px 2px 8px 2px;
    }
}