/* ======================================================= */
/* 论战游戏：钢铁追杀 - 工业废土与危险警告风 v1.0 */
/* 设计理念: 警示红 + 钢铁拉丝纹理 + 工业UI + 危险压迫感 */
/* ======================================================= */

/* ======================================================= */
/* Part 0: 核心动画定义 */
/* ======================================================= */

/* 警告灯闪烁 */
@keyframes warning-flash {
  0%, 100% { background-color: rgba(255, 51, 51, 0.1); box-shadow: inset 0 0 10px rgba(255, 51, 51, 0.2); }
  50% { background-color: rgba(255, 51, 51, 0.2); box-shadow: inset 0 0 20px rgba(255, 51, 51, 0.4); }
}

/* 扫描线动画 */
@keyframes scanning-line {
  0% { top: -10%; }
  100% { top: 110%; }
}

/* 按钮危险脉动 */
@keyframes danger-pulse {
  from { box-shadow: 0 0 5px #ff3333, inset 0 0 2px rgba(255,255,255,0.2); }
  to { box-shadow: 0 0 12px #ff3333, inset 0 0 5px rgba(255,255,255,0.4); }
}

/* 钢卷滚动微动 */
@keyframes steel-roll {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ======================================================= */
/* Part 1: 全局背景与环境 */
/* ======================================================= */

/* 隐藏顶部颜色装饰条 */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"] { display: none !important; }

/* 全局背景：深色工业废土 */
body, .grow.overflow-hidden {
    background: 
        radial-gradient(circle at center, rgba(30,30,40,0.8) 0%, rgba(10,10,15,1) 100%),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 10px),
        #0a0a0f !important;
    background-attachment: fixed !important;
}

/* 侧边栏：冷硬金属质感 */
.relative.overflow-auto.h-full.min-h-\[500px\].min-w-\[240px\].bg-white {
    background: linear-gradient(180deg, #1a1a24 0%, #0f0f13 100%) !important;
    border-right: 2px solid #333344 !important;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5) !important;
}

/* 滚动条：警示条风格 */
::-webkit-scrollbar { width: 8px !important; }
::-webkit-scrollbar-track { background: #0a0a0f !important; }
::-webkit-scrollbar-thumb {
    background: repeating-linear-gradient(45deg, #ff3333, #ff3333 5px, #331111 5px, #331111 10px) !important;
    border-radius: 4px !important;
}

/* ======================================================= */
/* Part 2: 对话终端（聊天框主体） */
/* ======================================================= */

/* 通用对话框：工业显示器风格 */
.bg-gray-100\/90.relative.inline-block {
    border-radius: 4px !important;
    padding: 20px 24px !important;
    margin: 20px 0 !important;
    border: 1px solid #333344 !important;
    background-image: linear-gradient(rgba(18, 18, 26, 0.95), rgba(10, 10, 15, 0.98)) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    overflow: hidden !important;
}

/* AI对话气泡：系统警告/锁定目标 */
.chat-answer-container .bg-gray-100\/90.relative.inline-block {
    border-left: 4px solid #ff3333 !important;
    animation: warning-flash 4s infinite !important;
}

/* AI框装饰：红色扫描线 */
.chat-answer-container .bg-gray-100\/90.relative.inline-block::before {
    content: '';
    position: absolute;
    left: 0; width: 100%; height: 2px;
    background: rgba(255, 51, 51, 0.3);
    box-shadow: 0 0 8px #ff3333;
    animation: scanning-line 3s linear infinite;
    z-index: 10;
    pointer-events: none;
}

/* AI框装饰：钢卷UI图标 */
.chat-answer-container .bg-gray-100\/90.relative.inline-block::after {
    content: '';
    position: absolute;
    top: 10px; right: 10px;
    width: 40px; height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%23ff3333' stroke-width='8'/%3E%3Ccircle cx='50' cy='50' r='20' fill='none' stroke='%23ff3333' stroke-width='4'/%3E%3Cpath d='M50 10 L50 30 M50 70 L50 90 M10 50 L30 50 M70 50 L90 50' stroke='%23ff3333' stroke-width='4'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.2;
    animation: steel-roll 10s linear infinite;
}

/* 用户对话气泡：幸存者终端 */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
    border-right: 4px solid #4488ff !important;
    background-color: rgba(20, 25, 35, 0.9) !important;
}

/* 文本内容样式 */
.markdown-body {
    color: #cbd5e1 !important;
    font-family: 'Consolas', 'Monaco', monospace !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

/* 强调文字：危险红色 */
.markdown-body strong { color: #ff3333 !important; text-shadow: 0 0 5px rgba(255,51,51,0.5); }

/* ======================================================= */
/* Part 3: 状态栏（战术数据面板） */
/* ======================================================= */

div.markdown-body details {
    background: #16161e !important;
    border: 1px solid #444 !important;
    border-radius: 0 !important;
    margin: 15px 0 !important;
}

div.markdown-body details > summary {
    background: #222 !important;
    color: #ff3333 !important;
    padding: 10px 15px !important;
    font-weight: bold !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    list-style-type: '⚠️ ' !important;
}

div.markdown-body details[open] > summary {
    border-bottom: 1px solid #ff3333 !important;
}

/* 自定义状态简写标签 */
f { color: #ff3333; font-weight: bold; font-size: 1.1em; } /* 姓名/核心 */
d { display: block; color: #aaa; font-size: 0.9em; border-bottom: 1px solid #222; padding: 2px 0; } /* 属性条 */

/* ======================================================= */
/* Part 4: 底部操作区域 */
/* ======================================================= */

/* 操作按钮：战术风格 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    background: #222 !important;
    color: #ff3333 !important;
    border: 1px solid #ff3333 !important;
    border-radius: 0 !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    background: #ff3333 !important;
    color: #fff !important;
    animation: danger-pulse 0.5s infinite alternate !important;
}

/* 输入框：战术终端 */
#ai-chat-input {
    background: #0a0a0f !important;
    color: #ff3333 !important;
    font-family: monospace !important;
}

#ai-send-button {
    background: #ff3333 !important;
    border-radius: 0 !important;
}

/* ======================================================= */
/* Part 5: 加载动画（系统锁定） */
/* ======================================================= */

.style_dot-flashing__8L91Q.style_text__zGhNq { display: none !important; }

.flex.items-center.justify-center.w-6.h-5::before {
    content: 'TARGET LOCKING...';
    color: #ff3333;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 2px;
    animation: text-fade-in 1s infinite alternate;
}

@keyframes text-fade-in {
    from { opacity: 0.3; }
    to { opacity: 1; text-shadow: 0 0 8px #ff3333; }
}

/* 隔离容器包裹 */
ai { display: block; position: relative; }