/* 移动端优化样式 */
/* 增强触摸体验、字体大小、间距等 */

/* 基础移动端优化 */
@media (max-width: 768px) {
	/* 增加触摸目标大小 */
	.btn,
	.nav-menu a,
	.theme-toggle {
		min-height: 44px;
		min-width: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* 优化按钮间距 */
	.hero-actions {
		flex-direction: column;
		gap: 16px;
		width: 100%;
	}

	.btn {
		width: 100%;
		justify-content: center;
		padding: 16px 24px;
		font-size: 16px;
	}

	/* 优化导航栏 */
	.nav-container {
		height: 60px;
		padding: 0 16px;
	}

	.brand-badge {
		font-size: 16px;
	}

	.brand-logo {
		height: 32px;
	}

	/* 优化汉堡菜单 */
	.hamburger {
		padding: 12px;
		margin-right: -8px;
		/* iPhone触摸优化 */
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
		min-height: 44px;
		min-width: 44px;
	}

	.hamburger-bar {
		width: 20px;
		height: 2px;
		margin: 4px 0;
	}

	/* 移动端"面试真题"按钮样式 */
	.mobile-menu-text-btn {
		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
		border: none;
		border-radius: 25px;
		padding: 12px 24px;
		color: white;
		font-weight: 600;
		font-size: 14px;
		text-align: center;
		box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
		transition: all 0.3s ease;
		cursor: pointer;
		min-width: 120px;
	}

	.mobile-menu-text-btn:hover {
		transform: translateY(-2px);
		box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
	}

	.mobile-menu-text-btn:active {
		transform: translateY(0);
	}

	.mobile-menu-text {
		display: block;
		white-space: nowrap;
	}

	/* 优化移动端导航菜单 */
	.nav-menu {
		width: 300px;
		right: -16px;
		top: 60px;
		border-radius: 16px;
		padding: 20px;
	}

	.nav-menu a {
		padding: 18px 24px;
		font-size: 16px;
		border-radius: 12px;
		margin: 8px 0;
	}

	/* 优化Hero区域 */
	.hero-grid {
		grid-template-columns: 1fr;
		gap: 32px;
		text-align: center;
	}

	.hero-content h1 {
		font-size: 36px;
		line-height: 1.2;
	}

	.hero-sub {
		font-size: 16px;
		line-height: 1.5;
	}

	/* 优化卡片布局 */
	.card-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.card {
		padding: 24px;
		border-radius: 16px;
	}

	/* 优化表单元素 */
	input,
	textarea,
	select {
		font-size: 16px; /* 防止iOS缩放 */
		padding: 16px;
		border-radius: 12px;
	}

	/* 优化表格 */
	.table-container {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	table {
		min-width: 600px;
	}

	/* 优化代码块 */
	pre {
		font-size: 14px;
		padding: 16px;
		border-radius: 12px;
		overflow-x: auto;
	}

	/* 优化图片 */
	img {
		max-width: 100%;
		height: auto;
		border-radius: 12px;
	}
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
	.container {
		width: 95%;
		padding: 0 8px;
	}

	.section-pad {
		padding: 20px 0;
	}

	.section-title {
		font-size: 24px;
		line-height: 1.3;
	}

	.hero-content h1 {
		font-size: 32px;
	}

	.hero-sub {
		font-size: 15px;
	}

	.card {
		padding: 20px;
		margin: 0 8px;
	}

	/* 优化导航 */
	.nav-menu {
		width: calc(100vw - 32px);
		right: 8px;
		left: 8px;
		padding: 16px;
	}

	.nav-menu li {
		padding: 12px 0;
	}

	/* 优化按钮 */
	.btn {
		padding: 14px 20px;
		font-size: 15px;
	}
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
	.hero-grid {
		grid-template-columns: 1fr 1fr;
		gap: 24px;
	}

	.hero-content h1 {
		font-size: 28px;
	}

	.nav-menu {
		max-height: 60vh;
		overflow-y: auto;
	}
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
	/* 增加触摸反馈 */
	.btn:active,
	.nav-menu a:active,
	.card:active {
		transform: scale(0.98);
		transition: transform 0.1s ease;
	}

	/* 优化滚动 */
	.nav-menu {
		-webkit-overflow-scrolling: touch;
	}

	/* 优化链接点击区域 */
	a {
		padding: 8px 4px;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}

	/* 特别优化VO辅助链接 */
	a[href*="vo-support"] {
		background: rgba(111, 182, 255, 0.1);
		border-radius: 8px;
		padding: 12px 16px;
		margin: 4px 0;
		min-height: 48px;
		font-weight: 600;
		border: 1px solid rgba(111, 182, 255, 0.2);
	}

	a[href*="vo-support"]:active {
		background: rgba(111, 182, 255, 0.2);
		transform: scale(0.98);
	}
}

/* iPhone特定优化 */
@supports (-webkit-touch-callout: none) {
	/* iPhone Safari 特定样式 */
	.hamburger {
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
	}

	.nav-menu {
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
	}

	.nav-menu a {
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
	}
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
	.brand-logo {
		image-rendering: -webkit-optimize-contrast;
		image-rendering: crisp-edges;
	}
}

/* 深色模式下的移动端优化 */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
	.nav-menu {
		background: rgba(15, 21, 43, 0.95);
		backdrop-filter: blur(20px);
	}

	.card {
		background: rgba(37, 51, 70, 0.8);
		backdrop-filter: blur(10px);
	}
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
	.btn,
	.nav-menu a,
	.card {
		transition: none;
	}

	.nav-menu.open {
		transition: none;
	}
}

/* 打印样式优化 */
@media print {
	.navbar,
	.theme-toggle,
	.hero-actions {
		display: none;
	}

	.container {
		width: 100%;
		max-width: none;
	}

	.card {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid #ccc;
	}
}
