/* dark-theme.css — Тёмная тема DolbnyaPro */
/* Референс: тёмный Material Design — слоистые карточки, мягкие тени, фиолетово-синий акцент */

/* === Цветовая палитра ===
   Фон:        #1A1A1A
   Карточки:   #2C2C2C / #282828
   Текст:      #FFFFFF / #E0E0E0
   Вторичный:  #B0B0B0
   Placeholder:#606060
   Акцент:     #7C5BFF (фиолетово-синий)
   Успех:      #4CAF50
*/

body.dark-theme {
  background: #1a1a1a !important;
}

body.dark-theme .container {
  background: #1a1a1a !important;
}

/* === Регистрация === */
body.dark-theme #registerScreen {
  background: #1a1a1a !important;
}

body.dark-theme #registerScreen input,
body.dark-theme #registerScreen button {
  background: #252525 !important;
  border: none !important;
  color: #e0e0e0 !important;
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-theme #registerScreen input::placeholder {
  color: #606060;
}

body.dark-theme #registerScreen button {
  background: #7c5bff !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(124, 91, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}

body.dark-theme #registerScreen button:hover {
  box-shadow: 0 6px 20px rgba(124, 91, 255, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* === Шапки — карточный стиль с мягкой тенью === */
body.dark-theme #chatListScreen .header,
body.dark-theme #searchScreen .header,
body.dark-theme #chatScreen .header,
body.dark-theme #chatScreen .selection-action-bar,
body.dark-theme .chat-search-bar,
body.dark-theme .media-header {
  background: #2c2c2c !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

body.dark-theme #searchScreen .header input {
  background: #252525 !important;
  color: #ffffff !important;
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-theme #searchScreen .header input::placeholder {
  color: #606060;
}

/* === Список чатов — полупрозрачные серые элементы === */
body.dark-theme .chat-list {
  background: rgba(26, 26, 26, 0.6) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Полоса историй — тот же фон, что у шапки списка чатов (#2c2c2c) */
body.dark-theme #chatListScreen .stories-strip {
  background: #2c2c2c !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.dark-theme .chat-item {
  background: rgba(44, 44, 44, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.dark-theme .chat-item:hover {
  background: rgba(60, 60, 60, 0.7) !important;
}

body.dark-theme .chat-item .chat-info h3 {
  color: #ffffff !important;
}

body.dark-theme .chat-item .chat-info .last-message {
  color: #b0b0b0 !important;
}

body.dark-theme .chat-item .last-message-time {
  color: #606060 !important;
}

body.dark-theme .chat-item .unread-badge {
  background: #7c5bff !important;
  box-shadow: 0 2px 8px rgba(124, 91, 255, 0.35);
}

/* === Область сообщений — фон-картинка (как в Telegram/WhatsApp) === */
body.dark-theme .messages {
  background: linear-gradient(rgba(26, 26, 26, 0.75), rgba(26, 26, 26, 0.75)),
              url('images/chat-bg-dark.jpg') center center / cover no-repeat fixed !important;
  background-color: #1a1a1a;
}

/* Голосовые — без доп. слоя, только сам плеер */
body.dark-theme .message.voice-only,
body.dark-theme .message.voice-only.received,
body.dark-theme .message.voice-only.sent {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* === Пузырьки — карточки с тенями === */
/* Входящие — светлее (#353535), чтобы не сливались с фоном чата и цитатами */
body.dark-theme .message.received {
  background: #353535 !important;
  border: none !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25) !important;
  border-radius: 14px;
  border-top-left-radius: 4px;
}

body.dark-theme .message.sent {
  background: rgba(124, 91, 255, 0.2) !important;
  border: 1px solid rgba(124, 91, 255, 0.2) !important;
  box-shadow: 0 2px 12px rgba(124, 91, 255, 0.15) !important;
  border-radius: 14px;
  border-top-right-radius: 4px;
}

body.dark-theme .message-sender {
  color: #9c7bff !important;
}

body.dark-theme .message-text {
  color: #e0e0e0 !important;
}

body.dark-theme .message-call .message-call-text,
body.dark-theme .message-call .message-time {
  color: #e0e0e0 !important;
}
body.dark-theme .message-call .message-call-icon {
  color: #7c5bff !important;
}

body.dark-theme .message-time {
  color: #606060 !important;
}

body.dark-theme .message-text a {
  color: #9c7bff !important;
}

/* Голосовые */
body.dark-theme .voice-message-sent {
  background: rgba(124, 91, 255, 0.15) !important;
  border: 1px solid rgba(124, 91, 255, 0.15);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border-radius: 14px;
}

body.dark-theme .voice-message-received {
  background: #353535 !important;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  border-radius: 14px;
}

body.dark-theme .voice-meta,
body.dark-theme .voice-current {
  color: #b0b0b0 !important;
}

body.dark-theme .voice-waveform {
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.15) 0 2px,
    transparent 2px 4px
  ) !important;
}

/* Системные сообщения */
body.dark-theme .message-system .message-system-text {
  color: #b0b0b0 !important;
  background: #252525 !important;
  border-radius: 10px;
}

/* Разделитель даты */
body.dark-theme .message-date-divider {
  color: #b0b0b0 !important;
  background: #2c2c2c !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

body.dark-theme .loading {
  color: #606060 !important;
}

/* === Медиа — подсветка при наведении === */
body.dark-theme .chat-media-wrap.chat-media-image {
  background: rgba(0, 0, 0, 0.6) !important;
}
body.dark-theme .chat-media-wrap.chat-media-image:has(img.chat-media.loaded) {
  background: transparent !important;
}
body.dark-theme .chat-media-placeholder {
  color: rgba(255, 255, 255, 0.5);
}
body.dark-theme .chat-media,
body.dark-theme .video-tap-wrap {
  border-radius: 12px;
  background: #252525 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}

body.dark-theme .chat-media:hover,
body.dark-theme .group-message-row .group-avatar img:hover,
body.dark-theme .avatar-img:hover {
  box-shadow: 0 6px 20px rgba(124, 91, 255, 0.25);
  filter: brightness(1.06);
}

body.dark-theme .group-message-row .group-avatar:hover,
body.dark-theme .avatar:hover {
  box-shadow: 0 0 0 2px rgba(124, 91, 255, 0.4);
}

/* Реакции */
body.dark-theme .message-reaction {
  background: #252525 !important;
  border-radius: 12px;
}

body.dark-theme .message.sent .message-reaction {
  background: rgba(124, 91, 255, 0.2) !important;
}

body.dark-theme .reaction-count {
  color: #b0b0b0 !important;
}

body.dark-theme .message-checks i {
  color: #606060 !important;
}

body.dark-theme .message.sent.read .message-checks i {
  color: #9c7bff !important;
}

/* === Поле ввода — recessed стиль === */
body.dark-theme .input-area {
  background: #2c2c2c !important;
  border: none !important;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
}

body.dark-theme .input-area textarea {
  background: #252525 !important;
  border: none !important;
  color: #e0e0e0 !important;
  border-radius: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-theme .input-area textarea::placeholder {
  color: #606060;
}

body.dark-theme .input-area textarea:focus {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(124, 91, 255, 0.35) !important;
}

body.dark-theme .input-area .emoji-button,
body.dark-theme .input-area .attach-button {
  color: #b0b0b0 !important;
}

body.dark-theme .input-area .emoji-button:hover,
body.dark-theme .input-area .attach-button:hover {
  background: #252525 !important;
  color: #e0e0e0 !important;
  border-radius: 50%;
}

body.dark-theme .input-area .send-button {
  color: #7c5bff !important;
}

body.dark-theme .input-area .send-button:hover {
  color: #9c7bff !important;
  filter: brightness(1.1);
}

/* === Цитата === */
body.dark-theme #replyPreview {
  background: #252525 !important;
  color: #e0e0e0 !important;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.dark-theme #replyPreview .reply-cancel {
  color: #606060 !important;
}

body.dark-theme .message-reply {
  background: #252525 !important;
  color: #e0e0e0 !important;
  border-radius: 10px;
  border-left: 3px solid rgba(124, 91, 255, 0.6);
}

body.dark-theme .message.received .message-reply {
  background: #2a2a2a !important;
  border-left-color: #7c5bff;
}

body.dark-theme .message.received .message-reply b {
  color: #b8a8ff !important;
}

body.dark-theme .message-reply:hover {
  background: #303030 !important;
}

body.dark-theme .message.received .message-reply:hover {
  background: #323232 !important;
}

/* === Поиск в чате === */
body.dark-theme .chat-search-bar input {
  background: #252525 !important;
  color: #fff !important;
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-theme .chat-search-bar input::placeholder {
  color: #606060 !important;
}

body.dark-theme .chat-search-highlight {
  background: rgba(255, 235, 59, 0.35) !important;
  color: #1a1a1a !important;
  border-radius: 4px;
}

/* === Меню — карточка с тенью === */
body.dark-theme #menuPopup {
  background: #2c2c2c !important;
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

body.dark-theme #menuPopup div {
  color: #e0e0e0 !important;
  border-radius: 10px;
  margin: 2px 8px;
}

body.dark-theme #menuPopup div:hover {
  background: #353535 !important;
}

/* === Кнопка создания чата === */
body.dark-theme #createChatButton {
  background: #7c5bff !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(124, 91, 255, 0.4), inset 0 1px 0 rgba(255,255,255,0.15) !important;
  border-radius: 50%;
}

body.dark-theme #createChatButton:hover {
  box-shadow: 0 6px 22px rgba(124, 91, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

/* === Модальное окно === */
body.dark-theme #createChatModal {
  background: rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme #createChatModal > div {
  background: #2c2c2c !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

body.dark-theme #createChatModal h3,
body.dark-theme #createChatModal h4 {
  color: #ffffff !important;
}

body.dark-theme #createChatModal input {
  background: #252525 !important;
  border: none !important;
  color: #e0e0e0 !important;
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-theme #groupSearchResults {
  background: #252525 !important;
  border-radius: 12px;
}

body.dark-theme #selectedParticipants {
  background: #252525 !important;
  border-radius: 12px;
}

body.dark-theme #createChatModal button {
  border-radius: 12px;
}

body.dark-theme #createChatModal button[onclick^="handleGroupModalAction"] {
  background: #7c5bff !important;
  box-shadow: 0 2px 10px rgba(124, 91, 255, 0.35);
}

body.dark-theme .call-back-modal-inner {
  background: #2c2c2c !important;
  color: #e0e0e0;
}
body.dark-theme .call-back-modal-inner div { color: inherit; }
body.dark-theme #callBackModal button { border-radius: 12px; }

/* === Аватарки без фото — единый цвет везде (#404040) === */
body.dark-theme .avatar,
body.dark-theme .group-message-row .group-avatar,
body.dark-theme .big-avatar,
body.dark-theme #groupParticipantsList .action-item > div > div:first-child {
  background: #404040 !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e0e0e0 !important;
}

body.dark-theme .status-dot.online {
  background-color: #4caf50 !important;
}

body.dark-theme .status-dot.offline {
  background-color: #606060 !important;
}

/* === Файлы в чате === */
body.dark-theme .file-attachment {
  background: #252525 !important;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.dark-theme .file-attachment .file-icon {
  background: #7c5bff !important;
  border-radius: 10px;
}

body.dark-theme .file-attachment .file-name {
  color: #e0e0e0 !important;
}

body.dark-theme .file-attachment .file-size {
  color: #606060 !important;
}

/* === Режим выбора === */
body.dark-theme .selection-action-bar {
  background: #2c2c2c !important;
}

body.dark-theme .selection-forward,
body.dark-theme .selection-delete {
  background: #353535 !important;
  border-radius: 10px;
}

body.dark-theme .selection-forward:hover:not(:disabled),
body.dark-theme .selection-delete:hover:not(:disabled) {
  background: #404040 !important;
}

body.dark-theme .message-select-checkbox {
  border-color: #606060 !important;
}

body.dark-theme .message-select-checkbox.selected {
  background: #7c5bff !important;
  border-color: #7c5bff !important;
}

/* === Окно просмотров (кто посмотрел в группе) === */
body.dark-theme .readers-popup {
  background: #2c2c2c !important;
  border: 1px solid #404040 !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
}
body.dark-theme .readers-popup-loading,
body.dark-theme .readers-popup-empty {
  color: #b0b0b0 !important;
}
body.dark-theme .readers-popup-error {
  color: #ff6b6b !important;
}
body.dark-theme .readers-popup-item {
  border-bottom-color: #404040 !important;
}
body.dark-theme .readers-popup-name {
  color: #e0e0e0 !important;
}
body.dark-theme .readers-popup-time {
  color: #b0b0b0 !important;
}

/* === React: модалка «Просмотры» (группа) — те же тона, что readers-popup === */
body.dark-theme .message-readers-overlay {
  background: rgba(0, 0, 0, 0.65) !important;
}
body.dark-theme .message-readers-dialog {
  background: #2c2c2c !important;
  border-color: #404040 !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55) !important;
}
body.dark-theme .message-readers-header {
  background: #252525 !important;
  border-bottom-color: #404040 !important;
}
body.dark-theme .message-readers-title {
  color: #e0e0e0 !important;
}
body.dark-theme .message-readers-close {
  color: #aebac1 !important;
}
body.dark-theme .message-readers-close:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}
body.dark-theme .message-readers-muted {
  color: #b0b0b0 !important;
}
body.dark-theme .message-readers-error {
  color: #ff6b6b !important;
}
body.dark-theme .message-readers-row {
  border-bottom-color: #404040 !important;
}
body.dark-theme .message-readers-avatar {
  background: #3d3d3d !important;
  color: #aebac1 !important;
}
body.dark-theme .message-readers-name {
  color: #e0e0e0 !important;
}
body.dark-theme .message-readers-phone {
  color: #8696a0 !important;
}
body.dark-theme .message-readers-time {
  color: #8696a0 !important;
}
body.dark-theme .message-readers-time-icon {
  color: #7c5bff !important;
  opacity: 0.9 !important;
}

/* === Контекстное меню === */
body.dark-theme .context-menu {
  background: #2c2c2c !important;
  border: none !important;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .context-menu div {
  color: #e0e0e0 !important;
}

body.dark-theme .context-menu div:hover {
  background: #353535 !important;
}

/* === Эмодзи-пикер === */
body.dark-theme .emoji-picker {
  background: #2c2c2c !important;
  border-top: none;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  border-radius: 14px 14px 0 0;
}

body.dark-theme .emoji-picker span:hover {
  background: #353535 !important;
  border-radius: 10px;
}

/* === Информация о контакте — полное оформление тёмной темы === */
body.dark-theme #contactInfoScreen {
  background: #1a1a1a !important;
}

body.dark-theme #contactInfoScreen .header {
  background: #2c2c2c !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

body.dark-theme #contactInfoScreen .contact-info-container {
  background: #1a1a1a !important;
}

body.dark-theme .contact-header {
  background: #2c2c2c !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.dark-theme .contact-main-info h2 {
  color: #ffffff !important;
}

body.dark-theme .contact-main-info p {
  color: #b0b0b0 !important;
}

body.dark-theme .contact-actions {
  background: #2c2c2c !important;
  margin-top: 20px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

body.dark-theme .action-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e0e0e0;
}

body.dark-theme .action-item:hover {
  background: #353535 !important;
}

body.dark-theme .action-item span {
  color: #e0e0e0 !important;
}

body.dark-theme .action-item i:first-child {
  color: #7c5bff !important;
}

body.dark-theme .action-item i:last-child {
  color: #606060 !important;
}

body.dark-theme .action-item span[style*="color: #ff3b30"],
body.dark-theme .action-item span[style*="color:#ff3b30"] {
  color: #ff6b6b !important;
}

body.dark-theme .action-item i[style*="color: #ff3b30"],
body.dark-theme .action-item i[style*="color:#ff3b30"] {
  color: #ff6b6b !important;
}

/* Участники группы */
body.dark-theme #groupParticipantsSection {
  background: #2c2c2c !important;
}

body.dark-theme #groupParticipantsSection > div:first-child {
  color: #e0e0e0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme #groupParticipantsList .action-item {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.dark-theme #groupParticipantsList .action-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Имена участников — светлый цвет для читаемости */
body.dark-theme #groupParticipantsList .action-item > div > div > div:first-child {
  color: #e0e0e0 !important;
}

/* Номера телефонов */
body.dark-theme #groupParticipantsList .action-item > div > div > div:last-child {
  color: #b0b0b0 !important;
}

/* Бейдж «Создатель» / «Админ» — акцент тёмной темы */
body.dark-theme #groupParticipantsList .action-item span {
  background: rgba(124, 91, 255, 0.3) !important;
  color: #b8a8ff !important;
}


body.dark-theme #groupParticipantsList .action-item .fa-chevron-right {
  color: #606060 !important;
}

/* Toggle — акцент фиолетово-синий */
body.dark-theme .toggle-switch label {
  background-color: #404040 !important;
}

body.dark-theme .toggle-switch input:checked + label {
  background-color: #7c5bff !important;
}

/* === Галерея медиа === */
body.dark-theme .media-categories-list {
  background: #1a1a1a !important;
}

body.dark-theme .media-category-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

body.dark-theme .media-category-item:active {
  background: #252525 !important;
}

body.dark-theme .media-category-text {
  color: #e0e0e0 !important;
}

body.dark-theme .media-category-count {
  color: #606060 !important;
}

body.dark-theme .media-category-icon {
  background: rgba(124, 91, 255, 0.2) !important;
  color: #7c5bff !important;
  border-radius: 12px;
}

body.dark-theme .media-category-icon.media-icon-photo {
  background: rgba(33, 150, 243, 0.2) !important;
  color: #2196f3 !important;
}

body.dark-theme .media-category-icon.media-icon-video {
  background: rgba(156, 39, 176, 0.2) !important;
  color: #9c27b0 !important;
}

body.dark-theme .media-gallery-content {
  background: #1a1a1a !important;
}

body.dark-theme .media-gallery-month-title {
  color: #e0e0e0 !important;
}

body.dark-theme .media-gallery-tabs {
  background: #1f1f1f !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .media-gallery-tabs-hint {
  color: #909090 !important;
}

body.dark-theme button.media-gallery-tab {
  background: #2c2c2c !important;
  color: #c5cdd3 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

body.dark-theme button.media-gallery-tab:hover {
  background: #353535 !important;
  color: #e8eef2 !important;
}

body.dark-theme button.media-gallery-tab-active {
  background: rgba(18, 140, 126, 0.45) !important;
  color: #ffffff !important;
  border-color: rgba(18, 140, 126, 0.55) !important;
}

body.dark-theme button.media-gallery-tab-active:hover {
  background: rgba(18, 140, 126, 0.55) !important;
  color: #ffffff !important;
}

body.dark-theme .media-gallery-loading-more {
  color: #909090 !important;
}

body.dark-theme .media-gallery-item {
  background: #252525 !important;
}

body.dark-theme .media-gallery-item .media-placeholder {
  background: #333 !important;
  color: #cfcfcf !important;
}

body.dark-theme .media-gallery-item .media-placeholder.file {
  background: rgba(255, 152, 0, 0.18) !important;
  color: #ffcc80 !important;
}

body.dark-theme .media-gallery-item .media-placeholder.file-pdf {
  background: rgba(229, 57, 53, 0.2) !important;
  color: #ef9a9a !important;
}

body.dark-theme .media-gallery-item .media-placeholder.file-word {
  background: rgba(25, 118, 210, 0.2) !important;
  color: #90caf9 !important;
}

body.dark-theme .media-gallery-item .media-placeholder.file-excel {
  background: rgba(56, 142, 60, 0.2) !important;
  color: #a5d6a7 !important;
}

body.dark-theme .media-gallery-item .media-placeholder.file-archive {
  background: rgba(245, 124, 0, 0.2) !important;
  color: #ffcc80 !important;
}

body.dark-theme .media-gallery-item .media-video-thumb {
  background: #1a1a1a !important;
}

body.dark-theme .media-gallery-file-row {
  background: #252525 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #e0e0e0 !important;
}

body.dark-theme .media-gallery-file-row:hover {
  background: #2f2f2f !important;
}

body.dark-theme .media-gallery-file-row .media-gallery-file-open {
  color: #5eead4 !important;
}

/* === Превью медиа === */
body.dark-theme #media-preview {
  background: #2c2c2c !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

body.dark-theme .media-preview-area {
  background: #252525 !important;
  border-radius: 12px;
}

body.dark-theme .media-preview-loader {
  color: #b0b0b0;
}

body.dark-theme .media-preview-close {
  background: rgba(255,255,255,0.2) !important;
}

body.dark-theme .media-preview-close:hover {
  background: rgba(255,255,255,0.35) !important;
}

/* === Модальное пересылки === */
body.dark-theme .forward-modal-overlay {
  background: rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .forward-modal {
  background: #2c2c2c !important;
  border: none !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5) !important;
  border-radius: 16px !important;
}

body.dark-theme .forward-modal > div:first-child {
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .forward-chat-list > div {
  color: #e0e0e0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

body.dark-theme .forward-chat-list > div:hover {
  background: #353535 !important;
}

body.dark-theme .forward-chat-list > div[style*="color:#999"] {
  color: #606060 !important;
}

/* === Запись голоса === */
body.dark-theme #recordingWaves {
  background: #2c2c2c !important;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

body.dark-theme .voice-message .voice-play-btn {
  background: #7c5bff !important;
}

/* === Web-layout десктоп — чтобы не растягивалось и не было «всё большое» === */
@media (min-width: 900px) {
  body.dark-theme:not(.force-mobile) {
    background: #141414 !important;
  }

  body.dark-theme:not(.force-mobile) .container {
    background: #1a1a1a !important;
  }

  body.dark-theme:not(.force-mobile) #chatListScreen {
    background: #1a1a1a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
  }

  body.dark-theme:not(.force-mobile) #chatScreen {
    background: #1a1a1a !important;
  }

  /* Фон — замостить картинку по её естественному размеру */
  body.dark-theme:not(.force-mobile) #chatScreen .messages {
    background-repeat: repeat !important;
    background-size: auto !important;
    background-attachment: scroll !important;
  }

  body.dark-theme:not(.force-mobile) #contactInfoScreen {
    background: #1a1a1a !important;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
  }

  body.dark-theme:not(.force-mobile) #mediaGalleryScreen {
    background: #1a1a1a !important;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
  }
}
