@font-face {
	font-family: nicefont;
	src: url(../fonts/nicefont.woff);
}

@font-face {
	font-family: fontawesome;
	src: url(../fonts/fontawesome.woff);
}

* {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	font-weight: 300;
	font-family:  fontawesome, sans-serif;
}

html {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

body {
	width: 100%;
	height: 100%;
	overflow-y: hidden;
	background: #020611;
	touch-action: manipulation;
}

body::before,
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.2s ease;
}

@keyframes vhsNoiseDrift {
	0% { transform: translate(0, 0); }
	25% { transform: translate(1px, -1px); }
	50% { transform: translate(-1px, 1px); }
	75% { transform: translate(1px, 0); }
	100% { transform: translate(0, 0); }
}

@keyframes crtFlicker {
	0%, 100% { opacity: 0.62; }
	47% { opacity: 0.54; }
	50% { opacity: 0.72; }
	53% { opacity: 0.58; }
}

@keyframes neonPulse {
	0%, 100% { opacity: 0.28; }
	50% { opacity: 0.42; }
}

body.video-filter-crt::before {
	opacity: 0.74;
	background: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.16) 0px,
		rgba(255, 255, 255, 0.16) 1px,
		rgba(0, 0, 0, 0.24) 2px,
		rgba(0, 0, 0, 0.24) 3px
	);
	animation: crtFlicker 0.12s steps(2, end) infinite;
}

body.video-filter-crt::after {
	opacity: 0.3;
	background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.5));
}

body.video-filter-retro::before {
	opacity: 0.52;
	background: radial-gradient(circle at center, rgba(255, 212, 161, 0.26), rgba(34, 18, 8, 0.34));
}

body.video-filter-retro::after {
	opacity: 0.28;
	background: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.08) 0px,
		rgba(255, 255, 255, 0.08) 1px,
		rgba(0, 0, 0, 0.12) 2px,
		rgba(0, 0, 0, 0.12) 4px
	);
}

body.video-filter-8bit::before {
	opacity: 0.72;
	background: repeating-linear-gradient(
		to right,
		rgba(255, 255, 255, 0.1) 0px,
		rgba(255, 255, 255, 0.1) 2px,
		rgba(0, 0, 0, 0.28) 3px,
		rgba(0, 0, 0, 0.28) 6px
	);
}

body.video-filter-8bit::after {
	opacity: 0.42;
	background: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.07) 0px,
		rgba(255, 255, 255, 0.07) 2px,
		rgba(0, 0, 0, 0.22) 3px,
		rgba(0, 0, 0, 0.22) 7px
	);
}

body.video-filter-vhs::before {
	opacity: 0.74;
	background: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.18) 0px,
		rgba(255, 255, 255, 0.18) 1px,
		rgba(0, 0, 0, 0.24) 2px,
		rgba(0, 0, 0, 0.24) 4px
	);
	animation: vhsNoiseDrift 0.14s linear infinite;
}

body.video-filter-vhs::after {
	opacity: 0.52;
	background: linear-gradient(90deg, rgba(255, 0, 68, 0.24), rgba(0, 240, 255, 0.22));
	animation: vhsNoiseDrift 0.1s linear infinite reverse;
	mix-blend-mode: screen;
}

body.video-filter-noir::before {
	opacity: 0.52;
	background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.56));
}

body.video-filter-noir::after {
	opacity: 0.24;
	background: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.04) 0px,
		rgba(255, 255, 255, 0.04) 1px,
		rgba(0, 0, 0, 0.1) 2px,
		rgba(0, 0, 0, 0.1) 4px
	);
}

body.video-filter-neon::before {
	opacity: 0.52;
	background: radial-gradient(circle at 50% 50%, rgba(78, 215, 255, 0.28), rgba(176, 82, 255, 0.2));
	animation: neonPulse 1.2s ease-in-out infinite;
}

body.video-filter-neon::after {
	opacity: 0.3;
	background: linear-gradient(120deg, rgba(56, 248, 255, 0.18), rgba(180, 72, 255, 0.2));
	mix-blend-mode: screen;
}

canvas {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 0;
}

b {
	//font-weight: bold;
	color: yellow;
}

a {
	text-decoration: none;
	color: yellow;
}



#welcome-msg {
	position: absolute;
	width: 100%;	
	height: 100%;
	min-height: 100dvh;
	left: 0;
	right: 0;
	margin: 0 auto;
	padding: 14px 16px 78px;
	box-sizing: border-box;
	overflow-y: auto;
	background-color: rgba(10, 10, 10, 0.52);
	z-index: 20;

	color: #dafcf1;	
	text-shadow: 0px -1px 0px #000, 0 0 20px rgba(218, 252, 241, 0.5);
}

#promptbox {
	color: #ffffff;
	opacity: 0.85;
	font-family:  nicefont, sans-serif;
	letter-spacing: 4px;
	text-align: center;
	max-width: 1100px;
	margin: 0 auto;
	position: relative;
	z-index: 21;
}




#press-z, #press-x {
	font-family:  fontawesome, sans-serif;
	opacity: 0.4;
	visibility: hidden;
}

#pause-msg {
	font-family:  fontawesome, sans-serif;
	opacity: 0.3;
}

.round-winner-flash {
	position: fixed;
	left: 50%;
	top: 16%;
	transform: translate(-50%, -18px) scale(0.96);
	padding: 14px 26px;
	border-radius: 10px;
	border: 1px solid rgba(145, 247, 255, 0.72);
	background: linear-gradient(180deg, rgba(7, 28, 46, 0.92), rgba(3, 12, 24, 0.9));
	box-shadow: 0 0 20px rgba(66, 172, 237, 0.42), inset 0 0 18px rgba(66, 172, 237, 0.2);
	color: #e8fcff;
	font-family: nicefont, sans-serif;
	font-size: 24px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-align: center;
	text-shadow: 0 0 10px rgba(145, 247, 255, 0.76), 0 0 24px rgba(66, 172, 237, 0.56);
	opacity: 0;
	pointer-events: none;
	z-index: 70;
	transition: opacity 0.15s ease;
	white-space: nowrap;
	max-width: min(92vw, 980px);
	overflow: hidden;
	text-overflow: ellipsis;
}

.round-winner-flash--show {
	opacity: 1;
	animation: winnerFlashPulse 2.6s ease both;
}

@keyframes winnerFlashPulse {
	0% {
		opacity: 0;
		transform: translate(-50%, -24px) scale(0.9);
		filter: blur(3px);
	}
	14% {
		opacity: 1;
		transform: translate(-50%, 0) scale(1.04);
		filter: blur(0);
	}
	24% {
		transform: translate(-50%, 0) scale(1);
	}
	70% {
		opacity: 1;
		transform: translate(-50%, 0) scale(1);
	}
	100% {
		opacity: 0;
		transform: translate(-50%, 8px) scale(0.98);
	}
}





#inputBox {
	margin: auto;
	width: 400px;
	max-width: min(100%, 400px);
	text-align: center;
	position: relative;
}

#inputBox::after {
  content: "";
  background: url(../images/crt3.gif);
  /*background-size: 18px 15px;*/
  opacity: 0.4;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: -1;   
}

#usernameInput {
	background-color: transparent;
	width: 400px;
	max-width: 100%;
	margin-top: 5px;
	padding: 10px;
	box-sizing: border-box;
	border: none;
	outline: none;
	color: #fff;
	font-size: 170%;
	text-align: center;
	
	text-shadow: 0px -1px 0px #000, 0 0 20px rgba(66,172,237, .6);
	transition: .4s ease;
}

#usernameInput:focus ~ #underline {
	width: 100%;
}

#underline {
	text-align: center;
	margin: auto;
	width: 0px;
	height: 3px;
	background: #fff;
	border: none;
	transition: .4s ease;
}

hr {
	border:none;
	border-bottom: 1px solid #42ACED;
	box-shadow: 0px 0px 10px rgba(66,172,237, .5), 0 0 5px rgba(145,2,227,.8);
}




#chatInput {
	position: fixed;
	top: 0px;
	padding: 5px;
	width: 100%;
	font-size: 16px;
	color: #fff;
	background-color: transparent;
	outline: none;
	border: none;
}






.hud {
	border:1px solid #42ACED;
	padding:.5em;
	border-radius: 5px 0 5px 0;
	box-shadow: 0px 0px 10px rgba(237,172,66,.5),
		0 0 5px rgba(145,227,2,.8);
	position:absolute;
	left:1em;
	right:1em;
	top:1em;
	bottom:1em;
}

.btn {
	padding: 1em;
	color: #42ACED;
	border: 2px inset #42ACED;
	background: transparent;
	text-shadow: 0px -1px 0px #000, 0 0 20px #42ACED;
	letter-spacing: .3em;
	font-weight: light !Important;
	/*cursor: pointer;*/
}

/*.btn:hover {
	background:rgba(0,0,0,0.3);
}*/

.btn.btn-ok {
	color: lightgreen;
	border-color: lime;
	text-shadow: 0px -1px 0px #000, 0 0 30px lime;
}
.btn.btn-warning {
	color: yellow;
	border-color: yellow;
	text-shadow: 0px -1px 0px #000, 0 0 30px yellow;
}
.btn.btn-error {
	color: darkred;
	border-color: red;
	text-shadow: 0px -1px 0px #222, 0 0 30px maroon;
}


.spinner {
  height: 30px;
  width: 30px;
  animation: rotation .5s infinite linear;
  border-left: 3px solid rgba(0, 174, 239, .15);
  border-right: 3px solid rgba(0, 174, 239, .15);
  border-bottom: 3px solid rgba(0, 174, 239, .15);
  border-top: 3px solid rgba(0, 174, 239, .8);
  border-radius: 100%;
}
@keyframes rotation {
  from {transform: rotate(0deg);}
  to {transform: rotate(359deg);}
}

@media screen and (max-width: 900px) {
	#promptbox {
		letter-spacing: 2px;
	}

	#inputBox {
		width: min(100%, 520px);
	}

	#usernameInput {
		width: 100%;
		font-size: 150%;
	}
}

@media screen and (max-width: 700px) {
	h1 {
		font-size: 2rem;
	}

	h3 {
		font-size: 1rem;
		line-height: 1.45;
	}

	h4 {
		font-size: 0.9rem;
	}

	h5 {
		font-size: 0.78rem;
		line-height: 1.55;
	}

	#welcome-msg {
		padding: 10px 10px 90px;
	}

	#promptbox {
		letter-spacing: 1px;
	}

	#press-z,
	#press-x,
	#pause-msg {
		padding: 0 8px;
	}

	#inputBox {
		padding: 0.8em;
	}

	#usernameInput {
		font-size: 1.25rem;
		padding: 12px 6px;
	}

	.btn {
		letter-spacing: 0.16em;
	}
}

@media screen and (max-width: 480px) {
	h3 {
		font-size: 0.92rem;
	}

	h5 {
		font-size: 0.72rem;
	}

	#welcome-msg {
		padding: 8px 8px 88px;
	}

	#inputBox {
		width: 100%;
	}

	#usernameInput {
		font-size: 1.05rem;
	}

	#press-z,
	#press-x {
		font-size: 0.78rem;
	}

	#pause-msg {
		font-size: 1.6rem;
	}
}