/* 更现代的CSS Reset */
:root {
	-webkit-tap-highlight-color: transparent;
	/* 移除移动端点击高亮 */
	text-size-adjust: 100%;
	/* 防止iOS文字缩放 */
	
	/* 设置rem基准值 - 1rem = 100px */
	font-size: 100px;
	
	/* 安全区域变量 */
	--sat: env(safe-area-inset-top, 0px);
	--sar: env(safe-area-inset-right, 0px);
	--sab: env(safe-area-inset-bottom, 0px);
	--sal: env(safe-area-inset-left, 0px);
	
	/* 视口高度变量 */
	--vh: 1vh;
	--dvh: 1dvh;
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

html {
	font-size: 100px; /* 基准字体大小 */
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

html,
body {
	font-family:
		"Microsoft YaHei",
		"PingFang SC",
		"Hiragino Sans GB",
		"Noto Sans CJK SC",
		"Source Han Sans SC",
		Inter,
		-apple-system,
		BlinkMacSystemFont,
		sans-serif;
	overflow-x: hidden;
	overscroll-behavior: none;
	touch-action: manipulation;
	margin: 0;
	line-height: inherit;
	overscroll-behavior: none;
	touch-action: none;
	overflow: hidden;
	position: fixed;
	width: 100%;
	height: 100%;
	min-height: 100%;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
	html {
		font-size: calc(100vw / 3.75); /* 375px设计稿基准 */
	}
	
	body {
		height: 100vh;
		height: 100dvh; /* 动态视口高度 */
	}
}

/* 超小屏幕适配 */
@media screen and (max-width: 320px) {
	html {
		font-size: calc(100vw / 3.2); /* 320px设计稿基准 */
	}
}

/* 大屏幕适配 */
@media screen and (min-width: 769px) {
	html {
		font-size: calc(100vw / 19.2); /* 1920px设计稿基准 */
	}
}

/* 横屏适配 */
@media screen and (orientation: landscape) and (max-height: 500px) {
	html {
		font-size: calc(100vh / 6.67); /* 横屏时以高度为基准 */
	}
}

/* 移除列表默认样式 */
ol,
ul {
	list-style: none;
}

/* 移除默认边距和边框 */
blockquote,
q {
	quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
	content: '';
	content: none;
}

/* 表格重置 */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* 表单元素重置 */
button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: inherit;
	margin: 0;
}

button,
input {
	overflow: visible;
	color: #000;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
	cursor: pointer;
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
	display: none;
}

/* 图片和嵌入内容 - 禁用长按放大 */
img,
embed,
iframe,
object,
video {
	max-width: 100%;
	height: auto;
	display: block;
	/* 禁用长按放大 */
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	/* 禁用图片长按菜单 */
	-webkit-touch-callout: none;
	/* 禁用iOS Safari的长按放大 */
	-webkit-tap-highlight-color: transparent;
	/* 禁用Android Chrome的长按放大 */
	pointer-events: auto;
	/* 确保图片不会被长按选中 */
	-webkit-user-drag: none;
	-khtml-user-drag: none;
	-moz-user-drag: none;
	-o-user-drag: none;
	user-drag: none;
}

/* 可交互元素 */
a,
button,
input,
textarea {
	touch-action: manipulation;
}

/* 禁用文本选择 */
:not(input, textarea, [contenteditable]) {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* 特殊元素处理 */
[hidden] {
	display: none !important;
}

/* 响应式媒体 */
audio,
canvas,
progress,
video {
	display: inline-block;
	vertical-align: baseline;
}

button {
	outline: none;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
}

span {
	line-height: 1;
}

::-webkit-scrollbar {
	display: none;
}

/* 全局禁用图片长按放大 - 兼容所有移动端设备 */
img {
	/* iOS Safari */
	-webkit-touch-callout: none !important;
	-webkit-user-select: none !important;
	/* Android Chrome */
	-webkit-tap-highlight-color: transparent !important;
	/* 通用 */
	user-select: none !important;
	-webkit-user-drag: none !important;
	-khtml-user-drag: none !important;
	-moz-user-drag: none !important;
	-o-user-drag: none !important;
	user-drag: none !important;
	/* 禁用长按菜单 */
	-webkit-touch-callout: none !important;
	/* 确保图片不会被选中 */
	-webkit-tap-highlight-color: transparent !important;
	/* 禁用双击缩放 */
	-webkit-touch-callout: none !important;
	/* 禁用拖拽 */
	-webkit-user-drag: none !important;
	-khtml-user-drag: none !important;
	-moz-user-drag: none !important;
	-o-user-drag: none !important;
	user-drag: none !important;
	/* 禁用选择 */
	-webkit-user-select: none !important;
	-khtml-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
	user-select: none !important;
	/* 禁用长按菜单 */
	-webkit-touch-callout: none !important;
	/* 禁用点击高亮 */
	-webkit-tap-highlight-color: transparent !important;
	/* 确保图片不会被选中 */
	pointer-events: auto !important;
}

/* 键盘弹出时的样式 */
body.keyboard-open {
	overflow-y: hidden;
	height: 100vh;
	height: 100dvh;
}

/* 输入框聚焦时的样式 */
input:focus,
textarea:focus {
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

/* 移动端点击优化 */
@media (hover: none) and (pointer: coarse) {
	button,
	a,
	[role="button"] {
		min-height: 0.44rem; /* 44px最小点击区域 */
		min-width: 0.44rem;
	}
}

/* 安全区域适配 */
.safe-area-top {
	padding-top: var(--sat);
}

.safe-area-bottom {
	padding-bottom: var(--sab);
}

.safe-area-left {
	padding-left: var(--sal);
}

.safe-area-right {
	padding-right: var(--sar);
}

/* 响应式工具类 */
.hidden-xs { display: none; }
.hidden-sm { display: none; }
.hidden-md { display: none; }
.hidden-lg { display: none; }

@media screen and (max-width: 480px) {
	.hidden-xs { display: block; }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
	.hidden-sm { display: block; }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
	.hidden-md { display: block; }
}

@media screen and (min-width: 1025px) {
	.hidden-lg { display: block; }
}

/* 文本溢出处理 */
.text-ellipsis {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.text-ellipsis-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

.text-ellipsis-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 清除浮动 */
.clearfix::after {
	content: '';
	display: table;
	clear: both;
}

/* 禁用选择 */
.no-select {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* 允许选择 */
.select {
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
}

/* 针对特定浏览器的额外处理 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
	/* Webkit浏览器（Safari, Chrome） */
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
	}
}

/* 针对iOS设备的特殊处理 */
@supports (-webkit-touch-callout: none) {
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
	}
}

/* 移动端图片长按放大禁用样式 */
/* 兼容所有移动端设备和浏览器 */

/* 基础图片样式重置 */
img {
	/* 禁用所有可能的用户交互 */
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
	user-select: none !important;
	
	/* 禁用触摸相关功能 */
	-webkit-touch-callout: none !important;
	-webkit-tap-highlight-color: transparent !important;
	
	/* 禁用拖拽 */
	-webkit-user-drag: none !important;
	-khtml-user-drag: none !important;
	-moz-user-drag: none !important;
	-o-user-drag: none !important;
	user-drag: none !important;
	
	/* 禁用长按菜单 */
	-webkit-touch-callout: none !important;
	
	/* 确保图片不会被选中 */
	pointer-events: auto !important;
}

/* iOS Safari 特殊处理 */
@supports (-webkit-touch-callout: none) {
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
		-webkit-user-drag: none !important;
	}
}

/* Android Chrome 特殊处理 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
		-webkit-user-drag: none !important;
	}
}

/* Firefox 特殊处理 */
@-moz-document url-prefix() {
	img {
		-moz-user-select: none !important;
		-moz-user-drag: none !important;
	}
}

/* Edge 特殊处理 */
@supports (-ms-ime-align: auto) {
	img {
		-ms-user-select: none !important;
	}
}

/* 针对不同设备像素比的优化 */
@media (-webkit-min-device-pixel-ratio: 1) {
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
	}
}

@media (-webkit-min-device-pixel-ratio: 2) {
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
	}
}

@media (-webkit-min-device-pixel-ratio: 3) {
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
	}
}

/* 针对特定移动设备的优化 */
/* iPhone */
@media screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
	}
}

/* iPad */
@media screen and (min-device-width: 481px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 1) {
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
	}
}

/* Android 设备 */
@media screen and (-webkit-min-device-pixel-ratio: 1) and (max-device-width: 1024px) {
	img {
		-webkit-touch-callout: none !important;
		-webkit-user-select: none !important;
		-webkit-tap-highlight-color: transparent !important;
	}
}

/* 确保在按钮内的图片也被禁用 */
button img {
	-webkit-touch-callout: none !important;
	-webkit-user-select: none !important;
	-webkit-tap-highlight-color: transparent !important;
	-webkit-user-drag: none !important;
	user-select: none !important;
	user-drag: none !important;
}

/* 确保在链接内的图片也被禁用 */
a img {
	-webkit-touch-callout: none !important;
	-webkit-user-select: none !important;
	-webkit-tap-highlight-color: transparent !important;
	-webkit-user-drag: none !important;
	user-select: none !important;
	user-drag: none !important;
}

/* 针对游戏特定元素的优化 */
.game-container img,
.betting-area img,
.dice img,
.chip img,
.btn img {
	-webkit-touch-callout: none !important;
	-webkit-user-select: none !important;
	-webkit-tap-highlight-color: transparent !important;
	-webkit-user-drag: none !important;
	user-select: none !important;
	user-drag: none !important;
	pointer-events: auto !important;
} 