/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a; /* 深色背景 */
    color: #e0e0e0; /* 浅色文字 */
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 整个对话框/内容区域 */
.ai-dialog-container { /* 假设这是包裹整个AI回复的容器 */
    max-width: 800px;
    margin: 20px auto;
    background-color: #282828; /* 比body稍亮的深色背景 */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid #4CAF50; /* 主题色边框 */
}

/* 文本内容 */
.text p {
    padding: 10px 25px;
    margin: 0;
    font-size: 1.05em;
    color: #e0e0e0;
    text-align: justify;
}
.text p:first-child {
    padding-top: 25px;
}
.text p:last-child {
    padding-bottom: 25px;
}

/* 折叠栏基础样式 */
details {
    background-color: #333;
    border: 1px solid #444;
    border-radius: 8px;
    margin: 15px 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
}
details:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    color: #4CAF50; /* 主题色 */
    font-size: 1.1em;
    background-color: #3c3c3c;
    border-bottom: 1px solid #444;
    border-radius: 8px 8px 0 0;
    transition: background-color 0.3s ease;
}
summary:hover {
    background-color: #444;
}
details[open] summary {
    background-color: #4CAF50;
    color: #fff;
    border-bottom: 1px solid #5cb85c;
}
details[open] summary::after {
    content: '▼';
    transform: rotate(180deg);
}
summary::after {
    content: '►';
    font-size: 0.9em;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

/* 状态栏特定样式 */
details[open] summary[title="📊 状态栏"] {
    background-color: #4CAF50;
    color: #fff;
}
details[open] summary[title="🌟 星记忆回廊 (LTM | STM)"] {
    background-color: #FFD700; /* 金色 */
    color: #333;
}
details[open] summary[title="🎲 行动建议"] {
    background-color: #00BFFF; /* 天蓝色 */
    color: #fff;
}

details > div { /* 折叠内容区域 */
    padding: 15px 20px;
    background-color: #333;
    border-radius: 0 0 8px 8px;
}

/* 状态栏内容 */
details > div p {
    margin: 5px 0;
    color: #e0e0e0;
    font-size: 0.95em;
}
details > div p strong {
    color: #4CAF50; /* 强调色 */
}
details > div p span {
    color: #999;
}

/* 记忆区表格样式 */
.details > div table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9em;
}
.details > div th, .details > div td {
    border: 1px solid #555;
    padding: 8px;
    text-align: left;
    color: #e0e0e0;
}
.details > div th {
    background-color: #4CAF50;
    color: #fff;
    font-weight: bold;
}
.details > div tr:nth-child(even) {
    background-color: #3a3a3a;
}
.details > div tr:hover {
    background-color: #444;
}
.details > div hr {
    border: none;
    border-top: 1px dashed #555;
    margin: 15px 0;
}

/* 行动建议列表 */
details > div ol {
    padding-left: 20px;
    margin: 10px 0;
}
details > div ol li {
    margin-bottom: 8px;
    color: #e0e0e0;
    font-size: 1em;
}
details > div ol li:hover {
    color: #4CAF50;
    cursor: pointer;
}

/* 隐藏思维链 */
.think {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-dialog-container {
        margin: 10px;
        border-radius: 8px;
    }
    .text p {
        padding: 8px 15px;
        font-size: 1em;
    }
    summary {
        padding: 12px 15px;
        font-size: 1em;
    }
    details {
        margin: 10px 15px;
    }
    details > div {
        padding: 12px 15px;
    }
    details > div table, details > div th, details > div td {
        font-size: 0.85em;
        padding: 6px;
    }
}