/* ================================================= */
/* ==================== БАЗОВЫЕ СТИЛИ ============== */
/* ================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: rgba(0, 0, 0, 0.973);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* ================================================= */
/* ==================== УТИЛИТЫ ==================== */
/* ================================================= */

.hidden {
  display: none !important;
}

.hide-in-foreign-profile {
  display: none !important;
}

/* ================================================= */
/* ==================== АВТОРИЗАЦИЯ ================ */
/* ================================================= */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  display: flex;
  flex-direction: column;
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(15px);
  padding: 40px;
  border-radius: 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-card h1 {
  margin-bottom: 28px;
  color: white;
  font-size: 36px;
  font-weight: 400;
}

.auth-card input {
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: white;
  font-size: 16px;
  outline: none;
  transition: all 0.3s;
}

.auth-card input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.auth-card input::placeholder {
  color: #666;
}

.auth-btn {
  width: 100%;
  padding: 16px;
  background: white;
  border: none;
  border-radius: 16px;
  color: black;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
}

.auth-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.auth-divider {
  text-align: center;
  color: #666;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 45%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: #888;
}

.auth-switch a {
  color: white;
  text-decoration: none;
  margin-left: 6px;
  border-bottom: 1px dotted #666;
}

.auth-switch a:hover {
  color: #ccc;
}

/* Verification Code Inputs */
.verify-code-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.verify-code-input {
  width: 48px !important;
  height: 56px !important;
  text-align: center;
  font-size: 24px !important;
  font-weight: 600;
  padding: 0 !important;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px !important;
  color: white !important;
  transition: all 0.3s ease;
  outline: none;
}

.verify-code-input:focus {
  border-color: #999 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(153, 153, 153, 0.1);
}

.verify-code-input:not(:placeholder-shown) {
  border-color: rgba(153, 153, 153, 0.6) !important;
  background: rgba(153, 153, 153, 0.05) !important;
}

#verifyForm h2 {
  color: white;
  font-size: 24px;
  font-weight: 500;
  text-align: center;
}

#verifyForm p {
  text-align: center;
}

#verifyEmail {
  color: #fff;
  font-weight: 600;
}

#resendTimer {
  color: #999;
  font-weight: 600;
}

#resendCode {
  transition: all 0.3s;
}

#resendCode:hover {
  color: #bbb;
  text-decoration: underline;
}

#verifyBackBtn {
  transition: all 0.3s;
}

#verifyBackBtn:hover {
  color: #fff;
  text-decoration: underline;
}

/* Анимация появления формы верификации */
#verifyForm {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-message {
  color: #ff6b6b;
  text-align: center;
  margin-top: 15px;
}

.success-message {
  color: #4cff4c;
  text-align: center;
  margin-top: 15px;
}

/* ================================================= */
/* ==================== ОСНОВНОЙ LAYOUT ============ */
/* ================================================= */

.app {
  display: flex;
  gap: 16px;
  padding: 16px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ==================== САЙДБАР ==================== */

.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: rgba(100, 100, 100, 0.068);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 20px 16px;
  padding-bottom: 80px;
  height: calc(100vh - 32px);
  position: sticky;
  top: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, padding 0.3s ease;
}

/* Свернутый сайдбар */
.sidebar.collapsed {
  width: 72px !important;
  padding: 20px 12px !important;
  padding-bottom: 80px !important;
}

.sidebar.collapsed .sidebar-logo {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar.collapsed .nav-btn span,
.sidebar.collapsed .mini-profile span {
  display: none !important;
}

.sidebar.collapsed .nav-btn,
.sidebar.collapsed .mini-profile {
  justify-content: center !important;
  padding: 12px !important;
  min-width: auto !important;
  width: 48px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.sidebar.collapsed .nav-btn {
  margin-bottom: 8px !important;
}

.sidebar.collapsed .mini-profile {
  margin-bottom: 20px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sidebar.collapsed .mini-profile img {
  margin: 0 !important;
  width: 48px !important;
  height: 48px !important;
}

.sidebar.collapsed .nav-btn svg {
  margin: 0 !important;
}

.sidebar-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 19px;
  margin-bottom: 8px;
}

.sidebar-logo {
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-align: left;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  padding: 0;
  margin: 0;
}

.sidebar-version {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  transition: opacity 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.3px;
}

.sidebar.collapsed .sidebar-logo-container {
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  margin-bottom: 16px;
  align-items: center;
}

.sidebar.collapsed .sidebar-logo {
  font-size: 18px;
  text-align: center;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
}

.sidebar.collapsed .sidebar-version {
  opacity: 0;
  display: none;
}

.sidebar h2 {
  color: white;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 500;
  opacity: 0.7;
  padding-left: 8px;
}

/* Мини-профиль в сайдбаре */
.mini-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 30px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mini-profile:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mini-profile img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
/* Анимация при наведении */
.mini-profile:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.1) !important;
}

.mini-profile:hover img {
  transform: rotate(5deg) scale(1.05);
  transition: transform 0.3s ease;
}

.mini-profile:active {
  transform: scale(0.98);
}

/* Анимация для активного состояния */
.mini-profile.active {
    background: rgba(255, 255, 255, 0.1) !important;
}
/* ===== ИСПРАВЛЕНИЕ МИНИ-ПРОФИЛЯ ===== */

.mini-profile {
  display: flex !important;
  align-items: center !important;  /* Выравниваем по центру вертикально */
  gap: 12px !important;
  margin-bottom: 20px !important;
  padding: 10px !important;
  background: rgba(100, 100, 100, 0.068) !important;
  border-radius: 20px !important;
  color: #fff !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  width: 100% !important;
}

.mini-profile img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;  /* Запрещаем сжиматься */
}

.mini-profile span {
  font-size: 15px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
  display: block !important;
}

/* Для сайдбара */
.sidebar {
  display: flex !important;
  flex-direction: column !important;
}

/* На мобильных скрываем мини-профиль и логотип */
@media screen and (max-width: 768px) {
  .mini-profile {
    display: none !important;
  }
  
  .sidebar-logo {
    display: none !important;
  }
}
/* Кнопки навигации */
.nav-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 15px 19px;
  margin-bottom: 8px;
  background: transparent;
  border: none;
  color: rgb(143, 143, 143);
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}
.nav-btn svg {
 fill: rgb(124, 124, 124);
}
.nav-btn:hover svg,
.nav-btn.active svg {
 fill: rgb(255, 255, 255);
}
.nav-btn:hover,
.nav-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.settings-menu-item svg {
   fill: rgb(124, 124, 124);
}
.settings-menu-item:hover svg,
.settings-menu-item.active svg {
   fill: rgb(255, 255, 255);
}
.settings-menu-item:hover,
.settings-menu-item.active {
  color: rgb(255, 255, 255);
}
.post-icons svg {
     fill: rgb(124, 124, 124);
}
.post-icons:hover svg,
.post-icons:active {
     fill: rgb(255, 255, 255);
}
/* ==================== КОНТЕНТ ==================== */

.content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Секции */
.section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Лента и профиль */
#mainsite,
#mainsite2 {
  width: 100%;
  max-width: 600px;
}

/* Диалоги и друзья */
#mainsite3 {
  width: 100%;
  max-width: 1900px;
}
#FriendSite {
  width: 100%;
  max-width: 600px;
}

/* ================================================= */
/* ==================== ПРОФИЛЬ ==================== */
/* ================================================= */

.user-profile {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  color: white;
  padding: 20px 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
}

.profile-username {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.profile-handle {
  color: #888;
  font-size: 16px;
  margin-bottom: 12px;
}

.profile-follow {
  font-size: 16px;
  color: #888;
  margin-bottom: 20px;
}

/* ===== КНОПКИ В ПРОФИЛЕ ===== */
.profile-buttons {
  width: 100%;
  max-width: 600px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Базовые стили для всех кнопок */
.profile-edit-btn,
.add-friend-btn,
.friend-added-btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  border: none;
  box-sizing: border-box;
}

/* Кнопка редактирования */
.profile-edit-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
}

.profile-edit-btn:hover {
  background: rgba(255, 255, 255, 0.164);
}

/* Кнопка добавления в друзья */
.add-friend-btn {
  background: rgba(76, 255, 76, 0.1);
  border: 1px solid #4cff4c;
  color: #4cff4c;
  cursor: pointer;
}

.add-friend-btn:hover {
  background: #4cff4c;
  color: black;
}

/* Кнопка "У вас в друзьях" */
.friend-added-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #888;
  cursor: default;
}

.friend-added-btn svg {
  opacity: 0.5;
}

/* ===== УПРАВЛЕНИЕ ВИДИМОСТЬЮ КНОПОК ===== */
/* По умолчанию скрываем все кнопки */
.profile-edit-btn,
.add-friend-btn,
.friend-added-btn {
  display: none !important;
}

/* Свой профиль - только кнопка редактирования */
body[data-profile="own"] .profile-edit-btn {
  display: flex !important;
}

/* Чужой профиль - показываем кнопки дружбы */
body[data-profile="other"] .add-friend-btn,
body[data-profile="other"] .friend-added-btn {
  display: flex !important;
}

/* Если уже в друзьях - показываем friend-added, скрываем add-friend */
body[data-profile="other"][data-friend="true"] .add-friend-btn {
  display: none !important;
}

body[data-profile="other"][data-friend="true"] .friend-added-btn {
  display: flex !important;
}

/* Если не в друзьях - показываем add-friend, скрываем friend-added */
body[data-profile="other"][data-friend="false"] .add-friend-btn {
  display: flex !important;
}

body[data-profile="other"][data-friend="false"] .friend-added-btn {
  display: none !important;
}

/* Если запрос отправлен - показываем специальную версию add-friend */
body[data-profile="other"][data-friend="pending"] .add-friend-btn {
  display: flex !important;
  background: rgba(255, 215, 0, 0.15) !important;
  border: 1px solid #ffd700 !important;
  color: #ffd700 !important;
  cursor: default !important;
  pointer-events: none !important;
}

body[data-profile="other"][data-friend="pending"] .friend-added-btn {
  display: none !important;
}

/* ===== ИСПРАВЛЕНИЕ БЛОКА ПОСТА В ПРОФИЛЕ ===== */

/* Показываем блок поста в профиле */
#profilePostBox {
  display: flex !important;
  width: 100%;
  max-width: 600px;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 30px;
  padding: 26px;
  gap: 12px;
  align-items: flex-start;
}

/* Убираем скрытие для чужого профиля если нужно */
body[data-profile="other"] #profilePostBox {
  display: none !important; /* Оставляем скрытым только в чужих профилях */
}

/* Стили для аватара в блоке поста */
#profilePostBox .post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Стили для области ввода */
#profilePostBox .post-input-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#profilePostBox .post-textarea {
  background: transparent;
  border: none;
  resize: none;
  color: white;
  font-size: 16px;
  outline: none;
  min-height: 30px;
  padding: 12px 0 0 12px;
}

#profilePostBox .post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

#profilePostBox .post-icons {
  display: flex;
  gap: 12px;
}

#profilePostBox .post-send-btn {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 25px;
  border-radius: 30px;
  font-size: 15px;
  color: white;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

#profilePostBox .post-send-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Превью изображений */
#profilePreview {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

#profilePreview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ================================================= */
/* ==================== ПОСТЫ ====================== */
/* ================================================= */

.post-box {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 30px;
  padding: 26px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.post-box .post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-box .post-input-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-box .post-textarea {
  background: transparent;
  border: none;
  resize: none;
  color: white;
  font-size: 16px;
  outline: none;
  min-height: 30px;
  padding: 12px 0 0 12px;
}

.post-box .post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.post-box .post-icons {
  display: flex;
  gap: 12px;
}

.post-box .post-icons .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.post-box .post-icons .icon:hover {
  transform: scale(1.1);
}

.post-box .post-send-btn {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 25px;
  border-radius: 30px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.post-box .post-send-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.posts-list {
  width: 100%;
  max-width: 600px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 30px;
  padding: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.post-user {
  display: flex;
  flex-direction: column;
}

.post-name {
  color: white;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-handle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.post-time {
  color: #888;
  font-size: 12px;
}

/* ===== ИСПРАВЛЕНИЕ ВРЕМЕНИ ===== */


.post-time {
  color: #8e8e8e;
  font-size: 12px;
  margin-bottom: 12px;
  display: inline-block;
}

/* Для мобильных */
@media screen and (max-width: 768px) {
  .post-time {
    font-size: 11px;
    margin-left: 4px;
  }
}

@media screen and (max-width: 480px) {
  .post-time {
    font-size: 10px;
  }
}

.post-text {
  color: white;
  margin-left: 54px;
  font-size: 15px;
  line-height: 1.5;
  margin-top: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-image {
  display: block;
  width: calc(100% - 54px);
  max-width: 100%;
  height: auto;
  margin-left: 54px;
  margin-top: 16px;
  border-radius: 12px;
  object-fit: contain;
}

/* ================================================= */
/* ================ ЛАЙКИ И КОММЕНТАРИИ ============ */
/* ================================================= */

.post-stats {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  margin-left: 54px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-action-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}

.post-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.post-action-btn.liked {
  color: #ff4d4d;
}

.like-icon, .comment-icon {
  font-size: 16px;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.post-action-btn.liked .like-icon {
  animation: pop 0.3s ease;
}

.comments {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-body {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 85%;
}

.comment-author {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: white;
  margin-bottom: 2px;
}

.comment-text {
  font-size: 14px;
  line-height: 1.4;
  color: #ddd;
  word-break: break-word;
}

.comment-input {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.comment-input input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  outline: none;
  font-size: 14px;
}

.comment-input input:focus {
  background: rgba(255, 255, 255, 0.08);
}

.comment-input button {
  padding: 19px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 30px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.comment-input button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.preview-box {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.preview-box img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ================================================= */
/* ==================== ДИАЛОГИ ==================== */
/* ================================================= */

.dialogs-container {
  display: flex;
  height: 97.8vh;
      background: rgba(20, 20, 20, 0.95);
  border-radius: 30px;
  overflow: hidden;
  width: 100%;
}

.users-column {
  width: 280px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.users-search-container {
  margin-bottom: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-collapse-arrow {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-collapse-arrow:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-collapse-arrow svg {
  transition: transform 0.3s ease;
  transform: rotate(0deg);
}

.sidebar-collapse-arrow.collapsed svg {
  transform: rotate(180deg) !important;
}

.users-search-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: white;
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
  box-sizing: border-box;
}

.users-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.users-search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.column-title {
  color: #888;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
    margin-top: 16px;
  margin-bottom: 16px;
  margin-left: 24px;
}

#usersList {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  color: white;
  position: relative;
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.user-item.active {
  background: rgba(255, 255, 255, 0.1);
}

.user-item.online::after {
  content: '';
  position: absolute;
  left: 42px;
  bottom: 12px;
  width: 10px;
  height: 10px;
  background: #4cff4c;
  border-radius: 50%;
  border: 2px solid #0d0d0d;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-item .user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.user-item .user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 500;
}

.user-item .last-message {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
}

.chat-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;  /* Прозрачный фон */
  min-width: 0;
}

/* 2. ИСПРАВЛЯЕМ ШАПКУ */
.dialog-header {
    /* Скрываем по умолчанию */
    display: none;
    
    /* Делаем фон максимально прозрачным */
    background: rgba(10, 10, 10, 0.5) !important; 
    
    /* Блюр работает, только если фон полупрозрачный */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    
    /* Фиксируем сверху на всю ширину с учетом отступов */
    position: absolute !important; 
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important; /* Убираем фиксированную ширину */
    max-width: calc(100% - 20px) !important; /* На случай если что-то ограничивает */
    
    border-radius: 24px !important;  
    height: 60px !important;
    z-index: 2010 !important; /* Выше чем chat-column */
    
    align-items: center !important;
    padding: 40px 15px !important;
    box-sizing: border-box !important;
    
    /* Убираем лишние отступы */
    margin: 0 !important;
    
    /* Чтобы содержимое не выходило за границы */
    overflow: visible !important;
}

/* Убеждаемся что родительский контейнер не обрезает шапку */
.chat-column {
    position: relative !important;
    overflow: visible !important; /* Чтобы шапка не обрезалась */
}

/* Для мобильных устройств */
@media screen and (max-width: 768px) {
    .dialog-header {
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100% - 20px) !important;
    }
}

/* Скрываем кнопку "назад" на десктопе */
.dialog-back-btn {
  display: none !important;
}

.dialog-header-avatar {
  width: 48px;
  height: 48px;
  margin-right: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.dialog-header-info {
  flex: 1;
  min-width: 0;
}

.dialog-header-name {
  font-size: 18px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.dialog-header-status {
  font-size: 13px;
  color: #888;
}

.dialog-header-status.online {
  color: #4cff4c;
}

.dialog-messages {
  /* Скрываем по умолчанию, но при показе будет flex */
  display: none;
  
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  flex-direction: column;
  gap: 16px; /* Увеличиваем расстояние между сообщениями */
}
.dialog-msg-wrapper + .dialog-msg-wrapper {
  margin-top: 8px; /* Отступ между разными сообщениями */
}
.dialog-msg-wrapper.me + .dialog-msg-wrapper.me {
  margin-top: 4px; /* Меньший отступ для подряд идущих своих сообщений */
}
.dialog-msg-wrapper.them + .dialog-msg-wrapper.them {
  margin-top: 4px; /* Меньший отступ для подряд идущих чужих сообщений */
}
/* ===== СЧЕТЧИК ВНУТРИ ПОЛЯ ВВОДА ===== */

.dialog-input {
    /* Скрываем по умолчанию */
    display: none;
    
    /* Когда показываем - делаем flex с gap */
    flex-direction: row;
    gap: 8px;
    
    /* Блюр работает, только если фон полупрозрачный */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    
    /* Фиксируем внизу */
    position: absolute !important; 
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    
    border-radius: 30px !important;  
    
    align-items: center !important;
    box-sizing: border-box !important;
    
    overflow: hidden !important;
    padding: 10px 15px !important;
}

/* Добавляем отступ для сообщений, чтобы они не перекрывались полем ввода */
.dialog-messages {
    padding-bottom: 80px !important;
}

/* Кнопка "опустить вниз" */
.scroll-to-bottom-btn {
  position: absolute;
  bottom: 84px;
  right: 25px;
  width: 44px;
  height: 44px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  flex-shrink: 0;
}

.scroll-to-bottom-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.scroll-to-bottom-btn:active {
  transform: scale(0.95);
}

.scroll-to-bottom-btn svg {
  color: white;
  fill: none;
}

/* Кнопка смайликов */
.dialog-emoji-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 22px;
  transition: all 0.2s;
}

.dialog-emoji-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.dialog-emoji-btn:active {
  transform: scale(0.95);
}

/* ===== ЭМОДЗИ ПИКЕР ===== */
.emoji-picker {
  position: fixed;
  width: 350px;
  height: 450px;
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.emoji-search {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  outline: none;
  flex-shrink: 0;
}

.emoji-search::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.emoji-categories {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.emoji-categories::-webkit-scrollbar {
  height: 4px;
}

.emoji-categories::-webkit-scrollbar-track {
  background: transparent;
}

.emoji-categories::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.emoji-category-btn {
  min-width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emoji-category-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.emoji-container {
  flex: 1 1 auto;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  padding: 12px;
  padding-bottom: 100px;
  min-height: 0;
  max-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.emoji-container::-webkit-scrollbar {
  width: 6px;
}

.emoji-container::-webkit-scrollbar-track {
  background: transparent;
}

.emoji-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.emoji-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.emoji-category {
  margin-bottom: 20px;
}

.emoji-category-title {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 4px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.emoji-item {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.2);
}

/* Обертка для поля ввода */
.dialog-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0);
  border: 1px solid rgba(255, 255, 255, 0.116);
  border-radius: 30px;
  padding: 0 16px;
}

.dialog-input-wrapper input {
  background: transparent !important;
  border: none !important;
  color: white !important;
  font-size: 15px !important;
  padding: 14px 12px !important;
  flex: 1 !important;
  width: 100% !important;
  transition: all 0.2s !important;
  outline: none !important;
}

.dialog-input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Контейнер для кнопок микрофона/отправки */
.dialog-action-btn-container {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.dialog-action-btn-container .voice-record-btn,
.dialog-action-btn-container .dialog-send-btn,
.dialog-action-btn-container #voiceRecordBtn,
.dialog-action-btn-container #dialogSendBtn {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* Показываем активную кнопку */
.dialog-action-btn-container .voice-record-btn[style*="display: flex"],
.dialog-action-btn-container #voiceRecordBtn[style*="display: flex"] {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.dialog-action-btn-container .dialog-send-btn[style*="display: flex"],
.dialog-action-btn-container #dialogSendBtn[style*="display: flex"] {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.msg-author {
  display: none !important;
}
.dialog-msg-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 70%;
  min-width: 0;
  margin-bottom: 8px;
}

.dialog-msg-wrapper.me {
  flex-direction: row-reverse;
  margin-left: auto;
}

.dialog-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dialog-message {
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.123);
  color: white;
  line-height: 1.4;
  word-break: break-word;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-text {
  display: inline;
}

.msg-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 8px;
  white-space: nowrap;
  align-self: flex-end;
  user-select: none;
}

.dialog-messages {
  padding-top: 150px !important;
}

.dialog-message.from-me {
  background: #2a2a2a;
}

/* Голосовые сообщения в стиле Telegram */
.voice-message {
  padding: 12px 16px !important;
  min-width: 280px;
  max-width: 350px;
  background: #2b2b2b !important;
  border-radius: 18px !important;
  position: relative;
}

.voice-message.from-them {
  background: #2b2b2b !important;
}

.voice-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.voice-play-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
}

.voice-play-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.voice-play-btn:active {
  transform: scale(0.95);
}

.voice-play-btn::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent white;
  margin-left: 2px;
}

.voice-play-btn.playing::before {
  border: none;
  width: 12px;
  height: 12px;
  background: linear-gradient(to right, white 0%, white 35%, transparent 35%, transparent 65%, white 65%, white 100%);
  margin-left: 0;
}

.voice-waveform {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  position: relative;
  cursor: pointer;
}

.voice-bar {
  width: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  transition: all 0.1s;
}

.voice-bar.active {
  background: white;
}

.voice-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  min-width: 45px;
  text-align: right;
  font-weight: 500;
}

.voice-message audio {
  display: none;
}

.dialog-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #888;
  text-align: center;
  padding: 40px 20px;
  gap: 8px;
}

.dialog-empty p {
  font-size: 18px;
  color: #aaa;
}

.dialog-empty span {
  font-size: 14px;
  color: #666;
}

.dialog-input input {
  flex: 1;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: white;
  font-size: 15px;
  outline: none;
}

.dialog-input input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.dialog-input button {
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: white;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.dialog-input button:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ===== КНОПКА ЗАПИСИ ГОЛОСА ===== */
.voice-record-btn {
  padding: 12px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 50% !important;
  color: white !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  flex-shrink: 0 !important;
}

.voice-record-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

.voice-record-btn.recording {
  background: rgba(255, 76, 76, 0.2) !important;
  border-color: #ff4c4c !important;
  animation: pulse 1.5s infinite !important;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

.voice-record-btn svg {
  fill: currentColor;
}

.voice-record-btn.recording svg {
  fill: #ff4c4c;
}

/* ===== КНОПКА ОТПРАВКИ СООБЩЕНИЯ ===== */
.dialog-send-btn,
#dialogSendBtn {
  padding: 12px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 50% !important;
  color: white !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  flex-shrink: 0 !important;
}

.dialog-send-btn:hover,
#dialogSendBtn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: scale(1.05);
}

.dialog-send-btn:active,
#dialogSendBtn:active {
  transform: scale(0.95);
}

.dialog-send-btn svg,
#dialogSendBtn svg {
  fill: currentColor;
}

.dialog-send-btn:hover {
  background: rgba(76, 175, 255, 0.3) !important;
}

.dialog-send-btn svg {
  fill: currentColor;
}

/* Таймер записи */
.recording-timer {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 8px 16px;
  border-radius: 20px;
  color: #ff4c4c;
  font-size: 14px;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 1000;
}

.recording-timer.active {
  display: flex;
}

.recording-timer::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #ff4c4c;
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Для мобильных */
@media screen and (max-width: 768px) {
  .voice-record-btn {
    width: 40px !important;
    height: 40px !important;
    padding: 10px !important;
  }
  
  .voice-record-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .recording-timer {
    bottom: 60px;
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* ================================================= */
/* ==================== ДРУЗЬЯ ===================== */
/* ================================================= */

.friends-container-search {
  width: 100%;
  background: #0d0d0d;
  border-radius: 30px;
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.friends-container {
  width: 100%;
  height: 600px;
  background: #0d0d0d;
  border-radius: 30px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.friends-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.friends-tab {
  padding: 10px 24px;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  border-radius: 30px;
  transition: all 0.2s;
}

.friends-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.friends-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.friends-tab-content {
  flex: 1;
  overflow-y: auto;
}

/* .friends-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  height: 100%;
} */

.friends-list-column,
.friends-search-column {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 30px;
  padding: 20px;
  height: 100%;
  overflow-y: auto;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.friend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.friend-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.friend-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.friend-info {
  flex: 1;
  min-width: 0;
}

.friend-name {
  color: white;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-status {
  font-size: 13px;
  color: #4cff4c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-status.offline {
  color: #888;
}

.friends-search-box {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.friends-search-box input {
  flex: 1;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: white;
  outline: none;
  font-size: 15px;
}

.friends-search-box input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.friends-search-box button {
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 30px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.friends-search-box button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  margin-bottom: 10px;
}

.add-friend-btn {
  padding: 16px;
  background: rgba(76, 255, 76, 0.055);
  border: 1px solid #4cff4c60;
  border-radius: 16px;
  color: #4cff4c80;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.add-friend-btn:hover {
  background: #4cff4c28;
  color: #4cff4ca8;
}

.add-friend-btn.pending {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
  color: #ffd700;
}
/* ===== СОСТОЯНИЕ "ЗАПРОС ОТПРАВЛЕН" ДЛЯ КНОПКИ В ПРОФИЛЕ ===== */

/* Кнопка в состоянии "Запрос отправлен" */
.profile-buttons .add-friend-btn.pending {
  background: rgba(255, 215, 0, 0.15) !important;
  border: 1px solid #ffd700 !important;
  color: #ffd700 !important;
  cursor: default !important;
  pointer-events: none !important;
  opacity: 0.9 !important;
}

.profile-buttons .add-friend-btn.pending:hover {
  background: rgba(255, 215, 0, 0.15) !important;
  color: #ffd700 !important;
  transform: none !important;
}

.profile-buttons .add-friend-btn.pending svg {
  opacity: 0.9 !important;
  stroke: #ffd700 !important;
}

/* Анимация для иконки */
@keyframes pendingPulse {
  0% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.7; transform: scale(1); }
}

.profile-buttons .add-friend-btn.pending svg {
  animation: pendingPulse 1.5s ease-in-out infinite;
}
/* Контейнер для списка запросов */
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}

/* Элемент запроса */
.request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 15px;
}

/* Информация о пользователе */
.request-info {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  flex: 1;
}

/* Аватар в запросе */
.request-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Детали запроса */
.request-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Имя пользователя */
.request-name {
  color: white;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Мета-информация */
.request-meta {
  color: #888;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Контейнер для кнопок */
.request-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Кнопка принятия */
.accept-request-btn {
  padding: 10px 24px;
  background: rgba(76, 255, 76, 0.075);
  border: 1px dashed  #4cff4c0a;
  border-radius: 30px;
  color: #4cff4c77;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.accept-request-btn:hover {
  background: rgba(76, 255, 76, 0.185);
  color: #4cff4c9d;
}

/* Кнопка отклонения */
.reject-request-btn {
  padding: 10px 24px;
  background: rgba(255, 76, 76, 0.089);
  border: 1px dashed #ff4c4c0e;
  border-radius: 30px;
  color: #ff4c4c6e;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.reject-request-btn:hover {
  background: rgba(255, 76, 76, 0.185);
  color: #ff4c4c94;
}

/* Адаптация для мобильных */
@media screen and (max-width: 768px) {
  .request-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .request-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .accept-request-btn,
  .reject-request-btn {
    padding: 8px 20px;
    font-size: 13px;
  }
}

@media screen and (max-width: 480px) {
  .request-avatar {
    width: 44px;
    height: 44px;
  }
  
  .request-name {
    font-size: 15px;
  }
  
  .request-meta {
    font-size: 12px;
  }
  
  .accept-request-btn,
  .reject-request-btn {
    padding: 6px 16px;
    font-size: 12px;
  }
}
/* ===== ИСПРАВЛЕНИЕ ПОИСКА ДРУЗЕЙ ===== */

/* Контейнер результатов поиска */
.friends-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
}

/* Элемент результата поиска */
.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 10px;
}

/* Информация о пользователе в поиске */
.search-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

/* Аватар в поиске */
.search-user-info .friend-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Имя пользователя в поиске */
.search-user-info span {
  color: white;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Кнопка в результатах поиска - маленькая */
.search-result-item .add-friend-btn {
  padding: 8px 16px !important;
  background: rgba(76, 255, 76, 0.15) !important;
  border: 1px solid #4cff4c !important;
  border-radius: 20px !important;
  color: #4cff4c !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
  min-width: 120px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.search-result-item .add-friend-btn:hover {
  background: #4cff4c !important;
  color: black !important;
}

/* Кнопка "Уже в друзьях" в поиске */
.search-result-item .add-friend-btn:disabled,
.search-result-item .add-friend-btn[disabled] {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: #666 !important;
  color: #888 !important;
  cursor: default !important;
  opacity: 0.7 !important;
}

.search-result-item .add-friend-btn:disabled:hover,
.search-result-item .add-friend-btn[disabled]:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #888 !important;
}

/* Кнопка "Запрос отправлен" в поиске */
.search-result-item .add-friend-btn.pending {
  background: rgba(255, 215, 0, 0.15) !important;
  border-color: #ffd700 !important;
  color: #ffd700 !important;
}

.search-result-item .add-friend-btn.pending:hover {
  background: #ffd700 !important;
  color: black !important;
}

/* Адаптация для мобильных */
@media screen and (max-width: 768px) {
  .search-result-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-result-item .add-friend-btn {
    width: 100%;
    margin-top: 5px;
  }
}

@media screen and (max-width: 480px) {
  .search-user-info .friend-avatar {
    width: 40px;
    height: 40px;
  }
  
  .search-user-info span {
    font-size: 14px;
  }
  
  .search-result-item .add-friend-btn {
    font-size: 12px;
    padding: 6px 12px;
    min-width: 100px;
    height: 32px;
  }
}
/* ================================================= */
/* ================ РЕДАКТИРОВАНИЕ ПРОФИЛЯ ========= */
/* ================================================= */

.edit-profile-container {
  max-width: 520px;
  margin: 40px auto;
  background: #0d0d0d;
  border-radius: 28px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.edit-profile-header h2 {
  color: white;
  font-size: 24px;
  font-weight: 500;
}

.close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.edit-avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
}

.edit-avatar-preview {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
}

.edit-avatar-actions {
  display: flex;
  gap: 12px;
}

.edit-avatar-btn {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0);
  border-radius: 30px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.edit-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.edit-avatar-btn.remove {
  border-color: rgba(255, 80, 80, 0.3);
  color: #ff8a8a;
}

.edit-avatar-btn.remove:hover {
  background: rgba(255, 80, 80, 0.1);
}

.edit-info-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.edit-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-field label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edit-field input,
.edit-field textarea {
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  outline: none;
  width: 100%;
}

.edit-field input:focus,
.edit-field textarea:focus {
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.edit-field textarea {
  min-height: 60px;
  resize: vertical;
}

.char-counter {
  text-align: right;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

.edit-profile-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.save-btn,
.cancel-btn {
  flex: 1;
  padding: 14px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
}

.save-btn {
  background: rgba(76, 255, 76, 0.15);
  color: #4cff4c;
  border: 1px solid #4cff4c;
}

.save-btn:hover {
  background: #4cff4c;
  color: black;
}

.cancel-btn {
  background: rgba(255, 76, 76, 0.15);
  color: #ff8a8a;
  border: 1px solid #ff4c4c;
}

.cancel-btn:hover {
  background: #ff4c4c;
  color: black;
}

/* ================================================= */
/* ================ МОДАЛЬНОЕ ОКНО ================= */
/* ================================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.comments-modal {
  display: flex; /* обязательно! */
  flex-direction: column;
  background: #1a1a1a;
  border-radius: 24px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
  animation: slideUp 0.3s ease;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  color: white;
  font-size: 20px;
  font-weight: 500;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

#commentsModal .modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.modal-original-post {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 30px;
  padding: 16px;
  margin-bottom: 20px;
}

.modal-original-post .post-header {
  margin-bottom: 8px;
}

.modal-original-post .post-avatar {
  width: 32px !important;
  height: 32px !important;
}

.modal-original-post .post-name {
  font-size: 14px !important;
}

.modal-original-post .post-text {
  font-size: 13px !important;
  margin-left: 40px !important;
}

.modal-original-post .post-image {
  max-height: 200px !important;
}

.modal-comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#commentsModal .modal-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.no-comments {
  text-align: center;
  color: #888;
  padding: 40px;
  font-size: 15px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ================================================= */
/* ==================== МОБИЛЬНАЯ ВЕРСИЯ =========== */
/* ================================================= */

@media screen and (max-width: 768px) {
  .app {
    flex-direction: column;
    padding: 0;
    gap: 0;
    min-height: 100vh;
  }

  .sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: 70px !important;
    border-radius: 30px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 8px 16px !important;
    padding-bottom: 8px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    z-index: 1000 !important;
    background: rgba(20, 20, 20, 0.95) !important;
    backdrop-filter: blur(10px) !important;
  }

  /* Отменяем все стили свернутого сайдбара на мобильных */
  .sidebar.collapsed {
    width: 100% !important;
    padding: 8px 16px !important;
    padding-bottom: 8px !important;
  }

  /* Скрываем логотип и версию на мобильных */
  .sidebar-logo-container,
  .sidebar-logo,
  .sidebar-version,
  .sidebar.collapsed .sidebar-logo-container,
  .sidebar.collapsed .sidebar-logo,
  .sidebar .sidebar-logo {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .sidebar h2,
  .mini-profile {
    display: none !important;
  }

  /* Скрываем аватар на мобильных во всех состояниях */
  .sidebar .mini-profile,
  .sidebar.collapsed .mini-profile,
  #miniProfile {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .nav-btn {
    width: auto;
    padding: 10px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
  }

  .nav-btn span {
    font-size: 10px;
  }

  .content {
    padding: 16px 12px 80px 12px;
  }

  #mainsite,
  #mainsite2,
  #mainsite3,
  #FriendSite {
    max-width: 100%;
  }

  .dialogs-container {
    flex-direction: column;
    height: calc(100vh - 90px);
    border-radius: 30px;
  }

  /* В диалогах на мобильных тоже скрываем аватар */
  body:has(#mainsite3:not(.hidden)) .sidebar .mini-profile,
  body:has(#mainsite3:not(.hidden)) .sidebar.collapsed .mini-profile,
  body:has(#mainsite3:not(.hidden)) #miniProfile {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  /* В диалогах применяем те же стили сайдбара */
  body:has(#mainsite3:not(.hidden)) .sidebar {
    padding: 8px 16px !important;
    padding-bottom: 8px !important;
  }

  body:has(#mainsite3:not(.hidden)) .sidebar.collapsed {
    width: 100% !important;
    padding: 8px 16px !important;
    padding-bottom: 8px !important;
  }

  .users-column {
    width: 100%;
    height: 35%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .chat-column {
    height: 65%;
  }

  /* .friends-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  } */

  .friends-list-column,
  .friends-search-column {
    max-height: 350px;
  }

  .friends-search-box {
    flex-direction: column;
  }

  .friends-search-box button {
    width: 100%;
  }

  .request-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .request-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .post-box,
  .posts-list,
  .user-profile {
    max-width: 100%;
  }

  .post-text,
  .post-image,
  .post-stats {
    margin-left: 48px;
  }

  .post-image {
    width: calc(100% - 48px);
  }
}

@media screen and (max-width: 480px) {
  .nav-btn {
    width: 50px;
    height: 50px;
    font-size: 11px;
  }

  .sidebar {
    padding: 6px 12px;
  }

  .user-avatar {
    width: 38px;
    height: 38px;
  }

  .dialog-message {
    max-width: 85%;
  }

  .dialog-input button {
    padding: 0 16px;
    font-size: 14px;
  }

  .post-avatar {
    width: 38px;
    height: 38px;
  }

  .post-text {
    margin-left: 44px;
  }

  .post-image {
    width: calc(100% - 44px);
    margin-left: 44px;
  }

  .post-stats {
    margin-left: 44px;
  }
}

/* ================================================= */
/* ==================== НИКНЕЙМ ==================== */
/* ================================================= */

.nickname-gradient {
  display: inline-block;
  background: linear-gradient(45deg, #666, #999, #ccc, #999, #666);
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nicknameFlow 8s ease-in-out infinite;
}

@keyframes nicknameFlow {
  0% { background-position: 0% 100%; }
  50% { background-position: 100% 0%; }
  100% { background-position: 0% 100%; }
}

.user-badge {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  border-radius: 6px;
  object-fit: contain;
}

.no-posts,
.no-data,
.no-friends-message {
  text-align: center;
  color: #888;
  padding: 40px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  margin-top: 20px;
}
/* ===== ПРИЖАТИЕ САЙДБАРА К КОНТЕНТУ ===== */

/* Для десктопа */
@media screen and (min-width: 769px) {
  .app {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 0 !important;  /* Убираем отступ между сайдбаром и контентом */
    padding: 10px !important;
    max-width: 1900px !important;
    margin: 0 auto !important;
  }

  .sidebar {
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    margin: 0 !important;
    margin-right: 10px !important;  /* Минимальный отступ */
    padding: 15px !important;
    background: rgba(100, 100, 100, 0.068) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 20px !important;
    height: calc(100vh - 20px) !important;
    position: sticky !important;
    top: 10px !important;
    flex-shrink: 0 !important;
  }

  /* Свернутый сайдбар на десктопе */
  .sidebar.collapsed {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 20px 12px !important;
  }

  .content {
    flex: 1 !important;
    max-width: 600px !important;  /* Фиксированная ширина для контента */
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Для диалогов и друзей - шире */
  body:has(#mainsite3:not(.hidden)) .content {
        max-width: 1900px !important;
  }
  body:has(#FriendSite:not(.hidden)) .content {
    max-width: 600px !important;
  }
}

/* Для мобильных */
@media screen and (max-width: 768px) {
  .app {
    flex-direction: column;
    padding: 0;
    gap: 0;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    margin: 0;
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
  }

  .content {
    padding: 16px 12px 70px 12px;
    max-width: 100%;
  }
}
/* ===== ИСПРАВЛЕНИЕ АВТОРИЗАЦИИ ===== */

/* Показываем авторизацию поверх всего */
.auth-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 10001 !important;
  background-color: rgba(0, 0, 0, 0.973) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 20px !important;
}

/* Скрываем приложение когда показываем авторизацию */
.app {
  display: none !important;
}

/* Когда авторизация скрыта - показываем приложение */
.auth-container.hidden + .app,
.auth-container.hidden ~ .app {
  display: flex !important;
}

/* Сама карточка авторизации */
.auth-card {
  background: rgba(30, 30, 30, 0.95) !important;
  backdrop-filter: blur(15px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Исправляем переключение между формами */
#loginForm,
#registerForm {
  transition: all 0.3s ease !important;
}

#registerForm.hidden {
  display: none !important;
}

/* Убираем возможные конфликты */
body {
  overflow: auto !important;
}
/* ===== ПРИНУДИТЕЛЬНОЕ СКРЫТИЕ АВТОРИЗАЦИИ ===== */

/* Когда авторизация скрыта */
.auth-container.hidden {
  display: none !important;
}

/* Когда приложение показано */
.app:not(.hidden) {
  display: flex !important;
}

/* Переопределяем возможные конфликты */
.hidden {
  display: none !important;
}

/* Форсированное скрытие авторизации при загрузке приложения */
body.logged-in .auth-container,
body:has(.app:not(.hidden)) .auth-container {
  display: none !important;
}

body.logged-in .app,
body:has(.auth-container.hidden) .app {
  display: flex !important;
}
/* ================================================= */
/* ==================== ВСПОМОГАТЕЛЬНОЕ ============ */
/* ================================================= */

#postImage,
#profilePostImage {
  display: none;
}

#uploadIcon {
  color: white;
  cursor: pointer;
}
.user-badge {
  display: inline-block !important;
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

/* Если изображение не загрузилось */
.user-badge[src=""], 
.user-badge:not([src]), 
.user-badge[src="#"] {
  display: none !important;
}
/* ===== СТИЛИ ДЛЯ ГЛАЗИКОВ (ИСПРАВЛЕННАЯ ВЕРСИЯ) ===== */

/* Обертка для поля с паролем */
.password-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

/* Поле ввода пароля */
.password-wrapper input {
    width: 100% !important;
    padding: 16px 50px 16px 16px !important; /* Отступ справа для глазика */
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    color: white !important;
    font-size: 16px !important;
    outline: none !important;
    transition: all 0.3s !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
}

.password-wrapper input:focus {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.password-wrapper input::placeholder {
    color: #666 !important;
}

/* Кнопка-глазик */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    font-size: 22px;
    color: #888;
    transition: all 0.2s;
    z-index: 10;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 50%;
}

.password-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .password-wrapper input {
        padding: 14px 45px 14px 14px !important;
        font-size: 15px !important;
    }
    
    .password-toggle {
        font-size: 20px;
        right: 12px;
        width: 28px;
        height: 28px;
    }
}
/* ===== БЕЙДЖИКИ НЕПРОЧИТАННЫХ СООБЩЕНИЙ ===== */

.user-item {
    position: relative;
}

/* Бейдж с количеством */
.unread-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #29292969;
    color: #ffffff8c;
    font-size: 13px;
    font-weight: 600;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}
/* Баннер профиля */
.profile-banner {
  width: 100%;
  height: 230px;
  background: #101010;
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: 30px;
}
.profile-banner.loaded {
    opacity: 1;
}
/* Контейнер для аватара */
.profile-avatar-container {
  padding: 0 16px;
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

#profileContent {
  width: 100%;
}

/* Аватар - наезжает на баннер */
#profileContent .profile-avatar {
  width: 130px !important;
  height: 130px !important;
  border-radius: 50% !important;
  border: 7px solid #070707 !important;
  margin-left: 20px !important;
  margin-top: -60px !important;
  margin-bottom: 8px !important;
  object-fit: cover !important;
}

/* Имя пользователя */
#profileContent .profile-display-name {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
  padding: 0 16px;
  max-width: 600px;
  margin-left: 10px;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Юзернейм */
#profileContent .profile-username {
  color: #888 !important;
  font-size: 15px !important;
  margin-bottom: 12px !important;
  padding: 0 16px !important;
  max-width: 600px !important;
  margin-left: 10px !important;
  margin-right: auto !important;
  text-align: left !important;
  display: block !important;
  justify-content: flex-start !important;
}

/* Статистика (подписчики/подписки) */
#profileContent .profile-stats {
  display: flex !important;
  gap: 24px !important;
  margin-bottom: 12px !important;
  padding: 0 16px !important;
  max-width: 600px !important;
  margin-left: 10px !important;
  margin-right: auto !important;
  color: #888 !important;
  font-size: 15px !important;
}

#profileContent .stat-number {
  color: white !important;
  font-weight: 600 !important;
  margin-right: 4px !important;
}

/* Дата регистрации */
#profileContent .profile-joined {
  color: #888 !important;
  font-size: 15px !important;
  margin-bottom: 20px !important;
  padding: 0 16px !important;
  max-width: 600px !important;
  margin-left: 10px !important;
  margin-right: auto !important;
}
        .users-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 10001;
            justify-content: center;
            align-items: center;
        }
        
        .users-modal.show {
            display: flex;
        }
        
        .users-modal-content {
            background: #1e1e1e;
            width: 90%;
            max-width: 500px;
            max-height: 80vh;
            border-radius: 16px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        
        .users-modal-header {
            padding: 16px;
            border-bottom: 1px solid #333;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .users-modal-header h3 {
            margin: 0;
            color: white;
            font-size: 18px;
        }
        
        .close-users-modal {
            background: none;
            border: none;
            color: #999;
            font-size: 28px;
            cursor: pointer;
            line-height: 1;
        }
        
        .close-users-modal:hover {
            color: white;
        }
        
        .users-modal-list {
            padding: 16px;
            overflow-y: auto;
            max-height: calc(80vh - 70px);
        }
        
        .user-modal-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid #333;
            cursor: pointer;
            transition: background 0.2s;
        }
        
        .user-modal-item:hover {
            background: #2a2a2a;
        }
        
        .user-modal-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            margin-right: 12px;
            object-fit: cover;
        }
        
        .user-modal-info {
            flex: 1;
        }
        
        .user-modal-name {
            color: white;
            font-weight: 500;
            margin-bottom: 4px;
        }
        
        .user-modal-status {
            font-size: 12px;
            color: #888;
        }
        
        .user-modal-actions {
            margin-left: 12px;
        }
        
        .user-action-btn {
            padding: 6px 12px;
            border-radius: 16px;
            border: none;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .user-action-btn.follow {
            background: #007bff;
            color: white;
        }
        
        .user-action-btn.follow:hover {
            background: #0056b3;
        }
        
        .user-action-btn.unfollow {
            background: #333;
            color: #ff4d4d;
            border: 1px solid #ff4d4d;
        }
        
        .user-action-btn.unfollow:hover {
            background: #ff4d4d;
            color: white;
        }
        
        .no-users {
            text-align: center;
            color: #888;
            padding: 40px 20px;
        }
        
        .stat-item {
            cursor: pointer;
            transition: color 0.2s;
        }
        
        .stat-item:hover {
            color: #007bff;
        }
        .profile-skeleton {
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-banner {
    height: 200px;
    background: #2a2a2a;
    border-radius: 12px;
    margin-bottom: 60px;
}

.skeleton-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #2a2a2a;
    margin: -50px auto 15px;
}

.skeleton-name {
    height: 24px;
    width: 150px;
    background: #2a2a2a;
    margin: 0 auto 10px;
    border-radius: 4px;
}

.skeleton-username {
    height: 18px;
    width: 100px;
    background: #2a2a2a;
    margin: 0 auto 20px;
    border-radius: 4px;
}

.skeleton-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.skeleton-stat {
    height: 20px;
    width: 80px;
    background: #2a2a2a;
    border-radius: 4px;
}

.skeleton-joined {
    height: 16px;
    width: 120px;
    background: #2a2a2a;
    margin: 20px auto;
    border-radius: 4px;
}

.post-skeleton {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.skeleton-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2a2a2a;
}

.skeleton-name-small {
    height: 16px;
    width: 120px;
    background: #2a2a2a;
    border-radius: 4px;
}

.skeleton-content {
    height: 60px;
    background: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-footer {
    height: 30px;
    background: #2a2a2a;
    border-radius: 4px;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
/* ================================================= */
/* ================ МОДАЛЬНОЕ ОКНО НАСТРОЕК ========= */
/* ================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    background: #1a1a1a;
    border-radius: 30px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    /* border: 1px solid #333; */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    color: #fff;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: #333;
    color: #fff;
}

#editProfileModal .modal-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 400px;
    padding: 0 0 0 24px;
}

/* ===== САЙДБАР НАСТРОЕК ===== */
.settings-sidebar {
    width: 240px;
    background: rgba(20, 20, 20, 0.95);
    border-right: 1px solid #333;
    padding: 24px 0;
    overflow-y: auto;
}

.settings-menu {
    margin-right: 8px;
    display: flex;
    flex-direction: column;
}

.settings-menu-item {
    padding: 12px 20px;
    color: #aaa;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.settings-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.settings-menu-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-left-color: #4a9eff;
}

/* Подпункты меню (с отступом) */
.settings-submenu-item {
    padding: 10px 20px 10px 40px;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.settings-submenu-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #ddd;
}

.settings-submenu-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left-color: #4a9eff;
}

/* Разделитель в меню */
.settings-menu-divider {
    height: 1px;
    background: #333;
    margin: 12px 0;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.settings-content {
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
}

.settings-section-title {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 24px;
}

/* Поле настройки */
.settings-field {
    margin-bottom: 28px;
}

.settings-field-label {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.settings-field-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Селект (выпадающий список) */
.settings-select {
    background: #252525;
    border: 1px solid #333;
    border-radius: 30px;
    padding: 12px 20px;
    color: #fff;
    font-size: 15px;
    width: 200px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.settings-select:hover {
    background-color: #2a2a2a;
    border-color: #444;
}

.settings-select:focus {
    outline: none;
    border-color: #4a9eff;
}

/* Разделитель */
.settings-divider {
    height: 1px;
    background: #333;
    margin: 32px 0;
}

/* Сообщение "Нет постов" */
.no-posts-message {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    margin-top: 20px;
}

/* Футер с кнопками */
#editProfileModal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #333;
}

.modal-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
        color: #fff;
}

.modal-btn.save {
    background: #4a9eff;
    color: #fff;
}

.modal-btn.save:hover {
    background: #3a8eef;
}

.modal-btn.cancel {
    background: transparent;
    color: #fff;
}

.modal-btn.cancel:hover {
    background: #333;
    border-color: #666;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
#editProfileModal .modal-content {
        flex-direction: column;
    }
    
    .settings-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #333;
        padding: 16px 0;
        max-height: 200px;
    }
    
    .settings-menu {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 12px;
    }
    
    .settings-menu-item,
    .settings-submenu-item {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        padding: 10px 16px;
    }
    
    .settings-menu-item.active,
    .settings-submenu-item.active {
        border-bottom-color: #4a9eff;
    }
    
    .settings-submenu-item {
        padding: 10px 16px;
    }
    
    .settings-menu-divider {
        width: 1px;
        height: 30px;
        margin: 0 8px;
    }
    
    .settings-select {
        width: 100%;
    }
}
/* ================================================= */
/* ================ МОДАЛЬНОЕ ОКНО НАСТРОЕК ========= */
/* ================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    background: #1a1a1a;
    border-radius: 24px;
    width: 90%;
    max-width: 900px;
    height: 60vh;
    display: flex;
    flex-direction: column;
    /* border: 1px solid #333; */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    color: #fff;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: #333;
    color: #fff;
}

#editProfileModal .modal-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.settings-sidebar {
    width: 300px;
    background: #14141400;
    border-right: 1px solid #333;
    padding: 20px 0;
}

.settings-menu {
    display: flex;
    flex-direction: column;
}

.settings-menu-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 18px 19px;
  margin-bottom: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}

.settings-menu-item:hover {
    background: #1f1f1f;
    color: #fff;
}

.settings-menu-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.settings-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.settings-section-title {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.settings-avatar-section {

    margin-bottom: 30px;
}


.settings-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #333;
    margin-top: 5px;
}


/* Кнопки управления баннером */
.profile-banner-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}


.profile-banner-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-banner-btn:hover {
    background: #444;
}

.profile-banner-btn.remove {
    background: #2a1a1a;
    color: #ff6b6b;
}

.profile-banner-btn.remove:hover {
    background: #3a2a2a;
}

.settings-avatar-actions {
    display: flex;
    gap: 10px;
}

.settings-avatar-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-avatar-btn:hover {
    background: #444;
}

.settings-avatar-btn.remove {
    background: #2a1a1a;
    color: #ff6b6b;
}

.settings-avatar-btn.remove:hover {
    background: #3a2a2a;
}

.settings-field {
    margin-bottom: 24px;
}

.settings-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.settings-field-subhint {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.settings-field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.settings-field-value {
    font-size: 15px;
    color: #fff;
    background: #252525;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 4px;
}

.settings-current-value {
    font-size: 14px;
    color: #4a9eff;
    margin-top: 4px;
    padding: 4px 0;
    border-bottom: 1px dashed #333;
    display: inline-block;
}

.settings-input {
    width: 100%;
    background: #252525;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.settings-input:focus {
    outline: none;
    border-color: #4a9eff;
    background: #2a2a2a;
}

.settings-textarea {
    width: 100%;
    background: #252525;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 15px;
    min-height: 80px;
    resize: vertical;
    transition: all 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.settings-textarea:focus {
    outline: none;
    border-color: #4a9eff;
    background: #2a2a2a;
}

.settings-char-counter {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 4px;
}

#editProfileModal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #333;
    flex-shrink: 0;
    background: #1a1a1a;
}

.modal-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.save {
    background: #68686844;
    color: #fff;
}

.modal-btn.save:hover {
    background: #68686825;
}

.modal-btn.save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-btn.cancel {
    background: #333;
    color: #fff;
}

.modal-btn.cancel:hover {
    background: #444;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.settings-menu-item {
    display: flex;
    align-items: center;   /* выравнивание по центру по вертикали */
    gap: 20px;              /* расстояние между иконкой и текстом */
}
.nav-btn {
      display: flex;
    align-items: center;   /* выравнивание по центру по вертикали */
    gap: 20px;              /* расстояние между иконкой и текстом */
}
/* Модальное окно звонка */
.call-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.call-modal.hidden {
  display: none;
}

.call-container {
  background: #1a1a1a;
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: callFadeIn 0.3s ease;
}

/* Магия: скрываем значок "битого фото" и текст, если src пустой */
#userAvatar:not([src]), 
#userAvatar[src=""] {
    visibility: hidden; /* Скрывает саму картинку, но оставляет её "место" (серый квадрат) */
    position: relative;
}

#userAvatar:not([src])::after, 
#userAvatar[src=""]::after {
    content: "";
    visibility: visible;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 4px;
}
.section {
    display: none;
}

.section:not(.hidden) {
    display: block;
}
/* Скрываем всё до полной загрузки */
.app-content {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.app-content.visible {
    opacity: 1;
}
/* По умолчанию скрываем все панели */
.settings-panel {
  display: none;
}

/* Показываем только активную */
.settings-panel.active {
  display: block;
}
/* ===== ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ БАННЕРА И АВАТАРА В НАСТРОЙКАХ ===== */

/* Контейнер баннера */
.settings-panel .profile-banner-container {
  position: relative;
  width: 100%;
  margin-bottom: 40px;
}

.settings-panel .profile-banner {
  width: 100%;
  height: 160px;
  background: #161616;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
}



/* ===== АВАТАР (НАЕЗЖАЕТ НА БАННЕР) ===== */
.settings-panel .settings-avatar-section {
  margin-top: -70px !important; /* Отрицательный отступ для наложения */
  text-align: center;
  position: relative;
  z-index: 10;
  padding: 0 !important;
  background: transparent !important;
}

.settings-panel .settings-avatar-container {
  display: inline-block;
  position: relative;
}


.settings-panel .settings-avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid #1a1a1a;
  background: #2a2a2a;
  object-fit: cover;
}
.buttonEditProfileAvatBan {
  position: relative;
  width: 300px;
    display: flex;
  flex-direction: column;
  gap: 14px;
}
        .buttons-container {
            display: flex;
            flex-direction: column;
            gap: 8px;
            width: fit-content;
            font-size: 13px;
            opacity: 0.3; /* Затемняем кнопки */
            filter: blur(0.5px); /* Легкое размытие */
        }
        
        .settings-avatar-btn, .settings-delete-btn {
            background: #68686844;
            color: #a0a0a0;
            padding: 8px 16px;
            border-radius: 30px;
            text-align: center;
            width: 270px;
            border: none;
            display: inline-block;
            box-sizing: border-box;

            cursor: not-allowed;
        }
        
        .settings-delete-btn {
            background: #4a1919;
            color: #a04545;
        }

/* Скрываем все панели настроек по умолчанию */
.settings-panel {
    display: none;
}

/* Показываем только активную панель */
.settings-panel.active {
    display: block;
}

/* Стили для пунктов меню */
.settings-menu-item {
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.settings-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.settings-menu-item.active {
    background-color: rgba(255, 255, 255, 0.2);
}
/* Стили для Cropper.js */
.cropper-container {
    max-height: 300px;
    margin-bottom: 20px;
}

.cropper-view-box,
.cropper-face {
    border-radius: 0;
}

.cropper-line,
.cropper-point {
    background-color: #fff;
}

/* Стили для модального окна */
#cropModal .modal-container {
    max-width: 600px;
    width: 90%;
}

#cropModal .modal-content {
    padding: 20px;
}

#cropImage {
    max-width: 100%;
    display: block;
}

/* ================================================= */
/* ============ УВЕДОМЛЕНИЯ О СООБЩЕНИЯХ =========== */
/* ================================================= */

.message-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10000;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
  min-width: 0;
}

.notification-name {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.notification-message {
  color: #aaa;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4a90e2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ================================================= */
/* ============== МЕНЮ ДИАЛОГА (ТРИ ТОЧКИ) ======== */
/* ================================================= */

.dialog-menu-btn {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-left: auto;
}

.dialog-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dialog-menu-dropdown {
  position: absolute;
  top: 60px;
  right: 20px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.dialog-menu-dropdown.active {
  display: block;
}

.dialog-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.dialog-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dialog-menu-item svg {
  flex-shrink: 0;
}

.dialog-menu-item span {
  font-size: 14px;
}

.dialog-menu-item:last-child {
  color: #ff4444;
}

.dialog-menu-item:last-child:hover {
  background: rgba(255, 68, 68, 0.1);
}

/* ===== МЕНЮ ПОСТА (ТРИ ТОЧКИ) ===== */
.post-menu-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.post-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.post-menu-btn svg {
    width: 20px;
    height: 20px;
}

.post-menu {
    position: absolute;
    top: 38px;
    right: 8px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.post-menu.active {
    display: block;
}

.post-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.post-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.post-menu-item.delete {
    color: #ff4444;
}

.post-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.post-header {
    position: relative;
}

/* Скрываем мобильные элементы на десктопе */
@media screen and (min-width: 769px) {
    .create-post-btn,
    .post-bottom-sheet {
        display: none !important;
    }
}


/* ===== КОНТЕКСТНОЕ МЕНЮ СООБЩЕНИЙ ===== */

.message-context-menu {
    position: fixed;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    min-width: 200px;
    overflow: hidden;
    animation: menuFadeIn 0.2s ease;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
}

.context-menu-item:hover {
    background: #2a2a2a;
}

.context-menu-item:active {
    background: #333;
}

.context-menu-item.menu-item-danger {
    color: #ff5c5c;
}

.context-menu-item.menu-item-danger .menu-icon {
    color: #ff5c5c;
}

.context-menu-item.menu-item-danger .menu-text {
    color: #ff5c5c;
}

.context-menu-item.menu-item-danger:hover {
    background: #4a1919;
}

.menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: #ddd;
}

.menu-icon svg {
    display: block;
    margin: 0 auto;
}

.menu-text {
    color: #ddd;
    font-size: 14px;
    flex: 1;
}

/* Режим выделения */

.selection-mode .dialog-msg-wrapper {
    cursor: pointer;
    position: relative;
}

/* Галочка справа от сообщения (круглый чекбокс) */
.selection-mode .dialog-msg-wrapper::before {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    z-index: 10;
}

.selection-mode .dialog-msg-wrapper.selected::before {
    background: #4CAF50;
    border-color: #4CAF50;
}

.selection-mode .dialog-msg-wrapper.selected::after {
    content: '✓';
    position: absolute;
    right: 21px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 15px;
    font-weight: bold;
    z-index: 11;
}

/* Добавляем отступ для сообщения, чтобы галочка не перекрывала текст */
.selection-mode .dialog-message {
    margin-right: 45px;
}

/* Для сообщений "от меня" (справа) галочка слева от сообщения */
.selection-mode .dialog-msg-wrapper.me::before {
    right: auto;
    left: 16px;
}

.selection-mode .dialog-msg-wrapper.me.selected::after {
    right: auto;
    left: 21px;
}

.selection-mode .dialog-msg-wrapper.me .dialog-message {
    margin-right: 0;
    margin-left: 45px;
}

.selection-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e1e1e;
    border-bottom: 1px solid #333;
    padding: 12px 16px;
    gap: 12px;
    min-height: 60px;
    z-index: 100;
}

.selection-panel button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    white-space: nowrap;
}

.selection-cancel {
    background: transparent;
    color: #4c9aff;
    padding: 8px 12px;
    font-weight: 500;
}

.selection-cancel:hover {
    background: rgba(76, 154, 255, 0.1);
}

.selection-delete {
    background: #f44336;
    color: white;
}

.selection-delete:hover {
    background: #d32f2f;
}

.selection-forward {
    background: #2196F3;
    color: white;
}

.selection-forward:hover {
    background: #1976D2;
}

.selection-count {
    color: #fff;
    font-size: 14px;
    flex: 1;
    text-align: center;
    font-weight: 500;
}

/* Превью ответа */

.reply-preview {
    display: flex;
    align-items: center;
    background: rgba(42, 42, 42, 0.95);
    padding: 10px 14px;
    margin: 0 10px 8px 10px;
    border-radius: 30px;
    gap: 10px;
    position: absolute;
    bottom: 90px;
    left: 10px;
    right: 10px;
    z-index: 1000;
}

/* Убедимся что chat-column имеет position: relative */
.chat-column {
    position: relative;
}

.reply-preview-icon {
    flex-shrink: 0;
    color: #888;
    width: 20px;
    height: 20px;
    margin-left: 50px;
}

.reply-preview-content {
    flex: 1;
    font-size: 13px;
    color: #aaa;
    overflow: hidden;
    padding-left: 10px;
}

.reply-preview-content strong {
    color: #888;
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
}

.reply-preview-text {
    color: #ddd;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.reply-cancel {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reply-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Закрепленные сообщения */

.pinned-messages-container {
    /* Копируем стили шапки */
    background: rgba(10, 10, 10, 0.5) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    
    /* Позиционируем ниже шапки с отступом */
    position: absolute !important;
    top: 100px !important; /* Шапка 60px + отступ сверху 10px + отступ между 30px */
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: calc(100% - 20px) !important;
    
    border-radius: 16px !important;
    z-index: 2009 !important; /* Чуть ниже шапки */
    
    padding: 12px 16px;
    box-sizing: border-box !important;
    margin: 0 !important;
    
    display: flex;
    align-items: center;
    gap: 12px;
}

.pinned-icon-global {
    flex-shrink: 0;
    color: #ddd;
    display: flex;
    align-items: center;
}

.pinned-icon-global svg {
    width: 24px;
    height: 24px;
    display: block;
}

.pinned-messages-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    flex: 1;
}

.pinned-messages-scroll::-webkit-scrollbar {
    height: 4px;
}

.pinned-messages-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.pinned-messages-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.pinned-message {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    gap: 8px;
    transition: background 0.2s;
    min-width: 150px;
    max-width: 250px;
    flex-shrink: 0;
    cursor: pointer;
}

.pinned-message:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pinned-text {
    flex: 1;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unpin-btn {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px 8px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.unpin-btn:hover {
    color: #fff;
}

/* Уведомления */

.message-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
}

.message-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Режим пересылки */

.forward-mode .user-item {
    cursor: pointer;
    position: relative;
}

.forward-mode .user-item::after {
    content: '➡️ Переслать сюда';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    font-size: 12px;
    font-weight: bold;
}


/* Подсветка сообщения при переходе к нему */
.message-highlight {
    position: relative;
}

.message-highlight::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: rgba(76, 154, 255, 0.4);
    border-radius: 20px;
    animation: messageHighlightFade 1.5s ease-out;
    pointer-events: none;
    z-index: -1;
}

@keyframes messageHighlightFade {
    0% {
        opacity: 0;
        background: rgba(76, 154, 255, 0.6);
    }
    15% {
        opacity: 1;
        background: rgba(76, 154, 255, 0.5);
    }
    50% {
        opacity: 1;
        background: rgba(76, 154, 255, 0.4);
    }
    100% {
        opacity: 0;
        background: rgba(76, 154, 255, 0);
    }
}

/* Курсор для закрепленных сообщений */
.pinned-message {
    cursor: pointer;
}

.pinned-message .unpin-btn {
    cursor: pointer;
}


/* Цитата в сообщении (ответ) */
.message-reply {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.message-reply:hover {
    background: rgba(255, 255, 255, 0.08);
}

.reply-line {
    width: 3px;
    background: #888;
    border-radius: 2px;
    flex-shrink: 0;
}

.reply-content {
    flex: 1;
    overflow: hidden;
}

.reply-author {
    color: #888;
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 11px;
}

.reply-text {
    color: #aaa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

/* ================================================= */
/* ============ МОДАЛЬНОЕ ОКНО ВЫХОДА ============== */
/* ================================================= */

.logout-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.logout-modal-container {
  background: rgba(25, 25, 25, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.logout-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-modal-header h2 {
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.logout-modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 32px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
}

.logout-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.logout-modal-content {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

/* Секция сохраненных аккаунтов */
.saved-accounts-section {
  margin-bottom: 24px;
}

.saved-accounts-section h3 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.saved-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.saved-account-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.saved-account-item.current {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.saved-account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.saved-account-info {
  flex: 1;
  min-width: 0;
}

.saved-account-name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.saved-account-username {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-account-badge {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.saved-account-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s;
}

.saved-account-item:hover .saved-account-remove {
  opacity: 1;
}

.saved-account-remove:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

/* Кнопки действий */
.logout-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-modal-btn {
  width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.switch-account-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.switch-account-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.logout-btn-action {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.logout-modal-btn svg {
  flex-shrink: 0;
}

/* Пустое состояние */
.no-saved-accounts {
  text-align: center;
  padding: 32px 16px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
}

/* Мобильная адаптация */
@media screen and (max-width: 768px) {
  .logout-modal-container {
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    position: fixed;
    bottom: 0;
    max-height: 80vh;
  }
  
  .logout-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

/* ===== КНОПКА ВЫХОДА В НАСТРОЙКАХ ===== */
.settings-logout-btn {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-logout-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.settings-logout-btn svg {
  stroke: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.settings-logout-btn:hover svg {
  stroke: rgba(255, 255, 255, 0.9);
}
