/* Общий контейнер чата */

#chat-container {
  position: relative; 
  font-family: 'Pretendard'!important;
  border-radius: 10px;
  width:300px;
  margin:20px auto;
  display: flex;
  justify-content: center;
  overflow: hidden;
  user-select: text;
  border: 1px solid #e7e5e6;
}


#chat-container #main-page {
  position: relative;
  width: 300px;
  height: 500px;
  background: #fff;
  overflow: hidden;
}

/* сам чат */
#chat-container #chat-main {
  width: 300px;
  display: flex;
  flex-direction: column;
  height: 500px;
  background: #fff;
  z-index: 1;
}

/* список тем для анимации*/
#chat-container #topics {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  padding: 0px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(0px);
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 2;
}


/* при показе */
#chat-container #topics.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* При активации тем */
#chat-container #chat-main.faded {
  filter: blur(0px);
  pointer-events: none;
}


#chat-container #chat-topics { 
  height: 420px;
  overflow-y: auto;
  padding: 0px 15px 15px 15px;
  user-select: none;
  margin-top: 15px;
}
#chat-container #close-topics {
    all: unset;
    position: absolute;
    display: block;
    top: 15px;
    left: 20px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
}

#chat-container #close-topics .ph-bold.ph-caret-left {
  font-size: 20px!important;
}

#chat-container #close-topics:hover {
transform: translateY(-1px);
}

/*превью чатов в списке*/
#chat-container .chat-topic {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background-color: #f7f7f7;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-bottom: 10px;
  border:1px solid #f7f7f7;
}

#chat-container .chat-topic:hover {
  background-color: #f0f0f0;
}

#chat-container .chat-topic.active {
  background: #fff;
  border:1px solid #e1bcc7;
}
#chat-container .chat-topic-avatar { width: 42px;
  height: 42px;}
  
#chat-container .chat-topic-avatar img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  transition: all 0.25s ease;
  filter: grayscale(100%) contrast(120%) brightness(1.1);
}

#chat-container .chat-topic-content {
  flex: 1;
  flex-direction: column;
  justify-content: center;
  margin-left:12px;
}

#chat-container .chat-topic-title {
  font-size: 15px;
  font-weight: 600;
  color: #747474;
  font-family: 'Noto Sans', sans-serif;
}

#chat-container .chat-topic-preview {
  font-size: 12px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#chat-container .chat-topic.active .chat-topic-avatar img {
  background-color: #fafafa;
  filter: grayscale(0%) contrast(110%) brightness(1);
  
}
#chat-container .chat-topic.active .chat-topic-title {
  color: #222222;  
}

#chat-container .chat-topic.active .chat-topic-preview {
  color: #e1bcc7;  
}

/* заголовок и профиль*/
#chat-container #chat-header {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  background: #f5f5f5;
  gap: 20px;
  position: relative;
  user-select: none;
}

#chat-container #chat-title {cursor: pointer;
  flex-grow: 1;
  position: relative;
  padding-left: 8px;
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
}

#chat-container #chat-title:hover {
  color: #e1bcc7;
}

#chat-container #chat-title:hover i {
  transform: translateX(-3px);
}

#chat-container #chat-title i {
  font-size: 16px;
  transition: transform 0.2s;
}

#chat-title-text {
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* текущий профиль в чате you */
#chat-container #chat-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  font-size: 10px;
  color: #222;
}

#chat-container #chat-profile > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

#chat-container #chat-avatar-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  transition: transform 1.8s ease, box-shadow 1.4s ease, filter 1.3s ease;
  filter: grayscale(100%) brightness(1.2);
  cursor: pointer;
}

#chat-container#chat-avatar-preview:hover {
  transform: scale(1.1);
  filter: grayscale(0%) brightness(1.1);
  transition: transform 1.8s ease, box-shadow 1.4s ease, filter 1.3s ease;
}

#chat-container #chat-username-preview {
  user-select: text;
  max-width: 120px;
  border: solid 1px #f1f1f1;
    background-color: #fff;
    font-size: 10px;
    line-height: 10px;
    padding: 8px 8px 8px 20px;
    color: #cec4cf;
    text-transform: lowercase;
    border-radius: 10px;
    box-sizing: border-box;
    margin-left:-26px;
}

.chat-profile-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chat-profile-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #999;
  flex-shrink: 0;
}

.chat-profile-status[data-online="true"]::before {
  background: #4caf50;
}

#profile-menu {
  position: relative;
  display: flex;
  align-items: center;
}


#profile-settings input[type="text"] {
  all: unset;
  width: 100%;
  padding: 3px 10px;
  margin-bottom: 5px;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  font-size: 10px;
  transition: border 0.2s;
  text-align: center;
}

#profile-settings input[type="text"]:focus {
  border: none;
  outline: none;
}

#profile-settings input:placeholder-shown {
  background-color: #fff; /* светлый фон если пусто */
}

#profile-settings input:not(:placeholder-shown) {
  border: 1px solid #e1bcc780;
}

#save-profile-btn {
    all: unset;
    width: 100%;
    height: 15px;
    font-family: "Pretendard", sans-serif;
    font-size: 10px;
    padding: 3px;
    background-color: #fff;
    color: #444;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    text-align: center;
}

#save-profile-btn:hover {
  background: #e1bcc7;
  font-weight: bold;
  color: #fff;
}


#profile-settings {
  position: absolute;
  top: 25px;
  right: 0;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: 200px;
  background: #f8f8f8;
  padding: 20px;
  font-size: 12px;
  color: #333;
  display: none;
}

#profile-settings.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#profile-settings label {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  user-select: none;
  font-size: 11px;
  justify-content: center;
}

/* Чекбокс с сердцем */
.minimal-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  font-size: 15px;
  cursor: pointer;
}

.minimal-checkbox input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 16px;
  height: 16px;
  display: inline-block;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s;
}

.checkbox-custom::after {
  content: '\2764';
  font-size: 15px;
  color: #aaa;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 16px;
  transition: color 0.3s;
}

.minimal-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '\2764';
  color: #e1bcc7;
}

#profile-selector {
  position: relative;
  padding: 10px 5px; 
    margin-top: 10px;
    display:flex; 
    gap:5px;
    width: auto;
    height: 30px;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
  transition: all 0.3s ease;
  cursor: grab;
}


/* Скрываем дефолтный скролл */
#profile-selector::-webkit-scrollbar {
  display: none;
}

#profile-selector {
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
 user-select: none;
  -webkit-user-select: none; /* для Safari */
  -ms-user-select: none;     /* для IE/Edge */
  }


#chat-container .profile-delete-btn {
  user-select: none; 
  -webkit-user-select: none; /* для Safari */
  -ms-user-select: none;     /* для IE/Edge */
  position: absolute;
  top: -5px;
  right: -5px;
  background: #c9c9c9;
  color: white;
  font-size: 8px;
  width: 13px;
  height: 13px;
  text-align: center;
  line-height: 14px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

#chat-container .profile-save {
  position: relative;
  display: inline-block;
  margin-right: 3px;
}

#chat-container .profile-save:hover .profile-delete-btn {
  display: block;
  background: #e1bcc7;
}

#chat-container .profile-save-avatar-img {
        user-select: none; 
-webkit-user-select: none; /* для Safari */
  -ms-user-select: none;     /* для IE/Edge */
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#chat-container .profile-save-avatar-img:hover {
    user-select: none;
  transform: scale(1.1);
}

#profile-selector img {
  pointer-events: auto;
  user-drag: none;          /* Safari */
  -webkit-user-drag: none;  /* Safari */
}

/* Основная панель сообщений */
#chat-messages {
  flex: 1;
  padding: 12px 18px;
  overflow-y: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  line-height: 1;
}


#chat-messages::-webkit-scrollbar {
  width: 8px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

#chat-messages::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
  background-color: rgba(100, 100, 100, 0.3);
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 100, 100, 0.6);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 100, 100, 0.3) transparent;
}




/* Аватарка */
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Баббл текста */
.chat-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  background-color: #f0f0f0;
  color: #333;
  font-size: 12px;
  line-height: 1;
  max-width: 70%;
  word-wrap: break-word;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Свои сообщения (разворачиваем, цвет другой) */
.chat-message.own-msg {
  flex-direction: row-reverse;
}

.chat-message.own-msg .chat-bubble {
  background-color: #f7f7f7;
  color: #111;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 18px;
}

/* Чужие сообщения — стандарт */
.chat-message:not(.own-msg) .chat-bubble {
  border: 1px solid #ededed;
  background-color: #fff;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 18px;
}


/* Панель с кнопками форматирования и смайлами */
#chat-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  user-select: none;
}

#chat-form {
  background: #f5f5f5;
  padding: 8px;
  border-top: 0px solid #ddd;
}

#chat-container .format-btn {
  all: unset;
  font-family: "Pretendard", sans-serif;
  font-size: 12px;
  background-color: #f6f6f6;
  color: #444;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  cursor: pointer;
  position: relative;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#chat-container.format-btn:hover {
  background-color: #eee;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

/* Сердечко-прыгун */
#chat-container .format-btn::after {
  content: '\2764';
  font-size: 10px;
  position: absolute;
  top: -4px;
  right: -4px;
  opacity: 0;
  color:#ee77a1;
  transform: scale(0.5) rotate(10deg);
  pointer-events: none;
}

#chat-container .format-btn:hover::after {
  animation: heart-bounce 0.4s forwards;
}

@keyframes heart-bounce {
  0% {
    transform: scale(0.5) translateY(0) rotate(10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) translateY(-4px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0) rotate(0deg);
    opacity: 1;
  }
}


#emoji-picker {
  position: absolute;
  top: 35%;
  left: 0;
  z-index: 1000;
  background-color: white;
  border: 1px solid #ccc;
  padding: 5px;
  width: 220px;
  border-radius: 8px;
  box-shadow: 0px 1px 50px 150px rgba(0, 0, 0, 0.15);
  transition: all 0.5s ease;
  max-height: 70px;
  overflow-y: auto;
  margin: 0px 35px;
}

#sticker-picker {
  position: absolute;
  top: 20%;
  left: 0;
  z-index: 1000;
  background-color: white;
  border: 1px solid #ccc;
  padding: 5px;
  width: 260px;
  border-radius: 8px;
  box-shadow: 0px 1px 50px 150px rgba(0, 0, 0, 0.15);
  transition: all 0.5s ease;
  max-height: 120px;
  overflow-y: auto;
  margin: 0px 15px;
}

.emoji-row, .sticker-row{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.emoji-btn, .sticker-btn  {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.2s;
}

.emoji-btn:hover, .sticker-btn:hover {
  transform: scale(1.2);
}

.sticker-img {
  width: 60px;
  height: 60px;
  border-radius:2px;
  object-fit: cover;
  cursor: pointer;
}

/* Редактируемое поле ввода */
#chat-input {
  flex-grow: 1;
  min-height: 30px;
  max-height: 80px; 
  font-size: 12px;
  line-height: 1.2em;
  padding: 6px;
  border-radius: 8px;
  overflow-y: auto;
  outline: none;
  background-color: #fff;
  color: #222;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Placeholder для contenteditable через data-placeholder */
#chat-input:empty::before {
  content: attr(placeholder);
  color: #aaa;
  pointer-events: none;
  user-select: none;
  position: absolute;
  left: 8px;
  top: 6px;
  font-size: 11px;
}


/* Кнопка отправки */
#chat-send {
  all: unset;
  width: 25px;
  height: 25px;
  font-family: "Pretendard", sans-serif;
  font-size: 15px;
  padding: 3px;
  background-color: #f6f6f6;
  color: #444;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#chat-send:hover {
  background-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

#chat-send::after {
  content: "\2764";
  font-size: 12px;
  position: absolute;
  top: -6px;
  right: -4px;
  opacity: 0;
  color:#ee77a1;
  transform: scale(0.5) rotate(10deg);
  pointer-events: none;
}

#chat-send:hover::after {
  animation: flower-bounce 0.4s forwards;
}

@keyframes flower-bounce {
  0% {
    transform: scale(0.5) translateY(0) rotate(10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) translateY(-4px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0) rotate(0deg);
    opacity: 1;
  }
}

#chat-send .flower-effect {
  content: "\2764";
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
  animation: none;
}

#chat-send .loading {all: unset;
  width: 25px;
  height: 25px;
  font-family: "Pretendard", sans-serif;
  font-size: 15px;
  padding: 3px;
  background-color: #e5e5e5;
  color: #444;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;   
}


#image-url { all: unset;
  flex-grow: 1;
  padding: 6px 10px;
  font-size: 10px;
  line-height: 1.2em;
  padding: 6px 8px;
  border-radius: 8px;
  overflow-y: auto;
  outline: none;
  background-color: #fff;
  color: #222;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
}
#image-preview {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  border: 0px solid #ddd;
  background-color: #f9f9f9;
}

#preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Скрытый iframe */
#chat-iframe {
  display: none;
}

/* Адаптив для маленьких экранов */
@media (max-width: 350px) {
  #chat-container {
    width: 100%;
    border-radius: 0;
  }
  
  #chat-messages {
    padding: 8px 12px;
  }
  
  #chat-input, #image-url, #chat-send {
    margin: 0 12px 10px 12px;
    width: calc(100% - 24px);
  }
}


/* Голосовое */
#voice-delete-btn {
  background: none;
  border: none;
  color: #c44;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1;
}

#voice-delete-btn:hover {
  background: rgba(255, 0, 0, 0.1);
  color: #a00;
}

.voice-msg {width: 120px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  color: #555;
  cursor: pointer;
}

.voice-msg summary {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.voice-msg summary::-webkit-details-marker {
  display: none;
}

#voice-preview i {
    color: #c5c5c5;
    font-size: 10px;
    cursor: default;
}

.voice-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.voice-title {
  font-weight: bold;
  color: #333;
}

.voice-msg-duration {
  font-size: 11px;
  color: #777;
}

.voice-animation {
  display: flex;
  gap: 2px;
}

.voice-msg-text {
  margin-top: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  white-space: pre-wrap;
  line-height: 1.4;
  cursor: default;
}

.voice-toggle {
  background: none;
  border: none;
  color: #888;
  font-size: 10px;
  cursor: pointer;
  padding: 2px 4px;
}

.hidden {
  display: none;
}

.voice-play {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  padding: 2px;
}

.voice-title {
  font-weight: bold;
  font-size: 9px;
  color: #666;
}

.voice-animation {
  display: flex;
  gap: 2px;
  align-items: center;
  height: 10px;
  margin-left: 4px;
}

.voice-wave {
  width: 2px;
  height: 8px;
  background: #bbb;
  animation: waveAnim 0.6s infinite ease-in-out;
}

.voice-wave:nth-child(2) {
  animation-delay: 0.1s;
}
.voice-wave:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes waveAnim {
  0%, 100% {
    height: 6px;
  }
  50% {
    height: 12px;
  }
}

.voice-msg-duration {
  margin-left: auto;
  font-size: 9px;
  color: #999;
}

.voice-msg-text {
  margin-top: 6px;
  font-size: 9px;
  color: #999;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  padding: 0;
  white-space: pre-wrap; /* <- сохраняет переносы строк */
}

details.voice-transcript > div {
  margin: 0 !important;
  padding: 0 !important;
}

.remove-voice-btn {
  position: relative;
  font-weight: 700;
  font-size: 10px;
  user-select: none;
  margin-left: 6px;
  cursor: pointer;
  line-height: 1;
  cursor: pointer;
  left: 5px;
}

.remove-voice-btn:hover {
  color: #800;
}

#voice-modal {
  display: none;
  position: absolute;
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  margin-top: 100px;
  font-size: 10px;
  color: #555;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  max-width: 100%;
  z-index: 1;
}

#voice-modal h3 {
  margin: 0 0 6px 0;
  font-size: 11px;
  font-weight: 600;
  color: #333;
}

#voice-modal label {
  font-size: 9px;
  color: #777;
  display: block;
  margin: 6px 0 2px;
}

#voice-modal textarea,
#voice-modal input[type="text"] {
  width: 100%;
  padding: 4px;
  font-size: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  resize: vertical;
}

#voice-modal button {
  margin-top: 8px;
  margin-right: 6px;
  padding: 3px 8px;
  font-size: 10px;
  border: none;
  border-radius: 4px;
  background-color: #ddd;
  color: #333;
  cursor: pointer;
  transition: background 0.2s;
}

#voice-modal button:hover {
  background-color: #ccc;
}

#voice-text, #voice-duration {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  font-family: 'Pretendard';
  color: #444;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease;
}

#voice-text:focus, #voice-duration:focus {
  border-color: #bbb;
  background-color: #fdfdfd;
  box-shadow: none;
  color: #444;
}


/*Уведомления*/
.chat-toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translate(-50%, 0px) !important;
  background: #222;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  z-index: 9999;
  opacity: 0;
  font-size: 12px;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Добавим анимацию выхода */
.chat-toast.fade-out {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-toast img.toast-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}


.toast-text {
  max-width: 150px;
  word-wrap: break-word;
}
.notification-label {
  color: #111; 
  background: #f6f6f6;
  padding: 2px 6px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  user-select: none;
}
.notification-label .icon {
  font-size: 14px;
}

.toast-close {
  margin-left: auto;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: #e74c3c;
}

.chat-toast {
  transition: transform 0.3s ease, opacity 0.3s ease;
  user-select: none;
  cursor:pointer;
}

/*выделение никнейма после собаки*/
.mention {
  background-color: #e1bcc7;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 0.9em;
  margin-right: 6px;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.mention:hover {
  background-color: #e9b6ce;
}

/*цитата с ником*/

.quote-block {
  border-left: 3px solid #999;
  padding-left: 8px;
  padding-bottom: 3px;
  margin: 6px 0;
  color: #444;
  background: #f3f3f3;
  border-radius: 4px;
  font-size: 10px;
}
.quote-block b {
    color: #e1bcc7;
    display: block;
    line-height: 1;
}
.context-menu {
  position: absolute;
  background: #1e1e1e;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 4px 0;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  display: none;
}

.context-menu__item {
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.context-menu__item:hover {
  background: #333;
}
.quote-wrapper {
  display: block;
  position: relative;
  padding: 0px;
  margin-bottom: 4px;
  opacity: 0.9;
  pointer-events: none;
  width: 100%;
  box-sizing: border-box;
}

.quote-wrapper * {
  user-select: none;
}

.remove-quote-btn {
  pointer-events: all; /* чтобы кнопка работала несмотря на блок */
  position: absolute;
  top: 2px;
  right: 2px;
  background: none;
  border: none;
  font-size: 10px;
  cursor: pointer;
  opacity: 0.6;
}

.remove-quote-btn:hover {
  opacity: 1;
  color: red;
}

/*настройки*/
#settings-toggle {  all: unset;
  width: 24px;
  height: 24px;
  background: #f0f0f0;
  color: #888;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  flex-shrink: 0;
}

#settings-toggle:hover {
  background: #e5e5e5;
  color: #555;
}

/* Анимация вращения шестерёнки при клике */
#settings-toggle.clicked i {
  animation: gear-spin 0.8s ease-in-out;
}

@keyframes gear-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.chat-settings.hidden {
  display: none;
}

.chat-settings {
  position: absolute;
  right: 10px;
  top: 40px;
  width: 240px;
  background: var(--bg-settings, #f9f9f9);
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  z-index: 9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* колокольчик в настройках*/
#notify-toggle {    display: none;}

/* =======================================================
   Вкладка профиля пользователя
   ======================================================= */

#chat-container.chat-container-with-profile #main-page {
  filter: blur(2px);
  pointer-events: none;
  transition: filter 0.3s ease;
}

.profile-tab-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 20;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.profile-tab-container.active {
  transform: translateX(0);
}

.profile-tab-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  user-select: none;
}

.profile-tab-back {
  all: unset;
  cursor: pointer;
  font-size: 18px;
  color: #888;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.profile-tab-back:hover {
  color: #e1bcc7;
}

.profile-tab-title {
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.profile-tab-content {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-tab-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
}

.profile-tab-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e1bcc7;
  box-shadow: 0 2px 10px rgba(225, 188, 199, 0.3);
}

.profile-tab-username {
  font-family: 'Pretendard', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.profile-tab-status {
  font-size: 11px;
  color: #999;
  background: #f5f5f5;
  padding: 3px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-tab-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #999;
  flex-shrink: 0;
}

.profile-tab-status[data-online="true"] {
  color: #4caf50;
}

.profile-tab-status[data-online="true"]::before {
  background: #4caf50;
}

.profile-tab-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.profile-tab-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile-tab-stat-value {
  font-family: 'Pretendard', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.profile-tab-stat-label {
  font-size: 10px;
  color: #999;
  text-transform: lowercase;
}

.profile-tab-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-tab-info-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-tab-info-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #999;
  text-transform: lowercase;
}

.profile-tab-info-title i {
  font-size: 12px;
  color: #ccc;
}

.profile-tab-info-content {
  font-size: 13px;
  color: #444;
  padding-left: 18px;
}

.profile-tab-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.profile-tab-action-btn {
  all: unset;
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: 'Pretendard', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.profile-tab-action-primary {
  background: #e1bcc7;
  color: #fff;
}

.profile-tab-action-primary:hover {
  background: #d4a8b8;
  transform: translateY(-1px);
}

.profile-tab-action-secondary {
  background: #f0f0f0;
  color: #666;
}

.profile-tab-action-secondary:hover {
  background: #e5e5e5;
}

/* Бейдж непрочитанных */
.unread-badge {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #e1bcc7;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(225, 188, 199, 0.4);
  transition: transform 0.2s;
}

.unread-badge:hover {
  transform: translateX(-50%) translateY(-2px);
}

.new-messages-divider {
  text-align: center;
  padding: 6px 0;
  font-size: 11px;
  color: #e1bcc7;
  font-weight: 600;
  user-select: none;
}

.chat-message.new-message {
  animation: slideInMsg 0.3s ease;
}

@keyframes slideInMsg {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}



/* &#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;
 Стили сообщений
   &#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552; */

/* &#9472;&#9472;&#9472; Обёртка сообщения &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.chat-message {
  display: flex;
  flex-direction: column;
  margin-bottom: -5px;
  max-width: 100%;
  word-break: break-word;
}

.chat-message.own-msg {
  align-items: flex-end;
}

.chat-message:not(.own-msg) {
  align-items: flex-start;
}

/* &#9472;&#9472;&#9472; Контейнер простого сообщения &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.chat-message-simple {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  width: fit-content;
}

/* &#9472;&#9472;&#9472; Шапка: аватар + имя &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.chat-message-simple-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-message.own-msg .chat-message-simple-header {
  flex-direction: row-reverse;
}

.chat-message-simple-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #eee;
}

.chat-message-simple-username {
  font-family: 'Pretendard', 'Noto Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}

.chat-message-simple-username:hover {
  color: #e1bcc7;
}

.chat-message.own-msg .chat-message-simple-username {
  color: #aaa;
}

/* &#9472;&#9472;&#9472; Контент сообщения &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.chat-message-simple-content {
  padding: 8px 12px;
  border-radius: 14px;
  font-family: 'Pretendard', 'Noto Sans', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Чужие сообщения */
.chat-message:not(.own-msg) .chat-message-simple-content {
  background: #f5f5f5;
  color: #333;
  border-bottom-left-radius: 4px;
  border: 1px solid #eee;
}

/* Свои сообщения */
.chat-message.own-msg .chat-message-simple-content {
  background: #f0e6ea;
  color: #333;
  border-bottom-right-radius: 4px;
  border: 1px solid #e1bcc740;
}

/* &#9472;&#9472;&#9472; Текст сообщения &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.chat-message-simple-text {
  font-size: 12px;
  line-height: 1.5;
  color: inherit;
}

.chat-message-simple-text img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 4px;
}

.chat-message-simple-text a {
  color: #c48a9f;
  text-decoration: none;
}

.chat-message-simple-text a:hover {
  text-decoration: underline;
}

.chat-message-simple-text blockquote {
  border-left: 3px solid #e1bcc7;
  padding: 4px 8px;
  margin: 4px 0;
  background: #fafafa;
  border-radius: 4px;
  font-size: 11px;
  color: #666;
}

.chat-message-simple-text code {
  background: #f0f0f0;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
}

.chat-message-simple-text strong {
  font-weight: 700;
}

.chat-message-simple-text em {
  font-style: italic;
}

/* &#9472;&#9472;&#9472; Старый формат (avatar + bubble) &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}

.chat-bubble {
  padding: 8px 12px;
  border-radius: 14px;
  font-family: 'Pretendard', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  max-width: 75%;
  word-wrap: break-word;
}

.chat-message:not(.own-msg) .chat-bubble {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #eee;
  border-bottom-left-radius: 4px;
}

.chat-message.own-msg .chat-bubble {
  background: #f0e6ea;
  color: #333;
  border: 1px solid #e1bcc740;
  border-bottom-right-radius: 4px;
}

.message-sender {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  margin-bottom: 2px;
}

/* &#9472;&#9472;&#9472; Блок «Новый чат создан» &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.chat-system-message {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  user-select: none;
}

.chat-system-message-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #bbb;
  background: #fafafa;
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
}

.chat-system-message-inner i {
  font-size: 12px;
  color: #e1bcc7;
}

/* &#9472;&#9472;&#9472; Разделитель новых сообщений &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.new-messages-divider {
  text-align: center;
  padding: 6px 0;
  font-size: 11px;
  color: #e1bcc7;
  font-weight: 600;
  user-select: none;
  cursor: pointer;
}

.new-messages-divider:hover {
  color: #d4a8b8;
}

/* &#9472;&#9472;&#9472; Анимация нового сообщения &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.chat-message.new-message {
  animation: msgSlideIn 0.3s ease;
}

@keyframes msgSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* &#9472;&#9472;&#9472; Бейдж непрочитанных &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.unread-badge {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #e1bcc7;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(225, 188, 199, 0.4);
  transition: transform 0.2s;
}

.unread-badge:hover {
  transform: translateX(-50%) translateY(-2px);
}

/* &#9472;&#9472;&#9472; Загрузка / ошибки &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.loading-message,
.no-messages,
.error-message {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: #bbb;
  font-family: 'Pretendard', sans-serif;
}

.error-message {
  color: #c44;
}

/* &#9472;&#9472;&#9472; Кнопка скролла вниз &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; */
.scroll-to-bottom-btn {
  position: absolute;
  bottom: 145px;
  right: 50%;
  transform: translateX(50%);
  width: 36px;
  height: 36px;
  background: #e1bcc7;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(225, 188, 199, 0.5);
  transition: all 0.2s;
  font-size: 16px;
  color: #fff;
}

.scroll-to-bottom-btn:hover {
  background: #d4a8b8;
  transform: translateX(50%) translateY(-2px);
  box-shadow: 0 5px 15px rgba(225, 188, 199, 0.6);
}


/* =======================================================

   ======================================================= */

.topics-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0px;
  padding: 15px;
}

#chat-container .this_h3 {
    position: relative;
    user-select: text;
    display: block;
    width: 100px;
    font-size: 16px;
    font-weight: bold;
    line-height: 10px;
    padding: 0;
    color: #cec4cf;
    text-transform: lowercase;
    border-radius: 10px;
    box-sizing: border-box;
    top: 0px;
    margin: 0px auto;
    text-align: center;
    flex: 1;
}

.topics-header .this_h3 {
  flex: 1;
}

#create-chat-btn {
  all: unset;
  width: 24px;
  height: 24px;
  background: #e1bcc7;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
}

#create-chat-btn:hover {
  background: #d4a8b8;
  transform: scale(1.1);
}

/* =======================================================
   &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; &#65533;&#65533;&#65533;&#65533;
   ======================================================= */

.chat-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.chat-modal.hidden {
  display: none;
}

.chat-modal-inner {
  background: #fff;
  border-radius: 14px;
  width: 90%;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  overflow: hidden;
  animation: modalSlideUp 0.25s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.chat-modal-header button {
  all: unset;
  cursor: pointer;
  font-size: 16px;
  color: #999;
  transition: color 0.2s;
  padding: 2px;
}

.chat-modal-header button:hover {
  color: #333;
}

.chat-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-modal-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  user-select: none;
}

.chat-modal-label input[type="checkbox"] {
  accent-color: #e1bcc7;
  width: 14px;
  height: 14px;
}

.chat-modal-input {
  all: unset;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 12px;
  color: #333;
  background: #fafafa;
  box-sizing: border-box;
  transition: border-color 0.2s;
  font-family: 'Pretendard', sans-serif;
}

.chat-modal-input:focus {
  border-color: #e1bcc7;
  background: #fff;
}

.chat-modal-input::placeholder {
  color: #bbb;
}

.chat-modal-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
}

.chat-modal-btn {
  all: unset;
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Pretendard', sans-serif;
}

.chat-modal-btn.cancel {
  background: #f0f0f0;
  color: #666;
}

.chat-modal-btn.cancel:hover {
  background: #e5e5e5;
}

.chat-modal-btn.primary {
  background: #e1bcc7;
  color: #fff;
}

.chat-modal-btn.primary:hover {
  background: #d4a8b8;
}

.chat-modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* &#65533;&#65533;&#65533;&#65533;&#65533;&#65533; &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; &#65533;&#65533;&#65533;&#65533;&#65533;&#65533; */
#refresh-topics-btn {
  all: unset;
  width: 24px;
  height: 24px;
  background: #f0f0f0;
  color: #888;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  flex-shrink: 0;
}

#refresh-topics-btn:hover {
  background: #e5e5e5;
  color: #555;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =======================================================
   &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; (&#65533;&#65533;&#65533;&#65533;&#65533;)
   ======================================================= */

.edit-profile-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px;
}

.edit-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e1bcc7;
}

.edit-profile-name {
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.chat-modal-btn.danger {
  background: #f5f5f5;
  color: #c44;
}

.chat-modal-btn.danger:hover {
  background: #fee;
}