/* Основные стили модального окна */
.notifications-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  background: #1a1a2e;
  border-radius: 12px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.3);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #2d2d4d;
}

.notifications-modal.show {
  display: flex;
}

.notifications-header {
  padding: 20px 20px;
  background: #03001f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #00065e;
}

.notifications-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  position: relative;
  top: 10px;
}

.close-modal-notif {
  position: absolute;
  top: 5px;
  right: 15px;
  color: #5177e0;
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.3s ease;
}

.notifications-tabs {
  display: flex;
  gap: 5px;
  margin: 10px 0;
  position: relative;
  top: 10px;
}

.tab-btn {
  padding: 5px 10px;
  background: transparent;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 12px;
  border-radius: 4px;
}

.tab-btn.active {
  background: #4e63c4;
  color: white;
}

.notifications-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.notification-bell {
  position: relative;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
}

.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #5957eb;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.notification-item {
  padding: 12px 20px;
  border-bottom: 1px solid #2d2d4d;
  cursor: pointer;
  transition: background 0.2s;
}

.notification-item:hover {
  background: rgba(155, 81, 224, 0.1);
}

.notification-item.unread {
  background: rgba(155, 81, 224, 0.05);
}

.notification-time {
  color: #9B51E0;
  font-size: 12px;
  margin-bottom: 5px;
}

.notification-text {
  color: white;
  font-size: 14px;
  margin-bottom: 5px;
}

.notification-author {
  color: #9B51E0;
  font-weight: bold;
}

.empty-notifications {
  padding: 30px;
  text-align: center;
  color: #666;
}

.notifications-footer {
  padding: 15px;
  text-align: center;
  border-top: 1px solid #2d2d4d;
}

.show-all-btn {
  background: transparent;
  border: 1px solid #9B51E0;
  color: #9B51E0;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

/* Оверлей */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}

.modal-overlay.show {
  display: block;
}

/* Адаптивность */
@media (max-width: 600px) {
  .notifications-modal {
    width: 95%;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    max-height: 90vh;
  }

  .notifications-header h3 {
    font-size: 0;
  }
  
  .notifications-header h3::before {
    content: "🔔";
    font-size: 18px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
    margin-top: 0;
  }
}

/* Кнопка "Прочесть" */
.mark-as-read-btn {
  padding: 4px 8px;
  background: rgba(155, 81, 224, 0.1);
  border: 1px solid #9B51E0;
  color: #9B51E0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  white-space: nowrap;
}

.mark-as-read-btn:hover {
  background: rgba(155, 81, 224, 0.2);
}

/* Кнопка "Прочесть все" */
.read-all-btn {
  display: block;
  width: 90%;
  margin: 0 auto;
  padding: 8px;
  margin-bottom: 10px;
  background: rgba(155, 81, 224, 0.1);
  border: 1px solid #9B51E0;
  color: #9B51E0;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.read-all-btn:hover {
  background: rgba(155, 81, 224, 0.2);
}

.notifications-list {
  max-height: 60vh;
  overflow-y: auto;
}

.notification-text {
  white-space: nowrap; /* Запрещаем перенос строк */
  overflow: hidden; /* Скрываем текст, который не помещается */
  text-overflow: ellipsis; /* Добавляем многоточие в конце */
  max-width: 300px; /* Или любое другое значение, которое подходит под твой дизайн */
}

.notification-content a.user-mention {
  color: #9B51E0;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}

.notification-content a.user-mention:hover {
  text-decoration: underline;
}

.user-mention {
  color: #6a1b9a;
  font-weight: bold;
  text-decoration: none;
}
.user-mention:hover {
  text-decoration: underline;
}

#notification-bell-container {
    top: 15px;
    right: 20px;
  }



@media (max-width: 1024px) {
  #notification-bell-container {
    top: 10px;
    right: 20px;
  }
}

@media (max-width: 768px) {
  #notification-bell-container {
    top: 8px;
    right: 70px;
  }
}

@media (orientation: landscape) and (max-width: 900px) {
  /* Принудительно задаем ширину, как на ПК */
  @viewport {
    width: device-width;
    zoom: 1.0;
  }
  
  /* Или просто через meta-тег динамически (через JS) */
  html {
    width: 1440px; /* Фиксированная ширина, как на ПК */
    margin: 0 auto;
    overflow-x: auto;
    transform: none !important;
  }
  body {
    min-width: 1440px; /* Чтобы контент не сжимался */
  }
}