/* ===========================
   Box4: Benutzerliste (Neon-Glas-Look ohne Hintergrundbilder)
   =========================== */
#box4.userlist-box.neo-box {
  max-width: 320px;
  margin: 32px auto;
  background: linear-gradient(135deg, rgb(47 47 47 / 65%) 60%, rgba(160, 59, 68, 0.18) 100%);
  border-radius: var(--box-radius);
  box-shadow:
    0 4px 24px 0 rgba(20,77,59,0.18),
    0 0 0 1.5px rgba(200,214,229,0.12) inset,
    0 1.5px 24px 0 rgba(160,59,68,0.10) inset;
  color: var(--foreground);
  font-family: var(--font-family);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: none; /* Border entfällt, da Neon-Rahmen */
  backdrop-filter: blur(12px) saturate(1.2);
  position: relative;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  z-index: 1;
}

#box4.userlist-box.neo-box:hover {
  transform: translateY(-6px);
  box-shadow:
    0 8px 30px rgba(20,77,59,0.3),
    0 0 0 2px rgba(200,214,229,0.2) inset,
    0 3px 36px 0 rgba(160,59,68,0.15) inset;
}

/* Neon-Rahmen: animierte Linien oben, unten, links, rechts */
#box4.userlist-box.neo-box::before,
#box4.userlist-box.neo-box::after,
#box4.userlist-box.neo-box > .neon-left,
#box4.userlist-box.neo-box > .neon-right {
  position: absolute;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-light), var(--primary));
  border-radius: 2px;
  filter: blur(1.5px) brightness(1.3);
  opacity: 0.85;
  animation: neon-move 3s linear infinite alternate;
  content: "";
  z-index: 2;
  pointer-events: none;
}

/* Oben */
#box4.userlist-box.neo-box::before {
  top: 0; left: 10%; right: 10%; height: 4px;
  animation-name: neon-move-horizontal;
}

/* Unten */
#box4.userlist-box.neo-box::after {
  bottom: 0; left: 10%; right: 10%; height: 4px;
  animation-name: neon-move-horizontal;
  animation-direction: reverse;
}

/* Links */
#box4.userlist-box.neo-box > .neon-left {
  top: 10%; bottom: 10%; left: 0; width: 4px;
  background: linear-gradient(180deg, var(--primary-dark), var(--primary-light), var(--primary));
  animation-name: neon-move-vertical;
}

/* Rechts */
#box4.userlist-box.neo-box > .neon-right {
  top: 10%; bottom: 10%; right: 0; width: 4px;
  background: linear-gradient(180deg, var(--primary-dark), var(--primary-light), var(--primary));
  animation-name: neon-move-vertical;
  animation-direction: reverse;
}

@keyframes neon-move-horizontal {
  0% { left: 10%; right: 10%; }
  100% { left: 0; right: 0; }
}

@keyframes neon-move-vertical {
  0% { top: 10%; bottom: 10%; }
  100% { top: 0; bottom: 0; }
}

/* Entferne Hintergrundbilder in Header, Content und Footer */
#box4 .box-header,
#box4 .box-content,
#box4 .box-footer {
  background-image: none !important;
  background-repeat: none !important;
  background-size: auto !important;
  background-position: initial !important;
}

/* ===========================
   Box4: Benutzerliste Inhalt (bestehend)
   =========================== */
#box4 .box-header {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  font-weight: 700;
  font-size: 1.3rem;
  text-shadow:
    0 0 5px rgba(200, 214, 229, 0.7),
    0 2px 4px rgba(0, 0, 0, 0.7);
  border-radius: var(--box-radius) var(--box-radius) 0 0;
}

#box4 .box-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

#box4 .box-header h2 i {
  font-size: 1.6rem;
  color: var(--accent);
}

#box4 .box-content {
  padding: 16px 10px 18px 10px;
  background-color: var(--background);
  border-radius: 0 0 var(--box-radius) var(--box-radius);
}

.user-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.userlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(160, 59, 68, 0.10);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 1rem;
  box-shadow: 0 1px 4px rgba(160, 59, 68, 0.08);
  transition: background 0.2s;
}

.userlist-item:hover {
  background: rgba(160, 59, 68, 0.18);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
  background: var(--background);
  flex-shrink: 0;
}

.username {
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.username:hover,
.username:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  outline: none;
}

.online-status {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 6px;
  margin-right: 2px;
  border: 1.5px solid #fff;
}

.online-status.online {
  background: #4caf50;
  box-shadow: 0 0 4px #4caf50;
}

.online-status.offline {
  background: #bdbdbd;
  box-shadow: 0 0 4px #bdbdbd;
}

.last-online {
  font-size: 0.85em;
  color: var(--muted);
  margin-left: 6px;
  white-space: nowrap;
}

.userlist-login-prompt {
  color: var(--primary-light);
  font-size: 1.05rem;
  text-align: center;
}

.userlist-login-prompt a {
  color: var(--accent);
  text-decoration: underline;
  transition: color var(--transition);
}

.userlist-login-prompt a:hover,
.userlist-login-prompt a:focus-visible {
  color: var(--primary-light);
  outline: none;
}

/* Fehleranzeige */
.user-list .error {
  color: #ffbaba;
  background: rgba(160, 59, 68, 0.18);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  font-size: 0.98rem;
}

/* Für Benutzerliste Content auf der rechten Seite */
.rightSide #box4.userlist-box .box-content {
  background-size: contain !important;
  background-repeat: repeat-y !important;
  background-position: center top !important;
}

/* Heading */
.userlist-box .box-header h2 {
  transform: translateX(0px) translateY(46px);
  font-size: 24px;
}

/* Responsive Anpassung */
@media (max-width: 480px) {
  #box4.userlist-box {
    max-width: 98vw;
    margin: 18px auto;
  }
  .username {
    max-width: 60vw;
  }
}