.chat-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.chat-members-sidebar {
  width: 200px;
  background: var(--bg-input);
  backdrop-filter: var(--blur);
  border-left: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-members-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.chat-members-content h2 {
  font-size: 16px;
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.3px;
}

.members-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background 0.2s;
}

.member-item:hover {
  background: var(--bg-hover);
}

.member-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name.self {
  color: var(--accent);
  font-weight: 600;
}

.chat-sidebar {
  width: 350px;
  background: var(--bg-input);
  backdrop-filter: var(--blur);
  border-right: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sidebar-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.chat-sidebar-content h2 {
  font-size: 16px;
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.3px;
}

.chat-sidebar-footer {
  position: relative;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-footer-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.sidebar-user-pic-wrapper {
  position: relative;
  flex-shrink: 0;
}

.online-status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--bg-input);
  border-radius: 50%;
}

.online-status-indicator.status-online {
  background: var(--status-online);
}

.online-status-indicator.status-idle {
  background: var(--status-idle);
}

.online-status-indicator.status-dnd {
  background: var(--status-dnd);
}

.online-status-indicator.status-invisible {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
}

.sidebar-user-text {
  flex: 1;
  min-width: 0;
}

.sidebar-username {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  cursor: pointer;
  transition: color 0.2s;
  display: block;
}

.sidebar-username:hover {
  color: var(--accent);
}

.sidebar-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.sidebar-status.clickable {
  cursor: pointer;
  transition: color 0.2s;
}

.sidebar-status.clickable:hover {
  color: rgba(255, 255, 255, 0.9);
}

.status-dropdown-menu {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 220px;
  background: rgba(17, 17, 17, 0.98);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 1001;
}

.status-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s;
  font-weight: 500;
}

.status-dropdown-item:hover {
  background: var(--border);
}

.status-dropdown-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.status-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-icon.status-online {
  background: var(--status-online);
}

.status-icon.status-idle {
  background: var(--status-idle);
  border-radius: 50%;
}

.status-icon.status-dnd {
  background: var(--status-dnd);
  border-radius: 50%;
}

.status-icon.status-invisible {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.status-text-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-subtext {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.status-dropdown-item .fas.fa-chevron-right {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.gear-button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(17, 17, 17, 0.6);
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: none;
}

.gear-button:hover {
  background: var(--border);
  border: none;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.gear-button i {
  font-size: 18px;
}

.dropdown-menu {
  position: absolute;
  bottom: 60px;
  left: 16px;
  right: 16px;
  background: var(--bg-surface-solid);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.dropdown-item {
  display: block;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s;
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--border);
}

.dropdown-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.room-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.room-list li {
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid var(--border);
  transition: all 0.2s;
  color: var(--text-primary);
  font-weight: 500;
}

.room-list li:hover {
  background: var(--border);
  border-color: rgba(255, 255, 255, 0.2);
}

.room-list li.active {
  background: rgba(107, 114, 128, 0.4);
  border-color: #9ca3af;
  color: var(--text-primary);
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  background: transparent;
}

.card {
  background: var(--bg-surface);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  min-height: 0;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.3), transparent);
  opacity: 0.5;
}

.row {
  display: flex;
  gap: 8px;
}

.chat-message-row input, .chat-message-row button {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-message-row input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
}

.chat-message-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-message-row input::placeholder {
  color: var(--text-muted);
}

.chat-message-row button {
  cursor: pointer;
  background: var(--accent);
  color: #000000;
  border: none;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
}

.chat-message-row button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.4);
  background: #facc15;
}

.chat-message-row button:active {
  transform: translateY(0);
}

.chat-message-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-message-row button:disabled:hover {
  transform: none;
  box-shadow: none;
}

ul.msgs {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar styling for webkit browsers */
ul.msgs::-webkit-scrollbar {
  width: 8px;
}

ul.msgs::-webkit-scrollbar-track {
  background: rgba(10, 10, 10, 0.3);
  border-radius: 4px;
}

ul.msgs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

ul.msgs::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

li.msg {
  width: 100%;
  align-self: flex-start;
  margin-bottom: 12px;
  flex-shrink: 0;
  padding: 4px 8px;
  margin-left: -8px;
  margin-right: -8px;
  border-radius: 8px;
  position: relative;
}

li.msg:hover {
  background-color: var(--bg-hover);
}

li.msg:hover .msg-ellipses-button {
  opacity: 1;
}

/* Replies no longer have indentation - visual connection is shown via connector line */

li.msg.msg-replied-to {
  /* Visual indicator that this message has replies */
}

li.msg.highlight-message {
  background-color: var(--accent-subtle);
  animation: highlight-pulse 0.5s ease-in-out;
}

@keyframes highlight-pulse {
  0%, 100% {
    background-color: var(--accent-subtle);
  }
  50% {
    background-color: rgba(251, 191, 36, 0.25);
  }
}

/* Reply connector line - connects reply to original message */
.reply-connector {
  position: absolute;
  left: 8px;
  top: -12px;
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(251, 191, 36, 0.4), rgba(251, 191, 36, 0.2));
  z-index: 1;
}

/* Reply context styling - iMessage-like */
.msg-reply-context {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 10px;
  background: var(--bg-hover);
  border-left: 3px solid rgba(251, 191, 36, 0.6);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
}

.msg-reply-context:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: rgba(251, 191, 36, 0.9);
}

.reply-context-avatar {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
}

.reply-context-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reply-context-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, 0.3);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
}

.reply-context-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reply-context-sender {
  font-weight: 600;
  color: rgba(251, 191, 36, 0.9);
  font-size: 0.75rem;
}

.reply-context-message {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.msg-profile-pic {
  flex-shrink: 0;
}

.msg-text-wrapper {
  flex: 1;
  min-width: 0;
  position: relative;
}

.msg-username {
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-weight: 600;
  opacity: 0.9;
}

.bubble {
  display: block;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.identicon {
  border-radius: 50%;
  flex-shrink: 0;
}

.status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid;
  font-weight: 600;
}


.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}

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

.chat-header-left h1 {
  margin: 0;
}

.chat-header-user {
  display: flex;
  align-items: center;
}

.chat-header-link {
  margin-left: 12px;
}

.chat-message-row {
  margin-top: 8px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.msg-actions {
  position: absolute;
  top: 0;
  right: -8px;
  display: flex;
  align-items: center;
  gap: 0;
  opacity: 0;
  transition: opacity 0.2s;
  background: rgba(40, 40, 40, 0.95);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 2px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-direction: row;
}

li.msg:hover .msg-actions {
  opacity: 1;
}

.msg-action-button {
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px 12px;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  position: relative;
}

.msg-action-button:first-child {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.msg-action-button:last-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.msg-action-button:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: var(--border);
}

.msg-action-button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
  box-shadow: none;
}

.msg-action-button.reacted {
  background: rgba(251, 191, 36, 0.25);
  box-shadow: none;
}

.msg-action-button.reacted:hover {
  background: rgba(251, 191, 36, 0.35);
  box-shadow: none;
}

/* More menu dropdown */
.msg-more-menu {
  position: relative;
}

.msg-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 120px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.msg-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: none;
}

.msg-dropdown-item:hover {
  background: var(--bg-hover);
  box-shadow: none;
}

.msg-dropdown-item-danger {
  color: #ef4444;
}

.msg-dropdown-item-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Report modal */
.report-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.report-reason-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
  transition: background 0.15s;
}

.report-reason-option:hover {
  background: var(--bg-hover);
}

.report-reason-option input[type="radio"] {
  accent-color: var(--accent);
}

.report-note-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.report-note-input:focus {
  outline: none;
  border-color: var(--accent);
}

.report-modal-submit {
  background: var(--accent) !important;
  color: var(--text-primary) !important;
}

.report-modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

/* Reactions */
.msg-reactions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.reactions-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  box-shadow: none;
}

.reaction-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.reaction-button.reacted {
  background: var(--accent-glow);
  border-color: rgba(251, 191, 36, 0.4);
}

.reaction-emoji {
  font-size: 16px;
  line-height: 1;
}

.reaction-count {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
  min-width: 12px;
  text-align: center;
}

.add-reaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  opacity: 0.6;
  box-shadow: none;
}

.add-reaction-button:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.emoji-picker {
  position: absolute;
  background: var(--bg-surface-solid);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  gap: 4px;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
}

.emoji-picker button {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
  box-shadow: none;
  width: auto;
  height: auto;
  min-width: auto;
}

.emoji-picker button:hover {
  background: var(--border);
  transform: none;
}

/* Delete Confirmation Modal - uses shared .modal-overlay and .modal classes */
.delete-modal-preview {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 24px;
}

.delete-modal-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.delete-modal-preview-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.delete-modal-preview-username {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.delete-modal-preview-timestamp {
  color: var(--text-muted);
  font-size: 12px;
}

.delete-modal-preview-content {
  margin-left: 52px;
}

.delete-modal-preview-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.delete-modal-preview-attachment {
  margin-top: 8px;
}

.delete-modal-cancel {
  background: var(--border);
  color: var(--text-primary);
}

.delete-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.delete-modal-confirm {
  background: rgba(220, 38, 38, 0.9);
  color: var(--text-primary);
}

.delete-modal-confirm:hover {
  background: rgba(220, 38, 38, 1);
  box-shadow: none;
}

/* Profile Popup Styles */
.profile-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.profile-popup {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
}

.profile-popup-close {
  transition: color 0.2s;
}

.profile-popup-close:hover {
  color: var(--text-primary);
}

.profile-popup-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-popup-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.profile-popup-username {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  text-align: center;
}

.profile-popup-interests {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-popup-interests h4 {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.profile-popup-interests-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-popup-interest-tag {
  background: var(--accent-subtle);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Inline style replacements */
.dm-section-header {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.sidebar-username-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.ws-error {
  color: #ff4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.clickable {
  cursor: pointer;
}

.reply-context-avatar-img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.reply-context-nested-indicator {
  font-size: 0.65rem;
  color: rgba(251, 191, 36, 0.6);
  margin-top: 2px;
  font-style: italic;
}

.msg-attachment-img {
  max-width: 300px;
  max-height: 300px;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.msg-attachment-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #4a5568;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.edit-message-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.edit-message-textarea {
  width: 100%;
  padding: 0.5rem;
  background: var(--border);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: inherit;
  resize: vertical;
  min-height: 60px;
}

.edit-message-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.edit-message-cancel-button {
  padding: 0.25rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 0.875rem;
  box-shadow: none;
}

.edit-message-save-button {
  padding: 0.25rem 0.75rem;
  background: #4a9eff;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 0.875rem;
  box-shadow: none;
}

.edit-message-save-button:disabled {
  background: #4a5568;
  cursor: not-allowed;
}

.edited-indicator {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-style: italic;
}

.msg-list-spacer {
  flex-shrink: 0;
  height: 1px;
}

.empty-chat-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  padding: 2rem;
  gap: 0.75rem;
}

.empty-chat-prompt-icon {
  font-size: 2.5rem;
}

.empty-chat-prompt-text {
  font-size: 0.95rem;
  line-height: 1.5;
}

.reply-context {
  padding: 0.5rem;
  background: rgba(251, 191, 36, 0.1);
  border-left: 3px solid var(--accent);
  margin-bottom: 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reply-context-content {
  flex: 1;
}

.reply-context-header {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.reply-context-text {
  color: #999;
  font-style: italic;
}

.reply-context-close {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 1.2rem;
  line-height: 1;
}

.pending-attachment {
  padding: 0.5rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.pending-attachment-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.pending-attachment-placeholder {
  width: 60px;
  height: 60px;
  background: #4a5568;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 24px;
}

.pending-attachment-info {
  flex: 1;
  min-width: 0;
}

.pending-attachment-filename {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-attachment-size {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  margin-top: 2px;
}

.pending-attachment-close {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: none;
}

.upload-button {
  margin-right: 0.5rem;
  padding: 0.5rem 1rem;
  background: #718096;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: none;
}

.upload-button:disabled {
  background: #4a5568;
  cursor: not-allowed;
}

.delete-modal-preview-img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
}

.delete-modal-preview-attachment-box {
  padding: 0.5rem;
  background: #4a5568;
  border-radius: 6px;
  color: #fff;
}

.delete-modal-preview-text-empty {
  font-style: italic;
  color: var(--text-muted);
}

.profile-popup-close-button {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 1.5rem;
  line-height: 1;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  box-shadow: none;
}

.profile-popup-city {
  margin-top: 1rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.profile-popup-dm-button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.2s;
  box-shadow: none;
}

.profile-popup-dm-button:hover {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(251, 191, 36, 0.5);
}

/* Friends */
.friend-search-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 8px;
    box-sizing: border-box;
}
.friend-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.friend-search-results {
    max-height: 200px;
    overflow-y: auto;
}
.friend-search-result {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: default;
}
.friend-search-result:hover {
    background: var(--bg-hover);
}
.friend-search-result-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
}
.friend-search-result-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}
.friend-action-btn {
    padding: 3px 10px;
    border-radius: 3px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: none;
}
.friend-action-btn:hover {
    transform: none;
    box-shadow: none;
}
.friend-action-btn.add {
    background: #3ba55c;
    color: #fff;
}
.friend-action-btn.add:hover {
    background: #2d8049;
}
.friend-action-btn.pending {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}
.friend-action-btn.accept {
    background: var(--accent);
    color: #000;
}
.friend-action-btn.accept:hover {
    background: #facc15;
}
.friend-action-btn.reject {
    background: transparent;
    color: var(--status-danger);
    border: 1px solid var(--status-danger);
    margin-left: 4px;
}
.friend-action-btn.reject:hover {
    background: rgba(237, 66, 69, 0.1);
}
.friends-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 8px;
}
.friends-tab {
    flex: 1;
    padding: 6px 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500;
}
.friends-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}
.friends-tab .badge {
    background: var(--status-danger);
    color: #fff;
    border-radius: 8px;
    padding: 0 5px;
    font-size: 10px;
    margin-left: 4px;
}
.friend-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.friend-item:hover {
    background: var(--bg-hover);
}
.friend-item-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
    position: relative;
}
.friend-item-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    bottom: -1px;
    right: -1px;
    border: 2px solid var(--bg-input);
}
.friend-item-status.online { background: var(--status-online); }
.friend-item-status.idle { background: var(--status-idle); }
.friend-item-status.dnd { background: var(--status-dnd); }
.friend-item-status.offline, .friend-item-status.invisible { background: #747f8d; }
.friend-item-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}
.friend-item-actions {
    display: flex;
    gap: 4px;
}

/* Friends section header (replaces inline styles in App.js) */
.friends-section-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.friends-count-badge {
  background: var(--status-danger);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 12px;
  margin-left: 8px;
}

.friends-chevron {
  font-size: 12px;
  margin-left: auto;
}

/* Profile popup friend action buttons (replaces inline styles in App.js) */
.profile-popup-dm-button.btn-add-friend {
  background: var(--status-success);
  color: var(--text-primary);
  border-color: var(--status-success);
}

.profile-popup-dm-button.btn-add-friend:hover {
  background: #2d8049;
}

.profile-popup-dm-button.btn-remove-friend {
  background: var(--status-danger);
  color: var(--text-primary);
  border-color: var(--status-danger);
}

.profile-popup-dm-button.btn-remove-friend:hover {
  background: #c53a3d;
}

.profile-popup-dm-button.btn-pending {
  opacity: 0.5;
  cursor: not-allowed;
}
