.glass-chat-wrapper {
	width: 95%;
	max-width: 1100px;
	height: calc(100vh - 120px);
	margin: 20px 0 80px 0;
	display: flex;
	background: rgba(22, 22, 22, 0.7);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Sidebar Styling */
.conversations-panel {
	width: 360px;
	border-right: 1px solid rgba(255, 255, 255, 0.05);
	display: flex;
	flex-direction: column;
	background: rgba(18, 18, 18, 0.4);
}

.panel-header {
	padding: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.panel-header h3 {
	margin: 0;
	font-size: 20px;
	color: #fff;
	font-weight: 700;
}

.icon-btn {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #38BDF8;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.icon-btn:hover {
	background: #38BDF8;
	color: #000;
}

.search-bar {
	margin: 0 20px 15px 20px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.search-bar i { color: #888; }

.search-bar input {
	background: transparent;
	border: none;
	outline: none;
	color: #fff;
	font-size: 13px;
	width: 100%;
}

.active-users-bar {
	display: flex;
	gap: 12px;
	padding: 0 20px 15px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	overflow-x: auto;
}

.active-avatar {
	position: relative;
	width: 48px;
	height: 48px;
	min-width: 48px;
}

.active-avatar img, .avatar-box img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.online::after {
	content: '';
	position: absolute;
	bottom: 2px;
	right: 2px;
	width: 10px;
	height: 10px;
	background-color: #10B981;
	border: 2px solid #161616;
	border-radius: 50%;
}

.conversations-list {
	flex: 1;
	overflow-y: auto;
	padding: 10px;
}

.conversation-item {
	display: flex;
	align-items: center;
	padding: 12px;
	border-radius: 16px;
	gap: 12px;
	cursor: pointer;
	transition: background 0.2s;
	position: relative;
}

.conversation-item:hover {
	background: rgba(255, 255, 255, 0.03);
}

.conversation-item.active {
	background: rgba(56, 189, 248, 0.1);
	border: 1px solid rgba(56, 189, 248, 0.2);
}

.avatar-box {
	position: relative;
	width: 44px;
	height: 44px;
	min-width: 44px;
}

.conversation-details {
	flex: 1;
	overflow: hidden;
}

.title-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.username {
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}

.timestamp {
	color: #666;
	font-size: 11px;
}

.preview-text {
	margin: 4px 0 0 0;
	color: #94A3B8;
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.unread-badge {
	background: #38BDF8;
	color: #000;
	font-size: 11px;
	font-weight: 700;
	border-radius: 10px;
	padding: 2px 7px;
}

/* Chat Area */
.active-chat-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: rgba(15, 15, 15, 0.6);
}

.chat-topbar {
	padding: 15px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.user-meta h4 {
	margin: 0;
	color: #fff;
	font-size: 15px;
}

.subtext {
	color: #38BDF8;
	font-size: 11px;
}

.topbar-actions {
	display: flex;
	gap: 8px;
}

.messages-scroll-area {
	flex: 1;
	padding: 24px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.chat-divider {
	text-align: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	line-height: 0.1em;
	margin: 10px 0 15px;
}

.chat-divider span {
	background: #161616;
	padding: 0 10px;
	color: #666;
	font-size: 11px;
}

.msg-bubble {
	max-width: 60%;
	padding: 12px 16px;
	border-radius: 18px;
	position: relative;
	display: flex;
	flex-direction: column;
}

.msg-bubble p {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.4;
}

.msg-bubble .time {
	font-size: 10px;
	margin-top: 4px;
	align-self: flex-end;
}

.incoming {
	align-self: flex-start;
	background: rgba(255, 255, 255, 0.06);
	color: #E2E8F0;
	border-bottom-left-radius: 4px;
}

.incoming .time { color: #888; }

.outgoing {
	align-self: flex-end;
	background: linear-gradient(135deg, #0284C7, #38BDF8);
	color: #fff;
	border-bottom-right-radius: 4px;
	box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

.outgoing .time { color: rgba(255, 255, 255, 0.8); }

.chat-input-bar {
	padding: 15px 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	background: rgba(18, 18, 18, 0.4);
}

.chat-input-bar input {
	flex: 1;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 12px 18px;
	border-radius: 24px;
	color: #fff;
	outline: none;
	font-size: 13px;
}

.send-btn {
	background: #38BDF8;
	color: #000;
	border: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 18px;
	transition: transform 0.2s;
}

.send-btn:hover {
	transform: scale(1.05);
}

@media screen and (max-width: 768px) {
	.glass-chat-wrapper {
		height: calc(100vh - 140px);
		border-radius: 0;
	}
	.conversations-panel {
		width: 100%;
	}
	.active-chat-panel {
		display: none;
	}
}