* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Whitney", "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #202225 0%, #36393f 100%);
  color: #dcddde;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background-color: #2f3136;
  padding: 2rem;
  border-radius: 5px;
  box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.25);
}

h1 {
  font-size: 1.5rem;
  text-align: center;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.subtitle {
  text-align: center;
  color: #b9bbbe;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.placeholder-note {
  background-color: #202225;
  border-radius: 4px;
  padding: 0.9rem;
  color: #b9bbbe;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.error-box {
  background-color: rgba(240, 71, 71, 0.15);
  border: 1px solid #f04747;
  color: #ff9c9e;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.auth-form { display: flex; flex-direction: column; }

label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #b9bbbe;
  margin-bottom: 0.4rem;
}

input {
  background-color: #202225;
  border: 1px solid #18191c;
  border-radius: 3px;
  color: #dcddde;
  padding: 0.7rem;
  font-size: 1rem;
  margin-bottom: 1.1rem;
  outline: none;
}

input:focus { border-color: #7289da; }

button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-primary { background-color: #7289da; margin-top: 0.25rem; }
.btn-primary:hover { background-color: #677bc4; }

.btn-danger { background-color: #f04747; }
.btn-danger:hover { background-color: #d84040; }

.switch-link { margin-top: 1rem; font-size: 0.875rem; color: #72767d; }
.switch-link a { color: #00b0f4; text-decoration: none; }
.switch-link a:hover { text-decoration: underline; }

/* --- Message Hover Actions, Replies & Inline Editing --- */
.message-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-main-line {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
}

.message-reply-spine {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 20px;
  padding-left: 14px;
  border-left: 2px solid #4f545c;
  border-top: 2px solid #4f545c;
  border-top-left-radius: 6px;
  height: 16px;
  font-size: 0.78rem;
  color: var(--text-muted, #72767d);
  cursor: pointer;
  overflow: hidden;
}

.message-reply-spine:hover {
  color: var(--text-primary, #dcddde);
}

.message-reply-author {
  font-weight: 700;
  color: var(--text-secondary, #b9bbbe);
  flex-shrink: 0;
}

.message-reply-snippet {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-hover-actions {
  position: absolute;
  right: 16px;
  top: -12px;
  background: var(--bg-base, #36393f);
  border: 1px solid #202225;
  border-radius: 4px;
  display: none;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.message-row:hover .message-hover-actions {
  display: flex;
}

.msg-action-btn {
  appearance: none;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary, #b9bbbe);
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.msg-action-btn:last-child {
  border-right: none;
}

.msg-action-btn:hover {
  background: var(--bg-hover, rgba(79, 84, 92, 0.32));
  color: #ffffff;
}

.msg-action-btn.danger {
  color: #f38688;
}

.msg-action-btn.danger:hover {
  background: var(--dnd, #f04747);
  color: #ffffff;
}

.edited-tag {
  font-size: 0.68rem;
  color: var(--text-muted, #72767d);
  margin-left: 5px;
}

.inline-edit-box {
  margin-top: 4px;
  width: 100%;
}

.inline-edit-box input {
  width: 100%;
  background: var(--bg-elevated, #40444b);
  border: 1px solid var(--accent, #7289da);
  border-radius: 4px;
  padding: 8px 10px;
  color: var(--text-primary, #dcddde);
  font-size: 0.94rem;
  outline: none;
}

.inline-edit-hint {
  font-size: 0.72rem;
  color: var(--text-muted, #72767d);
  margin-top: 4px;
}

.reply-compose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel, #2f3136);
  border: 1px solid #202225;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--text-secondary, #b9bbbe);
}

.reply-compose-bar + .composer {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* --- Server Rail Icon Image & Server Overview Settings --- */
.rail-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.srv-overview-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.srv-icon-uploader {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.srv-icon-circle-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.srv-icon-circle-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.srv-danger-zone {
  background: rgba(240, 71, 71, 0.08);
  border: 1px solid rgba(240, 71, 71, 0.35);
  border-radius: 5px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 720px) {
  .srv-overview-grid {
    grid-template-columns: 1fr;
  }
}