/* ==========================================================================
   NeoUser — Nutzerübersicht (Directory)
   Nutzt NeoUser CSS Custom Properties: --neo-primaer, --neo-primaer-dunkel,
   --neo-dunkel, --neo-hg, --neo-erfolg
   ========================================================================== */

/* --------------------------------------------------------------------------
   Wrapper + Controls
   -------------------------------------------------------------------------- */
.nu-wrap {
  margin: 32px auto;
  max-width: 960px;
}

.nu-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.nu-search {
  flex: 1;
  min-width: 200px;
  padding: 11px 16px;
  border: 1.5px solid rgba(var(--neo-primaer-dunkel-rgb), 0.3);
  border-radius: 10px;
  font-size: 15px;
  color: var(--neo-dunkel, #333d40);
  background: rgba(255, 255, 255, 0.6);
  outline: none;
  transition: border-color 0.2s ease;
}
.nu-search:focus { border-color: var(--neo-primaer, #ffa500); }

.nu-filter-toggle {
  display: flex;
  border: 1.5px solid rgba(var(--neo-primaer-dunkel-rgb), 0.3);
  border-radius: 10px;
  overflow: hidden;
}

.nu-filter-btn {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--neo-dunkel, #333d40);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nu-filter-btn + .nu-filter-btn { border-left: 1.5px solid rgba(var(--neo-primaer-dunkel-rgb), 0.3); }
.nu-filter-btn.is-active {
  background: linear-gradient(135deg, var(--neo-primaer, #ffa500), var(--neo-primaer-dunkel, #e09900));
  color: #fff;
}
.nu-filter-btn:not(.is-active):hover { background: rgba(var(--neo-primaer-rgb), 0.08); }

/* --------------------------------------------------------------------------
   Karten-Grid
   -------------------------------------------------------------------------- */
.nu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  min-height: 120px;
}

@media (max-width: 720px) { .nu-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .nu-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Profilkarte
   -------------------------------------------------------------------------- */
.nu-card {
  background: rgba(var(--neo-hg-rgb), 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(var(--neo-primaer-rgb), 0.2);
  border-radius: 14px;
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  animation: nu-fade-in 0.2s ease;
}
.nu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(var(--neo-dunkel-rgb), 0.12);
}

/* Match-Highlight */
.nu-card.is-match {
  border-color: var(--neo-primaer, #ffa500);
  box-shadow: 0 0 0 2px rgba(var(--neo-primaer-rgb), 0.2);
}

/* --------------------------------------------------------------------------
   Match-Badge
   -------------------------------------------------------------------------- */
.nu-match-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--neo-primaer, #ffa500), var(--neo-primaer-dunkel, #e09900));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Avatar
   -------------------------------------------------------------------------- */
.nu-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--neo-primaer, #ffa500);
  margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   Name + Rolle
   -------------------------------------------------------------------------- */
.nu-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--neo-dunkel, #333d40);
  line-height: 1.2;
}

.nu-rolle-badge {
  display: inline-block;
  padding: 2px 10px;
  background: linear-gradient(135deg, var(--neo-primaer, #ffa500), var(--neo-primaer-dunkel, #e09900));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 20px;
}

/* --------------------------------------------------------------------------
   Bemerkung
   -------------------------------------------------------------------------- */
.nu-bemerkung {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 5.8em;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Follower-Zahl
   -------------------------------------------------------------------------- */
.nu-follower-count {
  font-size: 12px;
  color: #aaa;
}

/* --------------------------------------------------------------------------
   Aktionen
   -------------------------------------------------------------------------- */
.nu-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.nu-follow-btn {
  flex: 1;
  min-width: 80px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--neo-primaer, #ffa500);
  background: linear-gradient(135deg, var(--neo-primaer, #ffa500), var(--neo-primaer-dunkel, #e09900));
  color: #fff;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.nu-follow-btn:hover { filter: brightness(1.08); transform: scale(1.02); }
.nu-follow-btn.is-following {
  background: transparent;
  color: var(--neo-primaer, #ffa500);
}
.nu-follow-btn.is-following:hover {
  background: rgba(220, 50, 50, 0.08);
  border-color: #c00;
  color: #c00;
}

.nu-block-btn {
  width: 100%;
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  border: 1.5px solid #ccc;
  background: transparent;
  color: #999;
  transition: border-color 0.15s, color 0.15s;
}
.nu-block-btn:hover { border-color: #c00; color: #c00; }
.nu-block-btn.is-blocked {
  border-color: #c00;
  color: #c00;
  background: rgba(200, 0, 0, 0.05);
}

.nu-msg-btn {
  flex: 1;
  min-width: 80px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid rgba(var(--neo-primaer-dunkel-rgb), 0.4);
  background: transparent;
  color: var(--neo-dunkel, #333d40);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.nu-msg-btn:hover { background: rgba(var(--neo-primaer-rgb), 0.1); }

/* --------------------------------------------------------------------------
   Leer / Kein-Treffer
   -------------------------------------------------------------------------- */
.nu-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #aaa;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Ladeindikator
   -------------------------------------------------------------------------- */
.nu-loading {
  grid-column: 1 / -1;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(var(--neo-primaer-rgb), 0.2);
  border-top-color: var(--neo-primaer, #ffa500);
  border-radius: 50%;
  animation: neo-spin 0.7s linear infinite;
  margin: 40px auto;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.nu-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.nu-page-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1.5px solid rgba(var(--neo-primaer-dunkel-rgb), 0.3);
  background: transparent;
  color: var(--neo-dunkel, #333d40);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.nu-page-btn:hover { background: rgba(var(--neo-primaer-rgb), 0.08); }
.nu-page-btn.is-active {
  background: var(--neo-primaer, #ffa500);
  border-color: var(--neo-primaer, #ffa500);
  color: #fff;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Geblockte Nutzer (collapsible)
   -------------------------------------------------------------------------- */
.nu-geblockte-details {
  margin-top: 40px;
  border-top: 1.5px solid rgba(200, 0, 0, 0.15);
  padding-top: 16px;
}

.nu-geblockte-summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  padding: 4px 0;
}
.nu-geblockte-summary::-webkit-details-marker { display: none; }
.nu-geblockte-summary::before {
  content: '▶';
  font-size: 10px;
  transition: transform 0.2s ease;
  color: #bbb;
}
.nu-geblockte-details[open] .nu-geblockte-summary::before {
  transform: rotate(90deg);
}
.nu-geblockte-summary:hover { color: #c00; }

.nu-geblockte-grid {
  margin-top: 16px;
}

.nu-geblockte-grid .nu-card {
  opacity: 0.75;
  border-color: rgba(200, 0, 0, 0.15);
  background: rgba(255, 240, 240, 0.4);
}
.nu-geblockte-grid .nu-card:hover {
  opacity: 1;
  border-color: rgba(200, 0, 0, 0.3);
}
.nu-geblockte-grid .nu-avatar {
  border-color: rgba(200, 0, 0, 0.3);
  filter: grayscale(40%);
}

/* --------------------------------------------------------------------------
   Keyframe
   -------------------------------------------------------------------------- */
@keyframes nu-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .nu-card, .nu-follow-btn { transition: none; animation: none; }
  .nu-card:hover { transform: none; }
}
