/* ========== 顶部语言切换按钮（原有） ========== */
.lang-switch-top {
	float: right;
	margin: 0 0 12px 12px;
	z-index: 200;
	position: relative;
}

.lang-switch-btn {
	display: inline-flex;
	align-items: center;
	background: #fcfcfc;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 0;
	font-size: 13px;
	line-height: 1;
	overflow: hidden;
}

.lang-switch-btn a {
	display: inline-block;
	padding: 5px 10px;
	color: #555;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.lang-switch-btn a:hover {
	background: #e8e8e8;
}

.lang-switch-btn a.active {
	background: #2980b9;
	color: #fff;
	cursor: default;
}

/* ========== 悬浮语言切换球 ========== */
/* 默认：左半圆+右侧矩形贴边，矩形部分藏入屏幕右侧 */
.lang-switch-float {
	position: fixed;
	right: -32px;
	top: 45%;
	width: 48px;
	height: 48px;
	border-radius: 24px 0 0 24px;
	background: #2980b9;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
	z-index: 999;
	transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 0.3s ease;
}

.lang-switch-float.visible {
	right: 0;
	box-shadow: 0 2px 12px rgba(41, 128, 185, 0.3);
}

.lang-switch-float.dragging {
	transition: none;
	box-shadow: 0 4px 16px rgba(41, 128, 185, 0.4);
	background: #2471a3;
}

/* ========== 移动端适配 ========== */
@media screen and (max-width: 768px) {
	.lang-switch-top {
		margin: 0 0 8px 8px;
	}

	.lang-switch-btn a {
		padding: 4px 8px;
		font-size: 12px;
	}

	.lang-switch-float {
		width: 44px;
		height: 44px;
		font-size: 12px;
		right: -30px;
		border-radius: 22px 0 0 22px;
	}

	.lang-switch-float.visible {
		right: 0;
	}
}
