/* ======================================================
   BOX 4 – BENUTZERLISTE (STANDARD BOX)
====================================================== */

#box4 {
  position: relative;
  width: 100%;

  background: var(--bg-glass);
  border-radius: var(--box-radius);
  backdrop-filter: blur(14px) saturate(1.3);

  font-family: var(--font-family);
  color: var(--foreground);

  display: flex;
  flex-direction: column;
  gap: 12px;

  padding: 18px 18px 20px;
  overflow: hidden;

  box-shadow:
    0 10px 40px rgba(0,0,0,.55),
    0 0 0 1px rgba(201,241,255,.12) inset;
}

/* ======================================================
   NEON RAHMEN – GLEICH WIE ALLE ANDEREN BOXEN
====================================================== */

#box4::before,
#box4::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

#box4::before {
  border: 2px solid transparent;
  background:
    linear-gradient(
      90deg,
      var(--primary),
      var(--accent),
      var(--primary-light)
    ) border-box;

  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  animation: neo-border 6s linear infinite;
}

#box4::after {
  inset: 6px;
  border-radius: calc(var(--box-radius) - 6px);
  background: radial-gradient(
    circle at top,
    rgba(0,255,136,.18),
    transparent 70%
  );
  opacity: .6;
}

/* ======================================================
   HEADER
====================================================== */

#box4 .box-header {
  text-align: center;
  padding: 0;
}

#box4 .box-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-light);
  text-shadow: 0 0 6px rgba(201,241,255,.5);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#box4 .box-header i {
  color: var(--accent);
}

/* ======================================================
   CONTENT (SCROLLBEREICH)
====================================================== */

#box4 .box-content {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Scrollbar – IDENTISCH */
#box4 .box-content::-webkit-scrollbar {
  width: 6px;
}

#box4 .box-content::-webkit-scrollbar-thumb {
  background: rgba(0,255,136,.45);
  border-radius: 6px;
}

/* ======================================================
   USER LIST
====================================================== */

.user-list {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.userlist-item {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 8px 10px;
  border-radius: 10px;

  background: rgba(255,77,77,.14);
  box-shadow:
    0 4px 14px rgba(0,0,0,.25),
    inset 0 0 0 1px rgba(201,241,255,.08);

  transition: background var(--transition);
}

.userlist-item:hover {
  background: rgba(255,77,77,.22);
}

/* ======================================================
   AVATAR
====================================================== */

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;

  border: 2px solid var(--accent);
  flex-shrink: 0;
}

/* ======================================================
   USER INFO
====================================================== */

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.username {
  font-weight: 700;
  color: var(--primary-light);
  text-decoration: none;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.username:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ======================================================
   STATUS
====================================================== */

.status-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
}

.online-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--primary-light);
}

.online-status.online {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(0,255,136,.8);
}

.online-status.offline {
  background: #a00;
}

.last-online {
  font-size: .75rem;
  opacity: .7;
}

/* ======================================================
   LOGIN / ERROR
====================================================== */

.userlist-login-prompt {
  text-align: center;
  font-size: .9rem;
  opacity: .85;
}

.userlist-login-prompt a {
  color: var(--accent);
  font-weight: 700;
}

.user-list .error {
  background: rgba(255,77,77,.22);
  padding: 8px;
  border-radius: 8px;
  text-align: center;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 600px) {
  .username {
    max-width: 60vw;
  }
}
