* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.message-meta {
  text-align: right;
  margin-top: 4px;
}

.read-status {
  font-size: 0.9rem; /* Размер галочек */
  opacity: 0.8; /* Слегка прозрачные */
  cursor: help; /* Курсор подсказывает, что есть подсказка */
  transition: opacity 0.2s ease;
}

.read-status:hover {
  opacity: 1; /* Полная непрозрачность при наведении */
}
.message-length-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ff4444;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}


.green-bar-box {
  display: flex;
  align-items: center;
  background: #222;
  border-radius: 8px;
  padding: 0;
  margin-top: 8px;
  margin-bottom: 8px;
}
.green-bar-input {
  flex: 1;
  background: #fff;
  color: #222;
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 12px 14px;
  font-size: 1.08rem;
  outline: none;
  height: 44px;
  box-sizing: border-box;
}
.green-bar-btn-group {
  display: flex;
  flex-direction: row;
  height: 44px;
}
.green-bar-btn {
  background: #219150;
  color: #fff;
  border: none;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 0 22px;
  height: 100%;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.green-bar-btn:first-child {
  border-radius: 0 0 0 0;
}
.green-bar-btn-upload {
  border-radius: 0 8px 8px 0;
}
.green-bar-btn:not(:last-child) {
  border-right: 1px solid #19713a;
}
.green-bar-btn:hover, .green-bar-btn:focus {
  background: #176c3a;
}




/* Стили для всех ссылок */
a {
  color: #4da6ff; /* Голубой цвет (можете изменить на любой другой) */
  text-decoration: none; /* Убираем подчеркивание */
  transition: color 0.2s ease-in-out; /* Плавное изменение цвета */
}

/* Стили для ссылок при наведении */
a:hover {
  color: #7fbbff; /* Более светлый голубой при наведении */
  text-decoration: underline; /* Добавляем подчеркивание при наведении */
}

/* Стили для ссылок в файловых сообщениях */
.file-link {
  display: inline-block;
  padding: 5px 10px;
  background-color: #212bb8;
  border-radius: 4px;
  text-decoration: none;
  color: #e7e7e7;
  margin-top: 5px;
  margin-bottom: 5px;
}

.file-link:hover {
  background-color: #2834dd;
}
.chat-image {
  max-width: 100%;
  max-height: 300px;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 5px;
}

.file-container {
  margin-top: 5px;
  margin-bottom: 5px;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
  background-color: #222; /* Тёмный фон */
}
hr {
  margin: 20px 0;
  border: none; /* Убираем стандартную границу */
  height: 1px;
  background-color: #444; /* Серая линия */
}
#root {
  background-color: #333;
  height: 100vh;
  min-width: 505px;
  margin: 0 auto;
  margin-left: 130px;
  margin-right: auto;
}
#home-container {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
}
#home-header {
  text-align: center;
  margin: 20px 0;
  color: #fff; /* Белый текст */
}
#chat-widget-home {
  padding: 30px;
  background-color: #333; /* Слегка светлее основного фона */
}
#chat-widget-home input {
  width: 100%;
  max-width: 300px;
  padding: 8px 10px;
  font-size: 1.1rem;
  border-radius: 8px;
  border: none;
  outline: none;
  background-color: #444; /* Серый фон для инпута */
  color: #fff; /* Белый текст */
}
#chat-widget-home label {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #aaa; /* Светло-серый текст */
}
#chat-widget-home div {
  margin-bottom: 20px;
}
#chat-widget-home button {
  height: calc(1.1rem + 20px);
  padding: 5px 10px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  color: #fff; /* Белый текст */
}
#name-input {
  display: flex;
  flex-direction: column;
}
#code-label {
  display: block;
}
#join {
  border: 2px solid #1e7e46; /* Зелёная граница */
  color: #fff;
  background-color: #1e7e46;
  transition: all 0.1s ease-in;
}
#join:hover {
  background-color: #fff;
  color: #1e7e46;
}
#create {
  border: 2px solid #ccc; /* Серая граница */
  color: #ccc;
  background-color: #333;
  transition: all 0.1s ease-in;
}
#create:hover {
  background-color: #ccc;
  color: #333;
}
#error {
  width: calc(100% - 60px);
  margin: 0 auto;
  padding: 10px;
  background-color: #b93f31; /* Красный фон для ошибки */
  color: #fff; /* Белый текст */
  border-radius: 10px;
  font-weight: 900;
}
#room-container {
  height: 100%;
  display: flex;
  flex-direction: row;
  padding: 0 0 0 0;
  background-color: #222; /* Тёмный фон */
}
#user-list-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 275px;
  min-width: 180px;
  max-width: 320px;
  height: 100vh;
  background: #232323;
  border-radius: 0 15px 15px 0;
  margin: 0;
  margin-right: 0;
  padding: 18px 10px 8px 10px;
  box-shadow: 2px 0 8px rgba(0,0,0,0.08);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  z-index: 10;
}
#main-chat-area {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #333;
  height: 99vh;
  padding: 0 30px 30px 30px;
}
#room-subsection {
  margin-bottom: 20px;
}
#room-code-display {
  color: #fff; /* Белый текст */
}
#room-code-display span {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  color: #ddd; /* Светло-серый текст */
  font-family: monospace;
  padding: 8px 5px;
}
#leave-chat-btn {
  color: #fff; /* Белый текст */
  background-color: #c54334; /* Красный фон */
  font-weight: 800;
  text-decoration: none;
  padding: 6px;
  border: 2px solid #e74c3c;
  display: inline-block;
  margin-top: 5px;
  border-radius: 10px;
  transition: all 0.1s ease-in;
}
#leave-chat-btn:hover {
  color: #c44133; /* Красный текст */
  background-color: #e4e4e4; /* Белый фон */
}
#chat-room-widget {
  flex: 1 1 0%;
  min-height: 0;
  position: relative;
  background-color: #222; /* Тёмный фон */
  border: 4px solid #222;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
}
#msgs-container {
  position: relative;
  flex: 1 1 0%;
  height: auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  background-color: #222; /* Тёмный фон */
  padding: 10px;
  scroll-behavior: smooth;
}
#msgs-container > ul {
  list-style: none;
}
#message-box {
  position: relative;
  bottom: 0;
  width: 100%;
  height: 50px;
  display: flex;
}
#message-input {
  flex-grow: 1;
  padding: 10px;
  font-size: 1.1rem;
  outline: none;
  border: 4px solid #222;
  border-right: none;
  background-color: #333; /* Слегка светлее основного фона */
  border-bottom-left-radius: 15px;
  color: #fff; /* Белый текст */
}
#send-file-btn {
  padding: 0 20px;
  font-size: 1.05rem;
  border: 4px solid #222;
  border-left: none;
  background-color: #1e7e46; /* Зелёный фон */
  color: #fff; /* Белый текст */
  cursor: pointer;
  border-bottom-right-radius: 15px;
  transition: all 0.1s ease-in;
}
#send-btn {
  padding: 0 20px;
  font-size: 1.1rem;
  border: 4px solid #222;
  /* border-left: none;
  border-right: none; */
  background-color: #1e7e46; /* Зелёный фон */
  color: #fff; /* Белый текст */
  cursor: pointer;
  /* border-bottom-right-radius: 15px; */
  transition: all 0.1s ease-in;
}
#send-btn:hover {
  background-color: #1e7e46; /* Слегка тёмнее зелёного */
}
.message-item {
  background-color: #333; /* Слегка светлее основного фона */
  border-radius: 10px;
  padding: 10px;
  width: fit-content;
  max-width: 75%;
  margin: 10px 0;
  color: #fff; /* Белый текст */
}
.peer-message-item {
  background-color: #1e7e46; /* Зелёный фон */
  color: #fff; /* Белый текст */
  border-bottom-left-radius: 0;
}
.self-message-item {
  margin-left: auto;
  margin-right: 0;
  border-bottom-right-radius: 0;
}
.muted-text {
  color: grey;
  font-size: 0.7rem;
  display: block;
  margin-bottom: 2px;
  margin-top: 2px;
}
.muted-text-white {
  color: white;
  font-size: 0.7rem;
  display: block;
  margin-bottom: 2px;
}
.member-activity {
  text-align: center;
  margin: 10px 0;
  color: #aaa; /* Светло-серый текст */
}
/* --- USER LIST PANEL --- */
.user-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #333;
  color: #fff;
  font-size: 1.04rem;
}
.user-list-item:last-child {
  border-bottom: none;
}
.user-nick {
  font-weight: 600;
  margin-right: 10px;
}
.user-stats {
  margin-left: 10px;
  font-size: 0.98rem;
  color: #b0e6b0;
}
.mic-toggle-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  margin: 0 6px;
  color: #fff;
  outline: none;
  transition: color 0.15s;
}
.mic-toggle-btn:hover {
  color: #1e7e46;
}
.mic-icon {
  font-size: 1.2rem;
  margin: 0 6px;
}
.notif-icon {
  font-size: 1.1rem;
  margin-left: 6px;
}
