:root {
	--color_1: rgb(80, 79, 115);
	--color_2: rgb(109, 67, 198);
	--panel_color: rgb(71, 71, 71);
	--panel_height: 2.2rem;
	--panel_font_family: JB Mono;
	--panel_gap: 0.8rem;
}

@font-face {
  font-family: "Nova Square";
  src: url("../fonts/NovaSquare-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "JB Mono";
  src: url("../fonts/JetBrainsMono-Regular.ttf") format("truetype");
}

body, html {
	height: 100%;
	width: 100%;
	margin: 0;
	padding: 0;
	font-family: Nova Square;
	background-color: rgb(57, 57, 62);
	overflow: hidden;
	font-size: 18px;
}

#main {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
}

#top {
	height: var(--panel_height);
	background-color: var(--panel_color);
	justify-content: flex-start;
	flex-grow: 0;
	flex-shrink: 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	font-size: 1rem;
}

#middle {
    flex-grow: 1;
    flex-shrink: 1;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    overflow: hidden;
    min-width: 400px;
}

#center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 200px;
    overflow: hidden;
}

#sidebar {
    display: flex;
    flex-direction: column;
    width: 400px;
    flex-shrink: 0;
    flex-grow: 0;
    min-width: 400px;
}

#bottom {
	flex-grow: 0;
	flex-shrink: 0;
}

#canvas_container {
    flex-grow: 1;
    flex-shrink: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    outline: none;
    background-color: rgb(63, 134, 179);
    min-height: 0;
}

#canvas {
    width: 100%;
    height: 100%;
    background-color: black;
    outline: none;
}

#canvas_container.disabled {
	opacity: 0.5;
}

#canvas_container.kicked {
	background-color: red;
}

#minimap_container {
	position: relative;
	flex-grow: 0;
	flex-shrink: 0;
}

#minimap {
	width: 400px;
	height: 267px;
    background-color: grey;
    display: block;
}

#chat_main {
	background-color: rgb(46, 47, 49);
	flex-grow: 1;
	flex-shrink: 1;
	position: relative;
	display: flex;
	flex-direction: column;
	font-size: 1.05rem;
}

.chat_area_parent {
	width: 100%;
	padding-top: 1rem;
	background-color: rgb(46, 47, 49);
	flex: 1 1 0;
	min-height: 0;
}

.chat_area {
	height: 100%;
	width: 100%;
	overflow-y: auto;
	color: white;
	scrollbar-width: none;
	display: flex;
	flex-direction: column;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	padding-bottom: 1rem;
	box-sizing: border-box;
	gap: var(--panel_gap);
}

#chat_area::-webkit-scrollbar {
	display: none;
}

.chat_message_container {
    word-wrap: break-word;
    color: white;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
}

.chat_icon {
	padding-right: 0.5rem;
	flex-shrink: 0;
}

.chat_username_container {
	display: inline;
}

.chat_username {
    font-weight: bold;
    white-space: nowrap;
    display: inline;
	cursor: pointer;
	user-select: none;
}

.chat_username:hover {
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.chat_username.visible {
	border-bottom: 2px solid #b4eab4;
}

.chat_username.invisible {
	border-bottom: 2px solid #f48abb;
}

.chat_message {
	display: inline;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.chat_counter {
	display: inline;
	color: #b4eab4;
	margin-left: 0.5rem;
}

a.chat:link, a.chat:visited, a.chat:hover {
	color: white;
	text-decoration: underline;
}

#chat_bottom {
	display: flex;
	flex-direction: row;
	gap: 0.2rem;
	align-items: center;
	box-sizing: content-box;
}

#chat_input {
	border: none;
	background-color: rgb(60, 61, 63);
	color: white;
	padding: 0.25rem;
	box-sizing: border-box;
	font-size: 1rem;
	outline: none;
	flex-shrink: 1;
	flex-grow: 1;
	height: var(--panel_height);
	min-width: 4rem;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
}

#chat_input::placeholder {
	font-family: Nova Square;
}

#upload_image {
	color: white;
	flex-shrink: 0;
	flex-grow: 0;
	background-color: var(--color_1);
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	user-select: none;
	cursor: pointer;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
}

#upload_image:hover {
	background-color: var(--color_2);
}

#main.hide_cursor #upload_image {
    cursor: none;
}

#self_destruct {
	color: white;
	flex-shrink: 0;
	flex-grow: 0;
	background-color: rgb(108, 79, 115);
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	user-select: none;
	cursor: pointer;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

#self_destruct:hover {
	background-color: rgb(138, 88, 151);
}

iframe {
	display: none;
}

#hud {
	color: white;
	font-family: var(--panel_font_family);
	text-shadow: 1px 1px black;
	flex-grow: 1;
	flex-shrink: 1;
	padding-left: 1rem;
	display: flex;
	cursor: default;
	user-select: none;
	gap: var(--panel_gap);
}

#hud > div {
	white-space: nowrap;
}

#hud.full {
	flex-wrap: wrap;
}

#about {
	color: white;
	flex-grow: 0;
	flex-shrink: 0;
	padding-right: 1rem;
}

.button {
	cursor: pointer;
	user-select: none;
}

.button:hover {
	cursor: pointer;
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

#volume_container {
	cursor: default;
}

.select {
	color: white;
	background-color: var(--color_1);
	outline: none;
	border: none;
	font-size: 1rem;
	font-family: Nova Square;
	padding-left: 0.3rem;
	padding-right: 0.3rem;
	padding-top: 0.2rem;
	padding-bottom: 0.2rem;
}

.select:hover {
	background-color: rgb(91, 90, 129);
	cursor: pointer;
}

.sep {
	user-select: none;
	opacity: 0.5;
}

#stats {
	height: var(--panel_height);
	width: 100%;
	color: white;
	background-color: var(--panel_color);
	flex-grow: 0;
	flex-shrink: 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	padding-left: 1rem;
	user-select: none;
	font-family: var(--panel_font_family);
	gap: var(--panel_gap);
}

#stats > div {
	white-space: nowrap;
}

#stats.full {
	height: 100%;
	flex-wrap: wrap;
}

.btn {
	cursor: pointer;
}

.btn:hover {
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.hidden {
	display: none !important;
}

#ship_stats_container {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.ship_stats_item {
	max-width: 260px;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-size: 1rem;
}

.ship_stats_uname {
	font-weight: bold;
}

.pointer {
	cursor: pointer;
}

#image_viewer_container {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

#image_viewer_top {
	display: flex;
	flex-direction: row;
}

#image_viewer_middle {
	flex-grow: 1;
	flex-shrink: 1;
	user-select: none;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}

.image_viewer_button {
	cursor: pointer;
	font-weight: bold;
	background-color: rgb(100, 122, 142);
	color: white;
	padding: 0.25rem;
	user-select: none;
	width: 8rem;
}

.image_viewer_button:hover {
	outline: 1px solid rgb(214, 210, 255);
}

#image_viewer_image {
	width: 800px;
	height: auto;
	max-height: 700px;
	border: none;
	outline: none;
	object-fit: contain;
	background-color: rgb(98, 98, 98);
	user-select: none;
}

#Msg-window-1 {
	top: 80px !important;
	transform: translate(-50%) !important;
}

.hide_cursor {
	cursor: none;
}

#ship_stats_container {
	width: 300px;
	display: flex;
	align-items: center;
	justify-content: center;
}

#credits_container {
	display: flex;
	font-size: 1.1rem;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

#credits_title {
	font-size: 1.4rem;
}

#credits_image {
	width: 80px;
	padding-bottom: 0.8rem;
	display: inline-block;
	will-change: transform;
	animation: credits_marquee 4s linear infinite;
	align-self: flex-start;
}

@keyframes credits_marquee {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(777%);
	}
}

@media (prefers-reduced-motion: reduce) {
	#credits_image {
		animation: none;
	}
}

.clickable {
	cursor: pointer;
}

.clickable:hover {
	text-decoration: underline;
}

#laser_picker {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.5rem;
	max-height: 100%;
	overflow: auto;
}

#laser_picker.hidden {
	display: none !important;
}

#laser_picker div {
	color: white;
	cursor: pointer;
	display: inline;
	user-select: none;
}

#laser_picker div:hover {
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

#afk_button.active {
	outline: 1px solid rgb(173, 188, 230);
}

#chat_picker {
	display: flex;
	flex-direction: row;
	color: white;
}

#chat_picker div {
	cursor: pointer;
	user-select: none;
	padding: 0.2rem;
	border: 1px solid rgb(68, 68, 68);
	text-align: center;
	flex-grow: 1;
	flex-shrink: 1;
}

#chat_picker div:hover {
	border: 1px solid rgb(90, 90, 90);
}

#chat_picker div:active {
	background-color: #424242;
}

#chat_picker div.selected {
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}