/* ==================== 状态栏折叠框基础样式 ==================== */

details {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(224, 239, 245, 0.8) !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    padding: 2px 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(160, 195, 210, 0.1) !important;
}

details[open] {
    background: rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 4px 15px rgba(160, 195, 210, 0.2) !important;
}

/* 标题栏（Summary）—— 收起状态：更大更鲜艳 */
summary {
    font-weight: bold !important;
    color: #1b4f72 !important;
    font-size: 1.15em !important;
    padding: 12px 8px !important;
    cursor: pointer !important;
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    background: rgba(201, 225, 233, 0.35) !important;
    border-radius: 10px !important;
    margin: 2px 0 !important;
    transition: all 0.4s ease !important;
}

/* 标题栏（Summary）—— 展开状态：再深一层 */
details[open] summary {
    color: #154360 !important;
    background: rgba(201, 225, 233, 0.6) !important;
    margin-bottom: 8px !important;
}

/* 星星标识 —— 默认状态：金黄色 */
summary::before {
    content: '✦' !important;
    margin-right: 10px !important;
    color: #f4d03f !important;
    font-size: 1.1em !important;
    display: inline-block !important;
    transition: transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    filter: drop-shadow(0 0 2px rgba(244, 208, 63, 0.4)) !important;
}

/* 星星标识 —— 展开状态：多转两圈（765° = 45° + 720°） */
details[open] summary::before {
    transform: rotate(765deg) !important;
    color: #fdf5d3 !important;
    text-shadow: 0 0 8px rgba(253, 245, 211, 0.6) !important;
    filter: drop-shadow(0 0 4px rgba(253, 245, 211, 0.5)) !important;
}

/* ==================== 正文段落 —— 悬浮立体卡片效果（圆润） ==================== */
p {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    margin-bottom: 12px !important;
    color: #556b78 !important;
    line-height: 1.7 !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    box-shadow: 
        0 1px 1px rgba(160, 195, 210, 0.08),
        0 4px 8px rgba(160, 195, 210, 0.12),
        0 8px 16px rgba(160, 195, 210, 0.1),
        0 16px 32px rgba(160, 195, 210, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

p:hover {
    transform: translateY(-4px) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    box-shadow: 
        0 2px 2px rgba(160, 195, 210, 0.1),
        0 8px 16px rgba(160, 195, 210, 0.16),
        0 16px 32px rgba(160, 195, 210, 0.14),
        0 32px 64px rgba(160, 195, 210, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* ==================== 角色对话文本 —— 方形淡粉底色 + 左侧金色竖条 ==================== */
.dialogue-text,
[class*="dialogue"] {
    /* 单独成段 */
    display: block !important;
    
    /* 淡粉底色 */
    background: rgba(255, 240, 245, 0.75) !important;
    backdrop-filter: blur(6px) !important;
    
    /* 方形不圆润 */
    border-radius: 0 !important;
    
    /* 左侧金色竖条装饰 */
    border-left: 4px solid #d4af37 !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-right: 1px solid rgba(212, 175, 55, 0.15) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15) !important;
    
    /* 内边距 */
    padding: 14px 18px 14px 22px !important;
    margin-bottom: 12px !important;
    
    /* 文字样式：鲜亮血红色加粗 */
    color: #DC143C !important;
    font-weight: 700 !important;
    text-shadow: 0 0 4px rgba(220, 20, 60, 0.25) !important;
    font-style: normal !important;
    letter-spacing: 0.02em !important;
    line-height: 1.7 !important;
    
    /* 区别于正文卡片的阴影 */
    box-shadow: 
        2px 0 6px rgba(212, 175, 55, 0.15),
        0 2px 8px rgba(220, 20, 60, 0.08) !important;
    
    /* 过渡 */
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

/* 角色对话悬浮效果 */
.dialogue-text:hover,
[class*="dialogue"]:hover {
    background: rgba(255, 235, 240, 0.9) !important;
    border-left-color: #c9a227 !important;
    box-shadow: 
        3px 0 10px rgba(212, 175, 55, 0.25),
        0 4px 12px rgba(220, 20, 60, 0.12) !important;
    transform: translateX(2px) !important;
}

/* ==================== 内部表格（记忆与情报）美化 ==================== */
table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 10px 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid rgba(224, 239, 245, 0.5) !important;
}

th {
    background-color: rgba(201, 225, 233, 0.5) !important;
    color: #4a5c68 !important;
    padding: 8px !important;
    font-size: 0.9em !important;
}

td {
    background-color: rgba(255, 255, 255, 0.5) !important;
    border-top: 1px solid rgba(224, 239, 245, 0.3) !important;
    padding: 8px !important;
    font-size: 0.85em !important;
    color: #6a8290 !important;
}

/* ==================== 心声剧场 (voice代码块) ==================== */
pre code.language-voice,
code[class*="voice"] {
    color: #9d8189 !important;
    font-style: italic !important;
    display: block !important;
    padding: 10px !important;
    line-height: 1.6 !important;
    background: linear-gradient(90deg, rgba(241, 203, 203, 0.2) 0%, transparent 100%) !important;
}

/* ==================== 剧情分支 (python代码块) ==================== */
pre code.language-python,
code[class*="python"] {
    color: #556b78 !important;
    border-left: 3px solid #fdf5d3 !important;
    padding-left: 15px !important;
}