/* ============================================================
   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-card);
  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: 8px 14px;
  border-bottom: 1px solid var(--border);
  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: 10px 10px;
  border-top: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.box-list__item:first-child { border-top: 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; }

/* ---- Vertikale Sidebar-Navigation (Icon + Label)
   Generisch wiederverwendbar, z.B. Admin-Menü ---- */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.side-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.side-nav-item.active {
    background: rgba(224,177,63,0.1);
    border-left-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}
.side-nav-icon  { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.side-nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav-empty { padding: 10px; color: var(--text-muted); font-size: 13px; }

@media (max-width: 900px) {
    .side-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .side-nav-item { padding: 6px 10px; }
}

/* ---- Sidebar-Layout (2-spaltig: Avatar-Card + Content)
   Genutzt von Profil UND Clan-Details ---- */
.layout_2col { display: grid; grid-template-columns: 275px 1fr; gap: 20px; }
.card { background: rgba(26,29,37,0.95); border-radius: 10px; padding: 15px; }
.avatar_large { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 3px; display: block; }
.username { font-size: 22px; font-weight: 600; margin-bottom: 5px; }
.muted { color: var(--text-muted); font-size: 13px; }

@media (max-width: 900px) {
    .layout_2col { grid-template-columns: 1fr; }
    .avatar_large { width: 100px; height: 100px; display: block; margin: 0 auto 10px; }
    .layout_2col > div:first-child .card { text-align: center; }
}

/* ---- Content-Block (generische Card mit Titel, z.B. Profil-Sidebar, Forum-Boards) ---- */
.content_block {
    padding: 12px;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    background-color: rgba(30,30,40,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.content_block_header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
    padding-bottom: 6px;
}
.content_block_body {
    gap: 10px;
}
.content_block_title {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 5px #000;
    margin-bottom: 10px;
}
.content_block_title a { color: #ffd700; text-decoration: none; }
.content_block_title a:hover { color: #fffacd; }

/* 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-card);
  border-radius: 5px;
  margin: 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;
  bottom: 8px;
  left: 8px;
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(0,0,0,0.7);
  z-index: 3;
  background-color: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-block;
  max-width: calc(100% - 16px);
  box-sizing: border-box;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.85);
  font-size: var(--fs-body);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.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;
  color: #fff;
  text-shadow: 0 0 8px rgba(0,0,0,0.7);
  z-index: 3;
  background-color: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-block;
  max-width: calc(100% - 16px);
  box-sizing: border-box;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.85);
}
.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);
}