/* Базовые настройки и сброс отступов */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background-color: #f5f7fa;
	color: #333;
	line-height: 1.5;
	display: flex;
	flex-direction: column;
}

h1 {
	text-align: center;
	justify-content: center;
	align-items: center;
	display: flex;
}

ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
	background-color: #333333;
	display: flex;
}

ul li a {
	display: block;
	color: white;
	padding: 14px 16px;
	text-decoration: none;
}

ul li a:hover {
	background-color: #111111;
}

/* Контейнер навигационной панели */
.navbar {
	background-color: #2c3e50; /* Тёмно-синий фон */
	padding: 0 20px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	height: 70px;
	width: 100%;
	min-width: 100%;
	top: 0;
	position: relative;
	display: flex;
}

/* Список ссылок — гибкая строка */
.nav-list {
	list-style: none;
	display: flex;
	justify-content: center; /* Центрируем ссылки */
	align-items: center;
	margin: 0;
	padding: 0;
	width: 100%;
}

span {
	width: 100%;
	height: 100%;
	background-color: #2c3e50; /* Тёмно-синий фон */
}

/* Каждая ссылка в списке
.nav-list li {
	margin: 0 15px;
} */

.right {
	margin-left: auto;
}

/* Стилизация ссылок */
.nav-link {
	display: block;
	color: #ecf0f1; /* Светло-серый текст */
	text-decoration: none;
	font-size: 16px;
	padding: 14px 0;
	transition: color 0.3s ease, background-color 0.3s ease;
	border-radius: 4px;
}

/* Эффект при наведении */
.nav-link:hover {
	color: #ffffff;
	background-color: rgba(255, 255, 255, 0.1);
}

/* Активная ссылка (можно добавлять класс .active вручную) */
.nav-link.active {
	color: #3498db; /* Яркий цвет для активной */
	font-weight: 600;
}

/* Контейнер всей страницы */
.chat-app {
	display: flex;
	height: 100vh;
	max-width: 1200px;
	margin: 0 auto;
	border: 1px solid #e0e4e8;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	justify-content: center;
	background-color: #f9fafc;
	flex: 0 0 85%;
	width: 85%;
	flex-direction: column;
}

/* Список постов (левая колонка) */
.posts-list {
	width: 80%;
	background-color: #ffffff;
	border-right: 1px solid #e0e4e8;
	overflow-y: auto;
}

.posts-list__header {
	padding: 16px 20px;
	background-color: #625df5;
	color: white;
	font-size: 18px;
	font-weight: 600;
	text-align: center;
}

.post-item {
	padding: 14px 20px;
	border-bottom: 1px solid #edf0f3;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.post-item:hover {
	background-color: #f0f4ff;
	transform: translateX(4px);
}

.post-item.active {
	background-color: #e6f0ff;
	border-left: 3px solid #625df5;
}

.post-item__title {
	font-weight: 500;
	margin-bottom: 4px;
	color: #2c3e50;
}

.post-item__preview {
	color: #7f8c8d;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Область чата (правая колонка) */
.chat-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
}

.chat-header {
	padding: 16px 20px;
	background-color: #625df5;
	color: white;
	display: flex;
	align-items: center;
	gap: 12px;
}

.tags {
	padding: 16px 20px;
	background-color: #625df5;
	color: white;
	/*display: block;*/
	align-items: center;
	gap: 12px;
	width: 28%;
}

.taglist::before {
	content: "Теги: "
}

.taglist {
	color: #223300;
}

.chat-header__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #9b8afb;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	color: white;
}

.chat-header__title {
	font-size: 16px;
	font-weight: 600;
}

.message-list {
	flex: 0 0 50%;
	padding: 20px;
	overflow-y: auto;
	background-color: #f9fafc;
	width: 50%;
	border: 1px;
}

.chat-messages {
	flex: 0 0 100%;
	padding: 20px;
	overflow-y: auto;
	background-color: #f9fafc;
	border: 1px;
}

.incoming .outgoing {
	width: 50%
}

/* Адаптивность */
@media (max-width: 768px) {
	.chat-app {
		flex-direction: column;
		border-radius: 0;
		height: 100%;
	}

	.posts-list {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid #e0e4e8;
	}

	.chat-area {
		height: calc(100% - 300px);
	}
}

/* Базовый сброс и шрифты для ощущения "простого веба" */
body {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	background-color: #f7f7f7;
	margin: 0;
	padding: 0;
	color: #333;
}

/* Шапка */
header {
	background: #fff;
	border-bottom: 1px solid #e0e0e0;
	padding: 10px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo {
	font-size: 24px;
	color: #2196F3; /* Цвет бумажного самолетика */
	font-weight: bold;
	text-decoration: none;
	cursor: pointer;
}

.header-icons span {
	margin-left: 15px;
	color: #999;
	cursor: pointer;
	font-size: 20px;
}

/* Основной контейнер */
.container {
	max-width: 900px;
	display: flex;
	margin: 5px auto;
	/*
	gap: 20px;
	padding: 0 10px;
	*/
	flex-direction: row;
}

/* Левая колонка (Лента) */
.main-content {
	flex: 2;
}

/* Правая колонка (Пустая, как на скрине) */
.sidebar {
	flex: 1;
	background: #fff;
	height: 300px;
	border: 1px solid #eee;
	display: none; /* Скрываем на мобильных */
}

@media (min-width: 768px) {
	.sidebar { display: block; }
}

/* Форма создания поста */
.post-creator {
	background: #fff;
	padding: 15px;
	border: 1px solid #eee;
	margin-bottom: 20px;
}

.input-area {
	background-color: #eaf5fc; /* Цвет как на скрине */
	border: none;
	padding: 15px;
	width: 100%;
	height: 120px;
	box-sizing: border-box;
	font-size: 14px;
	resize: none;
	outline: none;
	color: #555;
	position: relative;
}

.input-area::placeholder {
	color: #aab;
}

/* Уголок (имитация декоративного элемента) */
.corner-decor {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0 0 30px 30px;
	border-color: transparent transparent #dcecf6 transparent;
	pointer-events: none;
}

.controls {
	margin-top: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.tags-input {
	border: none;
	border-bottom: 1px solid #ddd;
	padding: 5px;
	width: 70%;
	outline: none;
	font-size: 13px;
}

.btn-submit {
	background-color: #8e5ea2; /* Фиолетовый как на скрине */
	color: white;
	border: none;
	padding: 8px 30px;
	border-radius: 20px;
	cursor: pointer;
	font-size: 14px;
	height: 30%;
}

.btn-submit:hover {
	background-color: #764b8a;
}

.mychats {
	display: flex;
	flex: 0 0 100%;
	flex-direction: row;
}

/* Фильтры */
.filters {
	margin-bottom: 15px;
	font-size: 14px;
	color: #777;
}

.filters span {
	margin-right: 15px;
	cursor: pointer;
}

.filters span.active {
	font-weight: bold;
	color: #333;
	background: #fff;
	padding: 3px 8px;
	border-radius: 4px;
}

/* Список постов */
.post {
	background: #fff;
	border: 1px solid #eee;
	padding: 15px;
	margin-bottom: 10px;
	cursor: pointer;
}

.post:hover {
	border-color: #ccc;
}

.post-text {
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 10px;
}

.post-tags {
	font-size: 12px;
	color: #8899a6;
}

/* Экран чата (изначально скрыт) */
#chat-view {
	display: none;
	background: #fff;
	border: 1px solid #eee;
	height: 500px;
	flex-direction: column;
	width: 100%;
	max-width: 900px;
	margin: 20px auto;
}

.chat-header {
	padding: 10px 15px;
	border-bottom: 1px solid #eee;
	display: flex;
	align-items: center;
	background: #f9f9f9;
}

.back-btn {
	margin-right: 15px;
	cursor: pointer;
	color: #8e5ea2;
	font-weight: bold;
}

.message {
	margin-bottom: 10px;
	max-width: 70%;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 14px;
}

.message.me {
	background: #eaf5fc;
	margin-left: auto;
	text-align: right;
}

.message.them {
	background: #f0f0f0;
}

.chat-input-area {
	display: flex;
	flex: 1;
	/*justify: center;
	padding: 10%;*/
	min-height: 200px;
}

.chat-input {
	flex: 0 1 100%;
	padding: 30px;
	width: 100%;
	display: flex;
}

.create-post-area {
	width: 40%;
	height: 170px;
	display: flex;
	flex: 1;
}

.create-post-tag-area {
	width: 40%;
	height: 70px;
	display: flex;
	flex: 1;
}

.row {
	flex-direction: row;
	display: flex;
	flex: 0 0 100%;
	padding: 5px 5px;
}

.create-post {
	flex: 0 1 100%;
	padding: 20px;
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

label {
	padding: 5px;
}
