/* ============================================================
   BeeDance Preload — Enterprise Entry (Stage 1)
   品牌表达层：深色主题 · 克制品牌呈现 · 最小化动画
   ============================================================ */

:root {
	/* 品牌色（来自官方产品设计系统） */
	--bd-navy-900: #1d202b;
	--bd-blue-700: #385384;
	--bd-blue-500: #428fec;
	--bd-blue-100: #c6d6f4;
	--bd-yellow-500: #ffcf00;

	/* 背景色（品牌表达层） */
	--bd-bg-deep: #0b1120; /* 比 navy 更深一点，符合大屏规范 */
	--bd-bg: #1d202b;
	--bd-surface: #374151;
	--bd-surface-border: #4b5563;

	/* 文本色 */
	--bd-text-primary: #f8fafc;
	--bd-text-secondary: #94a3b8;
	--bd-text-muted: #6b7280;

	/* 进度条 */
	--bd-accent-track: rgba(66, 143, 236, 0.15);
	--bd-accent: #428fec;
	--bd-accent-light: #60a5fa;

	/* 品牌容器（仅用于 logo） */
	--bd-brand-soft: rgba(255, 207, 0, 0.1);
	--bd-brand-border: rgba(255, 207, 0, 0.25);

	/* 字体系统 */
	--bd-font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
		"Microsoft YaHei", sans-serif;
	--bd-font-mono: "SF Mono", "Fira Code", Consolas, monospace;
}

html,
body,
#app {
	width: 100%;
	height: 100%;
	background-color: var(--bd-bg);
	margin: 0;
	padding: 0;
	overflow: hidden;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: var(--bd-font-base);
}

/* Legacy: hide Baidu Map logo/copyright controls globally.
   preload.css is loaded in index.html and applies app-wide.
   Keep this rule to avoid regressions in map views. */
.anchorBL {
	display: none !important;
}

/* ========== 主容器 ========== */
.preload__wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: radial-gradient(
			ellipse 80% 50% at 50% 0%,
			var(--bd-accent-track) 0%,
			transparent 50%
		),
		linear-gradient(180deg, var(--bd-bg) 0%, var(--bd-bg-deep) 100%);
	position: fixed;
	inset: 0;
	z-index: 9999;
	overflow: hidden;
	transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.preload__wrap.fade-out {
	opacity: 0;
	pointer-events: none;
}

/* ========== 内容区 ========== */
.preload__container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	flex: 1;
	width: 100%;
	padding: 0 24px;
	position: relative;
	z-index: 10;
	user-select: none;
}

/* ========== Logo（品牌克制原则：仅 logo 位置使用黄色） ========== */
.preload__logo {
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: var(--bd-brand-soft);
	border: 1px solid var(--bd-brand-border);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
	opacity: 0;
	transform: translateY(12px);
	animation: fadeSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.preload__logo-img {
	width: 36px;
	height: 36px;
	object-fit: contain;
	border-radius: 4px;
}

/* ========== 文案层级 ========== */
.preload__name {
	font-family: var(--bd-font-base);
	color: var(--bd-text-primary);
	font-weight: 600;
	font-size: 24px;
	line-height: 1.25;
	letter-spacing: 0.02em;
	text-align: center;
	margin: 0;
	opacity: 0;
	transform: translateY(12px);
	animation: fadeSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.preload__title {
	color: var(--bd-text-muted);
	font-size: 11px;
	font-weight: 500;
	margin: 10px 0 0;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: center;
	opacity: 0;
	transform: translateY(10px);
	animation: fadeSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

/* ========== 进度条 ========== */
.progress-wrap {
	width: 160px;
	margin-top: 40px;
	opacity: 0;
	animation: fadeIn 0.5s ease 0.55s forwards;
}

.progress-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.progress-bar__track {
	flex: 1;
	height: 2px;
	background: var(--bd-accent-track);
	border-radius: 1px;
	overflow: hidden;
	position: relative;
}

.progress-bar__fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--bd-accent) 0%, var(--bd-accent-light) 100%);
	border-radius: 1px;
	transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-label {
	font-family: var(--bd-font-mono);
	font-size: 11px;
	font-weight: 500;
	color: var(--bd-text-secondary);
	min-width: 32px;
	text-align: right;
	letter-spacing: 0.02em;
}

/* ========== 页脚 ========== */
.preload__footer {
	text-align: center;
	padding: 16px 24px 28px;
	z-index: 10;
	opacity: 0;
	animation: fadeIn 0.6s ease 0.75s forwards;
}

.preload__footer a {
	font-size: 11px;
	color: var(--bd-text-muted);
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: color 0.2s ease;
}

.preload__footer a:hover {
	color: var(--bd-accent);
}

.preload__footer .preload__icp {
	display: block;
	margin-top: 6px;
}

/* ========== 通用动画（符合无障碍：仅 transform/opacity） ========== */
@keyframes fadeSlideUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ========== 移动端 ========== */
@media (max-width: 768px) {
	.preload__logo {
		width: 48px;
		height: 48px;
		margin-bottom: 16px;
	}

	.preload__logo-img {
		width: 30px;
		height: 30px;
	}

	.preload__name {
		font-size: 20px;
	}

	.progress-wrap {
		width: 140px;
		margin-top: 32px;
	}

	.preload__footer {
		padding-bottom: 20px;
	}

	.preload__footer a {
		font-size: 10px;
	}
}

/* ========== 无障碍：支持减少动画 ========== */
@media (prefers-reduced-motion: reduce) {
	.preload__logo,
	.preload__name,
	.preload__title,
	.progress-wrap,
	.preload__footer {
		animation: none !important;
		transform: none !important;
		opacity: 1 !important;
	}

	.preload__wrap {
		transition: none !important;
	}

	.progress-bar__fill {
		transition: none !important;
	}
}
