/* AI 工作台壳层 — 全功能共用 */
:root {
	--lx-ai-cyan: #22d3ee;
	--lx-ai-violet: #a78bfa;
	--lx-ai-pink: #f472b6;
	--lx-ai-grid: rgba(34, 211, 238, 0.06);
}

.lx-ai-shell {
	position: relative;
}

.lx-ai-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(167, 139, 250, 0.2));
	border: 1px solid rgba(34, 211, 238, 0.35);
	color: #a5f3fc;
}

.lx-ai-badge__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22d3ee;
	box-shadow: 0 0 10px #22d3ee;
	animation: lx-ai-pulse 1.4s ease-in-out infinite;
}

.lx-ai-badge.is-local .lx-ai-badge__dot {
	background: #a78bfa;
	box-shadow: 0 0 10px #a78bfa;
}

@keyframes lx-ai-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.45; transform: scale(0.85); }
}

/* Hero 增强 */
.lx-fa__hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(ellipse 80% 120% at 0% 0%, rgba(34, 211, 238, 0.14), transparent 50%),
		radial-gradient(ellipse 70% 100% at 100% 100%, rgba(167, 139, 250, 0.16), transparent 45%),
		linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 27, 75, 0.55)) !important;
	border-color: rgba(34, 211, 238, 0.25) !important;
}

.lx-fa__hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(var(--lx-ai-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--lx-ai-grid) 1px, transparent 1px);
	background-size: 22px 22px;
	pointer-events: none;
	opacity: 0.7;
}

.lx-fa__hero-text { position: relative; z-index: 1; }
.lx-fa__hero-icon { position: relative; z-index: 1; filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.45)); }

.lx-ai-hero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	align-items: center;
}

.lx-ai-pain {
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid rgba(244, 114, 182, 0.25);
	background: linear-gradient(90deg, rgba(244, 114, 182, 0.1), rgba(167, 139, 250, 0.08));
	font-size: 13px;
	line-height: 1.55;
}

.lx-ai-pain strong {
	color: #f9a8d4;
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	letter-spacing: 0.06em;
}

/* 思考链 */
.lx-ai-think {
	margin: 12px 0;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid rgba(34, 211, 238, 0.2);
	background: rgba(2, 6, 23, 0.45);
}

.lx-ai-think__title {
	font-size: 12px;
	font-weight: 700;
	color: #67e8f9;
	margin: 0 0 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.lx-ai-stage {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 6px 0;
	font-size: 12px;
	color: #94a3b8;
}

.lx-ai-stage__icon {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #475569;
	flex-shrink: 0;
	margin-top: 1px;
	position: relative;
}

.lx-ai-stage.is-run .lx-ai-stage__icon {
	border-color: #22d3ee;
	box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
	animation: lx-ai-spin 0.9s linear infinite;
}

.lx-ai-stage.is-done .lx-ai-stage__icon {
	border-color: #34d399;
	background: #34d399;
}

.lx-ai-stage.is-done .lx-ai-stage__icon::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: solid #0f172a;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.lx-ai-stage.is-run,
.lx-ai-stage.is-done {
	color: #e2e8f0;
}

@keyframes lx-ai-spin {
	to { transform: rotate(360deg); }
}

/* 置信度 */
.lx-ai-meter {
	margin: 10px 0 14px;
}

.lx-ai-meter__label {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #94a3b8;
	margin-bottom: 6px;
}

.lx-ai-meter__bar {
	height: 8px;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.2);
	overflow: hidden;
}

.lx-ai-meter__fill {
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, #22d3ee, #a78bfa, #f472b6);
	box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
	transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 洞察卡片 */
.lx-ai-insights {
	display: grid;
	gap: 8px;
	margin: 10px 0;
}

.lx-ai-insight {
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid rgba(167, 139, 250, 0.25);
	background: rgba(88, 28, 135, 0.15);
	font-size: 12px;
	line-height: 1.5;
	color: #e9d5ff;
}

.lx-ai-insight::before {
	content: "✦ AI ";
	font-weight: 700;
	color: #c4b5fd;
}

/* 生成中遮罩微光 */
.lx-ai-busy {
	position: relative;
	pointer-events: none;
	opacity: 0.85;
}

.lx-ai-busy::after {
	content: "AI 推理中…";
	position: absolute;
	right: 10px;
	top: 10px;
	font-size: 11px;
	color: #67e8f9;
	padding: 4px 8px;
	border-radius: 6px;
	background: rgba(8, 47, 73, 0.85);
	border: 1px solid rgba(34, 211, 238, 0.4);
}

/* 工具箱 AI 感 */
.lx-tb__card {
	background:
		linear-gradient(155deg, rgba(34, 211, 238, 0.08) 0%, transparent 40%),
		linear-gradient(180deg, rgba(40, 47, 58, 0.9) 0%, rgba(18, 22, 32, 0.95) 100%) !important;
}

.lx-tb__badge {
	background: linear-gradient(135deg, #22d3ee, #a78bfa) !important;
	color: #0f172a !important;
}

body.wp-admin .lx-ai-pain {
	background: #fdf2f8;
	border-color: #fbcfe8;
	color: #1d2327;
}

body.wp-admin .lx-ai-pain strong { color: #9d174d; }

body.wp-admin .lx-ai-think {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #1d2327;
}

body.wp-admin .lx-ai-insight {
	background: #f5f3ff;
	border-color: #ddd6fe;
	color: #4c1d95;
}

body.wp-admin .lx-ai-badge {
	color: #0e7490;
	background: #ecfeff;
	border-color: #a5f3fc;
}
