/* Общие настройки */
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #0f0f10;
    color: #e4e4e7;
}

/* Контейнер */
.container {
    display: flex;
    height: 100vh;
}

/* Левая панель */
.sidebar {
    width: 250px;
    background: #18181b;
    padding: 15px;
    border-right: 1px solid #2a2a2e;
}

.sidebar h3 {
    margin-top: 0;
}

.chat-item {
    padding: 10px;
    margin-bottom: 5px;
    background: #232326;
    border-radius: 8px;
    cursor: pointer;
}

.chat-item:hover {
    background: #2f2f34;
}

/* Центральная часть */
.chat {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Верхняя панель */
.topbar {
    background: #18181b;
    padding: 10px 15px;
    border-bottom: 1px solid #2a2a2e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Сообщения */
.messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.message {
    max-width: 60%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
}

.message.you {
    background: #2563eb;
    margin-left: auto;
}

.message.other {
    background: #27272a;
}

/* Поле ввода */
.input-area {
    display: flex;
    padding: 10px;
    background: #18181b;
    border-top: 1px solid #2a2a2e;
}

input {
    flex: 1;
    padding: 10px;
    background: #232326;
    border: none;
    border-radius: 8px;
    color: white;
}

input:focus {
    outline: 2px solid #2563eb;
}

/* Кнопки */
button {
    margin-left: 10px;
    padding: 10px 15px;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

/* КНОПКИ ВИЙТИ (специально криво 😈) */
.logout {
    position: fixed;
    background: red;
    z-index: 999;
    pointer-events: auto;
}

/* Разбрасываем по углам, но даем отступ, чтобы не перекрывать важные кнопки */
.logout.top-left {
    top: 5px;
    left: 5px;
}

.logout.top-right {
    top: 5px;
    right: 5px;
}

.logout.bottom-left {
    bottom: 5px;
    left: 5px;
}

.logout.bottom-right {
    bottom: 5px;
    right: 80px; /* Сдвигаем влево, чтобы не накладывалась на кнопку отправки */
}

/* Светлая тема (если захочешь) */
.light {
    background: #f4f4f5;
    color: #111;
}

.light .sidebar {
    background: #e4e4e7;
}

.light .chat-item {
    background: #d4d4d8;
}

.light input {
    background: white;
    color: black;
}

.channel {
    background: #3b1c4a;
    border-left: 3px solid #a855f7;
}