/* ═══════════════════════════════════════════════════
   Shercord — Modern Dark UI Design System
   ═══════════════════════════════════════════════════ */

.messages-area {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto !important;
}

.message-wrapper, .msg-wrapper {
  contain: content;
}

button, .rail-icon, .channel-item {
  transform: translateZ(0);
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Voice Call Indicator */
.voice-call-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.3s ease-out;
}

/* Status Bar System */
.status-bar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.status-indicator:hover {
  background: var(--bg-highlight);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-color);
  flex-shrink: 0;
}

.status-text {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-custom {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-emoji {
  font-size: 14px;
}

.custom-status-text {
  font-style: italic;
}

/* Member List Status */
.member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.member-item:hover {
  background: var(--bg-highlight);
}

.member-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ba55c;
  flex-shrink: 0;
  margin-left: auto;
}

.member-status-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-status-text.hidden {
  display: none;
}

/* Status Picker Modal */
.status-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-width: 280px;
}

.status-picker-header {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.status-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.status-option:hover {
  background: var(--bg-highlight);
}

.status-option.selected {
  background: var(--bg-selected, #283560);
  border: 1px solid var(--accent);
}

.status-option-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-option-info {
  flex: 1;
  min-width: 0;
}

.status-option-title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.status-option-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.custom-status-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.custom-status-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.custom-status-input input[type="text"] {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
}

.custom-status-input input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.emoji-picker-btn {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s;
}

.emoji-picker-btn:hover {
  background: var(--bg-highlight);
}

/* Activity System */
.status-activities {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.3;
}

.activity-picker {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  min-width: 320px;
}

.activity-picker-header {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.activity-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-section-title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.activity-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-input-group input[type="text"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s;
}

.activity-input-group input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.activity-btn {
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.activity-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.activity-btn.danger {
  background: var(--red);
  border-color: var(--red);
}

.activity-btn.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.quick-activities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.quick-activity-btn {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.quick-activity-btn:hover {
  background: var(--bg-highlight);
  border-color: var(--accent);
}

/* Member Activity Display */
.member-activities {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-muted);
}

.member-activity {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-activity-icon {
  font-size: 11px;
  flex-shrink: 0;
}

.member-activity-text {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-activity-details {
  font-size: 9px;
  opacity: 0.8;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Message Reactions System */
.reaction-picker {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 280px;
  z-index: 1000;
}

.reaction-picker-header {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.reaction-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.reaction-emoji-btn {
  font-size: 20px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reaction-emoji-btn:hover {
  background: var(--bg-highlight);
  transform: scale(1.1);
}

.reaction-picker-custom {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.reaction-picker-custom input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
}

.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  user-select: none;
}

.reaction-pill:hover {
  background: var(--bg-highlight);
  transform: translateY(-1px);
}

.reaction-pill.reacted {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.reaction-emoji {
  font-size: 14px;
}

.reaction-count {
  font-weight: 500;
  font-size: 11px;
}

.reaction-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  font-weight: bold;
  margin-left: 4px;
}

.reaction-add-btn:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.ctx-menu--reaction {
  min-width: 200px;
}

/* Message Threads System */
.thread-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary);
}

.thread-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.thread-back-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.thread-back-btn:hover {
  background: var(--bg-highlight);
}

.thread-title {
  flex: 1;
  min-width: 0;
}

.thread-title-text {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.thread-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.thread-archive-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.thread-archive-btn:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.thread-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg-primary);
}

.thread-parent-message {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.thread-parent-header {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.thread-message {
  margin-bottom: 12px;
}

.thread-input-area {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.thread-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.thread-input-wrapper textarea {
  flex: 1;
  min-height: 32px;
  max-height: 120px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  line-height: 1.4;
}

.thread-input-wrapper textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.thread-send-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.thread-send-btn:hover {
  background: var(--accent-hover);
}

.thread-send-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

.thread-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  margin-top: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.thread-indicator:hover {
  background: var(--bg-highlight);
  transform: translateY(-1px);
}

.thread-indicator:active {
  transform: translateY(0);
}

/* Enhanced Pinned Messages System */
.pinned-messages-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 600px;
}

.pinned-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.pinned-modal-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 18px;
}

.pinned-modal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.pinned-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.pinned-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.pinned-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.pinned-empty-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 18px;
  margin-bottom: 8px;
}

.pinned-empty-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.pinned-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  background: var(--bg-elevated);
  transition: all 0.2s;
}

.pinned-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pinned-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.pinned-item-author {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.pinned-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.pinned-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.pinned-author-info {
  flex: 1;
  min-width: 0;
}

.pinned-author-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.pinned-message-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pinned-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pinned-action-btn {
  background: none;
  border: none;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.pinned-action-btn:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.pinned-item-content {
  padding: 0 16px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.pinned-item-attachment {
  margin-top: 8px;
}

.pinned-attachment-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.pinned-attachment-img:hover {
  transform: scale(1.02);
}

.pinned-attachment-img.expanded {
  max-height: none;
  cursor: zoom-out;
}

.pinned-reactions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.pinned-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
}

.pinned-reaction-pill:hover {
  background: var(--bg-highlight);
  transform: translateY(-1px);
}

.pinned-reaction-emoji {
  font-size: 14px;
}

.pinned-reaction-count {
  font-weight: 500;
  font-size: 11px;
}

/* Enhanced Mention System */
.mention {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.mention:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.mention-everyone {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.2s;
}

.mention-everyone:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.mention-here {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.2s;
}

.mention-here:hover {
  background: rgba(34, 197, 94, 0.3);
  transform: translateY(-1px);
}

/* Mention Autocomplete Popup */
.mention-popup {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  min-width: 200px;
}

.mention-popup.hidden {
  display: none;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.mention-item:hover,
.mention-item.active {
  background: var(--bg-highlight);
}

.mention-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 10px;
  color: white;
  flex-shrink: 0;
}

.mention-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

/* Message Edit/Delete History System */
.message-history-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 600px;
}

.history-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.history-modal-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 18px;
}

.history-modal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.history-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  background: var(--bg-elevated);
  transition: all 0.2s;
}

.history-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.history-action {
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.history-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-content {
  padding: 0 16px 12px;
}

.history-author {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.history-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.message-edit-input {
  width: 100%;
  min-height: 60px;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  line-height: 1.4;
}

.message-edit-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* Enhanced Role Management System */
.role-management-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 700px;
}

.role-management-header {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.role-management-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 20px;
  margin-bottom: 4px;
}

.role-management-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.role-tabs {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.role-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.role-tab:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.role-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-elevated);
}

.role-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.roles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-elevated);
  transition: all 0.2s;
}

.role-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.role-item.used {
  opacity: 0.7;
  cursor: not-allowed;
}

.role-item.custom-role {
  border-color: var(--accent);
}

.role-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: 8px;
}

.role-name {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.role-color {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
}

.role-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}

.role-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.role-action-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.role-action-btn:hover {
  background: var(--bg-highlight);
  border-color: var(--accent);
}

.add-role-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.add-role-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-highlight);
}

.add-role-icon {
  font-size: 18px;
  font-weight: bold;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.permission-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-elevated);
}

.permission-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.permission-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: 6px;
}

.permission-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.permission-roles {
  margin-top: 8px;
}

.permission-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.permission-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.permission-role {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.permission-role.has-permission {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.role-members-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.role-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.role-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.role-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 16px;
  color: white;
  font-weight: 600;
  font-size: 12px;
}

.role-badge-icon {
  font-size: 14px;
}

.role-badge-name {
  font-size: 12px;
}

.role-member-count {
  font-size: 12px;
  color: var(--text-muted);
}

.role-members {
  padding: 8px;
}

.role-member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.role-member-item:hover {
  background: var(--bg-highlight);
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: white;
  flex-shrink: 0;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.member-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.member-action-btn {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.member-action-btn:hover {
  background: var(--bg-highlight);
  border-color: var(--accent);
}

/* Enhanced Channel Categories System */
.channel-categories-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 700px;
}

.categories-header {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.categories-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 20px;
  margin-bottom: 4px;
}

.categories-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.categories-tabs {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.categories-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.categories-tab:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.categories-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-elevated);
}

.categories-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.category-item.uncategorized {
  border-style: dashed;
  opacity: 0.8;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.category-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.category-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-highlight);
  padding: 2px 8px;
  border-radius: 12px;
}

.category-actions {
  display: flex;
  gap: 8px;
}

.category-action-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.category-action-btn:hover {
  background: var(--bg-highlight);
  border-color: var(--accent);
}

.category-channels {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.category-channel:hover {
  background: var(--bg-highlight);
}

.channel-remove-btn,
.channel-add-btn {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.channel-remove-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

.channel-add-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #86efac;
}

.add-category-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  margin-top: 16px;
}

.add-category-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-highlight);
}

.add-category-icon {
  font-size: 18px;
  font-weight: bold;
}

.channels-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-config-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-elevated);
  transition: all 0.2s;
}

.channel-config-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.channel-config-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-config-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-config-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.channel-config-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.channel-config-btn:hover {
  background: var(--bg-highlight);
  border-color: var(--accent);
}

.channel-type {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-highlight);
  padding: 2px 8px;
  border-radius: 12px;
}

.category-permissions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.role-permission-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.role-permission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.role-permission-actions {
  display: flex;
  gap: 8px;
}

.permission-toggle-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.permission-toggle-btn:hover {
  background: var(--bg-highlight);
  border-color: var(--accent);
}

.role-permissions {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.permission-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.permission-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.permission-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.permission-checkbox .permission-icon {
  font-size: 16px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: 4px;
}

/* Server Boost System */
.server-boost-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 700px;
}

.boost-header {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.boost-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 20px;
  margin-bottom: 4px;
}

.boost-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.boost-current {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.boost-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.boost-level-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
  padding: 8px 16px;
  border-radius: 12px;
}

.boost-level-progress {
  width: 200px;
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
}

.boost-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transition: width 0.3s ease;
}

.boost-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.boost-count {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.boost-next {
  font-size: 12px;
  color: var(--text-muted);
}

.boost-benefits {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.benefits-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 16px;
}

.benefits-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  transition: all 0.2s;
}

.benefit-item.unlocked {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
}

.benefit-item.locked {
  opacity: 0.6;
  border-color: var(--border);
}

.benefit-icon {
  font-size: 16px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: 6px;
}

.benefit-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.benefit-status {
  font-size: 12px;
}

.boost-packages {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.packages-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 16px;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.package-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-elevated);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.package-item.popular {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.package-item.best {
  border-color: #1e40af;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.package-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: white;
}

.package-badge.popular {
  background: #3b82f6;
}

.package-badge.best {
  background: #1e40af;
}

.package-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.package-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.package-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.package-boosts {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.package-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.package-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.boost-history {
  padding: 20px;
}

.history-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 20px;
}

.history-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
}

.history-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-action {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.history-date {
  font-size: 12px;
  color: var(--text-muted);
}

.history-details {
  font-size: 13px;
  color: var(--text-muted);
}

.server-boost-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent);
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  z-index: 10;
}

/* Custom Emoji System */
.custom-emoji-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 700px;
}

.emoji-header {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.emoji-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 20px;
  margin-bottom: 4px;
}

.emoji-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.emoji-tabs {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.emoji-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.emoji-tab:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.emoji-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-elevated);
}

.emoji-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
}

.emoji-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s;
}

.emoji-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.emoji-item.custom-emoji {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
}

.emoji-preview {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-surface);
  overflow: hidden;
}

.emoji-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emoji-char {
  font-size: 32px;
  line-height: 1;
}

.emoji-name {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  word-break: break-all;
  font-weight: 500;
}

.emoji-upload {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.upload-area:hover {
  border-color: var(--accent);
  background: var(--bg-highlight);
}

.upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.upload-text {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 8px;
}

#emoji-file-input {
  display: none;
}

.upload-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: 6px;
}

.info-icon {
  font-size: 16px;
}

.info-text {
  font-size: 14px;
  color: var(--text-muted);
}

.emoji-manage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emoji-manage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  transition: all 0.2s;
}

.emoji-manage-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.emoji-manage-preview {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-surface);
  overflow: hidden;
  flex-shrink: 0;
}

.emoji-manage-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emoji-manage-info {
  flex: 1;
  min-width: 0;
}

.emoji-manage-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 2px;
}

.emoji-manage-date {
  font-size: 12px;
  color: var(--text-muted);
}

.emoji-manage-actions {
  display: flex;
  gap: 4px;
}

.emoji-action-btn {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.emoji-action-btn:hover {
  background: var(--bg-highlight);
  border-color: var(--accent);
}

.emoji-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 40px 20px;
  font-size: 16px;
}

/* Enhanced Theme System */
.theme-settings-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 700px;
}

.theme-header {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.theme-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 20px;
  margin-bottom: 4px;
}

.theme-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.theme-tabs {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.theme-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.theme-tab:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.theme-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-elevated);
}

.theme-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.theme-preset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.theme-preset:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.theme-preset.active {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
}

.theme-preset-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.theme-preset-icon {
  font-size: 20px;
}

.theme-preset-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.theme-preset-badge {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent);
}

.theme-preset-colors {
  display: flex;
  gap: 4px;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.theme-colors {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.color-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-elevated);
}

.color-group-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 12px;
}

.color-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.color-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.color-item label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.color-item input[type="color"] {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  background: var(--bg-surface);
}

.theme-advanced {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.advanced-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-elevated);
}

.advanced-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 12px;
}

.advanced-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.advanced-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
}

.advanced-option input[type="radio"] {
  margin: 0;
}

.advanced-option span {
  font-size: 14px;
  color: var(--text-primary);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-highlight);
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: white;
}

/* Message Density Classes */
.message-density-comfortable .message {
  padding: 16px;
  margin-bottom: 8px;
}

.message-density-cozy .message {
  padding: 12px;
  margin-bottom: 6px;
}

.message-density-compact .message {
  padding: 8px;
  margin-bottom: 4px;
}

/* Emoji Size Classes */
.emoji-size-small .emoji-char {
  font-size: 16px;
}

.emoji-size-medium .emoji-char {
  font-size: 20px;
}

.emoji-size-large .emoji-char {
  font-size: 24px;
}

/* Animation Classes */
.no-animations * {
  animation: none !important;
  transition: none !important;
}

.no-animations .message:hover {
  transform: none !important;
}

.no-animations .emoji-item:hover {
  transform: none !important;
}

.no-animations .theme-preset:hover {
  transform: none !important;
}

/* Enhanced Notification System */
.notification-settings-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 700px;
}

.notification-header {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.notification-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 20px;
  margin-bottom: 4px;
}

.notification-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.notification-tabs {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.notification-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.notification-tab:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.notification-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-elevated);
}

.notification-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.notification-general,
.notification-desktop,
.notification-push {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.notification-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-elevated);
}

.notification-group-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 12px;
}

.notification-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
}

.notification-option input[type="checkbox"],
.notification-option input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}

.notification-option span {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

.notification-option label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 8px;
  min-width: 120px;
}

.notification-option select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
}

.notification-option input[type="email"],
.notification-option input[type="text"] {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
}

.notification-option input[type="range"] {
  flex: 1;
  margin: 0 8px;
}

.notification-option button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.notification-option button:hover {
  background: var(--bg-highlight);
  border-color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
  font-size: 12px;
}

/* Enhanced Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  max-width: 300px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  transition: all 0.2s;
}

.toast:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.toast.success {
  border-color: #22c55e;
  background: linear-gradient(135deg, var(--bg-elevated), rgba(34, 197, 94, 0.1));
}

.toast.error {
  border-color: #ef4444;
  background: linear-gradient(135deg, var(--bg-elevated), rgba(239, 68, 68, 0.1));
}

.toast.info {
  border-color: #3b82f6;
  background: linear-gradient(135deg, var(--bg-elevated), rgba(59, 130, 246, 0.1));
}

.toast.warning {
  border-color: #f59e0b;
  background: linear-gradient(135deg, var(--bg-elevated), rgba(245, 158, 11, 0.1));
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Notification Badge */
.favicon-badge {
  position: fixed;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  z-index: 10000;
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Notification Position Classes */
.notification-position-top-right #toast-container {
  top: 20px;
  right: 20px;
}

.notification-position-top-left #toast-container {
  top: 20px;
  left: 20px;
}

.notification-position-bottom-right #toast-container {
  bottom: 20px;
  right: 20px;
  top: auto;
}

.notification-position-bottom-left #toast-container {
  bottom: 20px;
  left: 20px;
  top: auto;
}

/* Keyboard Shortcuts System */
.quick-switcher {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 500px;
}

.quick-switcher-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.quick-switcher-header input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: all 0.2s;
}

.quick-switcher-header input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.quick-switcher-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.quick-switcher-section {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 8px 16px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.quick-switcher-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.quick-switcher-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 2px;
}

.quick-switcher-item:hover,
.quick-switcher-item.selected {
  background: var(--bg-highlight);
}

.quick-switcher-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-surface);
  font-size: 16px;
  flex-shrink: 0;
}

.quick-switcher-info {
  flex: 1;
  min-width: 0;
}

.quick-switcher-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-switcher-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-switcher-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 40px 20px;
  font-size: 16px;
}

/* Keyboard Shortcuts Modal */
.keyboard-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 600px;
  overflow-y: auto;
  padding: 8px;
}

.shortcut-category {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.shortcut-category-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.shortcut-items {
  display: flex;
  flex-direction: column;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}

.shortcut-item:last-child {
  border-bottom: none;
}

.shortcut-item:hover {
  background: var(--bg-highlight);
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.shortcut-keys .key {
  padding: 2px 6px;
  background: var(--bg-highlight);
  border-radius: 3px;
  font-size: 11px;
}

.shortcut-description {
  font-size: 14px;
  color: var(--text-primary);
  margin-left: 16px;
}

/* Key styling in shortcuts */
.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 2px;
}

.shortcut-keys .modifier {
  color: var(--text-muted);
  font-weight: 500;
}

.shortcut-keys .key {
  color: var(--accent);
  font-weight: 600;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .quick-switcher {
    max-height: 400px;
  }
  
  .keyboard-shortcuts-list {
    max-height: 500px;
  }
  
  .shortcut-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .shortcut-description {
    margin-left: 0;
    font-size: 13px;
  }
}

.voice-call-indicator-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-primary);
}

.voice-return-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.voice-return-btn:hover {
  background: var(--accent-hover);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── Google Fonts already loaded via HTML ── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Color palette - Modern Deep Space Theme */
  --bg-void: #030712;
  --bg-deep: #0a0e1a;
  --bg-base: #0f1629;
  --bg-mid: #151d35;
  --bg-elevated: #1a2442;
  --bg-highlight: #212d52;
  --bg-hover: #283560;
  --bg-active: #2f3d6e;

  /* Accent - Aurora Gradient */
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --accent-2: #a855f7;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --accent-gradient-hover: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);

  /* Semantic */
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --blue: #3b82f6;
  --purple: #a855f7;
  --pink: #ec4899;
  --orange: #f97316;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-disabled: #475569;

  /* Border / divider */
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(99, 102, 241, 0.3);

  /* Layout */
  --rail-width: 64px;
  --sidebar-width: 260px;
  --members-width: 220px;
  --header-height: 48px;
  --mobile-nav-height: 60px;

  /* Radius - More modern, less rounded */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 24px;
  --r-full: 50%;

  /* Shadow - Layered shadows for depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Transitions */
  --t-fast: 100ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-void);
}

/* ── Themes ────────────────────────────────────────────────── */
[data-theme="emerald"] {
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-light: #6ee7b7;
  --accent-gradient: linear-gradient(135deg, #10b981, #3b82f6);
}

[data-theme="ruby"] {
  --accent: #e11d48;
  --accent-hover: #be123c;
  --accent-light: #fda4af;
  --accent-gradient: linear-gradient(135deg, #e11d48, #fb923c);
}

[data-theme="gold"] {
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-light: #fcd34d;
  --accent-gradient: linear-gradient(135deg, #f59e0b, #ec4899);
}

.theme-neon {
  --bg-void: #020202;
  --bg-deep: #050505;
  --bg-base: #0a0a0a;
  --bg-mid: #101010;
  --bg-elevated: #161616;
  --bg-highlight: #222222;
  --bg-hover: #333333;
  --bg-active: #11aa33;
  --accent: #22ff66;
  --accent-light: #55ff88;
  --accent-glow: rgba(34, 255, 102, 0.3);
  --accent-2: #ff22aa;
  --text-primary: #f0f0f0;
  --text-secondary: #00ff66;
}

.theme-discord {
  --bg-void: #1e1f22;
  --bg-deep: #2b2d31;
  --bg-base: #313338;
  --bg-mid: #383a40;
  --bg-elevated: #404249;
  --bg-highlight: #464850;
  --bg-hover: #4e5058;
  --bg-active: #5865f2;
  --accent: #5865f2;
  --accent-light: #7289da;
  --accent-glow: rgba(88, 101, 242, 0.3);
  --accent-2: #eb459e;
  --text-primary: #dbdee1;
  --text-secondary: #b5bac1;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Utility ─────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

.music-player-dock {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 40;
  width: 220px;
  height: 200px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #000;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.music-player-dock.active {
  opacity: 0.72;
  pointer-events: auto;
  transform: translateY(0);
}

.music-player-dock:hover {
  opacity: 1;
}

.music-player-dock iframe,
.music-player-dock #yt-player {
  width: 220px !important;
  height: 200px !important;
  display: block;
}

.active {
  color: var(--accent-light) !important;
}

/* ══════════════════════════════════════════════════════════════
   SETUP OVERLAY
══════════════════════════════════════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 16, 0.92);
  backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-slow);
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

.setup-card {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-mid) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: 40px 48px;
  width: 420px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: slideUp var(--t-slow) ease both;
}

@keyframes slideUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.setup-logo {
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    filter: drop-shadow(0 0 12px var(--accent-glow));
  }

  50% {
    filter: drop-shadow(0 0 24px rgba(124, 58, 237, 0.6));
  }
}

.setup-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.setup-sub {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.setup-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: -8px;
  margin-bottom: 8px;
}

.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: border-color var(--t-base), box-shadow var(--t-base);
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.color-picker-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-picker-row label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-secondary);
}

.color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  border: 2px solid transparent;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.selected {
  border-color: white;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: var(--r-md);
  color: white;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .3px;
  transition: opacity var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.btn-primary.large {
  font-size: 16px;
  padding: 14px;
}

.btn-secondary {
  padding: 12px 20px;
  background: var(--bg-highlight);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.btn-secondary.large {
  font-size: 16px;
  padding: 14px 24px;
}

/* ══════════════════════════════════════════════════════════════
   APP LAYOUT
══════════════════════════════════════════════════════════════ */
.app {
  display: grid;
  grid-template-columns: var(--rail-width) var(--sidebar-width) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ── Server Rail ──────────────────────────────────────────────── */
.server-rail {
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border);
}

.rail-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  transition: border-radius var(--t-base), background var(--t-base), color var(--t-base), transform var(--t-fast);
  flex-shrink: 0;
  position: relative;
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
}

.rail-icon::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background: var(--accent-light);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: height var(--t-base);
}

.guild-icon:hover {
  transform: translateY(-2px);
  border-radius: var(--r-md);
}

.rail-icon:hover {
  border-radius: var(--r-lg);
  background: var(--accent);
  color: white;
}

.rail-icon:hover::after {
  height: 20px;
}

.rail-icon.active {
  border-radius: var(--r-lg);
  background: var(--accent);
  color: white;
}

.rail-icon.active::after {
  height: 36px;
}

.rail-icon.add-server-btn {
  background: var(--bg-elevated);
  color: var(--green);
}

.rail-icon.add-server-btn:hover {
  background: var(--green);
  color: white;
}

.rail-icon.discover-btn {
  background: var(--bg-elevated);
  color: var(--blue);
}

.rail-icon.discover-btn:hover {
  background: var(--blue);
  color: white;
}

.rail-divider {
  width: 32px;
  height: 2px;
  background: var(--border-strong);
  border-radius: var(--r-full);
  flex-shrink: 0;
}

.server-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.rail-guild-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}

.rail-server-guild {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.rail-server-guild:hover {
  animation: rail-bobble 0.55s ease-out;
}

.rail-server-guild.active {
  animation: rail-orbit-glow 2.5s ease-in-out infinite;
}

@keyframes rail-bobble {
  0% {
    transform: translateY(0) scale(1);
  }

  40% {
    transform: translateY(-3px) scale(1.04);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes rail-orbit-glow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.45), 0 4px 14px rgba(0, 0, 0, 0.25);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25), 0 6px 22px rgba(79, 70, 229, 0.35);
  }
}

/* Online indicator pip */
.rail-icon .pip {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg-void);
}

/* ── Channel Sidebar ──────────────────────────────────────────── */
.channel-sidebar {
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-header {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
  cursor: pointer;
  transition: background var(--t-fast);
  flex-shrink: 0;
}

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header:hover {
  background: var(--bg-mid);
}

.sidebar-header span {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.sidebar-header-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  transition: color var(--t-fast);
}

.sidebar-header-btn:hover {
  color: var(--text-primary);
}

.channel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.channel-category {
  padding: 16px 8px 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  cursor: pointer;
  user-select: none;
  transition: color var(--t-fast);
}

.channel-category:hover {
  color: var(--text-secondary);
}

.channel-category svg {
  transition: transform var(--t-base);
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-mid);
  padding: 10px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  position: relative;
  /* Anchor for popovers */
  background-clip: padding-box;
}

.popover {
  position: absolute;
  background: rgba(var(--bg-deep-rgb), 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 8px;
  z-index: 1000;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  margin: 1px 8px;
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
  user-select: none;
}

.channel-item:hover {
  background: var(--bg-highlight);
  color: var(--text-secondary);
}

.channel-item.active {
  background: var(--bg-active);
  color: var(--text-primary);
}

.channel-item .ch-icon {
  font-size: 14px;
  flex-shrink: 0;
  opacity: .7;
}

.channel-item .ch-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.channel-item .ch-badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--r-full);
  min-width: 16px;
  text-align: center;
}

.channel-item .ch-badge--mention {
  background: #ed4245;
}

.date-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 6px;
  color: var(--text-muted, #94a3b8);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.date-separator::before,
.date-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(139, 167, 226, 0.14);
}

/* Voice user under channel */
.voice-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 36px;
  margin: 1px 8px;
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 13px;
  cursor: default;
}

.voice-member .vm-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.voice-member .vm-icon {
  font-size: 12px;
  color: var(--green);
  margin-left: auto;
}

.voice-member .rail-item-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background-size: cover;
  background-position: center;
}

.rail-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-item:hover .rail-item-inner {
  border-radius: 16px;
  background-color: var(--accent);
  color: white;
}

/* ── User Bar ────────────────────────────────────────────────── */
.user-bar {
  height: 56px;
  background: var(--bg-void);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  flex-shrink: 0;
}

.user-bar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--t-fast);
}

.user-bar-avatar:hover {
  opacity: .8;
}

.user-bar-info {
  flex: 1;
  min-width: 0;
}

.user-bar-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-bar-status {
  font-size: 11px;
  color: var(--green);
}

.user-bar-controls {
  display: flex;
  gap: 2px;
}

.user-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}

.user-ctrl-btn:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.user-ctrl-btn.muted {
  color: var(--red);
}

/* ── Main Content ─────────────────────────────────────────────── */
.main-content {
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
  position: relative;
}

/* ── Home View ───────────────────────────────────────────────── */
.home-view {
  flex: 1;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
}

.home-hero {
  max-width: 680px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.home-view.home-dm-active {
  padding: 0;
  overflow: hidden;
  align-items: stretch;
  justify-content: stretch;
}

.home-view.home-dm-active .dm-main-view {
  flex: 1;
  width: 100%;
}

.home-hero h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.home-hero p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 480px;
  line-height: 1.6;
}

/* Hero Buttons */
.hero-btn {
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hero-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hero-btn.primary {
  background: var(--accent);
  border-color: var(--accent-light);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.hero-btn.primary:hover {
  background: var(--accent-light);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.hero-btn.tiny {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--r-md);
}

.home-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.discover-section {
  width: 100%;
  margin-top: 24px;
  text-align: left;
}

.discover-section h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
}

.room-card {
  background: var(--bg-mid);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 16px;
  cursor: pointer;
  transition: all var(--t-base);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.room-card:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 20px var(--accent-glow);
}

.room-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.room-card-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.room-card-info {
  flex: 1;
  min-width: 0;
}

.room-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.room-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.room-card .btn-primary.tiny {
  padding: 6px 12px;
  font-size: 12px;
  width: auto;
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--t-base);
}

.room-card:hover .btn-primary.tiny {
  opacity: 1;
  transform: translateX(0);
}

/* ── Chat View ───────────────────────────────────────────────── */
.chat-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(17, 17, 34, 0.6);
  backdrop-filter: blur(12px);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-type-icon {
  color: var(--text-muted);
  display: flex;
}

#chat-channel-name {
  font-weight: 700;
  font-size: 15px;
}

.peer-badge {
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-elevated);
  padding: 2px 10px;
  border-radius: var(--r-full);
  color: var(--text-secondary);
}

.chat-header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}

.header-btn:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.chat-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.messages-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: flex var(--t-base);
}

.messages-load-more-wrap {
  flex-shrink: 0;
  padding: 6px 12px 0;
  display: flex;
  justify-content: center;
}

.messages-load-more-btn {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-mid);
  color: var(--accent-light);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.messages-load-more-btn:hover {
  background: var(--bg-highlight);
  border-color: var(--accent);
}

.new-msgs-chip {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 8px 16px;
  border: none;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  animation: chip-bounce 2s ease-in-out infinite;
}

.new-msgs-chip:hover {
  filter: brightness(1.08);
}

@keyframes chip-bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .new-msgs-chip {
    animation: none;
  }
}

.messages-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 0;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

#app[data-scord-focus="1"] .members-panel,
#app[data-scord-focus="1"] .members-split-handle {
  display: none !important;
}

#app[data-scord-focus="1"] .messages-column {
  flex: 1;
}

#app[data-scord-focus="1"] #voice-members-panel {
  display: none !important;
}

.connection-badge {
  display: none !important;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-mid);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.connection-badge.ok {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.35);
}

.connection-badge.warn {
  color: var(--yellow);
  border-color: rgba(234, 179, 8, 0.35);
}

.connection-badge.err {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.35);
}

.focus-mode-btn.active {
  background: var(--accent-glow);
  color: var(--accent-light);
}

.quick-switcher {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  backdrop-filter: blur(4px);
}

.quick-switcher.hidden {
  display: none !important;
}

.quick-switcher-panel {
  width: min(480px, 94vw);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: qs-pop 0.18s ease-out;
}

@keyframes qs-pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.quick-switcher-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.qs-kbd {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-mid);
  color: var(--text-secondary);
}

.quick-switcher-input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
}

.quick-switcher-results {
  max-height: 40vh;
  overflow-y: auto;
}

.qs-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--border);
}

.qs-item:hover,
.qs-item.qs-item--active {
  background: var(--bg-highlight);
}

.qs-item-title {
  font-weight: 600;
  color: var(--text-primary);
}

.qs-item-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.quick-switcher-hint {
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-muted);
}

.quick-switcher-hint kbd {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-mid);
  font-size: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.room-grid-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 8px 0;
}

.room-skel-card {
  height: 110px;
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, var(--bg-mid) 25%, var(--bg-highlight) 50%, var(--bg-mid) 75%);
  background-size: 200% 100%;
  animation: skel-shine 1.2s ease-in-out infinite;
}

@keyframes skel-shine {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-skel-card {
    animation: none;
    background: var(--bg-mid);
  }

  .quick-switcher-panel {
    animation: none;
  }
}

.msg-attach-img {
  max-height: 220px;
  width: auto;
  max-width: 100%;
  border-radius: var(--r-md);
  margin-top: 8px;
  display: block;
  cursor: zoom-in;
  transition: max-height var(--t-base);
}

.msg-attach-img.msg-attach-img--expanded {
  max-height: min(85vh, 1200px);
  cursor: zoom-out;
}

html[data-msg-density="comfortable"] {
  --msg-pad-y: 10px;
  --msg-avatar-size: 44px;
}

html[data-msg-density="cozy"] {
  --msg-pad-y: 6px;
  --msg-avatar-size: 40px;
}

html[data-msg-density="compact"] {
  --msg-pad-y: 4px;
  --msg-avatar-size: 32px;
}

.msg-row .msg-avatar {
  width: var(--msg-avatar-size, 40px);
  height: var(--msg-avatar-size, 40px);
  font-size: calc(var(--msg-avatar-size, 40px) * 0.38);
}

.msg-bubble {
  padding-top: var(--msg-pad-y, 8px);
  padding-bottom: var(--msg-pad-y, 8px);
}

html.scord-high-contrast {
  --border-strong: rgba(255, 255, 255, 0.22);
}

html.scord-high-contrast .msg-bubble--other {
  border: 1px solid var(--border-strong);
}

.modal-backdrop:not(.hidden) {
  animation: modal-fade-in 0.2s ease-out;
}

.modal-backdrop:not(.hidden) .modal {
  animation: modal-pop-in 0.22s ease-out;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-pop-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Visibility Utilities */
.hidden {
  display: none !important;
}

.chat-view:not(.hidden),
.voice-view:not(.hidden),
#home-view:not(.hidden) {
  animation: view-fade 0.2s ease-out;
}

@keyframes view-fade {
  from {
    opacity: 0.85;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .chat-input-area {
    backdrop-filter: none;
  }

  .quick-switcher {
    backdrop-filter: none;
  }
}

.voice-empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
}

.voice-empty-state-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.voice-empty-state h4 {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.dm-empty-hint {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

button:focus-visible,
.header-btn:focus-visible,
.input-send-btn:focus-visible,
.rail-icon:focus-visible,
.channel-item:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.messages-welcome {
  margin: auto;
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
}

.messages-welcome-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.messages-welcome h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.messages-welcome p {
  font-size: 14px;
}

/* ══ Modüler renk paletleri (data-scord-palette) ═════════════════ */
html[data-scord-palette="glass"] {
  /* :root zaten cam tonları — ek yok */
}

html[data-scord-palette="aurora"] {
  --bg-void: #050814;
  --bg-deep: #0a1024;
  --bg-base: #0f1733;
  --bg-mid: #141d3d;
  --bg-elevated: #1a2548;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-2: #22d3ee;
  --text-primary: #eef2ff;
  --text-secondary: #c7d2fe;
  --text-muted: #6366f1aa;
}

html[data-scord-palette="ember"] {
  --bg-void: #0c0404;
  --bg-deep: #1a0a0a;
  --bg-base: #241010;
  --bg-mid: #301616;
  --bg-elevated: #3d1c1c;
  --accent: #f97316;
  --accent-light: #fb923c;
  --accent-2: #ef4444;
  --text-primary: #fff5f5;
  --text-secondary: #fecaca;
  --text-muted: #b91c1c88;
}

html[data-scord-palette="paper"] {
  --bg-void: #0f1114;
  --bg-deep: #161a20;
  --bg-base: #1c222b;
  --bg-mid: #232a35;
  --bg-elevated: #2a3340;
  --accent: #0ea5e9;
  --accent-light: #38bdf8;
  --accent-2: #64748b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
}

html[data-scord-palette="forest"] {
  --bg-void: #030806;
  --bg-deep: #07140f;
  --bg-base: #0c1f18;
  --bg-mid: #102820;
  --bg-elevated: #153228;
  --accent: #34d399;
  --accent-light: #6ee7b7;
  --accent-2: #059669;
  --text-primary: #ecfdf5;
  --text-secondary: #a7f3d0;
  --text-muted: #047857aa;
}

html[data-scord-palette="midnight"] {
  --bg-void: #000000;
  --bg-deep: #050508;
  --bg-base: #0a0a0f;
  --bg-mid: #101018;
  --bg-elevated: #16161f;
  --accent: #818cf8;
  --accent-light: #a5b4fc;
  --accent-2: #6366f1;
  --text-primary: #f4f4f5;
  --text-secondary: #d4d4d8;
  --text-muted: #52525b;
}

/* Mesaj balonları — WhatsApp benzeri kendi / diğer */
:root {
  --bg-deep: #0a0a14;
  --bg-base: #11111f;
  --bg-elevated: #1a1a2e;
  --bg-active: #222240;
  --bg-hover: #2a2a48;
  --border: #333355;
  --text-primary: #f0f0ff;
  --text-secondary: #b0b0d0;
  --text-muted: #7c7c9e;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --red: #ef4444;
  --green: #22c55e;
  --yellow: #f59e0b;
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  --gradient-accent: linear-gradient(135deg, #6366f1, #3b82f6);
}

html[data-scord-palette="paper"] {
  --msg-bubble-self: linear-gradient(145deg, #0284c7 0%, #0369a1 100%);
  --msg-bubble-other: rgba(35, 42, 53, 0.95);
  --msg-text-on-other: #e2e8f0;
}

html[data-scord-palette="forest"] {
  --msg-bubble-self: linear-gradient(145deg, #047857 0%, #065f46 100%);
  --msg-bubble-other: rgba(15, 35, 28, 0.95);
}

html[data-scord-palette="midnight"] {
  --msg-bubble-self: linear-gradient(145deg, #4338ca 0%, #312e81 100%);
  --msg-bubble-other: rgba(18, 18, 28, 0.98);
}

.message {
  animation: fadeIn .2s ease both;
}

.message:hover .msg-bubble--other {
  filter: brightness(1.04);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg-row {
  display: flex;
  width: 100%;
  padding: 3px 8px;
  justify-content: flex-start;
}

.msg-row--self {
  justify-content: flex-end;
}

.msg-row-inner {
  display: flex;
  max-width: min(560px, 88%);
  gap: 10px;
  align-items: flex-end;
}

.msg-row--self .msg-row-inner {
  flex-direction: row-reverse;
}

.msg-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.msg-bubble {
  position: relative;
  border-radius: 18px 18px 18px 6px;
  padding: 8px 12px 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid transparent;
}

.msg-row--self .msg-bubble {
  border-radius: 18px 18px 6px 18px;
}

.msg-bubble--self {
  background: var(--msg-bubble-self);
  border-color: rgba(255, 255, 255, 0.12);
}

.msg-bubble--other {
  background: var(--msg-bubble-other);
  border-color: var(--msg-bubble-other-border);
}

.msg-bubble--self .msg-text {
  color: var(--msg-text-on-self);
}

.msg-bubble--self .chat-link,
.msg-bubble--self .rich-link {
  color: #f5e1ff;
}

.msg-bubble--other .msg-text {
  color: var(--msg-text-on-other);
}

.msg-bubble--self .msg-author {
  color: rgba(255, 255, 255, 0.92);
}

.msg-bubble--self .msg-time {
  color: rgba(255, 255, 255, 0.65);
}

.msg-bubble .msg-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.msg-row.grouped {
  padding-top: 1px;
}

.msg-row.grouped .msg-avatar {
  visibility: hidden;
  width: 36px;
  height: 0;
  overflow: hidden;
}

.msg-row.grouped .msg-header {
  display: none;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.msg-author {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
}

.msg-author.is-you {
  color: var(--accent-light);
}

.msg-time {
  font-size: 11px;
  color: var(--text-muted);
}

.msg-text {
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}

.msg-text code {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 5px;
  border-radius: var(--r-sm);
  font-family: monospace;
  font-size: 13px;
}

.message.pinned .msg-bubble {
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.55), 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Klasik satır — balon yok, daha “Discord” ama yine kendi vurgulu */
html[data-scord-chat="classic"] .msg-bubble {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 2px 0 4px;
}

html[data-scord-chat="classic"] .msg-row--self .msg-text {
  color: var(--accent-light);
  font-weight: 500;
}

html[data-scord-chat="classic"] .msg-bubble--other .msg-text {
  color: var(--text-secondary);
}

html[data-scord-chat="classic"] .msg-row {
  padding: 2px 12px;
}

html[data-scord-chat="classic"] .msg-row--self {
  background: rgba(124, 58, 237, 0.06);
  border-radius: var(--r-md);
}

html[data-scord-chat="classic"] .msg-row-inner {
  max-width: 100%;
}

/* System message */
.system-message {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0;
  animation: fadeIn .3s ease both;
}

/* ── Chat Embeds ─────────────────────────────────────────────── */
.chat-link {
  color: var(--accent-light);
  text-decoration: none;
}

.chat-link:hover {
  text-decoration: underline;
}

.chat-embed-img {
  display: block;
  max-width: 400px;
  max-height: 300px;
  border-radius: var(--r-md);
  margin-top: 8px;
  border: 1px solid var(--border-strong);
  cursor: zoom-in;
}

.chat-embed-video {
  margin-top: 8px;
  border-radius: var(--r-md);
  overflow: hidden;
  width: 480px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-strong);
}

.chat-embed-video iframe {
  width: 100%;
  height: 100%;
}

/* ── Pinned Message Styles ───────────────────────────────────── */
.pin-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  opacity: .85;
  pointer-events: none;
}

.pins-modal-item {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
  border-radius: var(--r-md);
  margin-bottom: 8px;
}

/* ── Translation Toggle State ────────────────────────────────── */
.input-translate-btn.active {
  background: var(--accent);
  color: white;
  border-radius: var(--r-md);
}

/* ── Members Panel ──────────────────────────────────────────── */
.members-panel {
  width: var(--members-width);
  background: var(--bg-deep);
  border-left: 1px solid var(--border);
  padding: 12px 8px;
  overflow-y: auto;
  flex-shrink: 0;
  transition: width var(--t-base);
}

.members-panel.collapsed {
  width: 0;
  padding: 0;
  overflow: hidden;
}

.members-panel h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
}

#voice-members-panel {
  display: none !important;
}

#voice-members-panel.collapsed {
  display: none !important;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  animation: fadeIn .2s ease both;
  position: relative;
}

.member-item:hover {
  background: var(--bg-highlight);
}

/* Drag and Drop Styles */
.member-item[draggable="true"] {
  cursor: grab;
}

.member-item[draggable="true"]:active {
  cursor: grabbing;
}

.member-item.dragging {
  opacity: 0.5;
  transform: scale(0.95);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.member-item.drag-over {
  background: rgba(99, 102, 241, 0.2);
  border: 2px dashed var(--accent);
  border-radius: var(--r-md);
}

/* Voice participant card drag styles */
.voice-participant-card[draggable="true"] {
  cursor: grab;
}

.voice-participant-card[draggable="true"]:active {
  cursor: grabbing;
}

.voice-participant-card.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

/* Channel item drop target styles */
.channel-item.drop-target {
  background: rgba(99, 102, 241, 0.25);
  border: 2px dashed var(--accent-light);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Drag handle indicator for admins */
.member-item[draggable="true"]::before {
  content: "⠿";
  color: var(--text-muted);
  font-size: 14px;
  margin-right: 4px;
  opacity: 0;
  transition: opacity var(--t-fast);
}

.member-item[draggable="true"]:hover::before {
  opacity: 0.6;
}

.member-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}

.member-avatar .status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg-deep);
}

.member-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.member-you-tag {
  font-size: 10px;
  color: var(--accent-light);
  background: var(--accent-glow);
  padding: 1px 5px;
  border-radius: var(--r-full);
  margin-left: auto;
}

/* ── Chat Input ──────────────────────────────────────────────── */
.chat-input-area {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  flex-shrink: 0;
  background: rgba(17, 17, 34, 0.4);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

/* ── Typing Indicator ────────────────────────────────────────── */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--r-sm);
  margin: 0 0 8px 0;
}

.typing-indicator.hidden {
  display: none;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.typing-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-light);
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {

  0%,
  60%,
  100% {
    opacity: 0.3;
  }

  30% {
    opacity: 1;
  }
}

/* ── Mention Popup ──────────────────────────────────────────── */
.mention-popup {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

.mention-popup.hidden {
  display: none;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background var(--t-fast);
  border-bottom: 1px solid var(--border);
}

.mention-item:last-child {
  border-bottom: none;
}

.mention-item:hover,
.mention-item.active {
  background: var(--bg-highlight);
}

.mention-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 10px;
  color: white;
  flex-shrink: 0;
}

.mention-name {
  font-size: 13px;
  color: var(--text-primary);
}

.reply-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--r-md);
  background: var(--bg-mid);
  border: 1px solid var(--border-strong);
  font-size: 12px;
}

.reply-preview-bar.hidden {
  display: none;
}

.reply-preview-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.reply-preview-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-light);
  letter-spacing: 0.04em;
}

.reply-preview-author {
  font-weight: 600;
  color: var(--text-primary);
}

.reply-preview-snippet {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-preview-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--r-sm);
  background: var(--bg-highlight);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background var(--t-fast), color var(--t-fast);
}

.reply-preview-close:hover {
  background: var(--red);
  color: #fff;
}

.msg-reply-ref {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 6px;
  padding: 4px 6px 4px 4px;
  border: none;
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast);
}

.msg-reply-ref:hover {
  background: rgba(124, 58, 237, 0.2);
  color: var(--text-primary);
}

.msg-reply-ref--compact {
  margin-bottom: 4px;
  padding: 2px 4px;
  font-size: 11px;
}

.msg-reply-bar {
  width: 3px;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 14px;
  border-radius: 2px;
  background: var(--accent);
}

.msg-reply-meta {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--accent-light);
}

.msg-reply-snippet {
  min-width: 0;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-highlight {
  animation: msg-highlight-pulse 2.2s ease;
}

@keyframes msg-highlight-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.55);
  }

  40% {
    box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.15);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
  }
}

.message.msg-highlight .msg-bubble {
  outline: 2px solid var(--accent-light);
}

.mention {
  padding: 0 3px;
  border-radius: 3px;
  background: rgba(88, 101, 242, 0.25);
  color: #c9cdfb;
  font-weight: 600;
  cursor: pointer;
}

.mention:hover {
  background: rgba(88, 101, 242, 0.45);
  color: #fff;
}

.spoiler {
  padding: 0 4px;
  border-radius: 3px;
  background: var(--bg-void);
  color: transparent;
  user-select: none;
  cursor: pointer;
  transition: color var(--t-base), background var(--t-base);
}

.spoiler.revealed {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.25);
  user-select: text;
}

.channel-item.channel-muted .ch-name {
  opacity: 0.65;
}

.channel-item.channel-muted::after {
  content: "🔕";
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.8;
}

.input-attach-btn,
.input-emoji-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: color var(--t-fast), background var(--t-fast);
}

.input-attach-btn:hover,
.input-emoji-btn:hover {
  color: var(--accent-light);
  background: var(--bg-highlight);
}

.chat-input-wrapper {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  transition: border-color var(--t-base), box-shadow var(--t-base);
  padding: 2px 4px;
}

.chat-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

#chat-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  resize: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.5;
  outline: none;
}

#chat-input::placeholder {
  color: var(--text-muted);
}

.input-right-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.input-send-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--accent);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.input-send-btn:hover {
  background: var(--accent-light);
  transform: scale(1.08);
}

.input-send-btn:active {
  transform: scale(.96);
}

/* ── Voice View ─────────────────────────────────────────────── */
.voice-view {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  transform: translateZ(0);
  contain: layout paint style;
}

.voice-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-strong);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.voice-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: normal;
}

.voice-sync-meta {
  display: none !important;
  margin-left: 8px;
  max-width: min(520px, 42vw);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .voice-sync-meta {
    display: none;
  }
}

.voice-participants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  align-content: stretch;
  justify-content: center;
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.04), transparent 36%), var(--bg-deep);
  transform: translateZ(0);
  contain: layout paint;
}

.voice-participants .voice-empty-state {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: center;
  width: min(560px, 92%);
}

.voice-participants.voice-grid-1 {
  grid-template-columns: minmax(0, 1fr);
}

.voice-participants.voice-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.voice-participants.voice-grid-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.voice-participants.voice-grid-3 .voice-participant-card:first-child {
  grid-row: span 2;
}

.voice-participants.voice-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.voice-participants.voice-grid-5,
.voice-participants.voice-grid-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.voice-participants.voice-grid-7,
.voice-participants.voice-grid-8,
.voice-participants.voice-grid-9,
.voice-participants.voice-grid-many {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  overflow-y: auto;
}

.voice-participants.voice-grid-many {
  grid-auto-rows: minmax(160px, 1fr);
}

.voice-empty {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  grid-column: 1 / -1;
}

.voice-participant-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-elevated) 94%, #000), var(--bg-mid));
  border: 2px solid transparent;
  border-radius: 8px;
  padding: clamp(12px, 1.7vw, 22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  animation: fadeIn .3s ease both;
  isolation: isolate;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  contain: layout paint style;
}

.voice-participant-card.has-video {
  padding: 0;
  background: #050608;
}

.voice-participant-card.speaking {
  border-color: var(--green);
  box-shadow:
    0 0 0 2px rgba(34, 197, 94, 0.75),
    0 0 16px rgba(34, 197, 94, 0.35);
  transform: translateZ(0) scale(1.01);
}

@media (prefers-reduced-motion: no-preference) {
  .voice-participant-card.speaking {
    animation: voice-speaking-pulse 1.4s ease-in-out infinite;
  }
}

@keyframes voice-speaking-pulse {

  0%,
  100% {
    transform: translateZ(0) scale(1.005);
  }

  50% {
    transform: translateZ(0) scale(1.018);
  }
}

.vpc-avatar {
  width: clamp(72px, 12vw, 132px);
  height: clamp(72px, 12vw, 132px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.voice-video {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
}

.speaking .vpc-avatar {
  box-shadow: 0 0 0 4px var(--green);
}

.vpc-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.vpc-role-badge {
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.vpc-icon {
  font-size: 18px;
  color: var(--text-muted);
}

.vpc-icon.muted {
  color: var(--red);
}

.vpc-name-container {
  max-width: min(100%, 520px);
  min-width: 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.voice-participant-card.has-video .vpc-name-container {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: auto !important;
  justify-content: flex-start !important;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.voice-participant-card.has-video .vpc-avatar {
  position: absolute;
  z-index: 1;
  width: 54px;
  height: 54px;
  left: 14px;
  top: 14px;
  font-size: 20px;
  border: 3px solid rgba(255, 255, 255, 0.18);
}

.vpc-thumb {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
  background: #000;
}

.watch-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  width: auto !important;
  margin-top: 0 !important;
  padding: 8px 12px;
  border-radius: 8px;
}

.voice-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 16px 20px 24px;
  flex-shrink: 0;
  border-top: 1px solid var(--border-strong);
  background: rgba(17, 17, 34, 0.35);
}

/* Voice channel chat drawer (Discord-like compact surface) */
.voice-ephemeral-chat {
  margin: 0 14px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-elevated) 92%, #000);
  overflow: hidden;
}

/* Open state: transparent glass so the voice participants stay visible
   behind the chat. Theme-aware (follows --bg-elevated/--bg-mid), with a
   plain transparent fallback where color-mix is unsupported. */
.voice-ephemeral-chat:not(.collapsed) {
  background: transparent;
  background: color-mix(in srgb, var(--bg-elevated) 34%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.voice-ephemeral-chat:not(.collapsed) .voice-chat-head {
  background: transparent;
  border-bottom-color: color-mix(in srgb, var(--border) 55%, transparent);
}

.voice-ephemeral-chat:not(.collapsed) .voice-chat-input {
  background: color-mix(in srgb, var(--bg-mid) 60%, transparent);
}

.voice-ephemeral-chat.hidden {
  display: none !important;
}

.voice-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.voice-chat-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.voice-chat-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--bg-highlight);
  color: var(--text-muted);
  font-weight: 700;
}

.voice-chat-toggle {
  height: 30px;
  min-width: 62px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-highlight);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.voice-chat-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 12px;
}

.voice-ephemeral-chat.collapsed .voice-chat-body {
  display: none;
}

.voice-chat-messages {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-chat-empty {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 12px;
}

.voice-chat-msg {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.voice-chat-msg strong {
  font-size: 12px;
  color: var(--text-primary);
}

.voice-chat-msg span {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.35;
  word-break: break-word;
}

.voice-chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.voice-chat-input {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--bg-mid);
  color: var(--text-primary);
  font-size: 13px;
}

.voice-chat-send {
  height: 34px;
  min-width: 76px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.voice-ctrl-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  border: none;
  border-radius: var(--r-full);
  color: white;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.voice-ctrl-btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.voice-ctrl-btn.danger {
  background: var(--red);
  box-shadow: 0 4px 16px rgba(239, 68, 68, .35);
}

.voice-ctrl-btn.danger:hover {
  background: #ff5555;
}

/* ── Voice Status Bar ───────────────────────────────────────── */
.voice-status-bar {
  position: fixed;
  bottom: 56px;
  left: var(--rail-width);
  width: var(--sidebar-width);
  background: var(--bg-void);
  border-top: 1px solid var(--border);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.vsb-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.vsb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

#vsb-channel-name {
  font-weight: 600;
  color: var(--green);
}

.vsb-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--r-md);
  background: var(--red);
  border: none;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}

.vsb-btn:hover {
  background: #ff5555;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg-mid);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 440px;
  max-width: 95vw;
  animation: slideUp var(--t-base) ease both;
  overflow: hidden;
}

.modal.modal--wide-settings,
.modal.modal--profile,
.modal:has(.scord-settings-shell) {
  width: min(1040px, 95vw);
}

.modal.modal--profile {
  width: min(760px, 95vw);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-highlight);
}

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: min(78vh, 780px);
  overflow: auto;
  min-width: 0;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Modal form elements */
.modal .form-group {
  width: 100%;
}

.modal-info {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.modal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  animation: slideRight .25s ease both;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  border-left: 3px solid var(--green);
}

.toast.error {
  border-left: 3px solid var(--red);
}

.toast.info {
  border-left: 3px solid var(--blue);
}

@keyframes slideRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── Connection indicator ──────────────────────────────────── */
.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: rgba(34, 197, 94, .15);
  color: var(--green);
}

.conn-pill.connecting {
  background: rgba(234, 179, 8, .15);
  color: var(--yellow);
}

.conn-pill.disconnected {
  background: rgba(239, 68, 68, .15);
  color: var(--red);
}

/* ── Emoji Picker ─────────────────────────────────────────── */
/* End of Emoji Popover */

/* ── Responsive tweaks ─────────────────────────────────────── */
@media (max-width: 700px) {
  :root {
    --sidebar-width: 200px;
    --members-width: 180px;
  }
}

@media (max-width: 500px) {
  .app {
    grid-template-columns: 56px 1fr;
  }

  .channel-sidebar {
    display: none;
  }
}

/* ── Direct Messaging Overlay ─────────────────────────────────────── */
.dm-sidebar-search {
  padding: 10px 10px 6px;
}

.dm-sidebar-search input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text-primary);
  background: var(--bg-mid);
  outline: none;
  font: inherit;
}

.dm-sidebar-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.dm-sidebar-empty {
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.dm-main-view {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  background: var(--bg-base);
}

.dm-main-top {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
}

.dm-main-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-mid);
}

.dm-main-search-icon {
  color: var(--text-muted);
  font-size: 16px;
}

.dm-main-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  background: transparent;
  font: inherit;
}

.dm-main-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  min-width: 0;
}

.dm-main-person-chip {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text-secondary);
  background: var(--bg-highlight);
  cursor: pointer;
  font-weight: 650;
}

.dm-main-person-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.dm-main-person-chip span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 10px;
}

.dm-main-chat {
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) auto;
}

.dm-main-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
}

.dm-main-peer {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dm-main-peer-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dm-main-peer-copy strong,
.dm-main-peer-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-main-peer-copy strong {
  color: var(--text-primary);
  font-size: 15px;
}

.dm-main-peer-copy span {
  color: var(--text-muted);
  font-size: 12px;
}

.dm-main-chat .dm-body {
  padding: 18px 22px;
}

.dm-main-chat .dm-input-area {
  padding: 14px 18px 18px;
}

.dm-call-strip {
  margin: 10px 18px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(88, 101, 242, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dm-call-strip.hidden {
  display: none;
}

.dm-call-strip-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dm-call-strip-copy strong {
  font-size: 12px;
  color: var(--text-primary);
}

.dm-call-strip-copy span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(320px, 44vw);
}

.dm-call-strip-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dm-call-strip-btn {
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-highlight);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  padding: 0 10px;
  cursor: pointer;
}

.dm-call-strip-btn.danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.28);
}

.direct-call-sidebar-shortcut {
  margin-top: 8px;
  background: rgba(34, 197, 94, 0.14) !important;
  color: var(--text-primary) !important;
}

.direct-call-sidebar-shortcut .ch-badge {
  background: var(--green);
  color: #052e16;
}

.dm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
  pointer-events: none;
  background: transparent;
}

.dm-overlay:not(.hidden) {
  pointer-events: auto;
}

.dm-sheet {
  width: min(400px, calc(100vw - 32px));
  max-height: min(520px, 70vh);
  background: rgba(13, 13, 26, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: slideUp .28s ease both;
}

.dm-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  flex-shrink: 0;
}

.dm-peer-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dm-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bg-mid);
}

.dm-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dm-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.dm-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: var(--r-md);
}

.dm-close-btn:hover {
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
}

.dm-call-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-left: auto;
  margin-right: 6px;
  color: #d1fae5;
  background: rgba(34, 197, 94, 0.16);
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, color 140ms ease;
}

.dm-call-btn:hover {
  transform: translateY(-1px);
  color: #fff;
  background: rgba(34, 197, 94, 0.34);
}

.dm-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dm-msg-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.dm-msg-row.dm-msg-own {
  flex-direction: row-reverse;
}

.dm-msg-avatar {
  width: 32px !important;
  height: 32px !important;
  margin-top: 0 !important;
}

.dm-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.dm-msg-own .dm-bubble {
  background: rgba(124, 58, 237, 0.25);
  border-color: rgba(124, 58, 237, 0.35);
}

.dm-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.dm-bubble-author {
  font-weight: 600;
  color: var(--accent-light);
}

.dm-bubble-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
  word-break: break-word;
}

.dm-input-area {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  align-items: flex-end;
}

.dm-input-area textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}

.dm-send-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
}

.dm-send-btn:hover {
  background: var(--accent-light);
  transform: scale(1.03);
}

.direct-call-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10020;
  width: min(420px, calc(100vw - 36px));
  min-height: 82px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-elevated) 94%, #000);
  box-shadow: var(--shadow-xl);
  animation: direct-call-in 150ms ease-out;
}

.direct-call-panel .direct-call-video {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.direct-call-panel .direct-call-video video.hidden { display: none; }
.direct-call-panel .direct-call-actions .direct-call-action[data-action="camera"].active {
  background: var(--accent);
  color: #fff;
}

.direct-call-panel--incoming {
  border-color: rgba(34, 197, 94, 0.65);
  animation: direct-call-in 150ms ease-out, direct-call-pulse 1.2s ease-in-out infinite;
}

.direct-call-panel--ringing .direct-call-avatar,
.direct-call-panel--incoming .direct-call-avatar {
  animation: direct-call-avatar-ring 1.1s ease-in-out infinite;
}

@keyframes direct-call-pulse {
  0%, 100% {
    box-shadow: var(--shadow-xl), 0 0 0 0 rgba(34, 197, 94, 0.22);
  }
  50% {
    box-shadow: var(--shadow-xl), 0 0 0 5px rgba(34, 197, 94, 0.1);
  }
}

@keyframes direct-call-avatar-ring {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes direct-call-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.direct-call-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 850;
  background: linear-gradient(135deg, var(--accent), var(--green));
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.direct-call-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.direct-call-copy strong,
.direct-call-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-call-copy strong {
  color: var(--text-primary);
  font-size: 14px;
}

.direct-call-copy span {
  color: var(--text-secondary);
  font-size: 12px;
}

.direct-call-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.direct-call-action {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text-primary);
  background: var(--bg-highlight);
  cursor: pointer;
  font-weight: 750;
}

.direct-call-action.accept {
  background: var(--green);
  color: #052e16;
}

.direct-call-action.danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.direct-call-action:hover {
  filter: brightness(1.12);
}

@media (max-width: 560px) {
  .direct-call-panel {
    left: 10px;
    right: 10px;
    bottom: calc(var(--mobile-nav-height) + 10px);
    width: auto;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .direct-call-avatar {
    width: 44px;
    height: 44px;
  }

  .direct-call-actions {
    grid-column: 1 / -1;
  }

  .direct-call-action {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .dm-main-view {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .dm-main-top {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }

  .dm-main-top-actions {
    padding-bottom: 2px;
  }

  .dm-main-chat-header {
    padding: 0 12px;
  }

  .dm-main-chat .dm-body {
    padding: 14px 12px;
  }

  .dm-main-chat .dm-input-area {
    padding: 10px 12px calc(var(--mobile-nav-height) + 10px);
  }

  .dm-overlay {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
  }

  .dm-sheet {
    width: 100%;
    max-height: 85vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    margin-top: auto;
  }
}

/* ── Hardware GPU Acceleration (60 FPS) ────────────────────────── */
.modal,
.dm-overlay,
.voice-status-bar,
.channel-sidebar,
.server-rail,
.chat-area {
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* ── Themes ───────────────────────────────────────────────────────── */
html.theme-neon {
  --bg-base: #060606;
  --bg-elevated: rgba(10, 10, 15, 0.95);
  --bg-hover: rgba(0, 255, 128, 0.1);
  --bg-active: rgba(0, 255, 128, 0.2);
  --border: #00ff80;
  --border-strong: lime;
  --text-main: #e0ffe0;
  --text-muted: #6b8f72;
  --accent-light: #00ff80;
  --accent-hover: #00e673;
}

html.theme-neon .server-list .server-icon {
  box-shadow: 0 0 10px var(--accent-light);
}

html.theme-neon .btn-primary {
  background: #000;
  color: #00ff80;
  border: 1px solid #00ff80;
  box-shadow: 0 0 8px #00ff80;
}

html.theme-neon * {
  border-radius: 0px !important;
}

html.theme-discord {
  --bg-base: #1e1f22;
  --bg-elevated: #2b2d31;
  --bg-hover: #35373c;
  --bg-active: #404249;
  --border: #1e1f22;
  --border-strong: #111214;
  --text-main: #f2f3f5;
  --text-muted: #b5bac1;
  --accent-light: #5865F2;
  --accent-hover: #4752C4;
}

html.theme-discord .server-rail,
html.theme-discord .channel-sidebar {
  background: #1e1f22;
}

html.theme-discord .channel-sidebar {
  background: #2b2d31;
}

html.theme-discord .chat-area {
  background: #313338;
}

html.theme-discord .form-group input,
html.theme-discord textarea {
  background: #1e1f22;
  border: none;
}

/* ══════════════════════════════════════════════════════════════
   V4 PREMIUM UI COMPONENTS
══════════════════════════════════════════════════════════════ */

/* ── Right-Click Context Menu ─────────────────────────────── */
.ctx-menu {
  position: fixed;
  z-index: 99999;
  min-width: 200px;
  background: rgba(18, 18, 35, 0.98);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  padding: 6px;
  animation: ctx-fade 100ms ease both;
  transform: translateZ(0);
  will-change: transform, opacity;
}

@keyframes ctx-fade {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: background var(--t-fast), color var(--t-fast);
  user-select: none;
}

.ctx-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.ctx-item.danger {
  color: var(--red);
}

.ctx-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.ctx-item .ctx-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.ctx-volume {
  padding: 8px 10px 10px;
  min-width: 220px;
}

.ctx-volume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.ctx-volume input {
  width: 100%;
  accent-color: var(--accent);
}

.ctx-divider {
  height: 1px;
  background: var(--border);
  margin: 5px 6px;
}

.ctx-menu--chat {
  max-height: min(380px, 72vh);
  overflow-y: auto;
}

.members-split-handle {
  width: 6px;
  flex-shrink: 0;
  cursor: col-resize;
  align-self: stretch;
  min-height: 80px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.members-split-handle:hover {
  background: rgba(124, 58, 237, 0.12);
}

@media (max-width: 768px) {
  .members-split-handle {
    display: none;
  }
}

.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.reaction-pill {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--bg-mid);
  cursor: pointer;
  border: 1px solid var(--border);
}

.ctx-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

/* ── Server Header Dropdown ────────────────────────────────── */
.server-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 500;
  background: rgba(13, 13, 26, 0.97);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  margin-top: 6px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  animation: ctx-fade 150ms ease both;
  transform: translateZ(0);
}

.sdm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: background var(--t-fast), color var(--t-fast);
}

.sdm-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sdm-item.danger {
  color: var(--red);
}

.sdm-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

/* ── Member Section Role Headers ──────────────────────────── */
.member-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 12px 4px;
  user-select: none;
}

.member-item {
  position: relative;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-weight: 600;
  margin-left: 4px;
  vertical-align: middle;
}

.role-badge.owner {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.role-badge.admin {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.role-badge.mod {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

/* ── Voice Speaking Animation ─────────────────────────────── */
.speaking-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid var(--green);
  animation: speaking-pulse 1.2s ease infinite;
  pointer-events: none;
}

@keyframes speaking-pulse {

  0%,
  100% {
    opacity: 0.9;
    transform: scale(1.0);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.08);
  }
}

.vpc-avatar {
  position: relative;
}

/* ── Speaking Bars (sidebar inline voice) ─────────────────── */
.voice-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-left: 4px;
}

.voice-bars span {
  width: 3px;
  background: var(--green);
  border-radius: 2px;
  animation: bar-bounce 0.8s ease-in-out infinite;
}

.voice-bars span:nth-child(2) {
  animation-delay: 0.15s;
}

.voice-bars span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bar-bounce {

  0%,
  100% {
    height: 4px;
  }

  50% {
    height: 12px;
  }
}

/* ── Screenshare Overlay (fullscreen viewer) ──────────────── */
.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ctx-fade 150ms ease both;
  cursor: zoom-out;
}

.screen-overlay video {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}

.screen-overlay-label {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-strong);
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Moderation toast styling ────────────────────────────── */
.toast.warn {
  background: rgba(234, 179, 8, 0.15);
  border-left: 3px solid var(--yellow);
}

.toast.ban {
  background: rgba(239, 68, 68, 0.15);
  border-left: 3px solid var(--red);
}

/* ── Settings tabs icon style ────────────────────────────── */
.settings-tab-icon {
  margin-right: 6px;
  font-size: 15px;
}

.settings-tab-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--border);
  min-width: 150px;
}

.settings-tab-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: none;
  background: none;
  color: var(--text-secondary);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13.5px;
  font-family: inherit;
  transition: background var(--t-fast), color var(--t-fast);
  text-align: left;
}

.settings-tab-nav button:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.settings-tab-nav button.active {
  background: var(--bg-active);
  color: var(--accent-light);
  font-weight: 600;
}

.settings-tab-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.settings-two-col {
  display: flex;
  gap: 0;
  min-height: 380px;
}

/* ── Peer ID display ─────────────────────────────────────── */
.peer-id-display {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-deep);
  padding: 8px 12px;
  border-radius: var(--r-md);
  word-break: break-all;
  border: 1px solid var(--border);
}

/* ── Right-click on message ──────────────────────────────── */
.msg-text {
  position: relative;
  user-select: text;
}

/* ── V9: Enhanced Screen Share & Speaking Glow ────────────── */
@keyframes speaking-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.vpc-avatar.speaking {
  animation: none;
  border: 2px solid var(--green) !important;
  transform: translateZ(0) scale(1.03);
}

.live-badge {
  background: var(--red);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  margin-left: 8px;
}

.share-icon {
  font-size: 14px;
  margin-left: 4px;
  opacity: 0.8;
}

.screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  padding: 40px;
  align-items: center;
  justify-content: center;
}

.screen-overlay-video {
  max-width: 100%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 1);
}

.screen-overlay-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: #fff;
  color: #000;
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
}

.screen-overlay-close:hover {
  transform: scale(1.05);
}

/* ── Mobile & Responsive Updates (V17) ───────────────────────── */
.mobile-only-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  margin-right: 8px;
  border-radius: var(--r-md);
}

.mobile-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}

.mobile-mask.active {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 260px;
    --rail-width: 68px;
  }

  .mobile-only-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .server-rail,
  .channel-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 2000;
    transition: transform var(--t-base) cubic-bezier(0.4, 0, 0.2, 1);
  }

  .server-rail {
    left: 0;
    width: var(--rail-width);
    transform: translateX(-100%);
  }

  .channel-sidebar {
    left: var(--rail-width);
    width: var(--sidebar-width);
    transform: translateX(calc(-100% - var(--rail-width)));
    border-right: 1px solid var(--border-strong);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }

  body.nav-open .server-rail,
  body.nav-open .channel-sidebar {
    transform: translateX(0);
  }

  .main-content {
    width: 100vw;
    padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px));
  }

  /* Discord tarzı mobil alt sekme çubuğu */
  .mobile-tabbar { display: grid !important; }

  #voice-members-panel {
    right: 8px;
    left: 8px;
    top: auto;
    bottom: 120px;
    width: auto;
    max-height: 34vh;
    border-radius: var(--r-xl);
  }

  /* Chat Adjustments */
  .chat-header {
    padding: 0 12px;
  }

  .chat-input-area {
    padding: 8px;
  }

  .chat-input-wrapper {
    gap: 4px;
    padding: 4px 8px;
  }

  .messages-area {
    padding: 12px;
  }

  .msg-item {
    padding: 4px 0;
  }

  .msg-avatar {
    width: 36px;
    height: 36px;
  }

  /* Members panel on mobile */
  .members-panel {
    position: fixed;
    right: 0;
    top: 52px;
    bottom: 0;
    width: 100%;
    max-width: 280px;
    background: var(--bg-deep);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform var(--t-base);
  }

  .members-panel.mobile-active {
    transform: translateX(0);
  }

  /* Better Tap Targets */
  .hero-btn,
  .btn-primary,
  .btn-secondary {
    min-height: 48px;
  }

  .user-ctrl-btn {
    width: 40px;
    height: 40px;
  }

  .channel-item {
    padding: 10px 12px;
  }
}

/* ── V16 Specific Elements ────────────────────────────────── */
.hero-join-code {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

.hero-join-code input {
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  color: white;
  padding: 8px 12px;
  border-radius: var(--r-md);
  outline: none;
  width: 160px;
}

.channel-stats {
  font-size: 11px;
  margin-left: 12px;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--border-strong);
  padding: 2px 8px;
  border-radius: 20px;
}

.gif-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 320px;
  height: 400px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  overflow: hidden;
  animation: slideUp 0.2s ease-out;
}

.emoji-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 45px;
  width: 280px;
  max-height: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 16px;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  overflow-y: auto;
  animation: slideUp 0.2s ease-out;
}

.emoji-popover span {
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--r-md);
  transition: background 0.2s, transform 0.1s;
}

.emoji-popover span:hover {
  background: var(--bg-highlight);
  transform: scale(1.15);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gif-popover input {
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-bottom: 1px solid var(--border);
  color: white;
  outline: none;
  font-size: 14px;
}

.gif-results {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
}

.gif-results img {
  width: 100%;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform 0.2s;
  background: var(--bg-deep);
}

.gif-results img:hover {
  transform: scale(1.05);
}

.local-preview {
  position: fixed;
  bottom: 90px;
  right: 260px;
  width: 220px;
  height: 140px;
  background: #000;
  border-radius: var(--r-lg);
  border: 2px solid var(--accent-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 999;
}

.local-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.local-preview .preview-label {
  position: absolute;
  bottom: 0px;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  padding: 4px;
  text-align: center;
  backdrop-filter: blur(4px);
}

.crown-icon {
  color: #fbbf24;
  margin-left: 6px;
  font-size: 1.1em;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

/* Theme Variants */
html[data-theme='emerald'] {
  --accent-light: #10b981;
  --accent-hover: #059669;
  --accent: #10b981;
}

html[data-theme='ruby'] {
  --accent-light: #ef4444;
  --accent-hover: #dc2626;
  --accent: #ef4444;
}

html[data-theme='gold'] {
  --accent-light: #f59e0b;
  --accent-hover: #d97706;
  --accent: #f59e0b;
}

/* Unified Voice Overflow Fix applied above */
/*  Voice Controls Bar  */
.voice-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.voice-ctrl-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-lg);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  color: #fff;
  background: var(--accent);
}

.voice-ctrl-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.voice-ctrl-btn.danger {
  background: #dc2626;
}

.voice-ctrl-btn.active {
  background: var(--green);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/*  Chat Input Action Buttons  */
.input-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  transition: color var(--t-fast), background var(--t-fast);
  line-height: 1;
  flex-shrink: 0;
}

.input-action-btn:hover {
  color: var(--text-primary);
  background: var(--bg-highlight);
}

.input-send-btn {
  background: var(--accent);
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  transition: background var(--t-fast), transform var(--t-fast);
  flex-shrink: 0;
}

.input-send-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/*  GIF Popover  */
.gif-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 360px;
  max-height: 300px;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 500;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gif-popover input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-deep);
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  box-sizing: border-box;
}

.gif-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
}

.gif-results img {
  width: 100%;
  border-radius: var(--r-sm);
  cursor: pointer;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform var(--t-fast);
}

.gif-results img:hover {
  transform: scale(1.05);
}

/*  Emoji Popover  */
.emoji-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50px;
  width: 320px;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 500;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.emoji-popover span {
  font-size: 22px;
  cursor: pointer;
  text-align: center;
  padding: 4px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast), transform var(--t-fast);
  line-height: 1.4;
}

.emoji-popover span:hover {
  background: var(--bg-highlight);
  transform: scale(1.2);
}

/* ══════════════════════════════════════════════════════════════
   IMPROVED MOBILE CHANNEL LIST
══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Full-screen channel drawer */
  .channel-sidebar {
    width: 85vw;
    max-width: 320px;
  }

  /* Better channel item tap targets */
  .channel-item {
    padding: 12px 16px;
    min-height: 44px;
  }

  /* Channel category headers */
  .channel-category {
    padding: 12px 16px 8px;
    min-height: 40px;
  }

  /* Room cards on mobile */
  .room-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .room-card {
    padding: 14px;
  }

  .room-card-icon {
    width: 40px;
    height: 40px;
  }

  /* Hero section mobile */
  .home-hero {
    padding: 20px 16px;
  }

  .home-hero h2 {
    font-size: 22px;
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  /* Voice view mobile */
  .voice-participants {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: minmax(170px, 1fr);
    overflow-y: auto;
    gap: 8px;
    padding: 12px;
  }

  .voice-participants.voice-grid-2,
  .voice-participants.voice-grid-3,
  .voice-participants.voice-grid-4,
  .voice-participants.voice-grid-5,
  .voice-participants.voice-grid-6,
  .voice-participants.voice-grid-7,
  .voice-participants.voice-grid-8,
  .voice-participants.voice-grid-9,
  .voice-participants.voice-grid-many {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(150px, 1fr);
  }

  .voice-participants.voice-grid-3 .voice-participant-card:first-child {
    grid-row: auto;
    grid-column: 1 / -1;
  }

  .voice-participant-card {
    min-height: 100px;
    padding: 10px;
  }

  .vpc-avatar {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .voice-controls {
    gap: 8px;
    padding: 12px 16px;
  }

  .voice-ctrl-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  /* Message input mobile */
  .chat-input-area {
    padding: 8px 12px;
  }

  .chat-input-wrapper {
    min-height: 44px;
  }

  #chat-input {
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  /* Messages mobile */
  .messages-area {
    padding: 12px 8px 0;
  }

  .msg-row {
    padding: 2px 4px;
  }

  .msg-row-inner {
    max-width: min(480px, 92%);
  }

  .msg-bubble {
    padding: 8px 10px;
  }

  .msg-avatar {
    width: 32px;
    height: 32px;
  }

  /* Compact mode default on mobile */
  html[data-msg-density="cozy"] {
    --msg-pad-y: 4px;
    --msg-avatar-size: 32px;
  }
}

/* ══════════════════════════════════════════════════════════════
   COMPACT MODE STYLES
══════════════════════════════════════════════════════════════ */
html[data-compact="true"] {
  --rail-width: 56px;
  --sidebar-width: 200px;
  --members-width: 180px;
}

html[data-compact="true"] .rail-icon {
  width: 40px;
  height: 40px;
}

html[data-compact="true"] .channel-item {
  padding: 4px 8px;
  font-size: 13px;
}

html[data-compact="true"] .member-item {
  padding: 4px 6px;
}

html[data-compact="true"] .member-avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

html[data-compact="true"] .msg-avatar {
  width: 32px !important;
  height: 32px !important;
}

html[data-compact="true"] .msg-bubble {
  padding: 4px 8px 6px;
}

html[data-compact="true"] .msg-text {
  font-size: 13px;
  line-height: 1.4;
}

html[data-compact="true"] .msg-time {
  font-size: 10px;
}

/* ══════════════════════════════════════════════════════════════
   MODERN GRADIENT BACKGROUNDS
══════════════════════════════════════════════════════════════ */
.app::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Server rail gradient accent */
.server-rail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

/* Channel sidebar subtle gradient */
.channel-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   ENHANCED BUTTON STYLES
══════════════════════════════════════════════════════════════ */
.btn-primary {
  background: var(--accent-gradient);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

/* ══════════════════════════════════════════════════════════════
   GLASSMORPHISM CARDS
══════════════════════════════════════════════════════════════ */
.room-card {
  background: linear-gradient(135deg, rgba(26, 36, 66, 0.8), rgba(21, 29, 53, 0.9));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.room-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

/* ══════════════════════════════════════════════════════════════
   TYPING INDICATOR
══════════════════════════════════════════════════════════════ */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.typing-dots {
  display: flex;
  gap: 3px;
  margin-left: 6px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-6px);
  }
}

/* ══════════════════════════════════════════════════════════════
   UNREAD BADGE
══════════════════════════════════════════════════════════════ */
.unread-badge {
  min-width: 20px;
  height: 20px;
  background: var(--red);
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  margin-left: auto;
}

.unread-badge.mention {
  background: var(--accent);
}

/* ══════════════════════════════════════════════════════════════
   MESSAGE ACTIONS (EDIT/DELETE)
══════════════════════════════════════════════════════════════ */
.msg-actions {
  position: absolute;
  top: -28px;
  right: 8px;
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-fast), visibility var(--t-fast);
}

.message:hover .msg-actions {
  opacity: 1;
  visibility: visible;
}

.msg-action-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background var(--t-fast), color var(--t-fast);
}

.msg-action-btn:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.msg-action-btn.delete:hover {
  color: var(--red);
}

/* ══════════════════════════════════════════════════════════════
   MESSAGE EDIT MODE
══════════════════════════════════════════════════════════════ */
.msg-edit-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  resize: none;
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.msg-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

.msg-edit-actions button {
  padding: 6px 16px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.msg-edit-actions .save-btn {
  background: var(--accent);
  color: white;
  border: none;
}

.msg-edit-actions .cancel-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════════
   THREAD VIEW
══════════════════════════════════════════════════════════════ */
.thread-preview {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--r-md);
  border-left: 2px solid var(--accent);
}

.thread-preview-text {
  font-size: 12px;
  color: var(--text-muted);
}

.thread-reply-count {
  font-size: 11px;
  color: var(--accent-light);
  margin-top: 4px;
  cursor: pointer;
}

.thread-reply-count:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════
   DRAG AND DROP UPLOAD ZONE
══════════════════════════════════════════════════════════════ */
.upload-drop-zone {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 16, 0.9);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}

.upload-drop-zone.active {
  opacity: 1;
  visibility: visible;
}

.upload-drop-zone-inner {
  padding: 48px;
  border: 2px dashed var(--accent);
  border-radius: var(--r-2xl);
  text-align: center;
  color: var(--accent-light);
}

.upload-drop-zone-inner svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
}

.upload-drop-zone-inner p {
  font-size: 18px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   LOADING SKELETON
══════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-mid) 25%, var(--bg-highlight) 50%, var(--bg-mid) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-md);
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR VOICE MEMBER — DISCORD-LIKE (FEAT-1/BUG-4)
══════════════════════════════════════════════════════════════ */
.voice-member {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 28px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
  min-width: 0;
}

.voice-member:hover {
  background: var(--bg-highlight);
}

.voice-member .vm-avatar {
  width: 18px;
  height: 18px;
  font-size: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: box-shadow 0.2s ease;
}

/* Speaking: green ring on avatar */
.voice-member .vm-avatar.speaking {
  box-shadow: 0 0 0 2px #22c55e, 0 0 6px rgba(34, 197, 94, 0.5);
}

/* Speaking row highlight */
.voice-member.voice-member--speaking>span,
.voice-member.voice-member--speaking>div>span:first-child {
  color: #22c55e;
}

/* vpc-thumb: non-interactive thumbnail in voice participant card */
.vpc-thumb {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  margin-top: 0;
  border-radius: 0;
  pointer-events: none;
  display: block;
  background: #000;
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   MUSIC BOT PANEL
══════════════════════════════════════════════════════════════ */
.music-bot-panel {
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--r-md);
  padding: 16px;
  margin: 0 20px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mbot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mbot-icon {
  font-size: 18px;
}

.mbot-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  flex: 1;
}

.mbot-yt-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

.mbot-yt-link:hover {
  text-decoration: underline;
}

.mbot-now-playing {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
  border-radius: var(--r-sm);
}

.mbot-thumb {
  width: 90px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  background: #000;
}

.mbot-now-info {
  flex: 1;
  min-width: 0;
}

.mbot-now-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.mbot-now-id {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mbot-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mbot-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
}

.mbot-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mbot-btn--danger:hover {
  background: #ef4444;
}

.mbot-vol-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
}

.mbot-vol-slider {
  width: 80px;
  accent-color: var(--primary);
  height: 4px;
}

.mbot-idle {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mbot-search-row {
  display: flex;
  gap: 8px;
}

.mbot-search-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.mbot-search-input:focus {
  border-color: var(--primary);
}

.mbot-btn--play {
  flex-shrink: 0;
  width: auto;
  padding: 0 16px;
  border-radius: var(--r-sm);
  background: var(--primary);
  font-weight: 500;
  font-size: 13px;
}

.mbot-btn--play:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   V21 professional voice, music and settings surfaces
   ========================================================================== */
.voice-header {
  gap: 10px;
  flex-wrap: wrap;
}

.voice-top-control-bar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  border-radius: 8px;
}

.voice-icon-btn {
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--bg-highlight);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.voice-icon-btn:hover {
  transform: translateY(-1px);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.voice-icon-btn.active {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.voice-icon-btn.danger {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.music-bot-panel--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 20px 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  border: 1px solid var(--border);
}

.mbot-compact-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mbot-compact-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mbot-compact-copy strong {
  font-size: 13px;
  color: var(--text-primary);
}

.mbot-compact-copy span {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(560px, 52vw);
}

.mbot-compact-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.music-bot-panel--compact .mbot-btn {
  width: auto;
  min-width: 46px;
  border-radius: 8px;
  padding: 0 12px;
}

.scord-settings-shell {
  width: 100%;
  min-height: min(620px, 72vh);
  max-height: min(620px, 72vh);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  margin: -8px;
}

.scord-settings-nav,
.scord-server-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--bg-mid);
  border-right: 1px solid var(--border);
}

.scord-settings-nav button,
.scord-server-settings-nav button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  text-align: left;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  font-weight: 650;
}

.scord-settings-nav button:hover,
.scord-server-settings-nav button:hover,
.scord-settings-nav button.active,
.scord-server-settings-nav button.active {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.scord-settings-nav button.danger,
.scord-server-settings-nav button.danger {
  color: #fecaca;
  margin-top: auto;
}

.scord-settings-content {
  overflow: auto;
  padding: 24px;
  min-width: 0;
}

.scord-settings-page {
  display: grid;
  gap: 16px;
}

.scord-settings-page h3,
.scord-server-settings-main h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--text-primary);
}

.scord-settings-page label,
.scord-server-settings-main label {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.scord-settings-page input,
.scord-settings-page select,
.scord-settings-page textarea,
.profile-pro-card input,
.profile-pro-card select,
.profile-pro-card textarea {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.scord-check {
  display: flex !important;
  grid-template-columns: none;
  flex-direction: row;
  align-items: center;
}

.scord-server-settings {
  position: fixed;
  inset: 18px;
  z-index: 120;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-xl);
}

.scord-server-settings-nav strong {
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 16px;
}

.scord-server-settings-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: auto;
  padding: 26px;
}

.srv-page {
  display: grid;
  align-content: start;
  gap: 16px;
}

.srv-danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 8px;
  padding: 16px;
  background: rgba(127, 29, 29, 0.16);
}

.srv-danger-zone h3 {
  margin: 0 0 8px;
  color: #fecaca;
  font-size: 16px;
}

.srv-danger-zone p {
  margin: 0 0 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.scord-role-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 46px 90px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-mid);
}

.scord-server-settings footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
  .voice-top-control-bar {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .voice-icon-btn {
    flex: 1;
    min-width: 0;
    padding: 0 6px;
  }

  .music-bot-panel--compact {
    flex-direction: column;
    align-items: stretch;
  }

  .mbot-compact-copy span {
    max-width: 100%;
  }

  .mbot-compact-actions {
    justify-content: space-between;
  }

  .scord-settings-shell,
  .scord-server-settings {
    grid-template-columns: 1fr;
  }

  .scord-settings-nav,
  .scord-server-settings-nav {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .scord-server-settings {
    inset: 8px;
  }

  .scord-role-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   V22 community templates and rich user menus
   ========================================================================== */
.channel-category--grouped {
  margin-top: 14px;
  letter-spacing: 0.03em;
}

.channel-category--grouped .add-ch-btn {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text-muted);
  transition: background 140ms ease, color 140ms ease;
}

.channel-category--grouped .add-ch-btn:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.channel-item.channel-live {
  background: rgba(34, 197, 94, 0.08);
}

.channel-item.channel-live .ch-name::after {
  content: " LIVE";
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  font-size: 9px;
  font-weight: 800;
}

.voice-member-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.voice-member-name-row > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-mini-live {
  flex-shrink: 0;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  font-size: 9px;
  font-weight: 800;
}

.voice-mini-mute {
  padding: 0;
  background: transparent;
  font-size: 11px;
  opacity: 0.85;
}

.rich-user-menu {
  position: fixed;
  z-index: 240;
  width: 260px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-xl);
  animation: rich-menu-in 120ms ease-out;
}

@keyframes rich-menu-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rich-user-menu-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 6px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.rich-user-menu-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #5865f2, #111827);
  color: white;
  font-weight: 800;
}

.rich-user-menu-head strong,
.rich-user-menu-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rich-user-menu-head span {
  color: var(--text-muted);
  font-size: 12px;
}

.rich-user-menu button {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  text-align: left;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  font-weight: 650;
}

.rich-user-menu button:hover {
  background: var(--bg-highlight);
  color: var(--text-primary);
}

.rich-user-menu button.danger {
  color: #fecaca;
}

.rich-user-menu button.danger:hover {
  background: rgba(239, 68, 68, 0.16);
}

.profile-pro-card {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-mid);
}

.profile-pro-banner {
  height: 118px;
}

.profile-pro-main {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-areas:
    "avatar title"
    "avatar status";
  gap: 8px 16px;
  padding: 0 20px 18px;
  transform: translateY(-34px);
  margin-bottom: -34px;
}

.profile-pro-avatar {
  grid-area: avatar;
  width: 92px;
  height: 92px;
  border: 6px solid var(--bg-mid);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  color: white;
  font-size: 30px;
  font-weight: 900;
}

.profile-pro-title {
  grid-area: title;
  align-self: end;
  min-width: 0;
}

.profile-pro-title h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.profile-pro-title span,
.profile-pro-status {
  color: var(--text-muted);
  font-size: 13px;
}

.profile-pro-status {
  grid-area: status;
}

.profile-pro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  padding: 0 20px 18px;
}

.profile-pro-grid section {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
}

.profile-pro-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-size: 12px;
  text-transform: uppercase;
}

.profile-pro-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-pro-note {
  display: grid;
  gap: 8px;
  padding: 0 20px 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-pro-note textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  text-transform: none;
}

.danger-soft {
  color: #fecaca !important;
  border-color: rgba(239, 68, 68, 0.32) !important;
}

@media (max-width: 680px) {
  .profile-pro-card {
    width: 100%;
  }

  .profile-pro-main {
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 0 14px 16px;
  }

  .profile-pro-avatar {
    width: 74px;
    height: 74px;
    font-size: 22px;
  }

  .profile-pro-grid {
    grid-template-columns: 1fr;
    padding: 0 14px 16px;
  }

  .profile-pro-note {
    padding: 0 14px 16px;
  }
}

/* ═══════════════════════════════════════════════════
   SCORD UI ANIMATIONS & GLASSMORPHISM — Premium Look
   ═══════════════════════════════════════════════════ */

/* ── Glassmorphism Base ──────────────────────────── */
.glass,
#modal-backdrop:not(.hidden) .modal,
.setup-card,
.ctx-menu,
.dm-overlay,
.toast {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  background: rgba(20, 20, 30, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ── Sidebar Glass ───────────────────────────────── */
.channel-sidebar,
.server-rail {
  background: rgba(12, 12, 20, 0.85) !important;
  backdrop-filter: blur(8px) !important;
}

/* ── Global Transitions ──────────────────────────── */
* {
  transition-property: background-color, border-color, color, opacity, transform, box-shadow;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

button, .btn, .rail-icon, .channel-item, .member-item, .vpc-card, .msg-row {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Server Rail Hover Effects ───────────────────── */
.rail-icon {
  transition: border-radius 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
  border-radius: 50% !important;
}
.rail-icon:hover {
  border-radius: 16px !important;
  transform: scale(1.1) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3) !important;
}
.rail-icon.active {
  border-radius: 16px !important;
  box-shadow: 0 0 0 2px var(--accent), 0 4px 16px rgba(99, 102, 241, 0.4) !important;
}


/* ── Mobil alt sekme çubuğu (sadece <=768px'te görünür) ── */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1500;
  grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--bg-darkest, #0b0714) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.mobile-tabbar button {
  display: grid;
  justify-items: center;
  gap: 2px;
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 10.5px;
  padding: 4px 0;
  cursor: pointer;
}
.mobile-tabbar button span { font-size: 19px; line-height: 1; }
.mobile-tabbar button:active { color: var(--text-primary); }

/* ── Rol Editörü (yeniden inşa) ──────────────────── */
.role-editor-list { display: grid; gap: 12px; }
.role-editor-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 10px;
}
.role-editor-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role-editor-head .role-name-edit { flex: 1; min-width: 120px; }
.role-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.role-hoist-check {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-secondary); cursor: pointer; white-space: nowrap;
}
.role-member-count { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.role-section-title { margin: 18px 0 6px; font-size: 14px; color: var(--text-primary); }
.role-member-list, .hidden-ch-list { display: grid; gap: 6px; }
.role-member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}
.role-member-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background-size: cover; background-position: center; flex-shrink: 0;
}
.role-member-name { flex: 1; font-size: 13.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-owner-tag { font-size: 11px; color: var(--text-muted); font-style: normal; }
.member-role-select {
  background: var(--bg-mid); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-size: 12.5px;
}
.hidden-ch-row {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; background: rgba(0, 0, 0, 0.14);
  display: grid; gap: 8px;
}
.hidden-ch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hidden-ch-roles { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hidden-ch-roles--off { opacity: 0.4; pointer-events: none; }

/* ── Channel Item Hover (8259fc1 tasarımı) ───────── */
.channel-item {
  padding: 8px 12px !important;
  border-radius: 8px !important;
  margin: 2px 0 !important;
}
.channel-item:hover {
  background: var(--bg-highlight) !important;
  transform: translateX(3px) !important;
}
.channel-item.active {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ── Message Animations ──────────────────────────── */
@keyframes msgSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-row {
  animation: msgSlideIn 0.2s ease-out;
  border-radius: 8px;
  padding: 4px 8px !important;
}
.msg-row:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* ── Modal Animations ────────────────────────────── */
@keyframes modalZoomIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
#modal-backdrop:not(.hidden) .modal {
  animation: modalZoomIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#modal-backdrop:not(.hidden) {
  animation: modalFadeIn 0.2s ease;
  backdrop-filter: blur(8px) !important;
  background: rgba(0, 0, 0, 0.6) !important;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Toast Animations ────────────────────────────── */
@keyframes toastSlideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast {
  animation: toastSlideInRight 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  border-radius: 10px !important;
  padding: 12px 20px !important;
  font-weight: 500 !important;
}

/* ── Context Menu ────────────────────────────────── */
@keyframes ctxFadeScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.ctx-menu {
  animation: ctxFadeScale 0.15s ease-out;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  padding: 6px !important;
}
.ctx-item {
  border-radius: 6px !important;
  margin: 2px 4px !important;
}
.ctx-item:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ── Voice Speaking Ring ─────────────────────────── */
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(88, 166, 255, 0); }
}
.voice-user.speaking .voice-user-avatar {
  animation: voicePulse 1.5s ease-in-out infinite;
}

/* ── Typing Indicator ────────────────────────────── */
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}
.typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ── Loading Spinner ─────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Badge Pulse ─────────────────────────────────── */
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.unread-badge, .notification-dot, .mention-badge {
  animation: badgePulse 2s ease-in-out infinite;
}

/* ── Stream Fullscreen Button ────────────────────── */
.stream-fullscreen-btn {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  background: rgba(0, 0, 0, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  opacity: 0.8 !important;
  transition: all 0.2s ease !important;
  z-index: 100 !important;
  backdrop-filter: blur(8px) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
  line-height: 1 !important;
}
.stream-fullscreen-btn::before {
  content: "⛶";
  font-size: 16px;
}
.video-container:hover .stream-fullscreen-btn,
.voice-video-item:hover .stream-fullscreen-btn,
.vpc-card:hover .stream-fullscreen-btn,
.stream-fullscreen-btn:hover {
  opacity: 1 !important;
  transform: scale(1.05) !important;
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4) !important;
}

/* ── Setup Overlay Premium ───────────────────────── */
#setup-overlay {
  background: linear-gradient(135deg, rgba(10, 10, 28, 0.92), rgba(20, 15, 40, 0.92)) !important;
  backdrop-filter: blur(16px) !important;
}
.setup-card {
  background: rgba(25, 25, 40, 0.7) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  animation: modalZoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
#enter-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 12px 24px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4) !important;
  transition: all 0.25s ease !important;
}
#enter-btn:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.6) !important;
}


/* ── Smooth Scrolling ────────────────────────────── */
.messages-area, .channel-list, .members-list, .dm-body {
  scroll-behavior: smooth;
}

/* ── Performance: content-visibility for long lists ── */
.messages-area, .channel-list, .members-list, .dm-body, #voice-members-list {
  content-visibility: auto;
  contain-intrinsic-size: 500px;
}

/* ── Performance: GPU rendering ──────────────────── */
.server-rail, .channel-sidebar, .chat-view, .voice-view {
  transform: translateZ(0);
  will-change: transform;
}

/* ── Reduced Motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Performance: lightweight backdrop-filter (GPU friendly) ── */
#modal-backdrop:not(.hidden) {
  backdrop-filter: blur(4px) !important; /* 8px → 4px: yarı yarıya */
  -webkit-backdrop-filter: blur(4px) !important;
}
.ctx-menu, .toast {
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

/* ── Performance: heavy shadows azalt ─────────────── */
.modal-card, .modal-content {
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important; /* daha hafif */
}
.ctx-menu {
  box-shadow: 0 4px 16px rgba(0,0,0,0.35) !important;
}

/* ── Virtual Scroll için CSS container ────────────── */
.members-list, #members-list, #voice-members-list {
  overflow-y: auto !important;
  contain: strict !important;
  height: 100% !important;
}
.member-item {
  contain: layout style !important;
}
#voice-participants {
  overflow-y: auto !important;
  contain: strict !important;
}

/* ── GPU Composition Layer ────────────────────────── */
.server-rail, .channel-sidebar, .chat-header, .user-bar {
  transform: translateZ(0);
  will-change: transform;
}

/* ── Message list render optimization ─────────────── */
.msg-row {
  contain: layout style !important;
}
.messages-area {
  contain: strict !important;
}

/* ── Debounce heavy paint operations ──────────────── */
* {
  -webkit-tap-highlight-color: transparent;
}
input, textarea, select, button {
  -webkit-appearance: none;
  appearance: none;
}

/* ═══════════════════════════════════════════════════════════════
   SCORD-UPGRADE v2.0 CSS FIXES
   ═══════════════════════════════════════════════════════════════ */

/* ── Screen overlay (concise single declaration) ── */
.screen-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.95) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: zoom-out !important;
  animation: scordFadeIn 0.2s ease !important;
}

.screen-overlay-video {
  max-width: 95vw !important;
  max-height: 90vh !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8) !important;
  object-fit: contain !important;
  cursor: default !important;
}

.screen-overlay-close {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  padding: 10px 24px !important;
  border: none !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  z-index: 20 !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4) !important;
  transition: all 0.2s ease !important;
}

.screen-overlay-close:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6) !important;
}

.screen-overlay-label {
  position: absolute !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  padding: 8px 24px !important;
  border-radius: 10px !important;
  background: rgba(0, 0, 0, 0.75) !important;
  color: #fff !important;
  font-size: 14px !important;
  backdrop-filter: blur(8px) !important;
  z-index: 10 !important;
  white-space: nowrap !important;
  border: none !important;
}

/* ── Fullscreen button in screen overlay ── */
.scord-fs-btn,
.screen-full-btn,
.voice-scord-fs-btn {
  position: absolute !important;
  top: 20px !important;
  right: 80px !important;
  padding: 10px 22px !important;
  border: none !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(40, 40, 70, 0.95)) !important;
  border: 1px solid rgba(99, 102, 241, 0.5) !important;
  color: #fff !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  z-index: 20 !important;
  backdrop-filter: blur(12px) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.scord-fs-btn:hover,
.screen-full-btn:hover,
.voice-scord-fs-btn:hover {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border-color: transparent !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5) !important;
}

/* ── Voice participant card volume slider ── */
.vpc-volume-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 8px !important;
  margin-top: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.vpc-vol-slider {
  flex: 1 !important;
  height: 4px !important;
  accent-color: #6366f1 !important;
  cursor: pointer !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 2px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  outline: none !important;
  min-width: 40px !important;
}

.vpc-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  background: #6366f1 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4) !important;
  border: none !important;
}

.vpc-vol-slider::-moz-range-thumb {
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  background: #6366f1 !important;
  cursor: pointer !important;
  border: none !important;
}

/* ── Watch/İzle button ── */
.watch-btn-scord {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border: none !important;
  color: #fff !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin-top: 8px !important;
  z-index: 3 !important;
}

.watch-btn-scord:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
}

/* ── Common animations ── */
@keyframes scordFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Fix duplicate screen-overlay declarations ── */
.screen-overlay {
  padding: 0 !important;
  flex-direction: column !important;
}

/* ── Screen Full Button Design ── */
#screen-full-btn,
.screen-full-btn,
.screen-overlay-tool {
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(40, 40, 70, 0.95)) !important;
  border: 1px solid rgba(99, 102, 241, 0.5) !important;
  color: #fff !important;
  padding: 10px 20px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 25px rgba(99, 102, 241, 0.2) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 100 !important;
  position: relative !important;
}

#screen-full-btn::before,
.screen-full-btn::before,
.screen-overlay-tool::before {
  content: "⛶" !important;
  font-size: 16px !important;
}

#screen-full-btn:hover,
.screen-full-btn:hover,
.screen-overlay-tool:hover {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border-color: transparent !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5), 0 0 35px rgba(99, 102, 241, 0.3) !important;
}

/* ── Voice Mute Indicator (Discord style) ── */
.vpc-mute-icon {
  display: inline-flex !important;
  align-items: center !important;
  margin-left: 6px !important;
  font-size: 12px !important;
  filter: grayscale(0.3);
}
.vpc-name-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}



/* ═══════════════════════════════════════════════════════════════════════════
   SCORD 2026 — görsel kimlik katmanı
   Amaç: "Discord klonu" hissini kırmak. Kendi renk imzamız (menekşe → camgöbeği
   duotone), display tipografi (Space Grotesk), aurora arkaplan, cam doku,
   tanecik (grain) ve mikro-etkileşimler. Katman en sonda: cascade'i kazanır.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --sc-a: #a78bfa;            /* menekşe */
  --sc-b: #22d3ee;            /* camgöbeği */
  --sc-ink: #0b0714;          /* en koyu zemin */
  --sc-grad: linear-gradient(135deg, var(--sc-a), var(--sc-b));
  --sc-glow-a: rgba(167, 139, 250, 0.35);
  --sc-glow-b: rgba(34, 211, 238, 0.25);
  --sc-display: "Space Grotesk", "Inter", sans-serif;
}

/* ── Login / hero ekranı ──────────────────────────────────────────────────── */

#setup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 15% 0%, #17102b 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 100%, #062a33 0%, transparent 55%),
    var(--sc-ink);
  z-index: 1000;
}

/* Tanecik dokusu — düz degrade yüzeylerin "ucuz" görünmesini engeller */
#setup-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.aurora-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: blur(90px) saturate(1.3);
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  will-change: transform;
}

.aurora-blob--1 {
  width: 46vw; height: 46vw;
  left: -12vw; top: -14vh;
  background: radial-gradient(circle at 30% 30%, #7c3aed, transparent 65%);
  animation: sc-drift-1 26s ease-in-out infinite alternate;
}

.aurora-blob--2 {
  width: 38vw; height: 38vw;
  right: -10vw; bottom: -16vh;
  background: radial-gradient(circle at 70% 60%, #0891b2, transparent 65%);
  animation: sc-drift-2 32s ease-in-out infinite alternate;
}

.aurora-blob--3 {
  width: 26vw; height: 26vw;
  left: 42vw; top: 46vh;
  background: radial-gradient(circle at 50% 50%, #db2777, transparent 60%);
  opacity: 0.22;
  animation: sc-drift-3 40s ease-in-out infinite alternate;
}

@keyframes sc-drift-1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(9vw, 12vh) scale(1.15); } }
@keyframes sc-drift-2 { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-8vw, -10vh) scale(0.95); } }
@keyframes sc-drift-3 { from { transform: translate(0, 0); } to { transform: translate(-14vw, -8vh); } }

.setup-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  width: min(1080px, 92vw);
  animation: sc-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sc-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.setup-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(20px, 4vh, 40px);
}

.setup-hero-wordmark {
  font-family: var(--sc-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.22em;
  color: #f5f3ff;
}

.setup-hero-title {
  font-family: var(--sc-display);
  font-size: clamp(38px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin: 0 0 18px;
}

.setup-hero-title em {
  font-style: normal;
  background: var(--sc-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.setup-hero-sub {
  max-width: 46ch;
  color: rgba(226, 232, 240, 0.72);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 26px;
}

/* Ses dalgası — platformun "sesli" kimliğini tek bakışta anlatır */
.setup-hero-wave {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  margin-bottom: 26px;
}

.setup-hero-wave span {
  width: 4px;
  border-radius: 4px;
  background: var(--sc-grad);
  height: 100%;
  transform-origin: center;
  animation: sc-wave 1.5s ease-in-out infinite;
}

.setup-hero-wave span:nth-child(1) { animation-delay: 0.00s; }
.setup-hero-wave span:nth-child(2) { animation-delay: 0.10s; }
.setup-hero-wave span:nth-child(3) { animation-delay: 0.20s; }
.setup-hero-wave span:nth-child(4) { animation-delay: 0.30s; }
.setup-hero-wave span:nth-child(5) { animation-delay: 0.40s; }
.setup-hero-wave span:nth-child(6) { animation-delay: 0.50s; }
.setup-hero-wave span:nth-child(7) { animation-delay: 0.60s; }
.setup-hero-wave span:nth-child(8) { animation-delay: 0.70s; }
.setup-hero-wave span:nth-child(9) { animation-delay: 0.80s; }
.setup-hero-wave span:nth-child(10) { animation-delay: 0.90s; }
.setup-hero-wave span:nth-child(11) { animation-delay: 1.00s; }
.setup-hero-wave span:nth-child(12) { animation-delay: 1.10s; }

@keyframes sc-wave {
  0%, 100% { transform: scaleY(0.25); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

.setup-hero-feats {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.setup-hero-feats li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 14px;
}

.feat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sc-grad);
  box-shadow: 0 0 10px var(--sc-glow-a);
  flex-shrink: 0;
}

/* Login kartı — cam panel + degrade kenar */
#setup-overlay .setup-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 34px 32px 30px;
  border-radius: 20px;
  background: rgba(17, 12, 32, 0.66);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  text-align: left;
}

#setup-overlay .setup-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: linear-gradient(160deg, var(--sc-glow-a), transparent 35%, transparent 70%, var(--sc-glow-b));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

#setup-overlay .setup-title {
  font-family: var(--sc-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: #f8fafc;
}

#setup-overlay .setup-sub {
  color: rgba(203, 213, 225, 0.65);
  font-size: 13.5px;
  margin: 0 0 22px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
}

.auth-tab {
  border: 0;
  border-radius: 9px;
  padding: 9px 0;
  font-size: 13.5px;
  font-weight: 650;
  font-family: inherit;
  color: rgba(203, 213, 225, 0.6);
  background: transparent;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}

.auth-tab:hover { color: #e2e8f0; }

.auth-tab.active {
  color: #fff !important;
  background: var(--sc-grad);
  box-shadow: 0 4px 18px var(--sc-glow-a);
}

.auth-error {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: #fecaca;
  background: rgba(153, 27, 27, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.backend-status {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.35);
  border: 1px solid rgba(245, 158, 11, 0.4);
  overflow-wrap: anywhere;
}

.backend-status.hidden {
  display: none;
}

#setup-overlay .form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
  margin-bottom: 7px;
}

#setup-overlay .form-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 15px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(2, 2, 8, 0.45);
  color: #f1f5f9;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

#setup-overlay .form-group input:focus {
  border-color: var(--sc-a);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}

#setup-overlay .setup-hint {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.55);
  margin: 14px 0 16px;
}

#setup-overlay #enter-btn {
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--sc-display);
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--sc-grad);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.15s;
  box-shadow: 0 8px 28px var(--sc-glow-a);
}

#setup-overlay #enter-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 36px var(--sc-glow-a), 0 4px 18px var(--sc-glow-b);
}

#setup-overlay #enter-btn:disabled { cursor: not-allowed; }

@media (max-width: 900px) {
  .setup-split { grid-template-columns: 1fr; width: min(440px, 92vw); }
  .setup-hero { display: none; }
}

/* ── Uygulama içi kimlik dokunuşları ─────────────────────────────────────── */

/* Display tipografi: başlıklar ve marka alanları */
.sidebar-header .server-name,
#modal-title,
.home-view h2,
.home-view h3,
.scord-settings-page h3,
.scord-server-settings-main h2 {
  font-family: var(--sc-display);
  letter-spacing: -0.01em;
}

/* Seçim rengi ve odak halkası — marka imzası */
::selection { background: rgba(167, 139, 250, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--sc-a);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Sunucu rayı: yumuşak squircle morph + aktif göstergesi */
.server-rail .rail-icon,
.server-rail-item {
  transition: border-radius 0.22s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s, box-shadow 0.2s !important;
}

.server-rail .rail-icon:hover,
.server-rail-item:hover {
  border-radius: 14px !important;
  box-shadow: 0 6px 20px var(--sc-glow-a);
}

/* Ana ekran kartları: degrade kenar + kalkış */
.room-card,
.home-view .server-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, border-color 0.2s;
}

.room-card:hover,
.home-view .server-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, 0.4) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 4px 20px var(--sc-glow-a);
}

/* Modal: cam yüzey yükseltmesi */
.modal {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Ayarlar: hesap kartı ve unique-id bileşenleri */
.settings-account-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.10), rgba(34, 211, 238, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-account-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 24px var(--sc-glow-a);
  flex-shrink: 0;
}

.settings-avatar-clickable {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.settings-avatar-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.settings-avatar-clickable:hover .settings-avatar-overlay { opacity: 1; }

/* Yayıncı modu: kişisel tanımlayıcıları bulanıklaştır */
body.streamer-mode .settings-unique-id-row span,
body.streamer-mode .settings-account-info span,
body.streamer-mode .room-card b {
  filter: blur(5px);
  transition: filter 0.15s ease;
}
body.streamer-mode .settings-unique-id-row span:hover,
body.streamer-mode .settings-account-info span:hover,
body.streamer-mode .room-card b:hover { filter: none; }

.settings-account-info { display: grid; gap: 2px; }
.settings-account-info strong { font-family: var(--sc-display); font-size: 18px; color: #f8fafc; }
.settings-account-info span { font-size: 13px; color: rgba(148, 163, 184, 0.8); font-family: monospace; }

.settings-hint {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(148, 163, 184, 0.75);
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin: 0;
}

.settings-unique-id {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-unique-id-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.7);
  margin-bottom: 8px;
}

.settings-unique-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: monospace;
  font-size: 14px;
  color: #f1f5f9;
}

/* Toast: cam çip */
.toast {
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Sohbet girişi odak: marka halkası */
#chat-input:focus {
  border-color: var(--sc-a) !important;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15) !important;
}

/* data-animations="off" iken aurora/dalga durur (global kural zaten
   animation-duration'ı sıfırlıyor; blur'lu bloblar statik degrade olur). */

/* ═══════════════════════════════════════════════════════════════════════════
   V25 — Ekran paylaşımı picker, birleşik ayarlar, sunucu ayarları redesign
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Screen share picker ── */
.v25-share-picker { display: grid; gap: 16px; }
.v25-share-note {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.5;
}
.v25-field { display: grid; gap: 8px; }
.v25-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.v25-seg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.v25-seg button {
  flex: 1;
  min-width: 64px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.v25-seg button:hover { background: var(--bg-hover); color: var(--text-primary); }
.v25-seg button.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.35);
}
.v25-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
}
.v25-check input { accent-color: #6366f1; width: 16px; height: 16px; }


/* ── Sunucu ayarları redesign ── */
.v25-server { inset: 24px; border-radius: 14px; }
.v25-server .scord-server-settings-nav { gap: 4px; padding: 16px 12px; }
.v25-server .scord-server-settings-nav strong {
  padding: 4px 10px 12px;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v25-server .scord-server-settings-main { padding: 22px; }
.v25-ch-group { display: grid; gap: 6px; }
.v25-ch-group h4 {
  margin: 10px 0 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.v25-ch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}
.v25-ch-row:hover { border-color: var(--border-strong); }
.v25-ch-name {
  font-size: 13.5px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v25-ch-actions { display: flex; gap: 6px; align-items: center; }
.v25-mini {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
  transition: all 0.12s ease;
}
.v25-mini:hover { background: var(--bg-highlight); color: var(--text-primary); }
.v25-mini.danger:hover { background: rgba(239, 68, 68, 0.25); }
.v25-invite-box {
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  background: rgba(0, 0, 0, 0.14);
}
.v25-invite-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.v25-invite-row { display: flex; gap: 8px; align-items: center; }
.v25-invite-row code {
  flex: 1;
  font-size: 20px;
  letter-spacing: 4px;
  font-weight: 700;
  color: var(--accent-light);
  text-align: center;
}

@media (max-width: 760px) {
  .v25-server { inset: 6px; }
  .v25-server .scord-server-settings-main { padding: 14px; }
  .v25-seg button { min-width: 52px; padding: 8px 6px; font-size: 12px; }
}
