.bp-spinner {
  --spinner-size: 20px;
  --spinner-border: 2px;
  --spinner-color: #60a5fa;
  --spinner-track: rgba(96, 165, 250, 0.2);
  --spinner-speed: 0.8s;

  display: inline-block;
  width: var(--spinner-size);
  height: var(--spinner-size);
  border-radius: 50%;
  border: var(--spinner-border) solid var(--spinner-track);
  border-top-color: var(--spinner-color);
  animation: bp-spinner-rotate var(--spinner-speed) linear infinite;
  box-sizing: border-box;
}

@keyframes bp-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bp-spinner {
    animation: none;
  }
}











.feed-preferences-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.feed-preferences-modal {
  background: #000;
  border: 1px solid #222;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* Кастомная прокрутка */
.feed-preferences-modal::-webkit-scrollbar {
  width: 4px;
}

.feed-preferences-modal::-webkit-scrollbar-track {
  background: transparent;
}

.feed-preferences-modal::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 2px;
  transition: background 0.2s;
}

.feed-preferences-modal:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.feed-preferences-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

.feed-preferences-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #333;
}

.feed-preferences-header h2 {
  margin: 0;
  font-size: 24px;
  color: #fff;
}

.close-button {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.close-button:hover {
  background: #333;
  color: #fff;
}

.feed-preferences-content {
  padding: 24px;
}

.preferences-input-section {
  margin-bottom: 32px;
}

.preferences-input-section h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #fff;
}

.preference-textarea {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}

.preference-textarea:focus {
  outline: none;
  border-color: #4CAF50;
  background: #222;
}

.preference-textarea::placeholder {
  color: #666;
}

.submit-preference-btn {
  margin-top: 12px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.submit-preference-btn:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.submit-preference-btn:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.9);
}

.submit-preference-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

.preference-message {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.preference-message.success {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
  border: 1px solid #4CAF50;
}

.preference-message.error {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid #f44336;
}

.preferences-lists-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.preference-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  margin-bottom: 8px;
  padding: 8px 0;
  user-select: none;
  transition: opacity 0.2s;
}

.preference-list-header:hover {
  opacity: 0.8;
}

.preference-list-header h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.preference-list-header svg {
  color: #888;
  transition: color 0.2s;
}

.preference-list-header:hover svg {
  color: #fff;
}

.preference-list h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #fff;
}

.list-description {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #888;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}

.empty-list {
  color: #666;
  font-size: 14px;
  font-style: italic;
  margin: 0;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.2s;
}

.blacklist-tag {
  background: rgba(244, 67, 54, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(244, 67, 54, 0.4);
}

.whitelist-tag {
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.remove-tag-btn {
  background: none;
  border: none;
  color: currentColor;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  opacity: 0.7;
}

.remove-tag-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .feed-preferences-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .feed-preferences-header {
    padding: 16px;
  }

  .feed-preferences-header h2 {
    font-size: 20px;
  }

  .feed-preferences-content {
    padding: 16px;
  }

  .preferences-input-section h3,
  .preference-list h3 {
    font-size: 16px;
  }
}

/* Desktop - Side panel (appears from left by default) */
.user-profile-modal-overlay.desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 1600;
  pointer-events: none;
  isolation: isolate;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Left position (default) */
.user-profile-modal-panel.desktop.left {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(400px, 33vw);
  max-width: 600px;
  min-width: 336px;
  background: #000;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: slideInLeft 0.3s ease-out;
  pointer-events: auto;
  z-index: 1601;
  overflow: hidden;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Right position (for messenger) */
.user-profile-modal-panel.desktop.right {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(400px, 33vw);
  max-width: 600px;
  min-width: 336px;
  background: #000;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease-out;
  pointer-events: auto;
  z-index: 1601;
  overflow: hidden;
}

/* Resize handle for profile panel */
.user-profile-modal-panel.desktop.left .profile-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  background: transparent;
  z-index: 1000;
  transition: background 0.2s;
}

.user-profile-modal-panel.desktop.right .profile-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  background: transparent;
  z-index: 1000;
  transition: background 0.2s;
}

.profile-resize-handle:hover,
.profile-resize-handle:active {
  background: rgba(59, 130, 246, 0.5);
}

/* Mobile - Slide from right */
.user-profile-modal-overlay.mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100005;
  pointer-events: auto;
  animation: fadeIn 0.3s ease-out;
  /* Prevent scroll on body */
  overflow: hidden;
  /* GPU acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Блокируем touch события */
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: auto;
  /* Плавный переход фона */
  transition: background-color 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%) translateZ(0);
  }
  to {
    transform: translateX(0) translateZ(0);
  }
}

.user-profile-modal-panel.mobile {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  z-index: 100010;
  overflow: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
  animation: slideInRight 0.3s ease-out;
  /* GPU acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  /* Разрешаем скролл только внутри панели */
  touch-action: pan-y;
  overscroll-behavior: contain;
  /* Плавный переход для возврата после свайпа */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Отключаем transition во время активного свайпа для мгновенного отклика */
.user-profile-modal-panel.mobile.swiping {
  transition: none;
}

/* Profile Info */
.user-profile-info {
  position: relative;
  flex-shrink: 0;
  background: #000;
  padding-bottom: 0; /* Убираем нижний padding */
  min-height: 380px; /* Ensure space for absolute positioned elements */
  container-type: inline-size;
  container-name: profile-info;
  isolation: isolate;
}

/* Profile Background */
.profile-background {
  width: 100%;
  /* height управляется через inline-стили для анимации скролла */
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

/* Camera Button for Profile Images */
.profile-camera-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  z-index: 5;
}

.profile-camera-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.profile-camera-btn img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.background-camera {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.avatar-camera {
  bottom: 0;
  right: 0;
}

.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
}

/* Vertical gradient overlay - from bottom (black) to top (transparent) */
.profile-background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

/* Back Button - верхний левый угол */
.profile-back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  z-index: 100015;
  color: #fff;
}

.profile-back-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.05);
}

.profile-back-btn svg {
  color: #fff;
}

/* Avatar and Buttons Section - responsive spacing */
.profile-avatar-section {
  position: absolute;
  top: 240px; /* Height of profile-background */
  transform: translateY(-50%); /* Center vertically on the edge */
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(16px, 4cqi, 32px);
  gap: clamp(12px, 3cqi, 24px);
  z-index: 3;
  isolation: isolate;
}

.profile-avatar {
  /* Адаптивный размер аватара в зависимости от размера модального окна */
  width: clamp(70px, 22cqi, 112px) !important;
  height: clamp(70px, 22cqi, 112px) !important;
  min-width: clamp(70px, 22cqi, 112px) !important;
  min-height: clamp(70px, 22cqi, 112px) !important;
  max-width: clamp(70px, 22cqi, 112px) !important;
  max-height: clamp(70px, 22cqi, 112px) !important;
  border: 4px solid #000;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-avatar .avatar-letter {
  font-size: clamp(28px, 8cqi, 45px) !important;
}

/* Profile Name Above Avatar - positioned relative to background edge */
.profile-name-above {
  position: absolute;
  top: 240px; /* Height of profile-background */
  transform: translateY(calc(-100% - clamp(70px, 20cqw, 110px) / 2 - 20px)); /* Name height + half avatar + gap */
  left: 20px;
  right: 20px;
  z-index: 2;
  text-align: left;
}

.profile-name-above h2 {
  margin: 0;
  font-size: clamp(24px, 8cqw, 48px);
  font-weight: 400;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.21;
}

/* Profile Name Edit Mode */
.profile-name-edit-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.profile-name-editable {
  margin: 0;
  font-size: clamp(24px, 8cqw, 48px);
  font-weight: 400;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.21;
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 4px;
  border-radius: 4px;
  padding: 4px 8px;
  transition: outline-color 0.2s;
}

.profile-name-editable:focus {
  outline-color: rgba(255, 255, 255, 0.6);
}

.profile-name-input {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: clamp(24px, 8cqw, 48px);
  font-weight: 400;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.21;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.profile-name-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.profile-name-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.profile-details {
  position: relative;
  text-align: left;
  padding: clamp(16px, 5cqi, 24px);
  z-index: 1;
}

/* Profile Action Buttons - теперь напрямую в .profile-avatar-section */
.profile-action-btn {
  width: clamp(42px, 12cqi, 64px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #570D0A;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.profile-action-btn:hover {
  background: #6e1310;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.profile-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.profile-action-btn.following {
  background: #570D0A; /* Сохраняем красную заливку */
}

.profile-action-btn.following:hover {
  background: #6e1310; /* Чуть светлее при наведении */
}

.profile-action-btn.following img {
  filter: none; /* Убираем фильтр для активной иконки */
}

.profile-action-btn.notifications-active {
  background: #570D0A; /* Сохраняем красную заливку */
}

.profile-action-btn.notifications-active:hover {
  background: #6e1310; /* Чуть светлее при наведении */
}

.profile-action-btn.notifications-active img {
  filter: none; /* Убираем фильтр для активной иконки */
}

.profile-action-btn img {
  width: clamp(16px, 4cqi, 22px);
  height: clamp(16px, 4cqi, 22px);
  filter: brightness(0) invert(1);
}

.profile-action-btn svg {
  color: #fff;
  width: clamp(14px, 4cqi, 22px);
  height: clamp(14px, 4cqi, 22px);
}

.profile-message-btn {
  width: clamp(60px, 16cqi, 96px);
  aspect-ratio: 250 / 170;
  border-radius: clamp(18px, 5cqw, 26px) clamp(18px, 5cqw, 26px) clamp(8px, 2cqw, 12px) clamp(18px, 5cqw, 26px);
}


/* Profile Info Fields */


.profile-info-fields {
  display: flex;
  flex-direction: column;
  gap: clamp(9px, 2cqi, 14px);
  margin-top: clamp(8px, 2cqi, 12px);
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.5cqi, 10px);
}

.field-value-text {
  font-size: clamp(16px, 4cqi, 18px);
  line-height: 1.5;
}

.username-row {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 2cqi, 12px);
}

.username-value {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 2cqi, 12px);
  font-size: clamp(16px, 4cqi, 18px);
  font-weight: 500;
  color: #fff;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
}

.username-value:hover,
.username-value:focus-visible {
  color: #e2e8f0;
  outline: none;
}

.username-value.copied {
  color: #4ade80;
}

.field-caption {
  font-size: 12px;
  font-weight: 400;
  color: #4ade80;
}

.field-label {
  font-size: 13px;
  font-weight: 400;
  color: #999;
  text-transform: none;
}

.field-value {
  font-size: 16px;
  font-weight: 400;
  color: #fff;
  line-height: 1.4;
}

/* Edit Mode Fields */
.field-edit-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  position: relative;
}

.field-textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: clamp(16px, 4cqi, 18px);
  font-weight: 400;
  color: #fff;
  line-height: 1.5;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
  font-family: inherit;
}

.field-textarea:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.field-textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.edit-icon-inline {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  flex-shrink: 0;
  margin-top: 10px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  text-align: center;
  gap: clamp(20px, 6cqi, 80px);
  margin-top: clamp(80px, 15cqi, 110px);
  position: relative;
  z-index: 1;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat-left {
  justify-self: end;
}

.stat-right {
  justify-self: start;
}


.profile-stats-grid .stat .stat-value {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #999;
  font-weight: 400;
  white-space: nowrap;
}

/* Media Container */
.user-media-container {
  flex: 1;
  overflow-y: auto;
  background: #000;
}

.loading-container,
.error-container,
.empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  text-align: center;
  color: #aaa;
  padding: 20px;
}

.loading-container p,
.error-container p,
.empty-container p {
  margin: 16px 0 0 0;
  font-size: 14px;
}

.spinner {
  animation: spin 1s linear infinite;
  color: #3b82f6;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Media Grid */
.user-profile-modal-panel .media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
}

.media-grid-item {
  position: relative;
  aspect-ratio: 0.5;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.media-grid-item.playing {
  border-color: #3b82f6;
}

.playing-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.playing-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.3);
  }
}

.media-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.media-grid-item:hover .media-thumbnail {
  transform: scale(1.1);
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  opacity: 0.9;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  opacity: 0;
}

.media-grid-item:hover .media-overlay {
  background: rgba(0, 0, 0, 0.5);
  opacity: 1;
}

.media-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.media-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Loading more indicator */
.loading-more-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: #aaa;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .user-profile-modal-panel.mobile {
    width: 100%;
  }
  
  .user-profile-info {
    min-height: 320px;
  }

  .profile-background {
    /* height управляется через inline-стили для анимации скролла */
  }

  .profile-name-above h2 {
    font-size: 24px;
  }

  .profile-back-btn {
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
  }

  .profile-avatar-section {
    top: 280px; /* Mobile background height */
    left: 0;
    right: 0;
    padding-inline: clamp(8px, 4.6vw, 18px);
    justify-content: space-between;
    gap: clamp(6px, 3.2vw, 14px);
  }
  
  .profile-name-above {
    top: 210px; /* Align closer to avatar */
    left: 20px;
    right: 20px;
    transform: none;
  }
  
  .profile-avatar {
    /* Адаптивный размер для мобильных */
    width: clamp(60px, 21vw, 88px) !important;
    height: clamp(60px, 21vw, 88px) !important;
    min-width: clamp(60px, 21vw, 88px) !important;
    min-height: clamp(60px, 21vw, 88px) !important;
    max-width: clamp(60px, 21vw, 88px) !important;
    max-height: clamp(60px, 21vw, 88px) !important;
    border: 3px solid #000;
  }
  
  .profile-avatar .avatar-letter {
    font-size: clamp(24px, 7vw, 35px) !important;
  }

  .profile-details {
    padding: 16px;
  }

  .profile-stats {
    gap: 24px;
  }

  .profile-stats-grid {
    gap: clamp(16px, 8vw, 56px);
    padding-inline: clamp(16px, 6vw, 32px);
    margin-top: clamp(70px, 12vw, 100px);
  }
  
  .profile-stats-grid .stat .stat-value {
    font-size: 20px;
  }

  .profile-stats-grid .stat .stat-label {
    font-size: 12px;
  }

  .profile-action-btn {
    --btn-size: clamp(34px, 12vw, 48px);
    width: var(--btn-size);
    height: var(--btn-size);
  }

  .profile-action-btn img {
    width: clamp(18px, 6vw, 24px);
    height: clamp(18px, 6vw, 24px);
  }

  .profile-action-btn svg {
    width: clamp(18px, 6vw, 24px);
    height: clamp(18px, 6vw, 24px);
  }

  .profile-message-btn {
    width: clamp(58px, 20vw, 86px);
    border-radius: clamp(18px, 6vw, 22px) clamp(18px, 6vw, 22px) clamp(10px, 4vw, 16px) clamp(18px, 6vw, 22px);
  }

  .user-profile-modal-panel .media-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
  }
}

/* Scrollbar styling */
.user-media-container::-webkit-scrollbar {
  width: 4px;
}

.user-media-container::-webkit-scrollbar-track {
  background: transparent;
}

.user-media-container::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 2px;
  transition: background 0.2s;
}

.user-media-container:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.user-media-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* Profile Tabs */
.profile-tabs {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  padding: 0;
  margin: 0;
  height: 52px;
  flex-shrink: 0;
  position: relative;
  z-index: 100012;
}

.profile-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  padding: 0;
}

.profile-tab:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.profile-tab.active {
  color: #fff;
}

.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #fff;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.profile-tab svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.profile-tab:active svg {
  transform: scale(0.9);
}

/* Mobile adjustments for tabs */
@media (max-width: 768px) {
  .profile-tabs {
    height: 48px;
  }
  
  .profile-tab svg {
    width: 22px;
    height: 22px;
  }
}

/* Desktop - Side panel */
.followers-modal-overlay.desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99998;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease-out, visibility 0s linear 0.24s;
  will-change: opacity;
}

.followers-modal-overlay.desktop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.24s ease-out, visibility 0s linear 0s;
}

.followers-modal-panel.desktop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: #000;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  z-index: 99999;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.28, 0.64, 0.3, 1), visibility 0s linear 0.28s;
  will-change: transform;
  overflow: hidden;
}

.followers-modal-panel.desktop.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.28s cubic-bezier(0.28, 0.64, 0.3, 1), visibility 0s linear 0s;
}

/* Mobile - Bottom sheet */
.followers-modal-overlay.mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100011;
  pointer-events: auto;
  isolation: isolate;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: contain;
  opacity: 0; /* Начальное состояние - невидимый */
  visibility: hidden; /* Полностью скрываем элемент */
  transition: opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.24s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.24s; /* Задержка скрытия после анимации */
  will-change: opacity;
}

.followers-modal-overlay.mobile.is-open {
  opacity: 1; /* Видимое состояние */
  visibility: visible; /* Делаем элемент видимым */
  transition: opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.24s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s; /* Убираем задержку при открытии */
}

/* Делаем overlay полностью непрозрачным когда модалка развернута */
.followers-modal-overlay.mobile.expanded-overlay {
  background: rgba(0, 0, 0, 1);
}

.followers-modal-panel.mobile {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100dvh;
  max-height: 100dvh;
  background: #000;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  z-index: 100012;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transform: translate3d(0, 100dvh, 0);
  visibility: hidden; /* Полностью скрываем панель */
  transition: transform 0.32s cubic-bezier(0.25, 0.74, 0.22, 1),
              border-radius 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.32s; /* Задержка скрытия после анимации */
  will-change: transform, border-radius;
}

/* Делаем панель видимой при открытии */
.followers-modal-panel.mobile.is-open {
  visibility: visible;
  transition: transform 0.32s cubic-bezier(0.25, 0.74, 0.22, 1),
              border-radius 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s; /* Убираем задержку при открытии */
}

/* Отключаем transition во время свайпа для мгновенной реакции */
.followers-modal-panel.mobile.is-moving {
  transition: none;
}

/* Обновляем transform для открытого состояния */
.followers-modal-panel.mobile.is-open {
  transform: translate3d(0, calc(100dvh - 70dvh), 0);
}

/* Состояние "развернуто" */
.followers-modal-panel.mobile.expanded {
  transform: translate3d(0, 0, 0);
  border-radius: 0;
}


/* Mobile drag handle */
.mobile-drag-handle {
  padding: 12px 0;
  display: flex;
  justify-content: center;
  cursor: grab;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.drag-indicator {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* Header */
.followers-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
  gap: 16px;
  -webkit-tap-highlight-color: transparent;
}

.followers-modal-panel.desktop .followers-modal-header {
  padding: 16px 20px;
  background: #000;
}

.header-tabs {
  display: flex;
  gap: 8px;
  flex: 1;
}

.tab-button {
  background: none;
  border: none;
  color: #aaa; /* <<< ИЗМЕНЕНИЕ ЗДЕСЬ (было #888) */
  font-size: 16px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-radius: 8px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.tab-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-button:active,
.tab-button:focus {
  color: #aaa;
  outline: none;
}

.tab-button.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
}

.tab-button.active:active,
.tab-button.active:focus {
  color: #fff !important;
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 2px;
  background: #3b82f6;
  border-radius: 2px 2px 0 0;
}

.close-button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Search section */
.followers-search-wrapper {
  padding: 12px 24px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
  background: #000;
  -webkit-tap-highlight-color: transparent;
}

.followers-modal-panel.desktop .followers-search-wrapper {
  padding: 12px 20px;
}

.followers-search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 10px 12px;
  gap: 8px;
  transition: background 0.2s;
}

.followers-search-container:focus-within {
  background: #252525;
}

.search-icon {
  color: #666;
  flex-shrink: 0;
}

.followers-search-input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 15px;
  outline: none;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.followers-search-input::placeholder {
  color: #666;
}

.search-clear-button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.search-clear-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.search-clear-button:active {
  transform: scale(0.95);
}

/* Users list */
.followers-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  /* Учитываем safe-area для iOS, чтобы контент не попадал под home bar */
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  position: relative;
  contain: layout paint style;
  will-change: transform, opacity;
  transform: translateZ(0);
  background: #000;
  /* Гарантируем непрозрачность во время анимаций */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Изоляция для предотвращения просачивания эффектов */
  isolation: isolate;
}

/* Анимация переключения вкладок */
.followers-list.slide-out-left {
  animation: slideOutLeft 0.18s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.followers-list.slide-out-right {
  animation: slideOutRight 0.18s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.followers-list.slide-in-left {
  animation: slideInLeft 0.26s cubic-bezier(0.13, 0.64, 0.19, 1) forwards;
}

.followers-list.slide-in-right {
  animation: slideInRight 0.26s cubic-bezier(0.13, 0.64, 0.19, 1) forwards;
}

@keyframes slideOutLeft {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-32px);
    opacity: 0.4;
  }
}

@keyframes slideOutRight {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(32px);
    opacity: 0.4;
  }
}

@keyframes slideInLeft {
  0% {
    transform: translateX(32px);
    opacity: 0.4;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  0% {
    transform: translateX(-32px);
    opacity: 0.4;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Убираем скроллбар на мобильных */
@media (max-width: 768px) {
  .followers-list::-webkit-scrollbar {
    display: none;
  }
  
  .followers-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

.followers-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #aaa;
}

.followers-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
  color: #aaa;
}

.followers-empty p {
  margin: 0;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #1a1a1a;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.user-item:active {
  background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.user-username {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-name {
  font-size: 13px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-bio {
  font-size: 13px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.user-actions {
  flex-shrink: 0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.action-btn span {
  display: inline;
}

/* Follow button */
.btn-follow {
  background: #3b82f6;
  color: #fff;
}

.btn-follow:hover:not(:disabled) {
  background: #2563eb;
}

/* Follow back button */
.btn-follow-back {
  background: #10b981;
  color: #fff;
}

.btn-follow-back:hover:not(:disabled) {
  background: #059669;
}

/* Unfollow button */
.btn-unfollow {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-unfollow:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
}

/* Mutual/Friends button */
.btn-mutual {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
  .followers-modal-header {
    padding: 16px 20px;
    /* Добавляем safe-area сверху, чтобы контент не заезжал под "челку" */
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
  }

  .tab-button {
    font-size: 14px;
    padding: 6px 12px;
  }

  .followers-search-wrapper {
    padding: 10px 16px;
  }

  .followers-search-input {
    font-size: 14px;
  }

  .user-item {
    padding: 12px 16px;
  }

  .action-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .action-btn span {
    display: none;
  }

  .btn-mutual {
    padding: 6px 10px;
  }
  
  /* Убираем hover эффекты на тач-устройствах */
  @media (hover: none) {
    .user-item:hover {
      background: transparent;
    }
    
    .tab-button:hover {
      color: inherit;
      background: transparent;
    }
    
    .close-button:hover {
      background: transparent;
    }
    
    .action-btn:hover:not(:disabled) {
      transform: none;
    }
  }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  .followers-modal-panel.desktop {
    width: 350px;
  }
}/**
 * BaseModal Styles - Базовые стили для модальных окон
 * 
 * Централизованные стили для:
 * - ForwardModal
 * - MediaUploadModal
 */

.base-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: modal-fade-in 0.2s ease;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Panel */
.base-modal-panel {
  background: var(--modal-bg);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modal-slide-up 0.3s ease;
}

.base-modal-panel.desktop {
  width: 600px;
  max-width: 90vw;
}

.base-modal-panel.mobile {
  width: 100%;
  max-width: 100vw;
  border-radius: 16px 16px 0 0;
  position: fixed;
  bottom: 0;
  max-height: 85vh;
}

@keyframes modal-slide-up {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile drag handle */
.mobile-drag-handle {
  padding: 12px 0 8px;
  display: flex;
  justify-content: center;
  cursor: grab;
  background: var(--modal-bg);
}

.mobile-drag-handle:active {
  cursor: grabbing;
}

.drag-indicator {
  width: 40px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 2px;
  opacity: 0.5;
}

/* Header */
.base-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--modal-bg);
  gap: 16px;
}

.base-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.close-button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.close-button:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

/* Content */
.base-modal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
}

.base-modal-content::-webkit-scrollbar {
  width: 8px;
}

.base-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.base-modal-content::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

.base-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Footer */
.base-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  background: var(--modal-bg);
}

/* Mobile specific */
@media (max-width: 768px) {
  .base-modal-panel.desktop {
    width: 100%;
    max-width: 100vw;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    max-height: 85vh;
  }
  
  .base-modal-header {
    padding: 16px 20px;
  }
  
  .base-modal-content {
    padding: 20px;
  }
  
  .base-modal-footer {
    padding: 12px 20px;
  }
}

/* Dark mode variables (fallback) */
:root {
  --modal-bg: #ffffff;
  --text-primary: #000000;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e0e0e0;
  --hover-bg: #f5f5f5;
  --scrollbar-thumb: #c4c4c4;
  --scrollbar-thumb-hover: #a0a0a0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --modal-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #333333;
    --hover-bg: #2a2a2a;
    --scrollbar-thumb: #555555;
    --scrollbar-thumb-hover: #777777;
  }
}

.search-input-wrapper {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
}

.search-input-spinner {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}





/* Desktop - Side panel */
.forward-modal-overlay.desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99998;
  pointer-events: auto;
  isolation: isolate;
  animation: fadeIn 0.3s ease-out;
}

.forward-modal-panel.desktop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 450px;
  background: #000;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease-out;
  pointer-events: auto;
  z-index: 99999;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Mobile - Bottom sheet */
.forward-modal-overlay.mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99998;
  pointer-events: auto;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.forward-modal-panel.mobile {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 85vh;
  background: #000;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
  pointer-events: auto;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

.forward-modal-panel.mobile.fullscreen {
  max-height: 100vh;
  border-radius: 0;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Mobile drag handle */
.mobile-drag-handle {
  padding: 12px 0;
  display: flex;
  justify-content: center;
  cursor: grab;
  flex-shrink: 0;
}

.drag-indicator {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* Header */
.forward-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.forward-modal-header h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.header-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.close-button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.2s;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Search section */
.forward-search-section {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.forward-search-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.forward-search-input:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.08);
}

.forward-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Content area */
.forward-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  min-height: 200px;
}

.forward-loading,
.forward-error,
.forward-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.forward-loading .spinner {
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.forward-error p {
  margin-bottom: 16px;
  color: #ff6b6b;
}

.retry-button {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.retry-button:hover {
  background: #5568d3;
  transform: translateY(-1px);
}

/* Section headers */
.forward-section-header {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Users grid - Desktop */
.forward-users-grid.desktop {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 20px;
  padding: 8px;
}

/* Users horizontal scroll - Mobile */
.forward-users-scroll.mobile {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.forward-users-scroll.mobile::-webkit-scrollbar {
  display: none;
}

.forward-users-scroll.mobile {
  scrollbar-width: none;
}

/* User item */
.forward-user-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border-radius: 16px;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.forward-user-item.mobile {
  min-width: 75px;
  max-width: 75px;
  gap: 8px;
  padding: 8px;
}

.forward-user-item.special {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.forward-user-item.special.reposted {
  background: rgba(0, 204, 102, 0.1);
  border: 1px solid rgba(0, 204, 102, 0.2);
}

.forward-user-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.forward-user-item:active {
  transform: scale(0.95);
}

/* User avatar */
.forward-user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.forward-user-avatar.mobile {
  width: 60px;
  height: 60px;
}

.forward-user-avatar.special {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

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

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
}

.avatar-placeholder.mobile {
  font-size: 26px;
}

.avatar-special {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-special.mobile {
  font-size: 28px;
}

/* User name */
.forward-user-name {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  word-break: break-word;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.forward-user-name.mobile {
  font-size: 11px;
  -webkit-line-clamp: 1;
  font-weight: 600;
}

/* Sending overlay */
.sending-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px 20px 0 0;
  z-index: 10;
}

.sending-overlay .spinner {
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
  color: #667eea;
}

.sending-overlay p {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
  .forward-modal-header {
    padding: 16px 20px;
  }

  .forward-modal-header h2 {
    font-size: 18px;
  }

  .forward-search-section {
    padding: 12px 20px;
  }

  .forward-modal-content {
    padding: 16px 20px;
  }
}

.create-group-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
}

.create-group-modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.create-group-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.create-group-modal-header h2 {
  margin: 0;
  font-size: 24px;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: #f0f0f0;
}

.create-group-form {
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.error-message {
  background-color: #ffe6e6;
  color: #d32f2f;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.btn-primary,
.btn-secondary {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #0056b3;
}

.btn-primary:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: transparent;
  color: #666;
  border: 1px solid #ddd;
}

.btn-secondary:hover {
  background-color: #f0f0f0;
}

/* Slug input styles */
.slug-input-wrapper {
  display: flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.slug-input-wrapper:focus-within {
  border-color: #007bff;
}

.slug-prefix {
  background-color: #f5f5f5;
  padding: 10px 12px;
  font-size: 14px;
  color: #666;
  white-space: nowrap;
  display: flex;
  align-items: center;
  border-right: 1px solid #ddd;
}

.slug-input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  font-size: 14px;
  font-family: 'Courier New', monospace;
  min-width: 0;
}

.slug-input:focus {
  outline: none;
}

.slug-input.success {
  background-color: rgba(76, 222, 128, 0.05);
}

.slug-input.error {
  background-color: rgba(248, 113, 113, 0.05);
}

.slug-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
}

.slug-status.checking {
  color: #666;
}

.slug-status.available {
  color: #28a745;
}

.slug-status.taken {
  color: #dc3545;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .create-group-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); /* Отступ для навигации + safe-area */
  }

  .slug-prefix {
    font-size: 12px;
    padding: 10px 8px;
  }

  .slug-input {
    font-size: 13px;
  }
}
.chat-info-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  animation: fadeIn 0.2s ease-out;
  /* GPU acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.chat-info-modal {
  background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
  z-index: 10003;
  /* GPU acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

.chat-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-info-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}

.close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chat-info-content {
  padding: 24px;
}

.chat-info-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.avatar-circle-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.chat-info-name {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 24px 0;
}

.chat-info-section {
  margin-bottom: 20px;
}

.chat-info-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.chat-info-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

.chat-info-stats,
.chat-info-type {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  margin: 0;
}

.chat-info-link-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-info-link {
  flex: 1;
  color: #8ab4f8;
  font-size: 14px;
  word-break: break-all;
  font-family: 'Courier New', monospace;
}

.copy-link-btn,
.open-link-btn {
  background: rgba(102, 126, 234, 0.2);
  border: none;
  color: #8ab4f8;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-link-btn:hover,
.open-link-btn:hover {
  background: rgba(102, 126, 234, 0.3);
  transform: scale(1.05);
}

.copied-text {
  display: block;
  color: #4ade80;
  font-size: 13px;
  margin-top: 8px;
  animation: fadeIn 0.2s ease-out;
}

.chat-info-owner {
  color: #fbbf24;
  font-size: 15px;
  margin: 0;
  text-align: center;
  padding: 12px;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.chat-info-actions {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .chat-info-modal-overlay {
    align-items: flex-end;
  }
  
  .chat-info-modal {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
  }

  .chat-info-header {
    padding: 16px 20px;
  }

  .chat-info-content {
    padding: 20px;
  }

  .avatar-circle-large {
    width: 100px;
    height: 100px;
    font-size: 40px;
  }

  .chat-info-name {
    font-size: 20px;
  }
}

.delete-chat-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.delete-chat-modal {
  background-color: var(--card-bg, #1e1e1e);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.delete-chat-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-color, #333);
}

.delete-chat-modal-header svg {
  color: var(--danger-color, #ff4444);
}

.delete-chat-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.delete-chat-modal-content {
  padding: 24px;
}

.delete-chat-modal-message {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--text-secondary, #aaa);
  line-height: 1.5;
}

.delete-chat-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.delete-option-button {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background-color: var(--bg-tertiary, #252525);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.delete-option-button:hover {
  background-color: var(--bg-hover, #2a2a2a);
  border-color: var(--primary-color, #007bff);
  transform: translateY(-2px);
}

.delete-option-button svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-secondary, #aaa);
  transition: color 0.2s ease;
}

.delete-for-self:hover svg {
  color: var(--warning-color, #ffa500);
}

.delete-for-both:hover svg {
  color: var(--danger-color, #ff4444);
}

.delete-option-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.delete-option-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.delete-option-description {
  font-size: 13px;
  color: var(--text-secondary, #888);
  line-height: 1.4;
}

.delete-chat-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color, #333);
  display: flex;
  justify-content: flex-end;
}

.cancel-button {
  padding: 10px 24px;
  background-color: transparent;
  border: 1px solid var(--border-color, #555);
  border-radius: 8px;
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-button:hover {
  background-color: var(--bg-hover, #2a2a2a);
  border-color: var(--text-secondary, #777);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .delete-chat-modal {
    width: 95%;
    max-width: none;
    margin: 0 12px;
  }

  .delete-chat-modal-header {
    padding: 20px 20px 12px;
  }

  .delete-chat-modal-content {
    padding: 20px;
  }

  .delete-option-button {
    padding: 14px;
    gap: 12px;
  }

  .delete-option-title {
    font-size: 15px;
  }

  .delete-option-description {
    font-size: 12px;
  }
}

/* ============================================
   STICKERS MODAL - ДЛЯ ПК
   Модальное окно, выдвигающееся справа
   ============================================ */

/* Контейнер модального окна для ПК */
.stickers-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 480px;
  background: linear-gradient(135deg, #1a1f3a 0%, #0f1419 100%);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  z-index: 900;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.stickers-modal.open {
  transform: translateX(0);
}

/* Отключаем transition при ресайзе для плавного движения */
.stickers-modal.resizing {
  transition: none;
}

/* Ручка ресайза */
.stickers-modal-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  z-index: var(--z-resize-handle, 2);
  background: transparent;
  transition: background-color 0.2s;
}

.stickers-modal-resize-handle::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.stickers-modal-resize-handle:hover::before,
.stickers-modal.resizing .stickers-modal-resize-handle::before {
  opacity: 1;
}

.stickers-modal-resize-handle:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   STICKERS MODAL - ДЛЯ МОБИЛЬНЫХ
   Модальное окно снизу без анимации
   ============================================ */

.stickers-modal-mobile {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 300px; /* Высота по умолчанию */
  background: linear-gradient(135deg, #1a1f3a 0%, #0f1419 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

/* Content области */
.stickers-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.stickers-modal-content::-webkit-scrollbar {
  width: 4px;
}

.stickers-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.stickers-modal-content::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 2px;
  transition: background 0.2s;
}

.stickers-modal-content:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.stickers-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

.stickers-modal-placeholder {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .stickers-modal {
    display: none; /* На мобильных не показываем ПК версию */
  }
}

@media (min-width: 769px) {
  .stickers-modal-mobile {
    display: none; /* На ПК не показываем мобильную версию */
  }
}

