/* ===================================================
   职高女校 · B平台全套CSS（暗金赛博HUD版）
   配色：深黑底 + 暗金 #d4af37 + 赛博青 #89dceb
         + 霓虹粉 #ff3366/#ff66b2 + 金钱绿 #4caf50
   包含：B平台适配 / 状态栏 / 聊天框 / 输入框
   =================================================== */

* { font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ═══════════════════════════════════════════════
   B平台 加载动画适配（自动注入）
   ═══════════════════════════════════════════════ */
.flex.items-center.justify-center.size-6 { opacity: 1 !important; }
.flex.items-center.justify-center.size-6 > .flex.gap-2 { display: none !important; }

/* ═══════════════════════════════════════════════
   B平台 表格修正（自动注入）
   ═══════════════════════════════════════════════ */
.rili-markdown-renderer table { display:table!important; table-layout:auto!important; width:100%!important; border-collapse:collapse!important; }
.rili-markdown-renderer table caption { display:table-caption!important; caption-side:top!important; text-align:center!important; padding:8px!important; }
.rili-markdown-renderer thead { display:table-header-group!important; }
.rili-markdown-renderer tbody { display:table-row-group!important; }
.rili-markdown-renderer tr { display:table-row!important; }
.rili-markdown-renderer th, .rili-markdown-renderer td { display:table-cell!important; }

/* ═══════════════════════════════════════════════
   B平台 按钮组保护（防止按钮消失）
   ═══════════════════════════════════════════════ */
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5,
.is-user .bg-muted.rounded.flex.p-0\.5,
.is-assistant .bg-muted.rounded.flex.p-0\.5 {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  position: relative !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  pointer-events: auto !important;
  clip: auto !important;
  clip-path: none !important;
}
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5 > button,
.is-user .bg-muted.rounded.flex.p-0\.5 > button,
.is-assistant .bg-muted.rounded.flex.p-0\.5 > button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  clip: auto !important;
  clip-path: none !important;
}
.flex.items-center.gap-1.ml-auto.md\:opacity-0.group-hover\:opacity-100 {
  visibility: visible !important;
  display: flex !important;
  pointer-events: auto !important;
  overflow: visible !important;
}
.flex.w-full.items-center.justify-between.gap-2.px-2 {
  display: flex !important;
  visibility: visible !important;
  overflow: visible !important;
}

/* ═══════════════════════════════════════════════
   B平台 顶部栏适配
   ═══════════════════════════════════════════════ */
header.flex.justify-between { position: relative; overflow: visible; }
header.flex.justify-between {
    background: linear-gradient(90deg, #1e1e1e, #1a1a1a) !important;
    border-bottom: 1px solid #333;
}
#nav-left button {
    color: #d4af37;
    transition: color .25s ease, background .25s ease;
}
#nav-left button:hover { background: rgba(212, 175, 55, 0.12); }
#nav-left button svg { color: #d4af37; }
/* B平台模型按钮不在header内：button:has(> .flex-1.truncate.text-left) */
#nav-middle .group.flex.items-center {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: border-color .25s ease, box-shadow .25s ease;
}
#nav-middle .group.flex.items-center:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}
#nav-middle button:has(> .flex-1.truncate.text-left) .flex-1.truncate.text-left {
    color: #e0e0e0 !important;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
}
#nav-middle button:has(> .flex-1.truncate.text-left) svg { color: #d4af37; }
#nav-right button {
    color: #d4af37;
    transition: color .25s ease, background .25s ease;
}
#nav-right button:hover { background: rgba(212, 175, 55, 0.12); }
#nav-right button svg { color: #d4af37; }

/* ===================================================
   第一部分 · 状态栏（v-* 系列）
   =================================================== */
.v-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.v-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}
.v-title {
    background: linear-gradient(90deg, #2c2c2c, #1a1a1a);
    color: #d4af37;
    padding: 10px 15px;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 1.1em;
    cursor: pointer;
    border-bottom: 1px solid #333;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
    position: relative;
    transition: background 0.3s ease;
}
.v-title:hover { background: #2a2a2a; }
.v-title::after {
    content: '▾';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #d4af37;
    opacity: 0.6;
    transition: transform 0.3s ease;
}
details[open] > .v-title::after {
    transform: translateY(-50%) rotate(180deg);
    opacity: 0.9;
}
/* 注意：移除了原来的 animation，避免内容更新时闪烁 */
.v-content {
    padding: 15px;
    color: #ccc;
    font-size: 0.95em;
    line-height: 1.8;
}
.v-content strong, .v-content b {
    font-weight: 600;
    color: #e0e0e0;
    letter-spacing: 0.5px;
}
/* 行级数据：块级自然换行 */
.v-row {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #333;
    display: block;
}
.v-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
/* 标签：行内、无胶囊背景 */
.v-label {
    display: inline;
    color: #89dceb;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 1px;
    margin-right: 5px;
}
.v-row .v-r18 { color: #ff66b2; }
.v-val { color: #e0e0e0; flex: 1; min-width: 0; }
.v-sub { color: #666; font-size: 0.85em; margin-left: 8px; }
.v-divider { color: #555; margin: 0 8px; }
.v-highlight {
    color: #ff3366;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}
.v-money {
    color: #4caf50;
    font-weight: 600;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 1.1em;
}
.v-bar {
    background: #2a2a2a;
    padding: 2px 8px;
    border-radius: 4px;
    color: #00bcd4;
    border: 1px solid #444;
    font-size: 0.9em;
    margin: 0 2px;
}
.v-sec-title {
    display: block;
    color: #e0e0e0;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 15px 0 10px 0;
    padding-left: 6px;
    border-left: 4px solid #ff3366;
}
.v-list-item {
    background: #222;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 6px;
    border-left: 3px solid #cba6f7;
    transition: background 0.2s ease;
}
.v-list-item:hover { background: #2a2a2a; }
.v-name { color: #cba6f7; font-weight: 600; letter-spacing: 0.5px; }
.v-item { color: #fff; }
.v-desc { color: #aaa; font-style: italic; }
.v-status { color: #f38ba8; font-weight: 600; }
.v-instruction {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 0, 0, 0.05);
    border: 1px dashed #ff3333;
    color: #ff9999;
    font-size: 0.85em;
}
.v-warn-title { font-weight: 600; color: #ff4d4d; }
.v-npc-card {
    background: #222;
    border: 1px solid #444;
    border-radius: 6px;
    margin-top: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}
.v-npc-card:hover { border-color: rgba(255, 102, 178, 0.4); }
.v-npc-title {
    background: #2a2a2a;
    color: #ff66b2;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
    position: relative;
    transition: background 0.3s ease;
}
.v-npc-title:hover { background: #333; }
.v-npc-title::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff66b2;
    opacity: 0.6;
    transition: transform 0.3s ease;
}
details[open] > .v-npc-title::after {
    transform: translateY(-50%) rotate(180deg);
    opacity: 0.9;
}
.v-npc-content { padding: 12px; }
.v-icon { font-size: 1.1em; margin-right: 6px; }
.v-sensual-box {
    background: linear-gradient(135deg, rgba(30, 15, 20, 0.8), rgba(20, 10, 15, 0.9));
    border: 1px solid rgba(243, 139, 168, 0.3);
    border-left: 3px solid #f38ba8;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
    box-shadow: inset 0 0 15px rgba(243, 139, 168, 0.05);
}
.v-sensual-row {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dotted rgba(243, 139, 168, 0.2);
    display: block;
}
.v-sensual-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.v-sensual-row .v-label {
    display: inline;
    color: #f38ba8;
    margin-right: 5px;
}
.v-sensual-row .v-val {
    display: inline;
    color: #f5e0e6;
    line-height: 1.6;
}
.v-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #444;
}
.v-content th, .v-content td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #333;
    border-right: 1px solid #333;
    font-size: 0.9em;
}
.v-content th:last-child, .v-content td:last-child { border-right: none; }
.v-content tr:last-child td { border-bottom: none; }
.v-content th {
    background: #2a2a35;
    color: #cba6f7;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
}
.v-content td { background: #1e1e26; color: #a6adc8; }
.v-content tr:hover td { background: #23232d; }
.v-action-list { display: flex; flex-direction: column; gap: 8px; }
.v-act-item {
    background: #252530;
    border: 1px solid #3a3a4a;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.v-act-item:hover {
    background: #2d2d3d;
    border-color: #89dceb;
    transform: translateX(4px);
}
.v-act-num {
    color: #89dceb;
    font-weight: bold;
    margin-right: 10px;
    font-family: 'Courier New', Consolas, monospace;
}
.v-act-text { color: #e0e0e0; }


/* ===================================================
   第三部分 · 聊天框（B平台）
   =================================================== */
/* ---- 隐藏顶部颜色装饰条 ---- */
[class*="bg-[#F1CBCB]"],
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}
/* ---- 统一聊天框 ---- */
.is-user > .border.border-muted,
.is-assistant > .border.border-muted {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    transition: border-color .3s ease, box-shadow .3s ease !important;
}
.is-user > .border.border-muted:hover,
.is-assistant > .border.border-muted:hover {
    border-color: rgba(212, 175, 55, 0.4) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.15) !important;
}
/* 背景动效（不影响布局与文本） */
.is-user > .border.border-muted::before,
.is-assistant > .border.border-muted::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(137, 220, 235, 0.03), transparent 60%);
    z-index: 0 !important;
    pointer-events: none;
    border-radius: inherit;
}
.is-user > .border.border-muted::after,
.is-assistant > .border.border-muted::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -30%;
    width: 50%;
    height: 220%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.06), transparent);
    transform: rotate(18deg);
    z-index: 0 !important;
    pointer-events: none;
}
/* ---- 主文本（绝对可读，严禁 text-shadow） ---- */
.rili-markdown-renderer {
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
    color: #F0F0F0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
    line-height: 1.8 !important;
    contain: content; /* 新增：减少重绘范围，降低闪烁 */
}
.rili-markdown-renderer strong, .rili-markdown-renderer b {
    font-weight: bold !important;
    color: #d4af37 !important;
}
.rili-markdown-renderer em { color: #ffb3c6 !important; }
.rili-markdown-renderer a { color: #89dceb !important; text-decoration: underline !important; }
.rili-markdown-renderer code {
    background: #2a2a2a !important;
    color: #89dceb !important;
    border: 1px solid #333 !important;
    border-radius: 4px !important;
    padding: 1px 5px !important;
}
.rili-markdown-renderer pre {
    background: #141414 !important;
    border: 1px solid #333 !important;
    border-radius: 8px !important;
}
.rili-markdown-renderer blockquote {
    border-left: 3px solid #d4af37 !important;
    color: #ccc !important;
    background: rgba(212, 175, 55, 0.05) !important;
}
.rili-markdown-renderer table th { background: #2a2a2a !important; color: #d4af37 !important; }
.rili-markdown-renderer table td { border-color: #333 !important; }
/* ---- 底部操作按钮（深色背景 → 高对比浅色） ---- */
.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7 {
    color: #EAEAEA !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    transition: color .2s ease, background .2s ease;
}
.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7:hover {
    color: #d4af37 !important;
    background: rgba(212, 175, 55, 0.1) !important;
}
.flex.items-center.gap-2.text-xs.font-mono.text-muted-foreground {
    color: #EAEAEA !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
}
/* ---- 输入框区分（暗金描边） ---- */
.is-user > .border.border-muted {
    border-color: rgba(212, 175, 55, 0.35) !important;
    background: #141414 !important;
}
.is-user > .border.border-muted:focus-within {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}
/* ---- 隐藏默认加载元素 ---- */
.style-module__AtdJSq__dot-flashing.style-module__AtdJSq__text {
    display: none !important;
}

/* ═══════════════════════════════════════════════
   自定义加载动画
   注意：原来的 .flex.items-center.justify-center.size-6
   选择器太宽泛，容易造成闪烁。
   这里改为只在特定容器内生效（请根据实际结构调整父级类名）。
   如果找不到合适的父级，建议直接删除本段，使用平台自带动画。
   ═══════════════════════════════════════════════ */
/*
.flex.items-center.justify-center.size-6 {
    position: relative !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
}
.flex.items-center.justify-center.size-6::before { ... }
.flex.items-center.justify-center.size-6::after { ... }
*/

/* 若你确定加载动画只出现在某个消息容器内，请使用类似下面的选择器替换上面被注释的部分：
.message-list .flex.items-center.justify-center.size-6 {
    position: relative !important;
    height: 44px !important;
    ...
}
*/

/* ===================================================
   第四部分 · B平台输入框（input-group）适配
   结构：div[data-slot="input-group"]
         ├── addon #prompt-input-header（模组/评论/图片/搜索按钮）
         ├── textarea[data-slot="input-group-control"]
         └── addon #prompt-input-footer（设置/模型/回复模式/发送）
   =================================================== */
div[data-slot="input-group"] {
    background: #141414 !important;
    border-color: #333 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    transition: border-color .25s ease, box-shadow .25s ease;
}
div[data-slot="input-group"]:focus-within {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}
/* 输入框本体 */
textarea[data-slot="input-group-control"] {
    color: #e0e0e0 !important;
    background: transparent !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
    line-height: 1.6 !important;
}
textarea[data-slot="input-group-control"]::placeholder { color: #666 !important; }
textarea[data-slot="input-group-control"]::selection { background: rgba(255, 51, 102, 0.3); color: #fff; }
/* header 按钮行 */
div[data-slot="input-group-addon"]#prompt-input-header {
    border-bottom: 1px solid #2a2a2a !important;
}
#prompt-input-header button {
    color: #89dceb !important;
    background: transparent !important;
    border-color: #333 !important;
    font-weight: 600 !important;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
#prompt-input-header button:hover {
    background: rgba(137, 220, 235, 0.12) !important;
    border-color: #89dceb !important;
}
#prompt-input-header button svg { color: #89dceb !important; }
#prompt-input-header button span { color: #e0e0e0 !important; }
/* footer 按钮行 */
#prompt-input-footer button {
    color: #e0e0e0 !important;
    background: transparent !important;
    border-color: #333 !important;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
#prompt-input-footer button:hover {
    background: rgba(212, 175, 55, 0.1) !important;
    border-color: #d4af37 !important;
    color: #d4af37 !important;
}
#prompt-input-footer button svg { color: inherit !important; }
/* footer 左侧工具按钮（设置/信息） */
#prompt-input-footer .flex.items-center.gap-1\.5 button {
    color: #89dceb !important;
}
#prompt-input-footer .flex.items-center.gap-1\.5 button:hover {
    background: rgba(137, 220, 235, 0.12) !important;
    color: #89dceb !important;
}
/* 模型选择按钮（含 .flex-1.truncate.text-left） */
#prompt-input-footer button:has(.flex-1.truncate.text-left) {
    color: #e0e0e0 !important;
    border-color: #333 !important;
}
#prompt-input-footer button:has(.flex-1.truncate.text-left):hover {
    border-color: #d4af37 !important;
    background: rgba(212, 175, 55, 0.1) !important;
}
#prompt-input-footer button:has(.flex-1.truncate.text-left) .flex-1.truncate.text-left {
    color: #e0e0e0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
}
#prompt-input-footer button:has(.flex-1.truncate.text-left) img { opacity: 0.9 !important; }
/* 回复模式按钮 */
#prompt-input-footer button[aria-label="回复模式"] {
    color: #89dceb !important;
}
#prompt-input-footer button[aria-label="回复模式"] span { color: #89dceb !important; }
/* 发送/停止按钮（bg-primary） */
#prompt-input-footer button[aria-label="停止"] {
    background: linear-gradient(135deg, #8b6d1f, #d4af37) !important;
    color: #0a0a0a !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3) !important;
    transition: box-shadow .25s ease, transform .25s ease;
}
#prompt-input-footer button[aria-label="停止"]:hover {
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4) !important;
    transform: translateY(-1px) !important;
}
#prompt-input-footer button[aria-label="停止"] svg { color: #0a0a0a !important; }

/* ===================================================
   第五部分 · 全局响应式适配
   =================================================== */
@media (max-width: 600px) {
    .v-content { font-size: 0.9em; }
    .v-title { font-size: 1em; padding: 10px 12px; }
    .v-title::after { right: 12px; }
    .v-content th, .v-content td { padding: 6px 8px; font-size: 0.82em; }
}
@media (max-width: 480px) {
    .is-user > .border.border-muted,
    .is-assistant > .border.border-muted { border-radius: 10px !important; }
    .rili-markdown-renderer { font-size: 0.92em !important; }
}
@media (prefers-reduced-motion: reduce) {
    /* 如果后续想恢复加载动画，可以在这里写静态版本 */
}