/* ---------- 遮罩层 / 放大模态 ---------- */
.overlay2 {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: none; /* 默认隐藏 */
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
	flex-direction: column;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.overlay2.active {
	display: flex;
	opacity: 1;
}

/* 大图容器 + 导航按钮放在同一行 */
.modal-container {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 1100px;
	max-height: 90vh;
	gap: 12px;
}

/* 图片包裹 — 保持比例，圆角优雅 */
.modal-image-wrapper {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 85vw;
	height: auto;
	max-height: 85vh;
	background: #1e1e1e;
	border-radius: 28px;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1/1; /* 默认方形，图片会自适应 */
	background: #0b0b0b;
	transition: all 0.2s;
}

.modal-image-wrapper img {
	width: 100%;
	height: 100%;
	object-fit: contain; /* 完整显示，不裁剪 */
	display: block;
	transition: opacity 0.2s ease;
	background: #111;
}

/* 左右导航按钮 — 圆形悬浮 */
.overlay2 .nav-btn {
	background: rgba(255, 255, 255, 0.88);
	border: none;
	width: 52px;
	height: 52px;
	border-radius: 60px;
	font-size: 28px;
	font-weight: 300;
	line-height: 1;
	color: #1e1e2a;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	transition: all 0.15s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	user-select: none;
	touch-action: manipulation;
}

.overlay2 .nav-btn:hover {
	background: rgba(255, 255, 255, 0.96);
	transform: scale(1.06);
	color: #000;
}

.overlay2 .nav-btn:active {
	transform: scale(0.94);
	background: rgba(240, 240, 240, 0.9);
}

.overlay2 .nav-btn.prev {
	margin-right: 4px;
}

.overlay2 .nav-btn.next {
	margin-left: 4px;
}

/* 关闭按钮 (右上角) */
.close-btn {
	position: fixed;
	top: 28px;
	right: 32px;
	background: rgba(30, 30, 30, 0.7);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: none;
	color: white;
	width: 48px;
	height: 48px;
	border-radius: 60px;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
	transition: background 0.2s;
	z-index: 1100;
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.close-btn:hover {
	background: rgba(60, 60, 60, 0.9);
}

/* 图片计数器 — 轻量提示 */
.counter {
	position: fixed;
	bottom: 32px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #f0f0f0;
	padding: 8px 20px;
	border-radius: 60px;
	font-size: 0.9rem;
	letter-spacing: 0.5px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-weight: 450;
	z-index: 1100;
	pointer-events: none;
	white-space: nowrap;
}

/* 移动端适配 */
@media ( max-width : 640px) {
	/* .alzs {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	} */
	.modal-container {
		gap: 6px;
	}
	.overlay2 .nav-btn {
		width: 44px;
		height: 44px;
		font-size: 22px;
	}
	.close-btn {
		top: 18px;
		right: 20px;
		width: 42px;
		height: 42px;
		font-size: 24px;
	}
	.counter {
		font-size: 0.75rem;
		padding: 6px 16px;
		bottom: 20px;
	}
	.modal-image-wrapper {
		max-width: 92vw;
		max-height: 78vh;
		border-radius: 18px;
	}
}

@media ( max-width : 420px) {
	/* .alzs {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	} */
	.overlay2 .nav-btn {
		width: 38px;
		height: 38px;
		font-size: 18px;
	}
}