.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.modal {
  background: var(--bg-app);
  border: 1px solid var(--border);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 8px;
}

.modal h2 { font-family: Tahoma, serif; color: var(--accent); font-size: 22px; margin-bottom: 14px; }
.modal-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 14px; }

.modal-head {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.modal-pfp {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-input);
  object-fit: cover;
}

.modal-name { color: var(--name); font-weight: 700; font-size: 18px; }
.modal-bio { color: var(--text); font-size: 14px; margin-top: 4px; word-break: break-word; }

.modal-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.modal-actions button {
  flex: 1;
  background: var(--bg-header);
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  font-family: Tahoma, sans-serif;
  min-width: 100px;
  border-radius: 6px;
}

.modal-actions button:hover { background: var(--bg-panel); color: var(--accent-hover); }
.modal-actions .ghost { background: transparent; color: var(--text-dim); }
.modal-actions .danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.modal-actions .danger:hover { background: var(--danger-bg-hover); }

.field { display: block; margin-bottom: 16px; }

.field span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-bright);
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  resize: vertical;
  font-family: inherit;
  border-radius: 4px;
}

.field input[type="color"].color-input {
  height: 42px;
  padding: 2px;
  cursor: pointer;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.check-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.check-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.check-row input[type="checkbox"]:checked::after {
  transform: translateX(18px);
  background: #fff;
}

.toggle-label {
  font-size: 14px;
  color: var(--text-bright);
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
}

.dc-profile {
  max-width: 600px;
  padding: 0 !important;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.dc-banner {
  height: 110px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  background-size: cover;
  background-position: center;
  position: relative;
}

.dc-avatar-stack {
  position: relative;
  height: 0;
  padding: 0 24px;
}

.dc-avatar-wrap {
  position: absolute;
  top: -60px;
  left: 24px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 6px solid var(--bg-panel);
  background: var(--bg-panel);
}

.dc-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-input);
}

.dc-status-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #23a55a;
  border: 6px solid var(--bg-panel);
  display: none;
}

.dc-status-dot.offline {
  background: #80848e;
}

.dc-block-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ed4245;
  border: 6px solid var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.dc-block-badge.hidden { display: none !important; }

.dc-avatar-edit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.dc-avatar-wrap:hover .dc-avatar-edit {
  opacity: 1;
}

.dc-avatar-edit input { display: none; }
.dc-avatar-edit .icon-img { background-color: #fff; width: 20px; height: 20px; }

.dc-banner-edit {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.dc-banner-edit:hover { background: rgba(0, 0, 0, 0.8); }
.dc-banner-edit input { display: none; }
.dc-banner-edit .icon-img { background-color: #fff; width: 16px; height: 16px; }

.dc-more-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 5;
  padding: 0 0 6px 0;
  line-height: 1;
  font-family: inherit;
}

.dc-more-btn:hover { background: rgba(0, 0, 0, 0.8); }

.dc-close-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 5;
  line-height: 1;
  font-family: inherit;
}

.dc-close-btn:hover { background: rgba(0, 0, 0, 0.8); }

.dc-body {
  padding: 60px 24px 24px;
}

.dc-card {
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}

.dc-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.dc-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.3px;
}

.dc-discrim {
  font-size: 16px;
  color: var(--text-dim);
  font-weight: 500;
}

.dc-custom-status {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
}

.dc-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.dc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-bright);
  letter-spacing: 0.4px;
}

.dc-badge.admin {
  background: #A6D9F5;
  color: #fff;
  border-color: transparent;
}

.dc-badge.you {
  background: #5865f2;
  color: #fff;
  border-color: transparent;
}

.dc-badge.online {
  background: #23a55a;
  color: #fff;
  border-color: transparent;
}

.dc-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.dc-section {
  margin-bottom: 14px;
}

.dc-section:last-child {
  margin-bottom: 0;
}

.dc-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.dc-about {
  font-size: 14px;
  color: var(--text-bright);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.dc-meta-row {
  font-size: 14px;
  color: var(--text-bright);
}

.dc-input,
.dc-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-bright);
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 4px;
  outline: none;
  font-family: inherit;
  resize: vertical;
}

.dc-input:focus,
.dc-textarea:focus {
  border-color: var(--accent);
}

.dc-activity {
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.dc-activity-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 2px;
}

.dc-activity-artist {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.dc-activity-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.dc-activity-time {
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.dc-activity-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.dc-activity-fill {
  height: 100%;
  background: var(--text-bright);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s;
}

.dc-activity-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: var(--text-dim);
  padding: 0 4px;
}

.dc-ctrl {
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}

.dc-ctrl:hover {
  color: var(--text-bright);
  transform: scale(1.15);
}

.dc-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.dc-actions button {
  flex: 1;
  background: #5865f2;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  min-width: 100px;
  border-radius: 4px;
  font-family: inherit;
  transition: background 0.15s;
}

.dc-actions button:hover { background: #4752c4; }
.dc-actions .ghost {
  background: var(--bg-panel);
  color: var(--text-bright);
  border: 1px solid var(--border);
}
.dc-actions .ghost:hover { background: var(--bg-header); }
.dc-actions .danger {
  background: #da373c;
  color: #fff;
}
.dc-actions .danger:hover { background: #a12828; }

.user-card { max-width: 600px; }

.color-input {
  width: 100%;
  height: 38px;
  padding: 2px;
  cursor: pointer;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.kicked-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  padding: 8px;
  background: var(--bg-input);
  border-radius: 4px;
}

.kicked-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-bottom: 1px solid var(--border);
}

.kicked-row:last-child { border-bottom: none; }

.kicked-row img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-input);
}

.kicked-row span { flex: 1; color: var(--name); font-weight: 700; font-size: 14px; }

.kicked-row button {
  background: var(--bg-header);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 700;
  border-radius: 4px;
}

.kicked-row button:hover { background: var(--bg-panel); color: var(--accent-hover); }

.reaction-modal { max-width: 460px; }

.reaction-search {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-bright);
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  outline: none;
  margin-bottom: 8px;
}

.reaction-search:focus { border-color: var(--accent); }

.reaction-picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.reaction-picker button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 20px;
  padding: 5px;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s, border-color 0.12s;
  line-height: 1;
}

.reaction-picker button:hover {
  background: var(--bg-panel);
  border-color: var(--accent);
  transform: scale(1.15);
}

.reaction-picker .rp-cat {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 8px 4px 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.reaction-picker .rp-cat:first-child { border-top: none; margin-top: 0; }

.more-modal {
  max-width: 220px !important;
  padding: 6px !important;
}

.more-menu { display: flex; flex-direction: column; }

.more-menu button {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
}

.more-menu button:hover {
  background: var(--bg-header);
  color: var(--accent);
}

.more-menu button.danger { color: var(--danger); }
.more-menu button.danger:hover { background: var(--danger-bg); }

.user-profile-role-section {
  padding-top: 4px;
}

.user-profile-role-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.user-profile-role-scope {
  flex: 0 0 100px;
}

.user-profile-role-select {
  flex: 1;
  min-width: 0;
}

.user-profile-role-scope,
.user-profile-role-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-bright);
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.user-profile-role-scope:focus,
.user-profile-role-select:focus {
  border-color: var(--accent);
}

.user-profile-role-save {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: inherit;
  transition: background 0.15s;
}

.user-profile-role-save:hover {
  background: var(--accent-hover);
}

.user-profile-role-hint {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.4;
}
