.w-full.h-full.max-h-\[70vh\] {
    max-height: 100% !important;
    height: 100% !important;
}

div[id^="ai-chat-answer"] div[class*="rounded-"]:not([class*="rounded-full"])

/* =========================================
   深空幽蓝科幻主题 (Sci-Fi Deep Blue)
   ========================================= */

/* --- 1. 顶部栏：全息星舰控制台 --- */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(180deg, rgba(4, 13, 33, 0.95) 0%, rgba(10, 25, 47, 0.85) 100%) !important;
    border-bottom: 1px solid rgba(0, 243, 255, 0.4) !important;
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.15) !important;
    backdrop-filter: blur(8px) !important;
    font-family: system-ui, -apple-system, sans-serif !important;
}

/* 顶部栏文字与图标：荧光青色发光效果 */
#ai-model-selector .truncate.text-\[13px\],
#ai-model-selector .shrink-0.flex.items-center svg,
.sticky.w-full.top-0 svg.lucide-clock-8,
.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2,
.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]),
#header-setting-button svg {
    color: #00f3ff !important;
    fill: #00f3ff !important;
    filter: drop-shadow(0 0 4px rgba(0, 243, 255, 0.8)) !important;
    transition: all 0.3s ease !important;
}

/* --- 🌟 特效：模拟小飞船在顶部栏巡航 --- */
@keyframes spaceship-patrol {
    0% { left: 0%; box-shadow: 0 0 10px #fff, 0 0 20px #00f3ff, 0 0 30px #00f3ff; }
    50% { left: calc(100% - 20px); box-shadow: 0 0 15px #fff, 0 0 30px #00f3ff, 0 0 40px #0055ff; }
    100% { left: 0%; box-shadow: 0 0 10px #fff, 0 0 20px #00f3ff, 0 0 30px #00f3ff; }
}

.sticky.w-full.top-0.flex.items-center::after {
    content: '' !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 0 !important;
    width: 20px !important;
    height: 3px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    animation: spaceship-patrol 4s ease-in-out infinite !important;
    pointer-events: none !important; /* 确保不影响点击 */
}

/* --- 2. 底部栏渐变背景 --- */
.bg-gradient-to-t {
    background: linear-gradient(to top, rgba(4, 13, 33, 1) 0%, rgba(10, 25, 47, 0.9) 60%, transparent 100%) !important;
}

/* --- 3. 底部按钮：机械交互面板 --- */
#ai-mod-button2 button.MuiButton-root {
    background: rgba(10, 25, 47, 0.8) !important;
    border: 1px solid #0055ff !important;
    color: #00f3ff !important;
    border-radius: 6px !important;
    text-shadow: 0 0 4px rgba(0, 243, 255, 0.5) !important;
    box-shadow: inset 0 0 8px rgba(0, 85, 255, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: bold !important;
}

#ai-mod-button2 button.MuiButton-root svg {
    fill: #00f3ff !important;
    filter: drop-shadow(0 0 2px #00f3ff) !important;
}

/* 按钮悬停：能量过载发光效果 */
#ai-mod-button2 button.MuiButton-root:hover {
    background: rgba(0, 243, 255, 0.15) !important;
    border-color: #00f3ff !important;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.6), inset 0 0 15px rgba(0, 243, 255, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* --- 4. 底部输入框：能量力场 --- */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 85, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 243, 255, 0.5); }
}

#ai-chat-bottom-input {
    animation: pulse-glow 4s infinite alternate !important;
    border-radius: 12px !important;
}

#ai-chat-input {
    background: rgba(4, 13, 33, 0.8) !important;
    border: 1px solid rgba(0, 85, 255, 0.6) !important;
    color: #e6f1ff !important; /* 极浅的蓝白色，确保输入文字绝对清晰 */
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    font-family: system-ui, -apple-system, sans-serif !important;
}

/* 输入框聚焦：激活通讯频道 */
#ai-chat-input:focus {
    border-color: #00f3ff !important;
    background: rgba(10, 25, 47, 0.95) !important;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4), inset 0 0 10px rgba(0, 243, 255, 0.1) !important;
    outline: none !important;
}

#ai-chat-input::placeholder {
    color: rgba(0, 243, 255, 0.4) !important;
}

#ai-chat-input::selection {
    background: rgba(0, 243, 255, 0.5) !important;
    color: #ffffff !important;
}




/* --- 全局容器与重置 --- */
s-bar {
    display: block;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #a0c0e0;
    font-size: 14px;
    line-height: 1.5;
    background: #050810;
    border: 1px solid #1a2a40;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

/* --- 折叠栏样式 --- */
s-bar details {
    margin-bottom: 8px;
    background: rgba(16, 24, 45, 0.5);
    border: 1px solid #203a55;
    border-radius: 6px;
    transition: all 0.3s ease;
}

s-bar details[open] {
    background: rgba(16, 24, 45, 0.8);
    border-color: #00d2ff;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
}

s-bar summary {
    padding: 8px 12px;
    font-weight: bold;
    color: #00d2ff;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.1) 0%, transparent 100%);
}

s-bar summary:hover {
    color: #fff;
    text-shadow: 0 0 5px #00d2ff;
}

/* --- 1. 思维链 (CoT) --- */
c-o-t {
    display: block;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #88aaff;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px dashed #306090;
    white-space: pre-wrap;
}

/* --- 2. 战术面板 (HUD) --- */
.hud-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; color: #fff; border-bottom: 1px solid #333; padding-bottom: 4px; margin-bottom: 4px;}
.hud-alert { color: #ff4444; font-weight: bold; animation: blink 2s infinite; font-size: 0.9em; }
.hud-env, .hud-units { font-size: 0.9em; color: #ccc; margin-top: 4px; }
.quest-box { margin-top: 8px; padding: 8px; background: rgba(255, 215, 0, 0.05); border-left: 3px solid #ffd700; }
.q-title { color: #ffd700; font-weight: bold; }
.q-reward { color: #00ff99; text-align: right; font-size: 0.9em; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* --- 3. 舰船状态栏 & 通用弹窗系统 (已改良弹窗位置与字号) --- */
u-s {
    display: block;
    margin: 10px 0;
    padding: 12px;
    background: linear-gradient(135deg, #0a0f1e 0%, #16203a 100%);
    border: 1px solid #306090;
    border-radius: 8px;
    color: #e0e0e0;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,210,255,0.05);
}
u-s header {
    display: flex; justify-content: space-between;
    font-weight: bold; color: #00d2ff;
    border-bottom: 1px solid rgba(0, 210, 255, 0.3);
    padding-bottom: 5px; margin-bottom: 8px;
}
.stat-grid { display: flex; justify-content: space-between; flex-wrap: wrap; font-family: monospace; color: #fff; font-size: 0.9em; }
.ship-mod { font-size: 0.85em; color: #a0c0e0; margin: 5px 0; font-style: italic; }

/* 舰船 UI 分割线专属样式 (强制 100% 宽度打断 Flex 布局) */
.u-l-title {
    width: 100%; /* 核心魔法：强行占满一行，把按钮挤下去 */
    border-bottom: 1px dashed #666;
    margin: 8px 0 4px 0; /* 调整上下间距，让排版更透气 */
    padding-bottom: 3px;
    font-size: 12px;
    color: #aaa;
    letter-spacing: 1px; /* 加点字间距，更有科幻UI的高级感 */
}

/* 核心修复：所有包含弹窗按钮的容器，都必须相对定位 */
u-l, .equip-grid, .bag-list, .trait-box, .c-pop { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 6px; 
    margin-top: 8px; 
    position: relative; /* 关键！弹窗将以此区域为基准进行居中 */
}

/* 按钮样式 */
u-b {
    display: inline-block; padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444; border-radius: 4px;
    font-size: 0.8em; transition: 0.2s; cursor: pointer;
    max-width: 100%;
}
u-b:hover, u-b:focus-within { border-color: #00d2ff; background: rgba(0, 210, 255, 0.15); color: #fff; }
t { outline: none; color: inherit; display: block; width: 100%; height: 100%; }

/* 弹窗样式 - 已修改为容器居中模式并缩小字号 */
ti {
    display: none; position: absolute; z-index: 1000;
    /* --- 位置改动：定位到父级容器(u-l等)的中心 --- */
    top: 50%; left: 50%; 
    transform: translate(-50%, -50%); /* 精确位移到中心点 */
    width: 92%; /* 宽度几乎占满容器，看起来更像一个中央面板 */
    right: auto; 
    /* ------------------------------------------ */
    padding: 8px; background: rgba(10, 15, 26, 0.98);
    border: 1px solid #00d2ff; border-radius: 6px;
    box-shadow: 0 0 30px rgba(0,0,0,0.9);
    color: #ccc; 
    font-size: 11px; /* 字号缩小：从13px改为11px */
    line-height: 1.3; white-space: normal;
    backdrop-filter: blur(5px);
    pointer-events: none; /* 防止弹窗遮挡点击，如果需要点击弹窗内部可删除此行 */
}
/* 针对不同容器的弹窗位置微调 */
.c-pop ti { width: 200px; } 
.equip-grid ti { z-index: 1001; }

ti b { display: block; color: #00d2ff; border-bottom: 1px dotted #555; margin-bottom: 4px; font-size: 1.05em; } /* 标题字号同步微调 */
ti i { display: block; margin-top: 5px; color: #aaa; font-style: normal; font-size: 0.85em; } /* 描述字号同步微调 */
t:focus ti, t:active ti { display: block; }

/* 槽位/物品颜色分类 */
.t-slot { border-left: 3px solid #a333c8; }
.x-slot { border-left: 3px solid #fbbd08; }
.g-slot { border-left: 3px solid #f2711c; }
.h-slot { border-left: 3px solid #00b5ad; }
.p-slot { border-left: 3px solid #767676; }
.m-slot { border-left: 3px solid #2185d0; }

/* --- 4. 个人档案 (P-S) --- */
p-s { display: block; padding: 8px; }
.p-head { display: flex; gap: 10px; margin-bottom: 8px; align-items: center; }
.p-info { flex: 1; line-height: 1.4; }
.p-info b { color: #fff; font-size: 1.1em; }
.p-mind, .p-combat { background: rgba(0,0,0,0.2); padding: 5px; border-radius: 4px; margin-bottom: 5px; font-size: 0.9em; }
.trait-box { margin-top: 5px; }

/* --- 5. 装备栏 (布局优化) --- */
.inv-row { font-weight: bold; color: #ffd700; border-bottom: 1px solid #333; margin-bottom: 5px; }
/* .equip-grid 已经合并到上方通用容器定义中 */
.bag-list { margin-top: 8px; border-top: 1px dashed #333; padding-top: 5px; }

/* --- 6. 关键人物卡片组 (C-G) --- */
c-g {
    display: grid;
    /* 核心魔法：auto-fit 会自动计算屏幕能塞下几个卡片。
       min(100%, 320px) 保证了在超窄手机上不会撑爆屏幕，在电脑端则保持 320px 的完美宽度并自动并排！*/
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 12px;
    padding-bottom: 8px;
}

c-c {
    /* Grid 布局下不需要 flex 属性了，直接 block 即可 */
    display: block; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px; 
    overflow: visible; 
}

.c-img {
    float: left; /* 【核心魔法2】让图片向左浮动，文字会自动环绕到它下方！ */
    width: 80px; 
    height: 80px;
    margin: 0 10px 5px 0; /* 右边和下边留出间距，推开文字 */
    background-size: cover; 
    background-position: center top;
    border-radius: 6px; /* 头像加个小圆角，质感++ */
    border: 1px solid #555; /* 边框改全包围，去掉原来的 border-right */
}

.c-data { 
    display: block; /* 取消原本的 flex 纵向排列 */
    font-size: 0.85em; 
    line-height: 1.5; /* 【优化】增加行高，字多的时候阅读更舒服 */
    color: #ddd;
}

/* 清除浮动，确保最底部的元素不会排版错乱 */
.c-data::after {
    content: "";
    display: table;
    clear: both;
}

.c-name { color: #fff; font-weight: bold; margin-bottom: 4px; font-size: 1.1em; }
.c-name small { color: #888; font-weight: normal; margin-left: 5px; font-size: 0.85em; }
.c-stat { margin-bottom: 6px; color: #ff9999; border-bottom: 1px dashed #555; padding-bottom: 4px; } /* 给血条加个虚线底边，做个视觉分隔 */
.c-desc, .c-mind { margin-bottom: 6px; }
.c-pop { margin-top: 8px; clear: both; /* 确保特质/物品栏始终在最下方 */ }

/* --- 7. 其他部分 --- */
.npc-list { padding-left: 20px; margin: 0; font-size: 0.9em; }
.npc-list li { margin-bottom: 5px; }
.heart-voice { 
    border-left: 3px solid #e91e63; 
    background: linear-gradient(90deg, rgba(233, 30, 99, 0.1), transparent);
    padding: 8px; margin: 10px 0; font-style: italic; color: #ffcce0;
}
.mem-sec { margin-bottom: 6px; padding: 5px; border-radius: 4px; font-size: 0.9em; }
.stm { background: rgba(0, 255, 0, 0.05); border-left: 2px solid #00ff00; }
.ltm { background: rgba(0, 100, 255, 0.05); border-left: 2px solid #0066ff; }
.core { background: rgba(255, 0, 0, 0.05); border-left: 2px solid #ff0000; }
.log { background: rgba(255, 215, 0, 0.05); border-left: 2px solid #ffd700; font-family: monospace; }

a-p ol { margin: 0; padding-left: 25px; }
a-p li { margin-bottom: 4px; color: #00d2ff; cursor: pointer; transition: 0.2s; }
a-p li:hover { color: #fff; text-shadow: 0 0 8px #00d2ff; transform: translateX(5px); }

/* --- 正文容器 (保持不变) --- */
main-screen {
    display: block; position: relative; padding: 15px 12px; margin: 5px 0 15px 0;
    background: linear-gradient(rgba(18, 25, 40, 0.4) 50%, rgba(0, 0, 0, 0.1) 50%), rgba(10, 15, 25, 0.3);
   background: rgba(10, 15, 25, 0.3);
    border-left: 3px solid #00d2ff; border-right: 1px solid rgba(0, 210, 255, 0.2);
    border-top: 1px solid rgba(0, 210, 255, 0.1); border-bottom: 1px solid rgba(0, 210, 255, 0.1);
    border-radius: 0 8px 0 0; box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
main-screen::after { content: "LOG_REC ●"; position: absolute; top: -10px; right: 5px; font-size: 0.7em; color: #00d2ff; background: #050810; padding: 0 5px; font-family: monospace; opacity: 0.8; }
main-screen p { margin: 0 0 12px 0; text-align: justify; line-height: 1.7; text-indent: 2em; position: relative; }
main-screen p:hover { background: rgba(255, 255, 255, 0.02); }
main-screen hr { border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 210, 255, 0), rgba(0, 210, 255, 0.75), rgba(0, 210, 255, 0)); margin: 20px 0; position: relative; }
main-screen hr::after { content: "◈"; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); color: #00d2ff; background: #050810; padding: 0 5px; font-size: 12px; }
main-screen strong, main-screen b { color: #00d2ff; font-weight: bold; }

/* --- 舰载战斗AI思维链样式 --- */
think {
    display: block;
    background: rgba(0, 20, 40, 0.6);
    border-left: 2px solid #00d2ff;
    margin: 5px 0;
    padding: 8px;
    font-size: 0.75rem; /* 字体缩小 */
    line-height: 1.2;   /* 行间距紧凑 */
    color: #70c0ff;
    font-family: 'Courier New', Courier, monospace; /* 等宽字体增加计算感 */
    white-space: pre-wrap;
    position: relative;
    overflow: hidden;
}

/* 装饰：演算中的小光点 */
think::before {
    content: "●";
    color: #00d2ff;
    position: absolute;
    right: 10px;
    top: 5px;
    animation: blink 1s infinite;
}

@keyframes blink { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

/* --- 敌方舰船扫描终端 (猩红配色 - 已改良弹窗位置与字号) --- */
e-s {
    display: block;
    margin: 10px 5px;
    padding: 12px;
    background: linear-gradient(135deg, #1a0505 0%, #3a0a0a 100%); /* 暗红渐变 */
    border: 1px solid #903030;
    border-radius: 8px;
    color: #f0e0e0;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 4px 15px rgba(255,0,0,0.2);
    position: relative; /* 确保弹窗以此为定位基准 */
}

/* 敌方标题栏：警示红 */
e-s header {
    font-weight: bold;
    color: #ff4d4d;
    border-bottom: 1px solid rgba(255, 77, 77, 0.3);
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
}

/* 敌方槽位按钮：暗红色调 */
e-b {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #602020;
    border-radius: 4px;
    font-size: 0.75em;
    transition: 0.2s;
}

e-b:focus-within {
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.2);
}

/* 敌方浮窗：锁定风格 - 已修改为中央弹出模式 */
e-s ti {
    display: none;
    position: absolute;
    /* --- 位置改动：定位到敌舰容器 e-s 的中心 --- */
    top: 55%; left: 50%; 
    transform: translate(-50%, -50%); 
    width: 92%; 
    right: auto;
    /* ------------------------------------------ */
    z-index: 998; 
    padding: 10px; /* 稍微缩小内边距 */
    background: rgba(26, 5, 5, 0.98);
    border: 1px solid #ff4d4d;
    border-radius: 6px;
    box-shadow: 0 0 25px rgba(0,0,0,0.9);
    pointer-events: none; /* 防止弹窗遮挡点击 */
    white-space: normal;
    font-size: 11px; /* 字号缩小：保持与玩家UI一致的精致感 */
    line-height: 1.3;
}

e-s ti b {
    color: #ff4d4d;
    display: block;
    font-size: 1.05em; /* 标题字号同步微调 */
    margin-bottom: 4px;
    border-bottom: 1px dotted #602020;
}

/* 锁定/未知状态的特殊样式 */
.is-locked {
    color: #666 !important;
    text-shadow: none;
    font-style: italic;
}

/* 基础图片容器样式 - 终极防翻车版 (这部分你写得非常完美，直接保留) */
.c-img {
    display: block; 
    width: 100px; 
    min-width: 100px; 
    height: 100px; 
    aspect-ratio: 1 / 1;
    flex-shrink: 0; 
    background-size: cover; 
    background-position: center top; 
    background-repeat: no-repeat;
    border-radius: 8px; 
    background-color: #2a2a2a; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.3); 
}


.c-img[data-name="灰风"] {
    background-image: url('https://s41.ax1x.com/2026/03/10/peixLRI.png');
}

.c-img[data-name="翠蛉"] {
    background-image: url('https://s41.ax1x.com/2026/03/11/peF5xiT.png');
}

.c-img[data-name="啾娅"] {
    background-image: url('https://v1.ax1x.com/2026/03/17/NqKvDP.png');
}

.c-img[data-name="终端-73"] {
    background-image: url('https://v1.ax1x.com/2026/03/17/NqKafw.png');
}

.c-img[data-name="琉璃"] {
    background-image: url('https://v1.ax1x.com/2026/03/17/Nqbpdt.png');
}

.c-img[data-name="泡泡"] {
    background-image: url('https://v1.ax1x.com/2026/03/17/Nqbbwj.png');
}

.c-img[data-name="厄里斯"] {
    background-image: url('https://v1.ax1x.com/2026/03/17/NqbgS5.png');
}