/* --- Star Trek LCARS Theme for AI Chat --- */

/* 容器与基础设定 */
.ai-st-container {
    --lcars-orange: #ff9900;
    --lcars-purple: #cc99ff;
    --lcars-blue: #9999ff;
    --lcars-bg: #000;
    --lcars-text: #ddd;
    
    background-color: var(--lcars-bg);
    color: var(--lcars-text);
    font-family: Arial, sans-serif; /* 使用通用无衬线字体模拟LCARS风格 */
    border-radius: 15px;
    padding: 5px;
    margin: 10px 0;
    overflow: hidden; /* 保证内部LCARS元素不会溢出圆角 */
}

/* 移除details默认箭头 */
.ai-st-container details > summary {
    list-style: none;
}
.ai-st-container details > summary::-webkit-details-marker {
    display: none;
}

/* --- LCARS 核心元素样式 --- */

/* <summary> 标题栏基础样式 */
.ai-st-container summary {
    padding: 5px 10px;
    padding-left: 90px; /* 为左侧的"弯头"留出空间 */
    margin-bottom: 5px;
    position: relative;
    cursor: pointer;
    background-color: var(--lcars-purple);
    color: var(--lcars-bg);
    font-weight: bold;
    border-radius: 0 5px 5px 0; /* 右侧圆角 */
    transition: background-color 0.3s;
}

.ai-st-container summary:hover {
    background-color: var(--lcars-blue);
}

/* 创造LCARS标志性的"弯头" */
.ai-st-container summary::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 80px;
    background-color: var(--lcars-orange);
    border-radius: 15px 0 0 15px; /* 左侧半圆 */
}

/* 打开状态的标题栏 */
.ai-st-container details[open] > summary {
    background-color: var(--lcars-blue);
    margin-bottom: 10px;
}

/* --- 内容区域样式 --- */
.ai-st-container details > div,
.ai-st-container details > p,
.ai-st-container details > ul,
.ai-st-container details > table {
    padding: 0 10px 10px 10px;
}

.ai-st-container strong {
    color: var(--lcars-orange);
    font-weight: normal;
}

/* NPC信息分隔线 */
.ai-st-container hr {
    border: none;
    height: 2px;
    background-color: var(--lcars-blue);
    margin: 15px 5px;
}

/* --- 特殊模块样式 --- */

/* 顶部栏 (奥德赛号) 特殊样式 */
.ai-st-container details:first-of-type > summary {
    background-color: var(--lcars-orange);
    color: var(--lcars-bg);
    font-size: 1.1em;
}
.ai-st-container details:first-of-type > summary::before {
    background-color: var(--lcars-purple);
}
.ai-st-container details:first-of-type > div, 
.ai-st-container details:first-of-type p {
    padding-left: 15px;
}

/* 记忆区表格样式 */
.ai-st-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.ai-st-container th, .ai-st-container td {
    border: 1px solid var(--lcars-blue);
    padding: 6px 8px;
    text-align: left;
    font-size: 0.9em;
}
.ai-st-container th {
    background-color: var(--lcars-purple);
    color: var(--lcars-bg);
    font-weight: bold;
}

/* 行动推荐列表 */
.ai-st-container details[open] summary ~ ol,
.ai-st-container details[open] summary ~ ul,
.ai-st-container details[open] summary ~ p > a {
    list-style-type: none;
    padding-left: 15px;
}

.ai-st-container details[open] summary ~ p > a,
.ai-st-container details[open] summary ~ ul li,
.ai-st-container details[open] summary ~ ol li {
    background: #333;
    margin-bottom: 4px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
    cursor: pointer;
}

.ai-st-container details[open] summary ~ p > a:hover,
.ai-st-container details[open] summary ~ ul li:hover,
.ai-st-container details[open] summary ~ ol li:hover {
    background: var(--lcars-orange);
    color: var(--lcars-bg);
}

/* 占位符的微调 */
.ai-st-container .placeholder, .ai-st-container [placeholder] {
    opacity: 0.7;
    font-style: italic;
}