:root {
  --bg-main: #202225;
  --bg-sidebar: #2f3136;
  --bg-guilds: #202225;
  --bg-accent: #5865f2;
  --bg-accent-hover: #4752c4;
  --bg-input: #40444b;
  --text-primary: #ffffff;
  --text-muted: #b9bbbe;
  --border-subtle: #202225;
  --danger: #ed4245;
  --scrollbar-thumb: #202225;
  --scrollbar-track: #2f3136;
  --radius-md: 8px;
  --radius-lg: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
}

body {
  overflow: hidden;
}

a {
  color: var(--bg-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#app {
  height: 100vh;
}

/* Auth */

.auth-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #5865f2 0, #202225 50%);
}

.auth-card {
  background-color: #36393f;
  padding: 32px;
  border-radius: var(--radius-lg);
  width: 360px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.auth-title {
  margin: 0 0 16px;
  font-size: 24px;
  text-align: center;
}

.auth-error {
  background-color: rgba(237,66,69,0.1);
  color: #ff6b6b;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-input {
  background-color: var(--bg-input);
  border: 1px solid #18191c;
  border-radius: 3px;
  padding: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.auth-input:focus {
  outline: none;
  border-color: var(--bg-accent);
}

.btn-primary {
  background-color: var(--bg-accent);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 8px;
}

.btn-primary:hover {
  background-color: var(--bg-accent-hover);
}

.auth-footer {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

/* App shell */

.app-shell {
  display: grid;
  grid-template-columns: 72px 240px 1fr;
  grid-template-rows: 1fr;
  height: 100vh;
  background-color: var(--bg-main);
}

.sidebar {
  background-color: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
}

/* Guilds bar */

.guilds-bar {
  background-color: var(--bg-guilds);
  align-items: center;
  padding: 12px 0;
  gap: 12px;
}

.guilds-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--bg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 8px;
}

.guilds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.guilds-item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: #36393f;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-radius 0.2s, background-color 0.2s;
}

.guilds-item:hover {
  border-radius: 16px;
  background-color: var(--bg-accent);
}

.guilds-item.active {
  border-radius: 16px;
  background-color: var(--bg-accent);
}

/* Channels sidebar */

.channels-bar {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.channels-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: #2f3136;
}

.server-name {
  font-weight: 600;
  font-size: 16px;
}

.channels-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 8px 12px;
}

.channel-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  display: block;
}

.channel-item:hover {
  background-color: #393c43;
  color: var(--text-primary);
}

.user-bar {
  padding: 8px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #292b2f;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #7289da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.user-name {
  font-size: 14px;
}

.user-status {
  font-size: 12px;
  color: var(--text-muted);
}

.user-actions .icon-button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
}

/* Chat main */

.chat-main {
  display: flex;
  flex-direction: column;
  background-color: #36393f;
}

.chat-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background-color: #36393f;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-hash {
  color: var(--text-muted);
}

.chat-actions .btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
}

.chat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0 16px;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

.messages-placeholder {
  margin-top: 24px;
  text-align: center;
  color: var(--text-muted);
}

.message-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4f545c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.message-body {
  flex: 1;
}

.message-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.message-author {
  font-weight: 500;
  font-size: 14px;
}

.message-time {
  font-size: 11px;
  color: var(--text-muted);
}

.message-text {
  font-size: 14px;
  white-space: pre-wrap;
}

.message-input-wrap {
  padding: 0 16px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.message-input {
  flex: 1;
  resize: none;
  max-height: 120px;
  min-height: 40px;
  background-color: var(--bg-input);
  border-radius: 8px;
  border: 1px solid #202225;
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 14px;
}

.message-input:focus {
  outline: none;
  border-color: var(--bg-accent);
}

.btn-send {
  align-self: stretch;
}

/* Call overlay */

.call-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.call-overlay.hidden {
  display: none;
}

.call-window {
  width: 720px;
  max-width: 100%;
  background-color: #202225;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.call-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.call-title {
  font-weight: 600;
}

.call-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.call-body {
  position: relative;
  background-color: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 360px;
}

.remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.local-video {
  position: absolute;
  width: 180px;
  height: 120px;
  bottom: 12px;
  right: 12px;
  border-radius: var(--radius-md);
  border: 2px solid #fff;
  object-fit: cover;
  background-color: #000;
}

.call-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.btn-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: #4f545c;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.btn-round.btn-danger {
  background-color: var(--danger);
}

.btn-round:hover {
  filter: brightness(1.1);
}

/* Scrollbars */

.messages::-webkit-scrollbar,
.channels-list::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb,
.channels-list::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 4px;
}

.messages::-webkit-scrollbar-track,
.channels-list::-webkit-scrollbar-track {
  background-color: var(--scrollbar-track);
}

/* Responsive */

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 72px 1fr;
  }
}

/* Mobile layout */
@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .guilds-bar {
    display: none;
  }
  .channels-bar {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

/* New dialog input */

.new-dialog {
  padding: 8px 8px 0 12px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.new-dialog-input {
  flex: 1;
  background-color: var(--bg-input);
  border-radius: 4px;
  border: 1px solid #202225;
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 13px;
}

.new-dialog-input:focus {
  outline: none;
  border-color: var(--bg-accent);
}

.new-dialog-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background-color: var(--bg-accent);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-dialog-btn:hover {
  background-color: var(--bg-accent-hover);
}


.user-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #7289da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.user-avatar-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #292b2f;
  background-color: #3ba55d;
}

.user-avatar-status.status-online {
  background-color: #3ba55d;
}

.user-avatar-status.status-calling {
  background-color: #faa61a;
}

.user-avatar-status.status-busy {
  background-color: #ed4245;
}

.user-status-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* Channel item with icon and unread badge */

.channel-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #4f545c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.channel-name {
  flex: 1;
  text-align: left;
}

.channel-unread {
  min-width: 16px;
  height: 16px;
  border-radius: 12px;
  background-color: var(--bg-accent);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.channel-item-unread {
  color: var(--text-primary);
  font-weight: 500;
}

/* Avatar color variants for dialog icons */

.avatar-color-1 { background-color: #5865f2; }
.avatar-color-2 { background-color: #43b581; }
.avatar-color-3 { background-color: #faa61a; }
.avatar-color-4 { background-color: #ed4245; }
.avatar-color-5 { background-color: #9b84ee; }
.avatar-color-6 { background-color: #f47fff; }

/* New dialog input (already partially defined, ensure it's present) */

.new-dialog {
  padding: 8px 8px 0 12px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.new-dialog-input {
  flex: 1;
  background-color: var(--bg-input);
  border-radius: 4px;
  border: 1px solid #202225;
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 13px;
}

.new-dialog-input:focus {
  outline: none;
  border-color: var(--bg-accent);
}

.new-dialog-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background-color: var(--bg-accent);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-dialog-btn:hover {
  background-color: var(--bg-accent-hover);
}


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

.user-avatar.large {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

/* Settings page */

.settings-page {
  display: flex;
  height: 100vh;
  background-color: #202225;
  color: #fff;
}

.settings-sidebar {
  width: 220px;
  padding: 24px 16px;
  border-right: 1px solid #18191c;
  background-color: #2f3136;
}

.settings-title {
  margin: 0 0 16px;
  font-size: 20px;
}

.settings-menu {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.settings-menu li {
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-muted);
}

.settings-menu li.active {
  background-color: #393c43;
  color: var(--text-primary);
}

.settings-back {
  font-size: 13px;
  color: var(--text-muted);
}

.settings-content {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
}

.settings-section {
  margin-bottom: 32px;
}

.settings-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-field label {
  font-size: 13px;
  color: var(--text-muted);
}

.settings-field input,
.settings-field select {
  background-color: var(--bg-input);
  border-radius: 4px;
  border: 1px solid #202225;
  color: var(--text-primary);
  padding: 6px 8px;
  font-size: 14px;
}

.settings-field input:focus,
.settings-field select:focus {
  outline: none;
  border-color: var(--bg-accent);
}

.settings-avatar-row {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.settings-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.settings-error {
  background-color: rgba(237,66,69,0.1);
  color: #ff6b6b;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 8px;
}

.settings-success {
  background-color: rgba(67,181,129,0.12);
  color: #3ba55d;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 8px;
}

@media (max-width: 800px) {
  .settings-page {
    flex-direction: column;
  }
  .settings-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #18191c;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}


.preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#preview-video {
  width: 160px;
  height: 90px;
  background-color: #000;
  border-radius: 6px;
}


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


/* Диалог в активном звонке */
.channel-item-in-call {
  background-color: #393c43;
  border-left: 2px solid #3ba55d;
}

/* Окно звонка: удалённый пользователь */
.call-body {
  display: flex;
  gap: 8px;
}

.remote-wrapper {
  position: relative;
  flex: 1;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remote-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: radial-gradient(circle at top, rgba(88, 101, 242, 0.3), transparent);
}

.remote-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
}

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

.remote-name {
  font-size: 14px;
  font-weight: 500;
}

/* История звонков в сообщениях */
.call-log {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.call-log-out {
  background-color: rgba(88, 101, 242, 0.1);
  color: #5865f2;
}

.call-log-in {
  background-color: rgba(67, 181, 129, 0.1);
  color: #3ba55d;
}

.call-log-missed {
  background-color: rgba(237, 66, 69, 0.12);
  color: #ed4245;
}

.call-log-duration {
  background-color: rgba(79, 84, 92, 0.4);
  color: #b9bbbe;
}

/* Кнопка "Принять" */
.btn-accept {
  background-color: #3ba55d;
}

.btn-accept:hover {
  background-color: #2d7d43;
}


.btn-round.btn-active {
  box-shadow: 0 0 0 2px rgba(240, 71, 71, 0.6);
  background-color: #f04747;
}

.channel-item-active {
  background-color: #393c43;
}

/* Typing indicator */
.chat-typing {
  min-height: 18px;
  padding: 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Toast notifications */
#toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}

.toast {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background-color: #2b2b2b;
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-info {
  background-color: #2b2b2b;
}

.toast-error {
  background-color: var(--danger);
}

.toast-call {
  background-color: #5865f2;
}

/* Call control visibility helper */
.call-control-hidden {
  display: none;
}

/* Фикс скролла внутри флекс-колонок */
.channels-bar,
.chat-main,
.chat-content {
  min-height: 0;
}

.message-row-own {
  flex-direction: row-reverse;
}

.message-row-own .message-body {
  text-align: right;
}

.message-actions {
  margin-top: 4px;
  display: flex;
  gap: 4px;
  font-size: 12px;
}

.message-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.message-action-btn:hover {
  background-color: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.message-edited {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}

.message-deleted {
  font-style: italic;
  color: var(--text-muted);
}


.call-conn-status {
  margin-left: 8px;
  font-size: 12px;
  opacity: 0.8;
}

.call-conn-status.conn-ok {
  color: #3ba55d; /* зелёненький как в Discord */
}

.call-conn-status.conn-bad {
  color: #faa61a; /* жёлтый */
}

.call-conn-status.conn-lost {
  color: #ed4245; /* красный */
}

.call-conn-status.conn-connecting {
  color: #999;
}

/* Убедитесь, что окно звонка занимает весь экран в полноэкранном режиме */
.fullscreen .call-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

.fullscreen .call-window {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.fullscreen .call-body {
  flex-grow: 1;
}

.fullscreen .call-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
}

/* Основной стиль контейнера */
.chat-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
}

/* Панель с эмодзи */
.emoji-panel {
  display: flex;
  flex-wrap: wrap;
  width: 200px; /* Ширина панели */
  background-color: #2f3136; /* Цвет фона */
  border: 1px solid #292929; /* Цвет границы */
  padding: 10px;
  position: absolute;
  bottom: 60px; /* Отступ от нижней части экрана */
  z-index: 1000;
  display: none; /* Панель скрыта по умолчанию */
}

.emoji-btn {
  background: none;
  border: none;
  font-size: 20px;
  margin: 5px;
  cursor: pointer;
  padding: 5px;
  color: white; /* Цвет текста эмодзи */
  display: inline-block;
}

#emoji-button {
  background-color: var(--bg-accent);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 8px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
  /* Панель эмодзи для мобильных устройств */
  .emoji-panel {
    width: 100%; /* Панель на всю ширину экрана */
    bottom: 60px; /* Сдвиг панели выше */
    left: 0;
    padding: 5px;
    grid-template-columns: repeat(4, 1fr); /* 4 эмодзи в строке */
    display: grid;
  }

  .emoji-btn {
    font-size: 18px; /* Уменьшаем размер эмодзи на мобильных устройствах */
    margin: 3px;
    padding: 10px;
    width: 40px;
    height: 40px;
    text-align: center;
  }

  #emoji-button {
    width: 30%; /* Сделаем кнопку эмодзи широкой на мобильных устройствах */
    padding: 10px 0;
  }
}

/* Для планшетов */
@media (min-width: 601px) and (max-width: 1024px) {
  .emoji-panel {
    width: 250px;
    grid-template-columns: repeat(5, 1fr); /* 5 эмодзи в строке */
  }

  .emoji-btn {
    font-size: 22px; /* Увеличиваем размер эмодзи для планшетов */
  }

  #emoji-button {
    width: 100px;
    padding: 12px;
  }
}

/* Mobile layout adjustments */
@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .guilds-bar {
    display: none;
  }

  .channels-bar {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  /* Adjust the message input area */
  .message-input-wrap {
    padding: 10px;
    flex-direction: row;
    gap: 8px;
    position: relative;
    width: 100%;
  }

  .message-input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;  /* Prevents it from growing too large */
    background-color: var(--bg-input);
    border-radius: 8px;
    border: 1px solid #202225;
    color: var(--text-primary);
    padding: 10px;
    font-size: 14px;
    box-sizing: border-box;
  }

  .btn-send {
    padding: 12px;
    font-size: 16px;
    width: auto; /* Make sure the send button is aligned with the input */
    margin-left: 8px; /* Add some space between the button and input */
  }

  /* Emoji panel positioning */
  .emoji-panel {
    width: 100%;
    left: 0;
    padding: 5px;
    bottom: 70px;
    display: flex; /* Make emojis align horizontally */
    flex-wrap: wrap;
    justify-content: space-between;
    grid-template-columns: repeat(6, 1fr); /* Spread out the emojis */
  }

  .emoji-btn {
    font-size: 20px;
    width: 40px;
    height: 40px;
    margin: 5px;
    padding: 8px;
    cursor: pointer;
    text-align: center;
  }

  #emoji-button {
    width: 50px;
    padding: 12px;
    font-size: 18px;
    background-color: var(--bg-accent);
    border: 1px solid #292929;
    color: white;
    cursor: pointer;
    margin-left: 10px;
  }
}

/* For very small screens */
@media (max-width: 500px) {
  .message-input {
    font-size: 13px;
    padding: 8px;
  }

  .btn-send {
    font-size: 14px;
  }

  .emoji-btn {
    font-size: 18px;
    padding: 6px;
  }

  #emoji-button {
    font-size: 16px;
    padding: 10px;
  }
}
