* {
	-webkit-tap-highlight-color: transparent;
	box-sizing: border-box;
}
body {
	background-color: rgb(0, 0, 0);
	font-family: system-ui, sans-serif;
	margin: 0;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	user-select: none;
}
code {
	background: rgb(64, 64, 64);
}
h1, h2, h3, h4, h5, h6, p, span, b, pre {
	color: rgb(205, 205, 205);
	margin: 0;
}
a {
	color: yellow;
}
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #474747;
}
::-webkit-scrollbar-thumb:hover {
  background: #555;
}
button, select, input {
	color: rgb(255, 255, 255);
	background-color: rgb(64, 64, 64);
	border-radius: 5px;
	border: none;
	padding: 7px;
	outline: none;
	cursor: pointer;
	transition: 0.4s cubic-bezier(.18,2.5,.49,1) opacity, 0.4s cubic-bezier(.18,2.5,.49,1) scale;
}
button:active, select:active, input:active {
	scale: 0.97;
}
.container {
	display: flex;
	flex: 1;
	overflow: hidden;
	position: relative;
}
ul.bar {
	list-style-type: none;
	margin: 0;
	padding: 5px;
	width: 25%;
	min-width: 200px;
	max-width: 300px;
	background-color: #181818;
	border-right: 1px solid rgb(41, 41, 41);
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	height: 100%;
	z-index: 1000;
	transition: transform 0.5s cubic-bezier(.16,1.16,.14,1);
}
.nav-icon {
	opacity: 0.3;
	display: inline-block;
}
li:has(#bar-status) {
	margin-top: auto;
	font-family: monospace;
	font-size: 11px;
}
li a {
	display: flex;
	align-items: center;
	gap: 5px;
	color: #bebebe;
	padding: 8px 16px;
	text-decoration: none;
	transition: 0.2s cubic-bezier(.16,.98,.23,1);
}
li a:active {
	scale: 0.97;
	transition: 0.4s cubic-bezier(.18,2.5,.49,1);
}
li a:hover, .active {
	background-color: #272727;
	color: white;
	box-shadow: 0 0 0 1px inset rgb(56, 56, 56);
	border-radius: 5px;
}
.active {
	animation: active 0.3s cubic-bezier(.18,2.5,.49,1) forwards;
}
@keyframes active {
	from { scale: 0.95; }
}
#main {
	flex: 1;
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.topbar {
	background-color: #181818;
	border-bottom: 1px solid rgb(41, 41, 41);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	gap: 5px;
	z-index: 50;
	flex-shrink: 0;
}
.topbar-left, .topbar-right {
	display: flex;
	align-items: center;
	gap: 5px;
}
.nav-sep {
	color: #555;
	font-weight: bold;
}
.icon-btn {
	background: transparent;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.icon-btn:hover {
	background: #272727;
}
.native-drop {
	position: relative;
	display: inline-flex;
	align-items: center;
}
.native-drop select {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	color: #fff;
	font-weight: bold;
	font-size: 14px;
	padding: 5px 20px 5px 5px;
	border: none;
	outline: none;
	max-width: 150px;
	text-overflow: ellipsis;
}
.native-drop select:hover {
	background: rgba(255, 255, 255, 0.05);
}
.native-drop .caret {
	position: absolute;
	right: 5px;
	pointer-events: none;
	opacity: 0.6;
}
#chat {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	font-size: 13px;
	color: #fff;
	text-shadow: #888 1px 1px;
	z-index: 49;
	pointer-events: none;
}
#chat, #chat * {
	user-select: text;
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
}
@property --mask-bottom {
	syntax: "<length-percentage>";
	inherits: false;
	initial-value: 0px;
} 
#chat ul {
	list-style: none;
	margin: 0 0 0 6px;
	padding: 0;
	padding-bottom: 6px;
	overflow-y: auto;
	overflow-x: hidden;
	word-break: break-all;
	pointer-events: auto;
	--mask-bottom: 0px;
	transition: --mask-bottom 0.5s cubic-bezier(.19,.94,.12,1);
	-webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 60px, black calc(100% - var(--mask-bottom)), transparent 100%);
	mask-image: linear-gradient(to bottom, transparent 0%, black 60px, black calc(100% - var(--mask-bottom)), transparent 105%);
}
#chat ul.fade-bottom {
	--mask-bottom: 50px;
}
#chat li, #chat .chatmsg {
	padding: 2px;
	opacity: 1;
	color: #fff;
}
#chat .chatname { cursor: pointer; color: #ececec; }
#chat .chatid { opacity: 0.6; }
#chat .chattime { opacity: 0.8; }
#chat .chatmessage { color: rgb(230,230,230); }
#chat .mention { color: yellow; text-shadow: 2px 2px 5px yellow; }
#chat .reply { color: rgb(165, 165, 165); text-shadow: none; opacity: 0.8; font-style: italic; }
.chat-input-bar {
	display: flex;
	align-items: stretch;
	width: 100%;
	margin: 0;
	padding: 0;
	gap: 0;
	pointer-events: auto;
	background: rgba(43, 43, 43, 0.6);
	border-top: 1px solid rgb(41, 41, 41);
}
.chat-input-bar:focus-within {
	background: rgba(37, 37, 37, 0.9);
}
#upload-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 16px;
	color: #bebebe;
	cursor: pointer;
	background: transparent;
	border: none;
	border-right: 1px solid rgb(41, 41, 41);
	flex-shrink: 0;
}
#upload-btn:hover { background-color: rgba(255, 255, 255, 0.08); }
#upload-btn input[type="file"] { display: none; }
#chat #chat-input {
	display: block;
	flex: 1;
	width: 100%;
	box-sizing: border-box;
	padding: 15px 20px;
	border: none;
	background: transparent;
	color: #fff;
	border-radius: 0;
	outline: none;
	pointer-events: auto;
}
#chat #chat-input:active { scale: 1; }
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); z-index: 1000; align-items: center; justify-content: center; padding: 10px; }
.modal-backdrop.open { display: flex; animation: fadein 0.2s ease forwards; }
.modal-backdrop.closing { display: flex; animation: fadeout 0.2s ease forwards; pointer-events: none; }
.modal-backdrop.closing .settings-modal-box { animation: popout 0.2s cubic-bezier(.18,2.5,.49,1) forwards; }
.settings-modal-box { background-color: rgb(15, 15, 15); border: 1px solid rgb(41, 41, 41); width: 500px; max-width: 100%; max-height: 100%; position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; animation: popin 0.25s cubic-bezier(.18,2.5,.49,1); box-sizing: border-box; }
.settings-close-btn { position: absolute; top: 20px; right: 15px; background: rgb(64, 64, 64); padding: 5px 10px; border-radius: 5px; font-weight: bold; }
.setting-block { background-color: rgb(20, 20, 20); border: 1px solid rgb(41, 41, 41); padding: 12px; margin-top: 15px; border-radius: 10px; }
.setting-block h3 { border-bottom: 1px solid rgb(41, 41, 41); padding-bottom: 5px; margin-bottom: 10px; font-size: 14px; }
.setting-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.setting-row:last-child { margin-bottom: 0; }
.tab-bar { border-bottom: 2px solid rgb(41, 41, 41); display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; }
.tab-btn { background-color: transparent; color: rgb(205, 205, 205); padding: 8px 16px; margin: 0; border: none; cursor: pointer; font-size: 14px; border-radius: 5px 5px 0 0; transition: background-color 0.2s; }
.tab-btn:hover { background-color: rgb(30, 30, 30); }
.tab-btn.active { background-color: rgb(64, 64, 64); color: white; font-weight: bold; }
.status-msg { color: yellow; font-size: 13px; margin-left: 8px; }
input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
input[type="color"] { width: 40px; height: 30px; padding: 0; border: none; border-radius: 5px; cursor: pointer; background: transparent; }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }
@keyframes popin { from { scale: 0.95; opacity: 0; } }
@keyframes popout { from { scale: 1; opacity: 1; } to { scale: 0.95; opacity: 0; } }
.mobile-only { display: none; }
#bar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 90; }
@media (max-width: 768px) {
	.mobile-only { display: flex; }
	ul.bar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); }
	ul.bar.open { transform: translateX(0); }
	#bar-overlay.open { display: block; }
}