#mp-chat {
	position: fixed;
	bottom: 16px;
	left: 16px;
	width: 340px;
	max-height: 260px;
	display: none;
	flex-direction: column;
	z-index: 100;
	pointer-events: none;
	opacity: 0.35;
	transition: opacity 0.3s ease;
	font-family: system-ui, -apple-system, sans-serif;
}

#mp-chat.active {
	opacity: 1;
	pointer-events: auto;
}

.chat-messages {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	max-height: 180px;
	padding: 6px 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,0.15) transparent;
	mask-image: linear-gradient(transparent 0%, black 15%);
	-webkit-mask-image: linear-gradient(transparent 0%, black 15%);
}

.chat-messages::-webkit-scrollbar {
	width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,0.15);
	border-radius: 2px;
}

.chat-msg {
	font-size: 13px;
	line-height: 1.4;
	color: #e0e0e0;
	text-shadow: 0 1px 3px rgba(0,0,0,0.8);
	word-break: break-word;
}

.chat-msg.system {
	color: #888;
	font-style: italic;
	font-size: 12px;
}

.chat-name {
	color: #4ade80;
	font-weight: 600;
}

.chat-name.clickable {
	cursor: pointer;
}

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

.chat-text {
	color: #e0e0e0;
}

.chat-input-row {
	padding: 4px 0 0 0;
	pointer-events: auto;
}

.chat-input-row input {
	width: 100%;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 6px;
	color: #fff;
	font-size: 13px;
	padding: 7px 10px;
	outline: none;
	font-family: system-ui, -apple-system, sans-serif;
	transition: border-color 0.2s, background 0.2s;
}

.chat-input-row input::placeholder {
	color: rgba(255,255,255,0.3);
}

.chat-input-row input:focus {
	background: rgba(0, 0, 0, 0.75);
	border-color: rgba(74, 222, 128, 0.5);
}
