/* AI 数据顾问 - 复刻大屏风格 v4 */
.aix {
  position: fixed; inset: 0; z-index: 999999;
  background: #0a1628;
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity 0.4s ease;
  font-family: "Microsoft YaHei", -apple-system, sans-serif;
  color: #c8d6e5;
  --acc: rgb(var(--admin-accent-rgb, 0, 180, 255));
  --acc-dim: rgba(var(--admin-accent-rgb, 0, 180, 255), 0.1);
  --acc-border: rgba(var(--admin-accent-rgb, 0, 180, 255), 0.3);
  --acc-glow: rgba(var(--admin-accent-rgb, 0, 180, 255), 0.5);
  overflow: hidden;
}
.aix.active { opacity: 1; }

.aix-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(var(--admin-accent-rgb,0,180,255),0.12), transparent 55%),
    linear-gradient(rgba(var(--admin-accent-rgb,0,180,255),0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--admin-accent-rgb,0,180,255),0.05) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* 顶部标题 */
.aix-header {
  height: 60px; flex-shrink: 0; position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(var(--admin-accent-rgb,0,180,255),0.15), transparent);
  border-bottom: 1px solid var(--acc-border);
}
.aix-header-line {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--acc), transparent);
}
.aix-header-title {
  font-size: 22px; font-weight: 700; color: var(--acc);
  letter-spacing: 6px; text-shadow: 0 0 20px var(--acc-glow);
}
.aix-header-right {
  position: absolute; right: 24px; display: flex; align-items: center; gap: 16px;
}
.aix-clock { font-size: 14px; color: var(--acc); }
.aix-close {
  width: 32px; height: 32px; border-radius: 4px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,80,80,0.4);
  color: #ff6b6b; font-size: 14px;
}
.aix-close:hover { background: rgba(255,80,80,0.2); }

/* 主体三栏 */
.aix-main {
  flex: 1; display: flex; gap: 16px; padding: 16px;
  position: relative; z-index: 2; min-height: 0;
}
.aix-col { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }

/* 面板 */
.aix-panel {
  background: linear-gradient(180deg, rgba(var(--admin-accent-rgb,0,180,255),0.08), rgba(var(--admin-accent-rgb,0,180,255),0.03));
  border: 1px solid var(--acc-border);
  padding: 14px;
  position: relative;
}
.aix-panel::before {
  content: ''; position: absolute; top: -1px; left: 10px; right: 10px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--acc), transparent);
}
.aix-panel-title {
  font-size: 13px; color: var(--acc); letter-spacing: 2px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--acc-border);
  text-shadow: 0 0 8px var(--acc-glow);
}

.aix-data-list { display: flex; flex-direction: column; gap: 6px; }
.aix-data-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; background: var(--acc-dim);
  border-left: 2px solid var(--acc);
}
.aix-data-label { font-size: 12px; color: #7a9cc0; }
.aix-data-num { font-size: 15px; color: var(--acc); font-weight: 700; text-shadow: 0 0 8px var(--acc-glow); }

.aix-quick-list { display: flex; flex-direction: column; gap: 8px; }
.aix-quick {
  padding: 10px 12px; font-size: 12px; cursor: pointer;
  background: var(--acc-dim); border: 1px solid var(--acc-border);
  color: #8ab8d8; transition: all .2s;
}
.aix-quick:hover { background: var(--acc-glow); color: #fff; border-color: var(--acc); }

.aix-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.aix-tag {
  font-size: 11px; padding: 4px 10px;
  background: var(--acc-dim); border: 1px solid var(--acc-border); color: #8ab8d8;
}

/* 中间聊天区 - 不透明背景 */
.aix-center {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: #0c1a2e;
  border: 1px solid var(--acc-border);
  position: relative; overflow: hidden;
}

/* AI 光环 - 大而明显 */
.aix-viz {
  position: absolute; top: 30px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 100px; z-index: 1; pointer-events: none;
}
.aix-core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--acc) 50%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff; text-shadow: 0 0 4px #000;
  box-shadow: 0 0 30px var(--acc-glow);
  animation: aixPulse 3s infinite;
}
.aix-ring {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 1px solid var(--acc-border);
}
.aix-ring--1 { width: 70px; height: 70px; animation: aixSpin 6s linear infinite; border-top-color: var(--acc); }
.aix-ring--2 { width: 100px; height: 100px; animation: aixSpin 10s linear infinite reverse; border-right-color: var(--acc); }
.aix-ring--3 { width: 130px; height: 130px; animation: aixSpin 15s linear infinite; }
@keyframes aixSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes aixPulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* 聊天消息区 - 大 */
.aix-chat {
  flex: 1; overflow-y: auto; padding: 150px 20px 16px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative; z-index: 2;
}
.aix-chat::-webkit-scrollbar { width: 4px; }
.aix-chat::-webkit-scrollbar-thumb { background: var(--acc-border); }

.aix-msg {
  max-width: 75%; padding: 12px 16px;
  font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.aix-msg--assistant {
  align-self: flex-start;
  background: var(--acc-dim); border: 1px solid var(--acc-border);
  border-left: 3px solid var(--acc); color: #c8e0f8;
}
.aix-msg--user {
  align-self: flex-end;
  background: var(--acc-glow); border: 1px solid var(--acc);
  color: #fff;
}

/* 输入栏 */
.aix-input-row {
  display: flex; gap: 10px; padding: 14px;
  border-top: 1px solid var(--acc-border);
  background: #081120;
  position: relative; z-index: 2;
}
.aix-mic {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  background: var(--acc-dim); border: 1px solid var(--acc-border);
  cursor: pointer; font-size: 18px;
}
.aix-mic.rec { background: rgba(255,80,80,0.3); border-color: #ff6b6b; animation: aixPulse 1s infinite; }
.aix-input {
  flex: 1; padding: 0 16px; border-radius: 2px;
  background: rgba(0,20,50,0.8); border: 1px solid var(--acc-border);
  color: #e0f0ff; font-size: 14px; outline: none;
}
.aix-input:focus { border-color: var(--acc); }
.aix-input::placeholder { color: #4a6a8a; }
.aix-send {
  padding: 0 28px; cursor: pointer;
  background: linear-gradient(135deg, var(--acc), var(--acc-glow));
  border: none; color: #fff; font-size: 14px; font-weight: 600;
}
.aix-send:hover { transform: scale(1.1) !important; }

@media (max-width: 900px) {
  .aix-col { display: none; }
  .aix-viz { display: none; }
  .aix-chat { padding-top: 20px; }
}
