/* ==========================================================
   FRIENDS GROUP – Styles
   ========================================================== */

:root {
  --bg: #000;
  --card: #070707;
  --card-hover: #0b0b0b;
  --line: #1b1b1b;
  --line-hover: #2b2b2b;
  --text: #fff;
  --muted: #8b8f98;
  --dim: #5c5f66;
  --chip: #121212;
  --chip-line: #262626;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- Seite ---------- */

.page {
  width: min(860px, 100% - 32px);
  margin: 0 auto;
  padding: 72px 0 96px;
}

/* ---------- Titel mit pulsierendem Glow ---------- */

.title {
  margin: 0 0 56px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(1.7rem, 7.4vw, 4.6rem);
  letter-spacing: 0.11em;
  line-height: 1;
  color: #fff;
  /* Leerzeichen am Ende der Laufweite ausgleichen, damit es wirklich mittig sitzt */
  padding-left: 0.11em;
  animation: glow 3.4s ease-in-out infinite;
}

/* leicht heller  →  wieder etwas dunkler  →  leicht heller ... */
@keyframes glow {
  0%, 100% {
    color: #e4e4e4;
    text-shadow:
      0 0 6px rgba(255, 255, 255, 0.30),
      0 0 18px rgba(255, 255, 255, 0.22),
      0 0 38px rgba(255, 255, 255, 0.12);
  }
  50% {
    color: #ffffff;
    text-shadow:
      0 0 8px rgba(255, 255, 255, 0.85),
      0 0 24px rgba(255, 255, 255, 0.60),
      0 0 54px rgba(255, 255, 255, 0.38);
  }
}

/* ---------- Karten ---------- */

.members {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.card:hover,
.card.open {
  background: var(--card-hover);
  border-color: var(--line-hover);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-height: 138px;
  padding: 24px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  border-radius: 20px;
}

.role {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}

/* Avatar */

.avatar {
  flex: none;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid #8d8d8d;
  background: #141414;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Name + Status */

.info { min-width: 0; }

.name {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #80848e;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.dot.online  { background: #23a55a; box-shadow: 0 0 8px rgba(35, 165, 90, 0.7); }
.dot.idle    { background: #f0b232; box-shadow: 0 0 8px rgba(240, 178, 50, 0.6); }
.dot.dnd     { background: #f23f43; box-shadow: 0 0 8px rgba(242, 63, 67, 0.75); }
.dot.offline,
.dot.invisible { background: #80848e; }

.custom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
}

.custom[hidden] { display: none; }

.custom img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* ---------- Aufklappbereich (Banner + Social Links) ---------- */

.card-more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.card.open .card-more { grid-template-rows: 1fr; }

.card-more-inner {
  min-height: 0;
  overflow: hidden;
}

.more-content { padding: 0 16px 22px; }

.banner {
  height: 150px;
  margin-bottom: 20px;
  border-radius: 14px;
  background-color: #111;
  background-position: center;
  background-size: cover;
  border: 1px solid var(--line);
}

.banner[hidden] { display: none; }

.socials-label {
  margin: 4px 0 14px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.32em;
  padding-left: 0.32em;
  color: #4d4d4d;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid var(--chip-line);
  background: var(--chip);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.chip:hover {
  background: #1a1a1a;
  border-color: #3a3a3a;
}

.chip:active { transform: scale(0.97); }

.chip svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none;
}

.empty-hint {
  text-align: center;
  font-size: 13px;
  color: var(--dim);
  margin: 6px 0 0;
}

/* ---------- Sound-Button ---------- */

.sound {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #242424;
  background: #0a0a0a;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.sound:hover { background: #151515; border-color: #3a3a3a; }
.sound:active { transform: scale(0.94); }

.sound svg { width: 20px; height: 20px; }
.sound .icon-off { display: none; }
.sound.muted .icon-on { display: none; }
.sound.muted .icon-off { display: block; color: #8b8f98; }
.sound.unavailable { opacity: 0.4; }

/* ---------- Admin-Link (oben links) ---------- */

.admin-link {
  position: fixed;
  top: 20px;
  left: 22px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border-radius: 23px;
  border: 1px solid #242424;
  background: #0a0a0a;
  color: #b7b9bf;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.admin-link:hover { background: #151515; border-color: #3a3a3a; color: #fff; }

/* kleiner Punkt, solange ein Entwurf nur bei dir aktiv ist */
.admin-link.has-draft::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0b232;
  box-shadow: 0 0 8px rgba(240, 178, 50, 0.7);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  background: #0d0d0d;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Mobil ---------- */

@media (max-width: 560px) {
  .page { padding-top: 84px; }
  .title { margin-bottom: 40px; }
  .card-head { gap: 16px; padding: 20px 18px; min-height: 120px; }
  .avatar { width: 76px; height: 76px; }
  .name { font-size: 16px; letter-spacing: 0.16em; }
  .banner { height: 110px; }
  .sound { top: 14px; right: 14px; }
  .admin-link { top: 14px; left: 14px; height: 46px; padding: 0 14px; }
}

/* ---------- Weniger Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  .title { animation: none; text-shadow: 0 0 16px rgba(255, 255, 255, 0.45); }
  .card-more { transition: none; }
}
