html {
	-webkit-user-select: none;
	cursor: caret;
	background: #000;
	height: 100%;
	overflow: hidden;
}

body {
	font-family: "Microsoft YaHei","proxima-nova-1","proxima-nova-2", arial, sans-serif;
	margin: 0;
	padding: 0;
	overflow: hidden;
	font-size: 62.5%;
	height: 100%;
}

/* 允许canvas接收鼠标事件，用于焦点恢复，但不干扰UI元素 */
#canvas {
	pointer-events: auto;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

/* 确保UI元素不会被Canvas覆盖 */
#ui, #ui * {
	pointer-events: auto !important;
	z-index: 1 !important;
}

/* 确保UI容器正确处理事件 */
#ui {
	position: relative;
	z-index: 1;
}

/* 认证面板独立于UI容器，使用视口定位 */
#authPanel {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10000;
	pointer-events: auto;
}

/* 确保弹窗在最顶层 */
#profileModal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 20000; /* 提高z-index确保在最顶层 */
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
}

/* 弹窗内容确保可以接收事件 */
.profile-modal-content {
	background: white;
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	width: 90%;
	max-width: 500px;
	max-height: 90%;
	overflow-y: auto;
	animation: modalSlideIn 0.3s ease-out;
	pointer-events: auto;
	position: relative;
	z-index: 20001;
}

/* 网站名称样式 */
.site-name {
	position: absolute;
	top: 20px;
	left: 20px;
	z-index: 10;
}

.site-name h1 {
	color: #fff;
	font-size: 1.5em;
	margin: 0;
	padding: 10px 15px;
	background: rgba(0, 0, 0, 0.7);
	border-radius: 8px;
	border: 2px solid #4fc3f7;
	box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
	text-shadow: 0 0 10px rgba(79, 195, 247, 0.8);
	font-weight: bold;
	letter-spacing: 1px;
}

/* 原有h1样式保留作为备份 */
h1.backup {
	display: block;
	position: absolute;
	top: 30px;
	left: 30px;
	width: 268px;
	height: 30px;
	background: url(images/logo.png);
	overflow: hidden;
	text-indent: 300px;
}

h2 {
	color: #fff;
	font-size: 1.3em;
	margin-bottom: 0.2em;
	font-weight: bold;
}

a {
	color: #c0fdf7;
	text-decoration: none;
}



	a:hover {
		color: #fff;
		text-decoration: underline;
	}

p {
	color: #999999;
	font-size: 1.3em;
	margin-bottom:0.5em;
}

strong {
	font-weight:bold;
}

/*#ui {
	display: none;
}*/

#fps {
	position: absolute;
	top: 0;
	left: 0;
	z-index:2;
}

#chatText
{
	display:inline-block;	
}
#chatText,#chat
{
	font-size:3em;
	font-weight: bold;
	max-width: 70%;
}
#chat {
	/*font-family: "Arial Rounded MT Bold";*/
	display: block;
	position: absolute;
	top: 60%;
	left: 50%;
	padding: 10px 20px;
	background: rgba(255,255,255,.1);
	border-radius: 20px;
	color: #fff;
	text-align: center;
	border-style:none;
	outline-style:none;
	height:30px;
	opacity:0;
	transition: opacity .2s linear;
	-o-transition: opacity .2s linear;
	-moz-transition: opacity .2s linear;
	-webkit-transition: opacity .2s linear;
	-ms-transition: opacity .2s linear;
}


#cant-connect {
	/*font-family: "Arial Rounded MT Bold";*/
	display: none;
	position: absolute;
	top: 200px;
	left: 10px;
	padding: 10px 20px;
	color: rgba(249,136,119,0.9);
	width: 400px;
	font-size: 2em;
	font-weight: bold;
}

#cant-connect a:link {
	color: #c0fdf7;
	text-decoration: underline;
}

#unsupported-browser {
  display: none;  
	position: absolute;
	z-index:2;	
	background-color: #fff;
	background-image: linear-gradient(top, #fff, #e2e2e2);
	background-image: -o-linear-gradient(top, #fff, #e2e2e2);
	background-image: -moz-linear-gradient(top, #fff, #e2e2e2);
	background-image: -ms-linear-gradient(top, #fff, #e2e2e2);
	background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #fff),color-stop(1, #e2e2e2));

	border-radius: 10px;
	box-shadow: 1px 1px 5px #000;
	
	top: 55%;
	left: 50%;
	width:420px;
	margin:-200px;
	padding:35px;
	font-size: 1.5em;
	border: 1px solid #fff;
}

#unsupported-browser p {
	color: #000;
	text-shadow: white 1px 1px 0;
	line-height: 1.4em;
}

a#force-init-button {
	font-size: .6em;
	color: #e47c6c;
	text-align: center;
	font-weight: bold;
	text-decoration: underline;
}
a#force-init-button:hover {
  color: #999;  
}


#unsupported-browser ul li  {
	display: inline;
	list-style-type: none;
	padding-right: 10px;
	font-weight: bold;
	padding: 4px 10px 4px 10px;
	background-color: #606061;
	border-radius: 100px;
	box-shadow:inset -1px -1px -5px #000;
	text-shadow: none;
	font-size: .8em;
}

#unsupported-browser ul   {
	margin: 20px 0px 20px 0px;
}



#info {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	background: rgba(0,0,0,0.2);
}
	#info section {
		float: left;
		margin: 20px 40px 20px 20px;
		margin-right: 40px;
	}
		#info #wtf {
			float: left;
			margin-left: 30px;
			margin-right: 40px;
		}
		
		#info #share {
			float: right;
			margin-right: 40px;
		}
		
		#info section ul {
		
		}
			#info section ul li {
				float: left;
				margin-right: 10px;
			}
				#info section ul li a {
					font-size: 1.3em;
				}
	
	#info #settings .edit {
		display: none;
	}
	

#instructions {
	position: absolute;
	top: 30px;
	right: 60px;
}

#fwa {
	display: none; /*remove on 27th November 2010*/
	position: absolute;
	top: 0px;
	right: 0px;
}

/* 登录注册表单样式 */

.auth-form {
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	min-width: 350px;
	max-width: 400px;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

.auth-form h2 {
	color: #333;
	margin-bottom: 20px;
	font-size: 1.5em;
}

.auth-form input {
	width: 100%;
	padding: 12px;
	margin: 10px 0;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 1.1em;
	box-sizing: border-box;
	transition: border-color 0.3s;
	pointer-events: auto;
	z-index: 10001;
	position: relative;
}

.auth-form input:focus {
	outline: none;
	border-color: #4CAF50;
}

.auth-form button {
	width: 100%;
	padding: 12px;
	margin: 15px 0;
	background: #4CAF50;
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 1.1em;
	cursor: pointer;
	transition: background 0.3s;
}

.auth-form button:hover {
	background: #45a049;
}

.auth-form button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.user-info {
	background: rgba(255, 255, 255, 0.95);
	padding: 20px 30px;
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	min-width: 250px;
	text-align: center;
	box-sizing: border-box;
}

.user-info span {
	color: #333;
	font-size: 1.2em;
	font-weight: bold;
	margin-right: 15px;
}

.user-info button {
	padding: 8px 16px;
	background: #f44336;
	color: white;
	border: none;
	border-radius: 6px;
	font-size: 1em;
	cursor: pointer;
	transition: background 0.3s;
}

.user-info button:hover {
	background: #da190b;
}

.switch-auth {
	margin-top: 15px;
	color: #666;
	font-size: 0.9em;
}

.switch-auth a {
	color: #4CAF50;
	text-decoration: none;
}

.switch-auth a:hover {
	text-decoration: underline;
}

.error-message {
	color: #f44336;
	font-size: 0.9em;
	margin: 5px 0;
	min-height: 20px;
	text-align: left;
}

.user-info {
	background: rgba(255, 255, 255, 0.95);
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

.user-info #welcomeText {
	color: #333;
	font-size: 1.1em;
}

.user-info #currentUser {
	font-weight: bold;
	color: #4CAF50;
}

.user-info button {
	padding: 8px 16px;
	background: #f44336;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: 1em;
}

.user-info button:hover {
	background: #da190b;
}

.error-message {
	color: #f44336;
	font-size: 0.9em;
	margin-top: 5px;
	display: none;
}

.success-message {
	color: #4CAF50;
	font-size: 0.9em;
	margin-top: 5px;
	display: none;
}

/* 个人中心样式 */
#profileSection {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000;
}

.profile-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 15px;
	background: rgba(255, 255, 255, 0.95);
	border: none;
	border-radius: 25px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 14px;
	color: #333;
	text-decoration: none;
}

.profile-btn:hover {
	background: rgba(255, 255, 255, 1);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	transform: translateY(-1px);
	text-decoration: none;
	color: #333;
}

.profile-btn:hover {
	background: rgba(255, 255, 255, 1);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	transform: translateY(-1px);
}

.profile-avatar {
	font-size: 18px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #4CAF50;
	color: white;
	border-radius: 50%;
}

.profile-name {
	font-weight: 500;
	max-width: 100px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 个人中心弹窗样式 */
.profile-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.profile-modal-content {
	background: white;
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	width: 90%;
	max-width: 500px;
	max-height: 90%;
	overflow-y: auto;
	animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-50px) scale(0.9);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.profile-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 25px;
	border-bottom: 1px solid #eee;
	background: #f8f9fa;
	border-radius: 15px 15px 0 0;
}

.profile-modal-header h2 {
	margin: 0;
	color: #333;
	font-size: 1.5em;
}

.profile-modal-close {
	font-size: 28px;
	font-weight: bold;
	color: #aaa;
	cursor: pointer;
	transition: color 0.3s ease;
	line-height: 1;
}

.profile-modal-close:hover {
	color: #333;
}

.profile-modal-body {
	padding: 25px;
}

.profile-avatar-section {
	text-align: center;
	margin-bottom: 30px;
}

.profile-avatar-display {
	position: relative;
	display: inline-block;
}

.profile-avatar-display img {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	border: 4px solid #4CAF50;
	object-fit: cover;
	background: #f5f5f5;
}

.avatar-upload-btn {
	margin-top: 15px;
}

.avatar-upload-label {
	display: inline-block;
	padding: 8px 16px;
	background: #4CAF50;
	color: white;
	border-radius: 20px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.3s ease;
}

.avatar-upload-label:hover {
	background: #45a049;
}

.profile-info-section {
	max-width: 350px;
	margin: 0 auto;
}

.profile-field {
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.profile-field label {
	min-width: 60px;
	font-weight: 500;
	color: #555;
}

.profile-field input {
	flex: 1;
	padding: 10px 12px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.3s ease;
}

.profile-field input:focus {
	outline: none;
	border-color: #4CAF50;
	box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.profile-display {
	flex: 1;
	padding: 10px 12px;
	background: #f8f9fa;
	border-radius: 8px;
	color: #666;
}

.save-btn {
	padding: 8px 16px;
	background: #4CAF50;
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.3s ease;
	white-space: nowrap;
}

.save-btn:hover {
	background: #45a049;
}

.save-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* 认证区域样式 */
#authSection {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000;
}

.auth-links {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 15px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 25px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(10px);
	transition: all 0.3s ease;
}

.auth-links:hover {
	background: rgba(255, 255, 255, 1);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	transform: translateY(-1px);
}

.auth-link {
	color: #4a5568;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	padding: 5px 8px;
	border-radius: 15px;
	transition: all 0.3s ease;
}

.auth-link:hover {
	color: #667eea;
	background: rgba(102, 126, 234, 0.1);
}

.auth-separator {
	color: #cbd5e0;
	font-size: 14px;
	user-select: none;
}

/* 响应式样式 - 移动设备优化 */
@media (max-width: 768px) {
	#authSection {
		top: 10px;
		right: 10px;
	}
	
	.auth-links {
		padding: 8px 12px;
		gap: 6px;
	}
	
	.auth-link {
		font-size: 12px;
		padding: 4px 6px;
	}
	
	.auth-separator {
		font-size: 12px;
	}
	
	.profile-btn {
		padding: 8px 12px;
		font-size: 12px;
	}
	
	.profile-name {
		max-width: 80px;
	}
	
	.profile-modal-content {
		width: 95%;
		margin: 10px;
	}
	
	.profile-modal-header {
		padding: 15px 20px;
	}
	
	.profile-modal-body {
		padding: 20px;
	}
	
	.profile-field {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	
	.profile-field label {
		min-width: auto;
	}
}


