/* =====================================================================
   Project Future – Forum
   Aufbau angelehnt an WoltLab Suite / Burning Board: dunkler Kopf,
   Menüleiste, Kästen mit Kopfzeile, Beiträge mit Autorenspalte links.
   ===================================================================== */

:root {
  --accent: #3a6d9c;
  --accent-hover: #2d5a84;
  --accent-soft: #e8f0f8;
  --header-bg: #1d2b3a;
  --header-bg-2: #24384d;
  --header-text: #fff;
  --menu-bg: #2c4a68;
  --menu-text: #dbe6f1;
  --menu-active: #3a6d9c;

  --page-bg: #eef1f5;
  --box-bg: #fff;
  --box-head: #f6f8fa;
  --border: #dde3ea;
  --border-strong: #c9d2dc;
  --text: #2b3340;
  --text-muted: #6b7684;
  --link: #2f6aa3;
  --link-hover: #1e4f80;
  --unread: #e57c13;
  --input-bg: #fff;
  --code-bg: #f4f6f8;
  --quote-bg: #f7f9fb;
  --row-hover: #f8fafc;
  --sticky-bg: #fffbea;

  --team1: #1f8a70;
  --team2: #2e7d32;
  --team3: #c0392b;
  --team4: #8e44ad;
  --team5: #d35400;

  --red: #c0392b;
  --green: #2e7d32;
  --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 1px 1px rgba(20, 30, 45, .04);
  --radius: 4px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root[data-color-scheme="auto"] { --_dark: 1; }
}
:root[data-color-scheme="dark"] { --_dark: 1; }

@media (prefers-color-scheme: dark) {
  :root[data-color-scheme="auto"] {
    --accent: #5b93c7; --accent-hover: #74a7d6; --accent-soft: #1f2d3c;
    --header-bg: #10161e; --header-bg-2: #172231; --menu-bg: #1a2735; --menu-text: #b9c7d6; --menu-active: #2c4a68;
    --page-bg: #13181f; --box-bg: #1b222b; --box-head: #212a35; --border: #2c3643; --border-strong: #3a4656;
    --text: #d9e0e8; --text-muted: #8f9cab; --link: #7fb0e0; --link-hover: #a8cbee; --input-bg: #141a21;
    --code-bg: #141a21; --quote-bg: #1f2731; --row-hover: #1f2731; --sticky-bg: #262414;
    --team1: #3ec9a3; --team2: #6cc36f; --team3: #ef6b5b; --team4: #c08ae0; --team5: #f39c4f;
    color-scheme: dark;
  }
}
:root[data-color-scheme="dark"] {
  --accent: #5b93c7; --accent-hover: #74a7d6; --accent-soft: #1f2d3c;
  --header-bg: #10161e; --header-bg-2: #172231; --menu-bg: #1a2735; --menu-text: #b9c7d6; --menu-active: #2c4a68;
  --page-bg: #13181f; --box-bg: #1b222b; --box-head: #212a35; --border: #2c3643; --border-strong: #3a4656;
  --text: #d9e0e8; --text-muted: #8f9cab; --link: #7fb0e0; --link-hover: #a8cbee; --input-bg: #141a21;
  --code-bg: #141a21; --quote-bg: #1f2731; --row-hover: #1f2731; --sticky-bg: #262414;
  --team1: #3ec9a3; --team2: #6cc36f; --team3: #ef6b5b; --team4: #c08ae0; --team5: #f39c4f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font: 14px/1.55 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 .8em; }
code { font-family: var(--mono); font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
img { max-width: 100%; }
.small { font-size: 12px; }
.muted { color: var(--text-muted); }
.inline { display: inline; margin: 0; }
.online { color: var(--green); font-weight: 600; }

.skipLink { position: absolute; left: -9999px; }
.skipLink:focus { left: 10px; top: 10px; z-index: 100; background: #fff; padding: 6px 10px; }

.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.icon.small { width: 15px; height: 15px; vertical-align: -2px; }
.icon.tiny { width: 12px; height: 12px; vertical-align: -1px; }
.flipY .icon { transform: rotate(180deg); }

.layoutBoundary { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ---------- Kopf ---------- */
.pageHeader { background: linear-gradient(180deg, var(--header-bg-2), var(--header-bg)); color: var(--header-text); }
.headerTopInner { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.logo { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none !important; }
.logo:hover { color: #fff; }
.logoMark {
  width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; font-size: 19px; letter-spacing: -.5px; color: #fff;
  background: linear-gradient(135deg, #f39c12, #d35400); box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.logoText { display: flex; flex-direction: column; line-height: 1.15; }
.logoText strong { font-size: 22px; font-weight: 700; letter-spacing: .2px; }
.logoText small { font-size: 12px; opacity: .7; text-transform: uppercase; letter-spacing: 1.5px; }

.headerSearch { flex: 1; max-width: 420px; margin-left: auto; display: flex; }
.headerSearch input[type="search"] {
  flex: 1; min-width: 0; border: 0; border-radius: var(--radius) 0 0 var(--radius); padding: 8px 12px;
  background: rgba(255, 255, 255, .12); color: #fff; font: inherit;
}
.headerSearch input::placeholder { color: rgba(255, 255, 255, .6); }
.headerSearch input[type="search"]:focus { outline: none; background: rgba(255, 255, 255, .2); }
.headerSearch button { border: 0; border-radius: 0 var(--radius) var(--radius) 0; padding: 0 12px; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer; }

.userPanel { display: flex; align-items: center; gap: 6px; }
.headerButton {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  color: #fff; background: transparent; border: 0; cursor: pointer;
}
.headerButton:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.headerButton .badge { position: absolute; top: 1px; right: 0; }
.schemeToggle .whenDark { display: none; }
:root[data-color-scheme="dark"] .schemeToggle .whenDark { display: block; }
:root[data-color-scheme="dark"] .schemeToggle .whenLight { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-color-scheme="auto"] .schemeToggle .whenDark { display: block; }
  :root[data-color-scheme="auto"] .schemeToggle .whenLight { display: none; }
}
.headerLogin { color: #fff; display: inline-flex; gap: 6px; align-items: center; padding: 7px 14px; border-radius: var(--radius); background: var(--accent); }
.headerLogin:hover { color: #fff; background: var(--accent-hover); text-decoration: none; }

.userMenu { position: relative; }
.userMenu > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 20px; }
.userMenu > summary::-webkit-details-marker { display: none; }
.userMenu > summary:hover { background: rgba(255, 255, 255, .12); }
.userMenuName { font-weight: 600; }

.dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px;
  background: var(--box-bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18); padding: 6px 0;
}
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 14px; color: var(--text);
  background: none; border: 0; font: inherit; text-align: left; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--row-hover); color: var(--link); text-decoration: none; }
.dropdown a.active { font-weight: 600; color: var(--link); }
.dropdown form { margin: 0; }
.dropdown .danger { color: var(--red); }
.dropdownHead { display: flex; gap: 10px; align-items: center; padding: 8px 14px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdownHead strong { display: block; }
.dropdownHead small { color: var(--text-muted); }
.dropdownWide { min-width: 300px; }
.dropdownForm { padding: 8px 14px; border-top: 1px solid var(--border); display: grid; gap: 6px; }
.dropdownForm label { font-weight: 600; font-size: 12px; color: var(--text-muted); }

.mainMenu { background: var(--menu-bg); }
.mainMenu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.mainMenu li a {
  display: flex; align-items: center; gap: 7px; padding: 11px 16px; color: var(--menu-text);
  font-weight: 500; text-decoration: none; border-bottom: 3px solid transparent;
}
.mainMenu li a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.mainMenu li.active a { color: #fff; background: var(--menu-active); border-bottom-color: #f39c12; }
.mainMenu li.external { margin-left: auto; }
.mainMenuToggle { display: none; }

/* ---------- Inhalt ---------- */
.pageBody { flex: 1; padding: 18px 0 32px; }
.breadcrumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--link); }

.contentHeader { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.contentHeader h1 { font-size: 24px; font-weight: 500; }
.contentHeaderDescription { margin: 4px 0 0; color: var(--text-muted); }
.contentHeaderActions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.contentWrap.withSidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.content { min-width: 0; }

.globalNotice, .info, .flash {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--box-bg); margin-bottom: 14px;
}
.globalNotice { border-left: 4px solid var(--accent); }
.globalNotice > div { flex: 1; }
.noticeError { border-left-color: var(--red); }
.info { color: var(--text-muted); background: var(--box-head); }
.flash-success { border-color: #b9dfbf; background: #eef8ef; color: #20612a; }
.flash-error { border-color: #f0c2bd; background: #fdf0ee; color: #922b21; }
:root[data-color-scheme="dark"] .flash-success { background: #15261a; color: #8fd59a; border-color: #23472b; }
:root[data-color-scheme="dark"] .flash-error { background: #2c1715; color: #f19b91; border-color: #5a2722; }

/* ---------- Kästen ---------- */
.box, .boardCategory, .threadListBox, .formBox {
  background: var(--box-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px;
}
.boxTitle, .categoryTitle {
  font-size: 15px; font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--box-head);
  display: flex; gap: 8px; align-items: center; border-radius: var(--radius) var(--radius) 0 0;
}
.categoryTitle { font-size: 16px; color: var(--accent); background: var(--box-bg); border-bottom: 2px solid var(--accent); }
.boxTitle a { color: inherit; }
.boxContent { padding: 14px 16px; }
.sidebar .box { margin-bottom: 16px; }
.sidebar .boxTitle { font-size: 14px; }
.formBox { padding: 18px; }

.emptyState { text-align: center; padding: 40px 20px; color: var(--text-muted); background: var(--box-bg); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.emptyState .icon { width: 36px; height: 36px; opacity: .5; margin-bottom: 8px; }
.emptyState p { margin: 0; }

/* ---------- Badges / Labels ---------- */
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--unread); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.badgeRed { background: var(--red); }
.badgeUnread { margin-left: 8px; vertical-align: 2px; }
.mainMenu .badge { margin-left: 2px; }
.label { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 3px; font-size: 11px; font-weight: 600; background: var(--box-head); border: 1px solid var(--border); color: var(--text-muted); vertical-align: 1px; }
.labelRed { background: #fdecea; color: var(--red); border-color: #f5c6c0; }
.labelBlue { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.prefix { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 11.5px; font-weight: 600; color: #fff; vertical-align: 1px; margin-right: 4px; line-height: 18px; }
.prefix-blue { background: #3a6d9c; }
.prefix-red { background: #c0392b; }
.prefix-green { background: #2e7d32; }
.prefix-orange { background: #e67e22; }
.prefix-yellow { background: #d4ac0d; color: #2b2b2b; }
.prefix-violet { background: #8e44ad; }
.prefix-grey { background: #7f8c8d; }
h1 .prefix { font-size: 14px; vertical-align: 4px; }

.username { font-weight: 600; }
.username.team1 { color: var(--team1); }
.username.team2 { color: var(--team2); }
.username.team3 { color: var(--team3); }
.username.team4 { color: var(--team4); }
.username.team5 { color: var(--team5); }
.teamBadge { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .4px; }
.teamBadge.team1 { background: var(--team1); }
.teamBadge.team2 { background: var(--team2); }
.teamBadge.team3 { background: var(--team3); }
.teamBadge.team4 { background: var(--team4); }
.teamBadge.team5 { background: var(--team5); }
.factionBadge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; border-radius: 10px; font-size: 11.5px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--faction) 45%, transparent); background: color-mix(in srgb, var(--faction) 12%, transparent); }
.factionBadge small { font-weight: 400; color: var(--text-muted); }
.factionDot { width: 8px; height: 8px; border-radius: 50%; background: var(--faction); }
.teamLegend { margin: 10px 0 0; font-size: 11.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; }

.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; vertical-align: middle; background: var(--box-head); }
.avatarLetter { display: inline-grid; place-items: center; color: #fff; font-weight: 700; user-select: none; }

/* ---------- Buttons & Formulare ---------- */
.button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--box-bg); color: var(--text); font: inherit; font-weight: 500;
  cursor: pointer; text-decoration: none !important; white-space: nowrap; line-height: 1.3;
}
.button:hover { background: var(--row-hover); color: var(--link); border-color: var(--accent); }
.button.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.buttonPrimary { background: var(--accent); border-color: var(--accent); color: #fff; }
.buttonPrimary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.buttonWide { width: 100%; justify-content: center; padding: 10px; }
.button.small { padding: 4px 9px; font-size: 12.5px; }
.button.danger { color: var(--red); }
.button.danger:hover { border-color: var(--red); }
details > summary.button { list-style: none; }
details > summary.button::-webkit-details-marker { display: none; }
.modMenu, .sortMenu { position: relative; display: inline-block; }

input[type="text"], input[type="search"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
  font: inherit; color: var(--text); background: var(--input-bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 7px 10px; width: 100%; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.5; }
select { width: auto; }
.formRow { margin-bottom: 14px; }
.formRow > label:not(.check) { display: block; font-weight: 600; margin-bottom: 5px; }
.formRow label small { font-weight: 400; color: var(--text-muted); }
.formOptions { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.check input { margin: 0; }
.formSubmit { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.formGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.formGrid .formWide { grid-column: 1 / -1; }
.formGrid select { width: 100%; }
.titleWithPrefix { display: flex; gap: 8px; }
.stackForm { display: grid; gap: 6px; margin-bottom: 12px; }
.dangerZone { border-color: #f0c2bd; }
.narrow { width: 80px !important; }

/* ---------- Seitenzahlen & Leisten ---------- */
.listToolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; min-height: 0; }
.listToolbar:empty { display: none; }
.listToolbarRight { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.listToolbarRight .dropdown { right: 0; }
.pagination { display: flex; align-items: center; gap: 4px; }
.pagination ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 3px; }
.pagination li a, .pagination li span, .pageNav {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--box-bg); color: var(--text); font-weight: 500;
}
.pagination li a:hover, .pageNav:hover { border-color: var(--accent); color: var(--link); text-decoration: none; }
.pagination li.active span { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination li.gap span { border: 0; background: none; }
.miniPages { margin-left: 6px; font-size: 11.5px; }
.miniPages a, .miniPages span { margin-right: 2px; padding: 0 4px; border: 1px solid var(--border); border-radius: 3px; color: var(--text-muted); }
.miniPages span { border: 0; }
.tabMenu { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.tabMenu a { padding: 8px 14px; color: var(--text-muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabMenu a:hover { color: var(--link); text-decoration: none; }
.tabMenu a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabMenu.compact { margin-bottom: 0; border-bottom: 0; }
.searchInline { display: flex; gap: 6px; }
.searchInline input { width: 200px; }

/* ---------- Forenliste ---------- */
.boardList, .threadList { list-style: none; margin: 0; padding: 0; }
.boardRow {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 280px; gap: 14px; align-items: center;
  padding: 14px 16px; border-top: 1px solid var(--border);
}
.boardRow:first-child { border-top: 0; }
.boardRow:hover { background: var(--row-hover); }
.boardIcon, .threadIcon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--box-head); color: var(--text-muted); }
.boardIcon .icon { width: 20px; height: 20px; }
.boardIcon.new { background: var(--accent); color: #fff; }
.boardTitle { font-size: 16px; font-weight: 500; }
.boardRow.unread .boardTitle a { font-weight: 700; }
.boardDescription { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; }
.subBoards { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 13px; }
.subBoards li { display: flex; align-items: center; gap: 4px; color: var(--text-muted); }
.subBoards li.unread a { font-weight: 700; }
.boardStats, .threadStats { margin: 0; display: grid; gap: 2px; font-size: 12.5px; }
.boardStats div, .threadStats div { display: flex; justify-content: space-between; gap: 8px; }
.boardStats dt, .threadStats dt { color: var(--text-muted); }
.boardStats dd, .threadStats dd { margin: 0; font-weight: 600; }
.boardLast, .threadLast { display: flex; gap: 10px; align-items: center; min-width: 0; font-size: 13px; }
.boardLastText { display: flex; flex-direction: column; min-width: 0; }
.boardLastTitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.boardLastText span { color: var(--text-muted); font-size: 12px; }

/* ---------- Themenliste ---------- */
.threadListHead {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px 220px; gap: 14px; padding: 9px 16px 9px 70px;
  background: var(--box-head); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.threadRow {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px 220px; gap: 14px; align-items: center;
  padding: 11px 16px; border-top: 1px solid var(--border);
}
.threadRow:first-child { border-top: 0; }
.threadRow:hover { background: var(--row-hover); }
.threadRow.sticky { background: var(--sticky-bg); }
.threadRow.deleted { opacity: .6; }
.threadIcon { position: relative; overflow: visible; }
.threadIcon.new::after { content: ""; position: absolute; right: -2px; top: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--unread); border: 2px solid var(--box-bg); }
.threadTitleLine { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.threadTitle { font-size: 15px; font-weight: 500; }
.threadRow.unread .threadTitle { font-weight: 700; }
.stateIcon { color: var(--text-muted); }
.threadMeta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.threadLast > div { display: flex; flex-direction: column; min-width: 0; }
.threadLastTime { font-size: 12px; color: var(--text-muted); }

/* ---------- Seitenleiste ---------- */
.statsList { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.statsList dt { color: var(--text-muted); }
.statsList dd { margin: 0; font-weight: 600; text-align: right; }
.sidebarList { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sidebarList li { display: flex; gap: 10px; align-items: flex-start; }
.sidebarList li > div { min-width: 0; display: flex; flex-direction: column; }
.sidebarList a { font-weight: 500; overflow-wrap: anywhere; }
.sidebarList small { color: var(--text-muted); }
.onlineList { margin: 0; }
.sidebarList li.memberLeft { opacity: .55; }
.inviteForm { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.dropdown .badge { margin-left: auto; }
.profileActions + .profileActions { grid-column: auto; }

/* ---------- Beiträge ---------- */
.messageList { display: grid; gap: 14px; margin-bottom: 14px; }
.message {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); background: var(--box-bg);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.messageSidebar { padding: 18px 14px; text-align: center; border-right: 1px solid var(--border); background: var(--box-head); border-radius: var(--radius) 0 0 var(--radius); }
.messageAvatar { position: relative; display: inline-block; }
.onlineDot { position: absolute; right: 6px; bottom: 6px; width: 14px; height: 14px; border-radius: 50%; background: #2ecc71; border: 2px solid var(--box-bg); }
.messageAuthor { margin-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.messageAuthor .username { font-size: 15px; overflow-wrap: anywhere; }
.userTitle { font-size: 12px; color: var(--text-muted); }
.messageStats { margin: 12px 0 0; display: grid; grid-template-columns: auto auto; gap: 2px 8px; font-size: 12px; text-align: left; justify-content: center; }
.messageStats dt { color: var(--text-muted); }
.messageStats dd { margin: 0; font-weight: 600; }
.messageContent { display: flex; flex-direction: column; min-width: 0; }
.messageHeader { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
.messageHeaderMeta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.messageAuthorMobile { display: none; }
.messageTime { color: var(--text-muted); }
.messageNumber { color: var(--text-muted); font-weight: 600; }
.messageBody { padding: 16px 18px; flex: 1; font-size: 14.5px; overflow-wrap: anywhere; }
.messageEdited { margin: 0 18px 10px; font-size: 12px; color: var(--text-muted); }
.messageSignature { margin: 0 18px 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--text-muted); max-height: 180px; overflow: hidden; }
.messageFooter { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--border); }
.messageButtons { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.messageButtons a, .messageButtons button {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: var(--radius); color: var(--text-muted);
  background: none; border: 0; font: inherit; font-size: 12.5px; cursor: pointer;
}
.messageButtons a:hover, .messageButtons button:hover { background: var(--row-hover); color: var(--link); text-decoration: none; }
.messageIp { font-size: 11px; color: var(--text-muted); font-family: var(--mono); padding: 0 6px; }
.messageDeleted { opacity: .65; border-style: dashed; }
.messageTeam .messageSidebar { box-shadow: inset 3px 0 0 var(--accent); }
.messageByAuthor .messageHeader::after { content: "Themenersteller"; font-size: 11px; color: var(--accent); font-weight: 600; margin-left: auto; margin-right: 12px; order: 0; }
.messageByAuthor .messageNumber { order: 1; }

.likeBox { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.likeButton { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--box-bg); color: var(--text-muted); cursor: pointer; font: inherit; font-size: 12.5px; }
.likeButton:hover { border-color: var(--accent); color: var(--accent); }
.likeButton.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.likeButton.static { cursor: default; }
.likeCount:empty { display: none; }

.quickReply { display: grid; grid-template-columns: 180px minmax(0, 1fr); background: var(--box-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.quickReplySidebar { padding-top: 22px; }
.quickReplyForm { padding: 14px 18px; }
.quickReplyForm .formSubmit { margin-top: 10px; }

/* ---------- Editor ---------- */
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--input-bg); }
.editor:focus-within { border-color: var(--accent); }
.editorToolbar { display: flex; flex-wrap: wrap; gap: 1px; padding: 4px; border-bottom: 1px solid var(--border); background: var(--box-head); border-radius: var(--radius) var(--radius) 0 0; }
.editorToolbar button { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border: 0; background: none; color: var(--text); border-radius: 3px; cursor: pointer; }
.editorToolbar button:hover, .editorToolbar button.active { background: var(--box-bg); color: var(--accent); }
.editorToolbar .sep { width: 1px; background: var(--border); margin: 4px 4px; }
.editorSpacer { flex: 1; }
.editorPreviewToggle { display: inline-flex !important; gap: 5px; padding: 0 8px; font: inherit; font-size: 12.5px; }
.editor textarea { border: 0; border-radius: 0; outline: none !important; display: block; min-height: 120px; background: transparent; }
.editorPreview { padding: 12px; min-height: 120px; border-top: 1px dashed var(--border); }
.editorSmilies { padding: 6px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 2px; }
.editorSmilies button { font-size: 20px; border: 0; background: none; cursor: pointer; padding: 2px 4px; border-radius: 3px; }
.editorSmilies button:hover { background: var(--row-hover); }
.editorHint { padding: 5px 10px; font-size: 11.5px; color: var(--text-muted); border-top: 1px solid var(--border); background: var(--box-head); border-radius: 0 0 var(--radius) var(--radius); }
.editorCompact .editorHint { display: none; }

/* ---------- BBCode-Ausgabe ---------- */
.bbcode ul, .bbcode ol { margin: .4em 0 .8em; padding-left: 26px; }
.bbcode .bb-center { text-align: center; }
.bbcode .bb-right { text-align: right; }
.bbcode .bb-img { max-height: 800px; border-radius: 3px; vertical-align: middle; }
.bb-quote { margin: 10px 0; border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--quote-bg); border-radius: var(--radius); }
.bb-quoteHead { padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.bb-quoteBody { padding: 10px 12px; }
.bb-code { margin: 10px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.bb-codeHead { padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.bb-code pre { margin: 0; padding: 10px 12px; overflow: auto; max-height: 500px; font-size: 13px; line-height: 1.5; }
.bb-icode { background: var(--code-bg); border: 1px solid var(--border); padding: 0 4px; border-radius: 3px; }
.bb-spoiler { margin: 10px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.bb-spoiler summary { padding: 6px 12px; cursor: pointer; font-weight: 600; background: var(--box-head); }
.bb-spoiler > div { padding: 10px 12px; }
.bb-video { margin: 10px 0; max-width: 640px; aspect-ratio: 16 / 9; background: #111; border-radius: var(--radius); overflow: hidden; }
.bb-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.bb-videoLoad { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 16px; border: 0; background: linear-gradient(135deg, #1c1c1c, #333); color: #fff; cursor: pointer; font: inherit; text-align: left; padding: 20px; }
.bb-videoLoad small { display: block; opacity: .7; font-size: 12px; margin-top: 2px; }
.bb-videoPlay { width: 56px; height: 56px; border-radius: 50%; background: #e62117; display: grid; place-items: center; font-size: 22px; flex: none; }
.smiley { font-size: 1.15em; }
.mention { font-weight: 600; background: var(--accent-soft); padding: 0 3px; border-radius: 3px; }
mark { background: #ffe58a; color: inherit; padding: 0 1px; }

/* ---------- Anmelden ---------- */
.loginWrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; max-width: 980px; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 4px; }

/* ---------- Profil, Mitglieder ---------- */
.profileHeader { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; background: var(--box-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.profileAvatar { position: relative; }
.profileAvatar .onlineDot { right: 10px; bottom: 10px; width: 18px; height: 18px; }
.profileInfo h1 { font-size: 26px; }
.profileTitle { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; color: var(--text-muted); }
.profileFacts { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: 13px; }
.profileStats { display: flex; gap: 24px; margin: 0; }
.profileStats div { text-align: center; }
.profileStats dt { font-size: 12px; color: var(--text-muted); }
.profileStats dd { margin: 0; font-size: 20px; font-weight: 600; }
.profileActions { grid-column: 1 / -1; }
.profileColumns { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.recentPosts { list-style: none; margin: 0; padding: 0; }
.recentPosts li { padding: 10px 0; border-top: 1px solid var(--border); }
.recentPosts li:first-child { border-top: 0; padding-top: 0; }
.recentTitle { font-weight: 600; margin-right: 8px; }
.recentPosts p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.memberGrid { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.memberCard { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--box-bg); border: 1px solid var(--border); border-radius: var(--radius); }
.memberCard > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.box .memberGrid { margin: 0; }
.teamGroup.team1 .boxTitle { color: var(--team1); }
.teamGroup.team2 .boxTitle { color: var(--team2); }
.teamGroup.team3 .boxTitle { color: var(--team3); }
.teamGroup.team4 .boxTitle { color: var(--team4); }
.teamGroup.team5 .boxTitle { color: var(--team5); }
.avatarSettings { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }

/* ---------- Benachrichtigungen, Suche, Moderation ---------- */
.notificationList, .searchResults, .reportList, .simpleList { list-style: none; margin: 0; padding: 0; }
.notificationList { background: var(--box-bg); border: 1px solid var(--border); border-radius: var(--radius); }
.notificationList li { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--border); }
.notificationList li:first-child { border-top: 0; }
.notificationList li a { flex: 1; color: var(--text); }
.notificationList li.unseen { background: var(--accent-soft); }
.notificationList li.unseen a { font-weight: 500; }
.notificationIcon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--box-head); color: var(--accent); flex: none; }
.searchFields { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.searchFields input[name="q"] { flex: 2; min-width: 200px; width: auto; }
.searchFields input[name="author"] { flex: 1; min-width: 150px; width: auto; }
.searchResults li { display: flex; gap: 12px; padding: 14px 16px; background: var(--box-bg); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.searchResults p { margin: 6px 0 0; font-size: 13px; }
.searchTitle { font-weight: 600; font-size: 15px; }
.reportList .box { margin-bottom: 12px; }
.reportReason { font-weight: 500; margin: 8px 0; }
.simpleList li { padding: 8px 0; border-top: 1px solid var(--border); }
.simpleList li:first-child { border-top: 0; }
.table { width: 100%; border-collapse: collapse; background: var(--box-bg); border: 1px solid var(--border); font-size: 13px; }
.table th, .table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { background: var(--box-head); font-weight: 600; }

/* ---------- Verwaltung ---------- */
.acpTree, .acpTree ul { list-style: none; margin: 0; padding: 0; }
.acpTree { background: var(--box-bg); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; }
.acpTree ul { margin-left: 28px; border-left: 2px solid var(--border); }
.acpBoardRow { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.acpTree > li:first-child > .acpBoardRow { border-top: 0; }
.acpBoard.depth0 > .acpBoardRow { background: var(--box-head); }
.acpBoard.depth0 > .acpBoardRow .acpBoardTitle { font-weight: 700; }
.acpBoardTitle { font-weight: 500; }
.acpPerms { margin-left: auto; }
.acpMove { display: inline-flex; gap: 2px; }
.acpMove button { border: 1px solid var(--border); background: var(--box-bg); color: var(--text-muted); border-radius: 3px; width: 24px; height: 24px; display: grid; place-items: center; cursor: pointer; }
.acpMove button:hover { color: var(--accent); border-color: var(--accent); }
.prefixRow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.prefixRow input[type="text"] { width: 180px; }
.prefixPreview { min-width: 110px; }

/* ---------- Fuß ---------- */
.pageFooter { background: var(--header-bg); color: rgba(255, 255, 255, .7); font-size: 13px; }
.footerInner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footerInner code { background: rgba(255, 255, 255, .1); padding: 1px 6px; border-radius: 3px; color: #fff; }
.footerLinks { display: flex; gap: 16px; flex-wrap: wrap; }
.footerLinks a { color: rgba(255, 255, 255, .8); }
.footerLinks a:hover { color: #fff; }

/* ---------- Mobil ---------- */
@media (max-width: 1100px) {
  .contentWrap.withSidebar { grid-template-columns: minmax(0, 1fr); }
  .boardRow { grid-template-columns: 44px minmax(0, 1fr) 230px; }
  .boardStats { display: none; }
  .profileColumns { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 800px) {
  .layoutBoundary { padding: 0 12px; }
  .headerTopInner { min-height: 64px; gap: 10px; flex-wrap: wrap; padding: 8px 0; }
  .logoMark { width: 38px; height: 38px; font-size: 15px; }
  .logoText strong { font-size: 18px; }
  .headerSearch { order: 3; max-width: none; flex-basis: 100%; margin: 0 0 4px; }
  .userMenuName { display: none; }
  .mainMenuToggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 0; background: none; border: 0; color: var(--menu-text); font: inherit; font-weight: 600; cursor: pointer; }
  .mainMenu ul { display: none; flex-direction: column; padding-bottom: 6px; }
  .mainMenu.open ul { display: flex; }
  .mainMenu li.external { margin-left: 0; }
  .mainMenu li a { border-bottom: 0; border-left: 3px solid transparent; }
  .mainMenu li.active a { border-left-color: #f39c12; }

  .contentHeader h1 { font-size: 20px; }
  .boardRow { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .boardIcon, .threadIcon { width: 36px; height: 36px; }
  .boardLast { grid-column: 2; font-size: 12px; }
  .boardLast .avatar { display: none; }
  .threadListHead { display: none; }
  .threadRow { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
  .threadStats { display: none; }
  .threadLast { grid-column: 2; font-size: 12px; }
  .threadLast .avatar { display: none; }
  .threadLast > div { flex-direction: row; gap: 6px; flex-wrap: wrap; }

  .message, .quickReply { grid-template-columns: minmax(0, 1fr); }
  .messageSidebar { display: none; }
  .messageAuthorMobile { display: inline; }
  .messageHeader, .messageBody { padding-left: 12px; padding-right: 12px; }
  .messageButtons span { display: none; }
  .quickReplySidebar { display: none; }
  .quickReplyForm { padding: 12px; }

  .loginWrap { grid-template-columns: minmax(0, 1fr); }
  .profileHeader { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .profileTitle, .profileFacts { justify-content: center; }
  .formGrid { grid-template-columns: minmax(0, 1fr); }
  .titleWithPrefix { flex-direction: column; }
  .titleWithPrefix select { width: 100%; }
  .searchInline input { width: 140px; }
  .listToolbarRight { margin-left: 0; }
  .table { display: block; overflow-x: auto; }
  .dropdownWide { min-width: min(300px, calc(100vw - 24px)); }
  .acpPerms { margin-left: 0; width: 100%; }
}
