html, body {
	position: fixed;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	-webkit-text-size-adjust: none;
	overflow: hidden;
}

html, body, * {
	touch-action: manipulation;
}

*::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}

*::-webkit-scrollbar-thumb, *::-webkit-scrollbar-thumb:horizontal {
	background: #888;
	border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover, *::-webkit-scrollbar-thumb:horizontal:hover {
	background: #555;
}

input[type='range'] {
	accent-color: #888;
	height: 10px;
}

a {
	color: #000;
	text-decoration: underline;
}

img {
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-user-drag: none;
	user-drag: none;
	-webkit-touch-callout: none;
}

hr {
	border-top: 2px solid #000;
	margin-top: 15px;
	margin-bottom: 15px;
}

hr.top {
	margin-top: 5px;
}

h2 {
	margin-top: 0;
	margin-bottom: 0;
}

h3 {
	margin-top: 10px;
	margin-bottom: 10px;
}

h5 {
	font-weight: bold;
	font-size: 17px;
}

ul {
	padding-left: 20px;
}

label {
	margin-bottom: auto;
	user-select: none;
}

label span {
	font-size: 14px;
	font-weight: normal;
}

label, input[type=checkbox] {
	cursor: pointer;
}

input::-webkit-calendar-picker-indicator {
	display: none !important;
	opacity: 0 !important;
}

label#nick-list, label#skin-list {
	position: relative;
}

label#nick-list:after, label#skin-list:after {
	position: absolute;
	top: 27px;
	right: 3px;
	content: url(../img/arrow.png);
	padding: .1em;
	pointer-events: none;
}

#overlays, #connecting, #upload-skin, #unban {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.3);
	opacity: 0;
	z-index: 200;
}

#connecting, #upload-skin, #unban {
	z-index: 201;
}

#connecting-content {
	width: 350px;
	background-color: #fff;
	margin: 100px auto;
	border-radius: 15px;
	padding: 5px 15px;
}

#upload-skin-content, #unban-content {
	position: relative;
	max-width: 510px;
	overflow: hidden;
	min-height: 55%;
	margin: 100px auto;
	border-radius: 15px;
}

#upload-skin-content iframe, #unban-content iframe {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	width: 100%;
	height: 100%;
	border: none;
}

#connecting-content h3, #upload-skin-content h3 {
	text-align: center;
}

.title {
	padding: 10px;
	text-align: center;
}

#colors {
	display: flex;
	flex-direction: row;
	justify-content: space-around;
	align-items: center;
	text-align: center;
	margin-top: 5px;
}

#colors label input {
	margin: auto;
}

#server {
	/*display: none;*/
	/*margin-top: 5px;*/
	width: 100%;
}

#helloDialog {
	width: 350px;
	height: 650px;
	background-color: rgba(255,255,255,0.91);
	margin: 10px auto;
	border-radius: 15px;
	position: absolute;
	top: 43%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.8);
	box-shadow: 0 0 9px #243342;
}

#helloDialogContent {
	padding: 5px 15px 5px 15px;
	height: 642px;
	overflow: hidden;
}

#gameplay {
	position: absolute;
	top: 0;
	left: 105%;
	width: 350px;
	height: 650px;
	background-color: rgba(255,255,255,0.91);
	border-radius: 15px;
	padding: 5px 15px 5px 15px;
	box-shadow: 0 0 9px #243342;
}

#news {
	position: absolute;
	top: 0;
	left: -105%;
	width: 350px;
	height: 650px;
	background-color: rgba(255,255,255,0.91);
	border-radius: 15px;
	padding: 5px 15px 5px 15px;
	box-shadow: 0 0 9px #243342;
}

#news .text, #gameplay .text {
	overflow-y: scroll;
	height: 550px;
	font-size: 15px;
}

#preview {
	position: relative;
	padding: 8px;
	overflow: hidden;
}

#previewSkin {
	width: 100%;
	border-radius: 50%;
	box-shadow: 0 0 8px rgba(0, 0, 0, .8);
	background-image: url(../img/checkerboard.png);
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	border-width: 0;
	border-color: transparent;
	border-style: solid;
	aspect-ratio: 1 / 1;
	user-select: none;
}

#previewName {
	position: absolute;
	top: 0;
	left: 0;

	display: flex;
	width: 100%;
	height: 100%;
	justify-content: center;
	align-items: center;

	font-family: 'Ubuntu', sans-serif;
	font-size: 40px;
	color: #fff;
	text-align: center;
	text-shadow: 1px 1px 4px #000;
}

#chat_textbox {
	transition: all .5s ease-in-out;
	position: absolute;
	z-index: 1;
	bottom: 10px;
	background: rgba(0, 0, 0, .2);
	border: 0;
	outline: none;
	color: #fff;
	height: 30px;
	text-indent: 12px;
	left: 10px;
	width: 300px;
	font-family: Ubuntu, sans-serif;
}

#chat_textbox:focus {
	background: rgba(0, 0, 0, .5);
}

#chat_clear {
	transition: all .5s ease-in-out;
	position: absolute;
	z-index: 1;
	bottom: 10px;
	background: rgba(0, 0, 0, .2);
	border: 0;
	outline: none;
	color: #777;
	height: 30px;
	left: 310px;
	width: 30px;
	font-family: Ubuntu, sans-serif;
}

#zoom_container {
	position: absolute;
	z-index: 1;
	bottom: 10px;
	background: rgba(0, 0, 0, .2);
	border: 0;
	outline: none;
	color: #777;
	height: 30px;
	left: 340px;
	width: 120px;
	text-align: center;
	font-size: 10px;
	font-family: Ubuntu, sans-serif;
}

#footer {
	text-align: center;
	margin-bottom: 10px;
	margin-top: -10px;
}

#play-btn {
	width: 100%;
}

#gallery-btn {
	width: 100%;
}

#touch {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
}

#touchCircle, #menuBtn, #fullscreenBtn, #splitBtn, #ejectBtn {
	position: fixed;
}

#menuBtn, #fullscreenBtn, #splitBtn, #ejectBtn {
	z-index: 2;
}

#touchCircle {
	width: 6vw;
	height: 6vw;
	border-radius: 6vw;
	background: #f00;
	opacity: 0.3;
	z-index: 3;
}

#menuBtn, #fullscreenBtn, #splitBtn, #ejectBtn {
	width: 12vw;
	height: 12vw;
	border-radius: 6vw;
	background: #fff;
	opacity: 0.3;
	filter: invert(1);
}

#menuBtn {
	left: 10vw;
	top: 1vh;
}

#fullscreenBtn {
	left: 24vw;
	top: 1vh;
}

#splitBtn {
	right: 18vw;
	bottom: 11vh;
}

.flipped-controls #splitBtn {
	left: 18vw;
	bottom: 11vh;
}

#ejectBtn {
	right: 0;
	bottom: 18vw;
}

.flipped-controls #ejectBtn {
	left: 0;
	bottom: 18vw;
}

#playSounds:checked + #soundsVolume {
	display: inline;
}

#soundsVolume {
	display: none;
	width: 100px;
	height: 18px;
	padding: 0;
	vertical-align: middle;
}

#showTransparent:checked + #transparentAlpha {
	display: inline;
}

#transparentAlpha {
	display: none;
	width: 100px;
	height: 18px;
	padding: 0;
	vertical-align: middle;
}

#settings label {
	margin-right: 10px;
	user-select: none;
}

.form-wrapper {
	width: 100%;
	display: flex;
	gap: 10px;
	align-items: flex-end;
	margin-bottom: 10px;
	clear: both;
}

.form-label-wrapper {
	display: flex;
	flex-direction: column;
	font-size: 14px;
	font-weight: normal;
}

.upload-btn-wrapper {
	width: 100%;
	position: relative;
	overflow: hidden;
	display: inline-block;
	cursor: pointer;
}

.upload-btn-wrapper button {
	width: 100%;
}

.upload-btn-wrapper input[type=file] {
	position: absolute;
	left: 0;
	top: 0;
	opacity: 0;
	font-size: 26px;
}

#copy-msg {
	min-width: 110px;
	text-align: center;
}

.darkTheme #helloDialog, .darkTheme #gameplay, .darkTheme #news {
	background-color: rgba(9,13,23,0.6);
	color: #fff;
	border: 2px solid rgba(36,51,66,0.9);
	box-shadow: 0 0 9px #243342;
}

.darkTheme a {
	color: #fff;
}

.darkTheme #menuBtn, .darkTheme #fullscreenBtn, .darkTheme #splitBtn, .darkTheme #ejectBtn {
	filter: none;
}

.darkTheme hr {
	border-top: 2px solid #fff;
}

#upload-skin-content {
	background-color: rgba(255,255,255,0.91);
}

#unban-content {
	background-color: #fff;
}

.grecaptcha-badge {
	display: none;
}

.darkTheme #connecting-content, .darkTheme #upload-skin-content {
	background-color: rgba(9,13,23,0.6);
	color: #fff;
	border: 2px solid rgba(36,51,66,0.9);
	box-shadow: 0 0 9px #243342;
}

.unselectable {
    touch-action: manipulation;          /* Allows taps but disables double-tap zoom */
    -webkit-touch-callout: none;         /* Prevents the callout (copy/paste menu) */
    -webkit-user-select: none;           /* Disables text/image selection */
    user-select: none;                   /* Standard property */
    -webkit-tap-highlight-color: rgba(0,0,0,0);  /* Removes tap highlight */
}

@media screen and (max-width: 899px) {
	#helloDialog {
		transform: translate(-50%, -50%) scale(0.5);
	}
}

@media screen and (max-width: 480px) {
	#gameplay, #news {
		display: none;
	}

	#helloDialog {
		transform: translate(-50%, -50%) scale(0.8);
	}
}