/* 二维码悬停显示样式 */
/* 全局层级重置 */
.qr-code-tooltip {
	position: absolute;
	z-index: 999999 !important;
}

.qr-hover-container {
	position: relative;
	display: inline-block;
	z-index: auto;
}

/* 确保父容器不会限制子元素层级 */
.footer,
.neo-footer,
.social-links {
	position: relative;
	z-index: auto;
	overflow: visible !important;
}

.qr-code-tooltip {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #fff;
	border: 2px solid #00d4ff;
	border-radius: 12px;
	padding: 15px;
	box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: 999999 !important;
	min-width: 200px;
	text-align: center;
	pointer-events: none;
}

.qr-code-tooltip.show,
.qr-hover-container:hover .qr-code-tooltip,
.qr-hover-container.mobile-active .qr-code-tooltip {
	pointer-events: auto;
}

.qr-code-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 8px solid transparent;
	border-top-color: #00d4ff;
}

.qr-code-tooltip::before {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #fff;
	z-index: 1;
}

.qr-hover-container:hover .qr-code-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(-10px);
}

.qr-code-image {
	width: 150px;
	height: 150px;
	border-radius: 8px;
	margin-bottom: 10px;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.qr-code-title {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	margin-bottom: 5px;
}

.qr-code-desc {
	font-size: 12px;
	color: #666;
	line-height: 1.4;
}

/* 响应式设计 - 优化小屏幕显示 */
@media (max-width: 768px) {
	.qr-code-tooltip {
		position: fixed !important;
		top: 50% !important;
		left: 50% !important;
		transform: translate(-50%, -50%) !important;
		width: 85vw;
		max-width: 320px;
		max-height: 80vh;
		overflow-y: auto;
		z-index: 2147483647 !important;
		backdrop-filter: blur(10px);
		background: rgba(255, 255, 255, 0.98) !important;
		border: 2px solid #00d4ff;
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
	}
	
	.qr-code-tooltip::after,
	.qr-code-tooltip::before {
		display: none;
	}
	
	.qr-hover-container:hover .qr-code-tooltip,
	.qr-hover-container.mobile-active .qr-code-tooltip {
		transform: translate(-50%, -50%);
		opacity: 1;
		visibility: visible;
	}
	
	.qr-code-image {
		width: min(140px, 30vw);
		height: min(140px, 30vw);
		max-width: 140px;
		max-height: 140px;
	}
	
	/* 添加关闭按钮 */
	.qr-code-tooltip::before {
		content: '×';
		display: block;
		position: absolute;
		top: 8px;
		right: 12px;
		width: 24px;
		height: 24px;
		background: #ff4757;
		color: white;
		border-radius: 50%;
		text-align: center;
		line-height: 24px;
		font-size: 16px;
		font-weight: bold;
		cursor: pointer;
		z-index: 1;
		border: none;
	}
	
	/* 添加遮罩层 */
	.qr-code-tooltip.show::after {
		content: '';
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background: rgba(0, 0, 0, 0.5);
		z-index: -1;
		display: block;
	}
}

@media (max-width: 480px) {
	.qr-code-tooltip {
		width: 90vw;
		max-width: 280px;
		padding: 16px;
	}
	
	.qr-code-image {
		width: min(120px, 25vw);
		height: min(120px, 25vw);
		max-width: 120px;
		max-height: 120px;
	}
	
	.qr-code-title {
		font-size: 16px;
		margin-bottom: 8px;
	}
	
	.qr-code-desc {
		font-size: 13px;
	}
}

@media (max-width: 360px) {
	.qr-code-tooltip {
		width: 95vw;
		padding: 12px;
	}
	
	.qr-code-image {
		width: min(100px, 22vw);
		height: min(100px, 22vw);
		max-width: 100px;
		max-height: 100px;
	}
	
	.qr-code-title {
		font-size: 14px;
	}
	
	.qr-code-desc {
		font-size: 12px;
	}
}

/* 桌面端位置智能调整 */
@media (min-width: 769px) {
	.qr-code-tooltip.position-top {
		bottom: 100%;
		top: auto;
		transform: translateX(-50%) translateY(-10px);
	}
	
	.qr-code-tooltip.position-bottom {
		top: 100%;
		bottom: auto;
		transform: translateX(-50%) translateY(10px);
	}
	
	.qr-code-tooltip.position-left {
		right: 100%;
		left: auto;
		top: 50%;
		transform: translateY(-50%) translateX(-10px);
	}
	
	.qr-code-tooltip.position-right {
		left: 100%;
		right: auto;
		top: 50%;
		transform: translateY(-50%) translateX(10px);
	}
	
	/* 调整箭头方向 */
	.qr-code-tooltip.position-bottom::after {
		top: -8px;
		border-top: none;
		border-bottom-color: #00d4ff;
	}
	
	.qr-code-tooltip.position-bottom::before {
		top: -6px;
		border-top: none;
		border-bottom-color: #fff;
	}
	
	.qr-code-tooltip.position-left::after,
	.qr-code-tooltip.position-right::after {
		top: 50%;
		left: auto;
		right: auto;
		transform: translateY(-50%);
		border-top: 8px solid transparent;
		border-bottom: 8px solid transparent;
	}
	
	.qr-code-tooltip.position-left::after {
		left: 100%;
		border-left-color: #00d4ff;
		border-right: none;
	}
	
	.qr-code-tooltip.position-right::after {
		right: 100%;
		border-right-color: #00d4ff;
		border-left: none;
	}
}

/* 动画效果增强 */
.qr-hover-container {
	transition: transform 0.2s ease;
}

.qr-hover-container:hover {
	transform: scale(1.1);
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
	.qr-code-tooltip {
		background: #2a2a2a;
		border-color: #00d4ff;
		color: #fff;
	}
	
	.qr-code-tooltip::before {
		border-top-color: #2a2a2a;
	}
	
	.qr-code-title {
		color: #fff;
	}
	
	.qr-code-desc {
		color: #ccc;
	}
}