/* Grundlayout */
#chat-container {
  display: flex;
  height: 75vh;
  width: 90vw;
  max-width: 1200px;
  margin: 2rem auto;
  background: #1e1f24;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  font-family: 'Segoe UI', Roboto, sans-serif;
  color: #eaeaea;
}

/* Benutzerliste */
#userlist-box {
  width: 25%;
  background: #25262c;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #3b3c42;
}

#userlist-box h5 {
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Userliste */
#userlist {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  flex-grow: 1;
  overflow-y: auto;
}

#userlist li {
  padding: 0.6rem 0.8rem;
  background: #2c2d33;
  margin-bottom: 0.4rem;
  border-radius: 10px;
  cursor: default;
  transition: background 0.2s;
}

#userlist li:hover {
  background: #3a3b42;
  color: #5fb4ff;
}

/* Theme Dropdown */
#themeSelect {
  width: 100%;
  padding: 0.5rem;
  border-radius: 10px;
  border: none;
  background: #2f3036;
  color: #ddd;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Chatbereich */
#messages-box {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: #1f2127;
}

/* Titel */
#messages-box h2 {
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.3rem;
}

/* Auth Bereich */
#auth-area {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 380px;
  margin: auto;
}

#auth-area input[type="text"],
#auth-area input[type="password"] {
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: none;
  background: #2b2c33;
  color: #eee;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
}

#auth-area input:focus {
  background: #35363e;
  box-shadow: 0 0 0 2px #5fb4ff44;
}

/* Buttons */
#auth-area button {
  padding: 0.6rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  color: white;
  transition: background 0.2s, transform 0.1s;
}

#auth-area .btn-success {
  background: #43b581;
}

#auth-area .btn-success:hover {
  background: #37a172;
  transform: scale(1.03);
}

#auth-area .btn-primary {
  background: #5fb4ff;
}

#auth-area .btn-primary:hover {
  background: #4799e6;
  transform: scale(1.03);
}

#auth-msg {
  margin-top: 0.3rem;
  color: #ff5f5f;
  font-weight: 500;
  text-align: center;
}

/* Chatbereich */
#chat-area {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Admin Controls */
#admin-controls {
  margin-bottom: 0.8rem;
}

#admin-controls input[type="text"] {
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: none;
  background: #2b2c33;
  color: #eee;
  font-size: 1rem;
  outline: none;
}

#admin-controls button {
  padding: 0.5rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: white;
}

#admin-controls button.btn-warning { background: #faa61a; }
#admin-controls button.btn-success { background: #43b581; }
#admin-controls button.btn-danger  { background: #f04747; }
#admin-controls button.btn-primary { background: #5fb4ff; }

#admin-controls button:hover {
  filter: brightness(0.9);
  transform: scale(1.02);
}

/* Nachrichtenliste */
#messages {
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
  background: #26272d;
  border-radius: 12px;
  border: 1px solid #3b3c42;
}

#messages li {
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.4rem;
  border-radius: 10px;
  background: #2f3036;
  word-wrap: break-word;
}

#messages li:nth-child(odd) {
  background: #34353b;
}

#system-alerts {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: #ffcc66;
  text-align: center;
}

/* Eingabebereich */
.input-group {
  display: flex;
  margin-top: 0.6rem;
}

.input-group input[type="text"] {
  flex-grow: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 12px 0 0 12px;
  border: none;
  background: #2b2c33;
  color: #eee;
  outline: none;
}

.input-group input:focus {
  background: #35363e;
  box-shadow: 0 0 0 2px #5fb4ff44;
}

.input-group button {
  background: #5fb4ff;
  border: none;
  color: white;
  padding: 0 1.5rem;
  border-radius: 0 12px 12px 0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.input-group button:hover {
  background: #4799e6;
  transform: scale(1.02);
}
.role-admin {
  background: linear-gradient(45deg, #ff6b6b, #ff3b3b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}
.role-moderator {
  background: linear-gradient(45deg, #5fb4ff, #1e90ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.role-streamer {
  background: linear-gradient(45deg, #b57aff, #7b2fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.role-vip {
  background: linear-gradient(45deg, #ffd966, #ffb700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.role-creator {
  background: linear-gradient(45deg, #6bff9d, #1efc6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* === Badges mit Gradienten und Glow === */
/* === Rollen mit Gradient === */
.role-admin,
.role-moderator,
.role-streamer,
.role-vip,
.role-creator {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* Abstand zwischen Name und Badge */
  font-weight: 600;
  font-size: 1rem;
}

/* Gradient-Text für Namen */
.role-admin {
  background: linear-gradient(45deg, #ff6b6b, #ff3b3b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.role-moderator {
  background: linear-gradient(45deg, #5fb4ff, #1e90ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.role-streamer {
  background: linear-gradient(45deg, #b57aff, #7b2fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.role-vip {
  background: linear-gradient(45deg, #ffd966, #ffb700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.role-creator {
  background: linear-gradient(45deg, #6bff9d, #1efc6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === Badges === */
.badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
  transform: translateY(-1px); /* minimal anheben für perfekte Mitte */
}

.badge-admin {
  background: linear-gradient(45deg, #ff6b6b, #ff3b3b);
  color: #fff;
}
.badge-moderator {
  background: linear-gradient(45deg, #5fb4ff, #1e90ff);
  color: #fff;
}
.badge-streamer {
  background: linear-gradient(45deg, #b57aff, #7b2fff);
  color: #fff;
}
.badge-vip {
  background: linear-gradient(45deg, #ffd966, #ffb700);
  color: #1e1e1e;
}
.badge-creator {
  background: linear-gradient(45deg, #6bff9d, #1efc6b);
  color: #1e1e1e;
}

/* Userliste clean ohne Punkte */
#userlist {
  list-style: none;
  padding: 0;
  margin: 0;
}
#userlist li {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}
/* Chat Container *//* Chat Container */
#messages {
  list-style: none;
  padding: 10px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Nachricht allgemein */
.message {
  display: flex;
  max-width: 70%;
  word-wrap: break-word;
}

/* Andere Benutzer -> links */
.message.other {
  justify-content: flex-start;
}
.message.other .bubble {
  background: #2f3136;
  color: #fff;
  border-radius: 12px 12px 12px 0;
  padding: 8px 12px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

/* Eigene Nachrichten -> rechts */
.message.self {
  align-self: flex-end;
  justify-content: flex-end;
}
.message.self .bubble {
  background: linear-gradient(45deg, #4CAF50, #388E3C);
  color: #fff;
  border-radius: 12px 12px 0 12px;
  padding: 8px 12px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

/* Username über den Nachrichten */
.message .username {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 3px;
  display: block;
  opacity: 0.8;
}
