/* 核心卡片容器：拟物化阴影与圆角，模拟现代APP模块 */
details {
    background: #ffffff;
    border-radius: 14px;
    margin: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f2f5;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

/* 展开时的卡片浮雕放大效果 */
details[open] {
    box-shadow: 0 8px 24px rgba(149, 157, 165, 0.15);
    border-color: #d1d9e6;
    margin: 16px 0;
}

/* 卡片标题栏：隐藏丑陋的默认三角，改为丝滑排版 */
details summary {
    padding: 15px 18px;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    list-style: none; /* 必须：隐藏部分浏览器的默认小三角 */
    background: linear-gradient(to right, #ffffff, #f8fafc);
    display: flex;
    align-items: center;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 隐藏WebKit内核下的默认三角 */
details summary::-webkit-details-marker {
    display: none;
}

/* 定制右侧的动态折叠指示器 (十字变减号) */
details summary::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

details[open] summary::after {
    transform: translateY(-30%) rotate(225deg);
    border-color: #3b82f6;
}

details[open] summary {
    border-bottom: 1px dashed #e2e8f0;
    color: #3b82f6; /* 展开后标题变蓝 */
}

/* 信息条目基础排版：精准隔离，防止污染平台其它元素的 p 标签 */
details p {
    margin: 0;
    padding: 12px 18px;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
    border-bottom: 1px solid #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    word-break: break-all;
}

/* 斑马线底纹：让长篇数据更容易阅读 */
details p:nth-of-type(even) {
    background-color: #fafbfc;
}

/* 去除最后一个条目的底边框 */
details p:last-of-type {
    border-bottom: none;
    padding-bottom: 16px;
}

/* 玩家台词/高亮标记专属样式（如果你在正文里用了 <font> 标签包围对话） */
details font {
    color: #059669;
    background: #ecfdf5;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin: 0 2px;
}

/* 【黑客引擎特调】思维链 <think> 的专属终端渲染 */
details think {
    display: block;
    margin: 12px 18px 16px;
    padding: 14px;
    background: #0f172a; /* 深夜蓝背景 */
    color: #34d399;      /* 荧光绿文字 */
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.6;
    border-radius: 8px;
    border-left: 4px solid #10b981;
    white-space: pre-wrap;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* 丝滑的下拉展开动画 */
details[open] p, details[open] think {
    animation: appSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes appSlideIn {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}