/* ============================================================
   BOXEN — Card/Container-Komponente
   Verwendung überall: Dashboard-Boxen, Forum-Kategorien,
   Profil-Bereiche usw. EIN Baustein für alles.
   ============================================================ */
.box {
  background: var(--container-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: -5px 5px 10px var(--box-shadow-color), 5px 5px 10px var(--box-shadow-color);
}

.box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--text-primary);
}

.box__body {
  padding: 16px;
}

.box__body--flush { padding: 0; }

/* Liste innerhalb einer Box (z.B. News, Forum-Threads) */
.box-list { display: flex; flex-direction: column; }
.box-list__item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.box-list__item:last-child { border-bottom: none; }
.box-list__item:hover { background: var(--bg-raised); }
.box-list__item { color: inherit; text-decoration: none; cursor: pointer; }
.box-list__title { font-size: var(--fs-body); color: var(--text-primary); }
.box-list__meta  {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-xs);
  font-size: var(--fs-meta);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Kleines Status-Badge, z.B. "NEU" */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius);
  line-height: 1.4;
}
.badge--new { background: var(--accent); color: var(--accent-text); }

/* Grid für Dashboard-artige Boxen-Layouts (3-spaltig, responsiv)
   .box-grid und .dashboard sind identisch — .dashboard ist der
   historisch gewachsene Name, den die Startseite nutzt. */
.box-grid,
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}
.box-grid .box,
.dashboard .box { display: flex; flex-direction: column; }

/* Generischer Content-Wrapper für alle Module außer Home
   (ehem. .container_content) */
.container_content {
  background-color: var(--container-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  margin: 20px 0;
  padding: 10px;
  color: var(--text-primary);
  box-shadow: -5px 5px 10px var(--box-shadow-color), 5px 5px 10px var(--box-shadow-color);
}

@media (max-width: 1100px) {
  .box-grid, .dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .box-grid, .dashboard { grid-template-columns: 1fr; }
}

.box__header-title { display: flex; align-items: center; gap: 8px; }
.box__header-title i { color: var(--accent); font-size: 16px; }

/* ============================================================
   STARTSEITE — Ergänzungen (Galerie, TeamSpeak, Twitch/Games-Slider)
   ============================================================ */
.gallery-content {
  position: relative;
  flex: 1;
  min-height: 300px;
  overflow: hidden;
  background: var(--bg-raised);
}
.gallery-content img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
}
.gallery-content img.active { opacity: 1; }
.gallery-content__caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff; padding: 24px 12px 8px; font-size: var(--fs-meta); font-weight: 600;
}
.gallery-content__error {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); font-size: var(--fs-meta);
}

.ts-users { flex: 1; padding: 8px 16px; overflow-y: auto; }
.ts-user { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: var(--fs-body); border-bottom: 1px solid var(--border); }
.ts-user:last-child { border-bottom: none; }
.ts-user__tooltip-wrap { position: relative; display: inline-flex; align-items: center; }
.ts-user__channel-icon { width: 16px; height: 16px; border-radius: var(--radius); }
.ts-user__tooltip {
  display: none; position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%);
  background: var(--bg-raised); color: var(--text-primary); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: var(--radius); font-size: 11px; white-space: nowrap; z-index: 9;
}
.ts-user__tooltip-wrap:hover .ts-user__tooltip { display: block; }
.ts-user__name { color: var(--text-primary); }
.ts-user__group-icons { display: flex; gap: 3px; margin-left: auto; }
.ts-user__group-icon { width: 16px; height: 16px; border-radius: var(--radius); }
.ts-users__empty { color: var(--text-muted); font-size: var(--fs-meta); padding: 24px 0; text-align: center; }

.tlb-content, .wg-content {
  position: relative;
  flex: 1;
  min-height: 300px;
  overflow: hidden;
  background: var(--bg-raised);
}
.tlb-slide, .wg-slide {
  position: absolute; inset: 0; overflow: hidden;
  opacity: 0; transition: opacity .8s ease; pointer-events: none; cursor: pointer;
}
.tlb-slide.active, .wg-slide.active { opacity: 1; pointer-events: auto; }
.tlb-slide img, .wg-slide img {
  display: block;
  height: 100%;
  width: auto;
  min-width: 100%;
  object-fit: cover;
  object-position: center;
}
.tlb-slide::after, .wg-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,15,20,.9) 0%, rgba(13,15,20,.3) 40%, transparent 65%);
}
.tlb-slide.no-img, .wg-slide.no-img { background: var(--bg-raised); }

.tlb-info, .wg-info {
  position: absolute; bottom: 8px; left: 8px; z-index: 3;
  color: #fff; background: rgba(13,15,20,.75);
  padding: 6px 10px; border-radius: var(--radius);
  max-width: calc(100% - 16px); box-sizing: border-box;
}
.tlb-live-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--danger); margin-bottom: 3px;
}
.tlb-live-badge span:first-child { width: 6px; height: 6px; border-radius: var(--radius); background: var(--danger); }
.tlb-live-badge.is-vod { color: #a970ff; }
.tlb-live-badge.is-vod span:first-child { background: #a970ff; }

.tlb-name-row { display: flex; align-items: center; gap: 6px; }
.tlb-avatar { width: 26px; height: 26px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--border-strong); }
.tlb-name { font-size: var(--fs-body); font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlb-title { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tlb-game { font-size: 11px; color: #a970ff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlb-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.wg-rank { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.wg-name { font-size: var(--fs-body); font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tlb-error, .wg-error {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); font-size: var(--fs-meta);
}