.badge { background: var(--accent); color:#fff; border-radius:999px; padding:1px 7px; font-size:0.75rem; font-weight:600; }
.rank-badge { display:inline-block; padding:2px 8px; border-radius:6px; font-size:0.78rem; font-weight:600; background:rgba(255,255,255,0.06); border:1px solid var(--border); }
.role-pill { display:inline-block; padding:2px 8px; border-radius:6px; font-size:0.75rem; font-weight:600; }
.role-pill.owner, .role-pill.moderation { background:rgba(255,107,107,0.15); color:#ff6b6b; }
.role-pill.administrator, .role-pill.super-admin { background:rgba(77,159,255,0.15); color:#4dabf7; }
.role-pill.moderator { background:rgba(81,207,102,0.15); color:#51cf66; }

/* Forum overview (WoltLab-like, IT style) */
.cat-section { margin: 28px 0 18px; }
.cat-header { font-size:1.05rem; font-weight:600; letter-spacing:0.02em; color:var(--text); padding-bottom:8px; border-bottom:2px solid var(--accent); margin-bottom:0; }
.forum-row { display:grid; grid-template-columns: 56px 1fr minmax(200px, 280px); gap:16px; align-items:center; background:var(--card); border:1px solid var(--border); border-top:none; padding:16px 18px; transition: background 0.12s; }
.cat-section .forum-row:first-of-type { border-top:1px solid var(--border); border-radius:0; }
.forum-row:hover { background: var(--card-hover); }
.forum-icon { width:48px; height:48px; border-radius:10px; background: var(--accent-soft); color: var(--accent); display:flex; align-items:center; justify-content:center; }
.forum-icon svg { width:26px; height:26px; }
.forum-main a.forum-name { font-weight:600; font-size:1.05rem; color:var(--text); text-decoration:none; }
.forum-main a.forum-name:hover { color: var(--accent); }
.forum-desc { color:var(--muted); font-size:0.9rem; margin:4px 0 6px; }
.forum-meta { color:var(--muted); font-size:0.82rem; }
.forum-subs { margin-top:6px; display:flex; flex-wrap:wrap; gap:8px; }
.forum-subs a { color:var(--muted); font-size:0.8rem; text-decoration:none; display:inline-flex; align-items:center; gap:4px; }
.forum-subs a:hover { color: var(--accent); }
.forum-subs svg { width:12px; height:12px; opacity:0.7; }
.forum-latest { font-size:0.82rem; color:var(--muted); }
.latest-item { display:flex; gap:10px; align-items:flex-start; margin-bottom:10px; }
.latest-item:last-child { margin-bottom:0; }
.avatar-fallback { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:0.75rem; font-weight:600; color:#fff; flex-shrink:0; }
.latest-title { color:var(--text); text-decoration:none; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:220px; }
.latest-title:hover { color: var(--accent); }
.latest-meta { font-size:0.75rem; }
@media (max-width: 800px) {
  .forum-row { grid-template-columns: 48px 1fr; }
  .forum-latest { grid-column: 1 / -1; padding-top:8px; border-top:1px dashed var(--border); }
}

/* Thread list */
.thread-row { display:grid; grid-template-columns: 1fr auto; gap:12px; align-items:center; background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px; margin-bottom:8px; }
.thread-row:hover { background: var(--card-hover); }
.thread-row a { color:var(--text); text-decoration:none; font-weight:500; }
.thread-row a:hover { color: var(--accent); }
.thread-stats { color:var(--muted); font-size:0.82rem; text-align:right; white-space:nowrap; }

/* Profile */
.profile-banner { height:140px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(135deg, #0b1a2e 0%, #12324f 40%, #0e4d6e 70%, #0b0d12 100%); background-image: linear-gradient(135deg, #0b1a2e, #12324f 40%, #0e4d6e), repeating-linear-gradient(60deg, transparent, transparent 12px, rgba(77,159,255,0.05) 12px, rgba(77,159,255,0.05) 13px); border:1px solid var(--border); border-bottom:none; }
.profile-card { background:var(--card); border:1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); padding:20px 24px 28px; margin-bottom:20px; position:relative; }
.profile-avatar { width:88px; height:88px; border-radius:50%; border:3px solid var(--card); margin-top:-64px; background:#1e2330; display:flex; align-items:center; justify-content:center; font-size:2rem; font-weight:600; color:var(--accent); overflow:hidden; }
.profile-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-stats { display:grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap:12px; margin-top:18px; }
.profile-stat { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:8px; padding:12px; text-align:center; }
.profile-stat .n { font-size:1.3rem; font-weight:600; }
.profile-stat .l { color:var(--muted); font-size:0.8rem; }

/* Poll */
.poll-box { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px; margin:16px 0 20px; }
.poll-q { font-weight:600; margin-bottom:12px; }
.poll-opt { margin:8px 0; }
.poll-bar-wrap { background:rgba(255,255,255,0.05); border-radius:6px; height:22px; overflow:hidden; margin-top:4px; }
.poll-bar { height:100%; background:var(--accent); border-radius:6px; min-width:0; }
.poll-label { display:flex; justify-content:space-between; font-size:0.9rem; }

/* Post actions */
.post-actions { margin-top:12px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.post-actions form { display:inline; }
.btn-thanks { background:transparent; border:1px solid var(--border); color:var(--muted); border-radius:6px; padding:4px 10px; cursor:pointer; font-size:0.85rem; }
.btn-thanks.liked { border-color:var(--accent); color:var(--accent); }
.btn-thanks:hover { border-color:var(--accent); color:var(--accent); }
.report-form { display:none; margin-top:8px; width:100%; }
.report-form.open { display:block; }

/* Code copy */
.pre-wrap { position:relative; }
.pre-wrap .copy-btn { position:absolute; top:8px; right:8px; background:#1b1f29; border:1px solid var(--border); color:var(--muted); border-radius:4px; padding:2px 8px; font-size:0.75rem; cursor:pointer; }
.pre-wrap .copy-btn:hover { color:var(--accent); border-color:var(--accent); }

/* Auto-ban blur */
.ban-content { filter: blur(6px); user-select:none; cursor:pointer; transition: filter 0.15s; max-height:80px; overflow:hidden; background:rgba(0,0,0,0.3); padding:8px; border-radius:6px; font-family:monospace; font-size:0.85rem; }
.ban-content.revealed { filter:none; user-select:text; max-height:none; }

/* Chip spiel embed */
.spiel-frame-wrap { position:relative; width:100%; background:#000; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; aspect-ratio: 16 / 10; min-height:480px; }
.spiel-frame-wrap iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.spiel-bar { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }

/* Admin */
.admin-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap:16px; }
.admin-links { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.admin-links a { background:var(--card); border:1px solid var(--border); padding:8px 12px; border-radius:8px; text-decoration:none; color:var(--text); font-size:0.9rem; }
.admin-links a:hover { border-color:var(--accent); color:var(--accent); }

/* Notifications / messages */
.notif-item, .msg-item { background:var(--card); border:1px solid var(--border); border-radius:8px; padding:12px 14px; margin-bottom:8px; }
.notif-item.unread, .msg-item.unread { border-color: var(--accent); }
.progress-bar { background:rgba(255,255,255,0.06); border-radius:999px; height:10px; overflow:hidden; }
.progress-bar > span { display:block; height:100%; background:var(--accent); }
