/* === 龙珠风-等待光球替换术 (纯CSS) === */
/* ⚠️重要：请将下面的 .typing-indicator 替换为你实际找到的类名 */
.typing-indicator, 
.loading-dots,    /* 我预判了几个常见的名字，如果运气好直接能用 */
div[class*="loading"] > span { 
    visibility: hidden; /* 1. 先把那三个丑点藏起来 */
    position: relative;
}
/* 2. 在原来的位置搓一个元气弹 */
.typing-indicator::after,
.loading-dots::after,
div[class*="loading"] > span::after {
    visibility: visible; /* 让这个伪元素显示出来 */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 龙珠雷达/集气球样式 */
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffeb3b 30%, #ff9800 90%); /* 金黄色气焰 */
    border-radius: 50%;
    box-shadow: 
        0 0 10px #ff9800,
        0 0 20px #ffeb3b;
    /* 动画：像心脏一样跳动 */
    animation: ki-pulse 0.6s infinite alternate;
}
/* 3. 动画关键帧 */
@keyframes ki-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.7;
        box-shadow: 0 0 5px #ff9800;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
        box-shadow: 0 0 25px #ffeb3b, 0 0 40px #ff5722; /* 爆气光效 */
    }
}
/* --- 1. 聊天框 (保持原样) --- */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"] { display: none !important; }
.bg-gray-100\/90.relative.inline-block {
    background-color: #e9f1f8 !important;
    background-image: linear-gradient(rgba(0, 0, 0, 0.03) 50%, transparent 50%), radial-gradient(circle at center, rgba(0, 86, 179, 0.1) 1px, transparent 1px);
    background-size: 100% 4px, 15px 15px;
    border: 2px solid #000 !important;
    border-left: 6px solid #f57f17 !important;
    border-radius: 4px !important;
    box-shadow: 4px 4px 0px rgba(0,0,0,1) !important;
    padding: 15px !important;
    color: #212529 !important;
}
.bg-gray-100\/90.relative.inline-block::before { display: none !important; }

/* --- 2. 字体与对话高亮 --- */
.markdown-body { font-family: 'Bangers', 'Impact', 'LXGW WenKai', sans-serif !important; color: #111 !important; line-height: 1.8 !important; font-size: 15px !important; }

/* 全局对话样式 (正文深红) */
d {
    color: #b71c1c; 
    font-weight: 900;
    font-family: 'KaiTi', serif; 
    background: rgba(183, 28, 28, 0.05);
    padding: 0 2px;
    border-radius: 2px;
    border-bottom: 2px solid rgba(183, 28, 28, 0.2);
}

.markdown-body strong { color: #d84315 !important; font-weight: 900 !important; text-decoration: underline decoration-wavy #ffeb3b; }

/* --- 3. 容器布局 (保持原样) --- */
.triple-container {
    padding: 8px;
    background: repeating-linear-gradient(45deg, #ff6f00, #ff6f00 10px, #ff8f00 10px, #ff8f00 20px);
    border: 3px solid #000;
    outline: 3px solid #fff;
    box-shadow: 0 0 0 4px #ff6f00;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

/* --- 4. 面板样式 (保持原样) --- */
.triple-container .main-panel {
    background: #0d47a1; 
    border: 2px solid #000;
    outline: 2px solid #ffd700;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.8);
    flex: 1 1 calc(50% - 6px);
    min-width: 0; 
    transition: none;
    margin-bottom: 2px;
}
.triple-container .main-panel[open] {
    flex-basis: 100%;
    outline: 3px solid #ffeb3b;
    z-index: 10;
}

/* --- 5. 面板内文字与高亮 (保持原样) --- */
.triple-container .main-panel p, 
.triple-container .main-panel li, 
.triple-container .main-panel div {
    color: #e3f2fd !important;
    font-size: 12px;
    text-shadow: 1px 1px 0 #000;
    padding: 6px;
}
.triple-container .main-panel d {
    color: #ffeb3b !important; 
    background: rgba(0, 0, 0, 0.3) !important; 
    border-bottom: 2px solid #ffd700 !important;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    white-space: normal; 
    word-break: break-all;
}

/* --- 6. 特殊面板变色 (★已修改：CoT 漫画风格) --- */
.triple-container .story-panel { background: #263238 !important; outline-color: #cfd8dc !important; }
.triple-container .story-panel summary { background: #37474f !important; }

/* Manga Style CoT (黑白漫画风) */
.triple-container .cot-panel { 
    /* 白底 + 漫画网点纸背景 */
    background-color: #fff !important; 
    background-image: radial-gradient(#212121 15%, transparent 16%) !important;
    background-size: 4px 4px !important;
    outline: 3px solid #000 !important; /* 纯黑边框 */
    box-shadow: 5px 5px 0 #000 !important; /* 硬黑阴影 */
}
.triple-container .cot-panel summary { 
    background: #000 !important; /* 黑底标题 */
    color: #fff !important; 
    font-family: 'Bangers', sans-serif !important;
    border-bottom: 3px solid #000 !important;
    text-shadow: none !important;
}
/* 强制CoT内部文字为黑字白底，模拟漫画对话框 */
.triple-container .cot-panel p,
.triple-container .cot-panel div,
.triple-container .cot-panel li {
    color: #000 !important;
    background: #fff !important;
    border: 2px solid #000 !important;
    margin: 4px !important;
    text-shadow: none !important;
    font-weight: bold;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.2) !important;
}

/* --- 7. 标题栏 (保持原样) --- */
.triple-container summary {
    padding: 2px 6px;
    background: #d84315;
    border-bottom: 2px solid #000;
    color: #fff;
    font-family: 'Impact', sans-serif;
    font-size: 11px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-shadow: 1px 1px 0 #000;
    min-height: 22px;
    white-space: nowrap;
    overflow: hidden;
}
.triple-container summary:hover { background: #bf360c; }
.triple-container summary::before {
    content: '★';
    display: inline-block;
    width: 14px; height: 14px; line-height: 12px;
    text-align: center; background: #ffd700; color: #d84315;
    border: 1px solid #000; border-radius: 50%;
    margin-right: 4px; font-size: 9px; flex-shrink: 0;
}
.triple-container summary::after { content: '▼'; color: #000; font-size: 9px; flex-shrink: 0; }

/* --- 8. 表格 (保持原样) --- */
details table { 
    width: 100%; border-collapse: collapse; margin-top: 2px; 
    border: 2px solid #000; background: rgba(0,0,0,0.3);
    table-layout: fixed;
}
details th { background: #ff6f00; color: #000; border: 1px solid #000; padding: 2px; font-size: 11px; overflow: hidden; }
details td { 
    background: transparent !important; border: 1px solid #000; 
    padding: 2px; color: #fff !important; font-size: 11px; 
    overflow: hidden; text-overflow: ellipsis;
}
details tr:nth-child(even) { background-color: rgba(255,255,255,0.05); }

/* --- 9. 标签 (保持原样) --- */
.triple-container name, .triple-container SL, .triple-container info, .triple-container abli {
    display: inline-block; padding: 0px 3px; border: 1px solid #000;
    font-weight: 900; margin: 1px; box-shadow: 1px 1px 0 #000;
    transform: skew(-5deg); font-size: 11px;
}
.triple-container name { background: #fff; color: #000; }
.triple-container SL { background: #ffd700; color: #000; }
.triple-container abli { background: #ff3d00; color: #fff; }
.triple-container info { background: #00e676; color: #000; }

/* --- 10. 移动端微调 (保持原样) --- */
@media (max-width: 768px) {
    .triple-container { padding: 5px; gap: 4px; }
}

/* ==========================================================================
   --- 11. 龙珠世界观 UI 美化 (Loading / Comment / Buttons) ---
   ========================================================================== */

/* 11.1 加载界面/动画：龙珠雷达 (Dragon Radar) 风格 */
/* 隐藏默认的旋转圈/点，替换为雷达扫描 */
.mes_text_loading, .lds-ellipsis, .fa-spinner, .spinner-border {
    color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: relative;
    overflow: visible !important;
    width: 40px !important; height: 40px !important;
    margin: 0 auto;
    display: block;
}

/* 创建雷达表盘 */
.mes_text_loading::after, .lds-ellipsis::after, .fa-spinner::after, .spinner-border::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    background-color: #004d40; /* 雷达深绿底色 */
    border: 2px solid #bdbdbd; /* 银色外壳 */
    box-shadow: inset 0 0 5px #000, 0 0 5px rgba(0, 230, 118, 0.5);
    /* 雷达网格线 */
    background-image: 
        linear-gradient(0deg, transparent 48%, rgba(0, 230, 118, 0.5) 49%, rgba(0, 230, 118, 0.5) 51%, transparent 52%),
        linear-gradient(90deg, transparent 48%, rgba(0, 230, 118, 0.5) 49%, rgba(0, 230, 118, 0.5) 51%, transparent 52%);
    z-index: 100;
    visibility: visible;
}

/* 创建雷达扫描指针 */
.mes_text_loading::before, .lds-ellipsis::before, .fa-spinner::before, .spinner-border::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 18px; height: 18px; /* 半径长度 */
    background: linear-gradient(45deg, rgba(0, 230, 118, 0.8), transparent);
    transform-origin: 0% 0%; /* 以圆心旋转 */
    animation: radar-scan 1.5s linear infinite;
    z-index: 101;
    border-radius: 100% 0 0 0;
    visibility: visible;
}

@keyframes radar-scan {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 11.2 输入框 (Comment Section)：战斗力探测器 (Scouter) 风格 */
textarea, input[type="text"], .text_pole {
    background-color: rgba(0, 30, 0, 0.85) !important; /* 深绿半透明 */
    color: #00e676 !important; /* 荧光绿文字 */
    border: 2px solid #00e676 !important;
    font-family: 'Courier New', monospace !important;
    text-shadow: 0 0 2px #00e676;
    border-radius: 4px 0 4px 0 !important;
    caret-color: #00e676 !important;
}
textarea::placeholder, input::placeholder {
    color: rgba(0, 230, 118, 0.5) !important;
}

/* 11.3 按钮 (Buttons)：龟仙流道服 (Turtle School Gi) 风格 */
button, .menu_button, .neo-button {
    background: linear-gradient(180deg, #ff9800, #ef6c00) !important; /* 悟空橙 */
    color: #fff !important;
    border: 2px solid #000 !important;
    border-bottom: 4px solid #000 !important; /* 立体感 */
    font-family: 'Bangers', 'Impact', sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
}

/* 悬停：超级赛亚人光效 */
button:hover, .menu_button:hover {
    background: #ffb74d !important;
    color: #fff !important;
    border-color: #ffd700 !important;
    box-shadow: 0 0 10px #ffeb3b, 0 0 20px #ff9800 !important; /* 金色气焰 */
    transform: translateY(-1px);
}

button:active {
    transform: translateY(2px);
    border-bottom: 2px solid #000 !important;
}