/* =====================================================================
   RGN Forum – Stil angelehnt an den Standard-Stil der WoltLab Suite
   Farben zentral als Variablen: hier anpassen, um das Design zu ändern.
   ===================================================================== */
:root {
  --header-panel-bg: #2b5179;
  --header-bg: #3a6d9c;
  --header-text: #fff;
  --header-text-muted: rgba(255, 255, 255, .75);
  --header-hover: rgba(255, 255, 255, .12);

  --nav-bg: #fafafa;
  --page-bg: #fff;
  --sidebar-bg: #ecf1f7;
  --text: #3a3a3d;
  --muted: #7d8287;
  --link: #3a6d9c;
  --link-hover: #2b5179;
  --border: #dde1e5;
  --border-light: #eceff2;
  --row-hover: #f7f9fb;
  --section-head: #3a6d9c;

  --button-bg: #e5e9ec;
  --button-text: #3a4552;
  --button-hover: #d4dae0;
  --primary: #3a6d9c;
  --primary-hover: #2b5179;
  --danger: #c0392b;

  --input-bg: #fff;
  --input-border: #c8ced4;
  --focus: #3a6d9c;

  --footer-bg: #3a5065;
  --footer-text: #d9e1e8;
  --footer-copyright-bg: #324557;

  --unread: #3a6d9c;
  --notice-info-bg: #def0fd; --notice-info-text: #2d5e83; --notice-info-border: #a6d1f3;
  --notice-success-bg: #dff0d8; --notice-success-text: #3c763d; --notice-success-border: #b4dba6;
  --notice-warning-bg: #fcf8e3; --notice-warning-text: #8a6d3b; --notice-warning-border: #f2d999;
  --notice-error-bg: #f2dede; --notice-error-text: #a94442; --notice-error-border: #e4b9b9;

  --surface: #fff;
  --surface-alt: #f7f9fb;
  --surface-sunken: #f2f4f6;
  --icon-muted: #a7b3bf;
  --icon-bg: #f0f3f6;
  --text-soft: #555;
  --sticky-bg: #fbfcfd;
  --like-active-bg: #dbe8f4;
  --quote-bg: #f5f8fb;
  --quote-line: #a7c1db;
  --quote-border: #e3eaf1;
  --highlight-bg: #f0f6fc;
  --hover-overlay: rgba(0, 0, 0, .04);
  --editor-hover: #e3e7eb;
  --ms-bg: linear-gradient(170deg, #2e3237 0%, #26292d 55%, #212427 100%);
  --ms-box: #383d43;
  --ms-border: #4b5159;
  --ms-box-border: rgba(255, 255, 255, .07);
  --post-bg: #ececec;
  --post-strip: #e2e2e2;
  --post-btn: #d4d4d4;
  --post-btn-hover: #c4c4c4;
  --post-btn-text: #333;
  --pop-bg: #fff;
  --pop-text: #3a3a3d;
  --pop-strong: #1e1e1e;
  --pop-muted: #8a9097;
  --pop-border: #e6e9ec;
  --pop-hover: #f4f6f8;
  --pop-unread: #e8f1fa;
  --pop-unread-hover: #dbe8f4;
  --pop-icon: #3a6d9c;
  --pop-head-bg: #3a4047;
  --pop-head-text: #fff;
  --pop-footer-bg: #2f353b;
  --pop-footer-hover: #262b30;
  --pop-footer-text: #fff;

  --radius: 3px;
  --max-width: 1400px;
  --font: "Segoe UI", "DejaVu Sans", "Lucida Grande", "Helvetica", Arial, sans-serif;
  color-scheme: light;
}

/* ---------------------------------------------------------------------
   Darkmodus: folgt dem System, außer der Besucher hat "hell" gewählt.
   Die gleichen Werte stehen zweimal (System + manuelle Wahl).
   --------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --header-panel-bg: #18222d; --header-bg: #1f2d3b; --header-hover: rgba(255, 255, 255, .08);
    --nav-bg: #1a222b; --page-bg: #141a21; --sidebar-bg: #1c252f;
    --text: #d5dae0; --muted: #8b97a3; --link: #6fa8dc; --link-hover: #9cc6ee;
    --border: #2f3b48; --border-light: #26313c; --row-hover: #1b242e; --section-head: #7fb2e0;
    --button-bg: #2a3643; --button-text: #d5dae0; --button-hover: #364555;
    --primary: #3a6d9c; --primary-hover: #4a82b6; --danger: #b8443a;
    --input-bg: #10161c; --input-border: #364555; --focus: #6fa8dc;
    --footer-bg: #18222d; --footer-text: #a9b5c1; --footer-copyright-bg: #121920;
    --unread: #5b9bd5;
    --notice-info-bg: #16293b; --notice-info-text: #9cc6ee; --notice-info-border: #24496b;
    --notice-success-bg: #172b1d; --notice-success-text: #8fd19e; --notice-success-border: #2b5235;
    --notice-warning-bg: #2d2615; --notice-warning-text: #e3c879; --notice-warning-border: #5a4a1f;
    --notice-error-bg: #321b1b; --notice-error-text: #f0a5a0; --notice-error-border: #5e2a28;
    --surface: #19212a; --surface-alt: #1e2731; --surface-sunken: #222c37;
    --icon-muted: #5f6d7b; --icon-bg: #232e3a; --text-soft: #aab3bc; --sticky-bg: #18202a;
    --like-active-bg: #24405c; --quote-bg: #1d2834; --quote-line: #3f6a93; --quote-border: #2a3846;
    --highlight-bg: #1c2a39; --hover-overlay: rgba(255, 255, 255, .05); --editor-hover: #2c3845;
  --ms-bg: linear-gradient(170deg, #2a2e33 0%, #222529 55%, #1c1f22 100%); --ms-box: #33383e;
  --ms-border: #40464d; --ms-box-border: rgba(255, 255, 255, .06);
  --post-bg: #1d242c; --post-strip: #252e38;
  --post-btn: #2c3742; --post-btn-hover: #384656; --post-btn-text: #d5dae0;
  --pop-bg: #2b3036; --pop-text: #c9ced4; --pop-strong: #fff; --pop-muted: #7d848c; --pop-border: rgba(255, 255, 255, .06);
  --pop-hover: #343a41; --pop-unread: rgba(58, 109, 156, .22); --pop-unread-hover: rgba(58, 109, 156, .32); --pop-icon: #7fb2e0;
  --pop-head-bg: #2b3036; --pop-head-text: #fff;
  --pop-footer-bg: #22272c; --pop-footer-hover: #1b1f23; --pop-footer-text: #fff;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .theme-toggle .fa-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .fa-sun { display: inline-block; }
}
:root[data-theme="dark"] {
  --header-panel-bg: #18222d; --header-bg: #1f2d3b; --header-hover: rgba(255, 255, 255, .08);
  --nav-bg: #1a222b; --page-bg: #141a21; --sidebar-bg: #1c252f;
  --text: #d5dae0; --muted: #8b97a3; --link: #6fa8dc; --link-hover: #9cc6ee;
  --border: #2f3b48; --border-light: #26313c; --row-hover: #1b242e; --section-head: #7fb2e0;
  --button-bg: #2a3643; --button-text: #d5dae0; --button-hover: #364555;
  --primary: #3a6d9c; --primary-hover: #4a82b6; --danger: #b8443a;
  --input-bg: #10161c; --input-border: #364555; --focus: #6fa8dc;
  --footer-bg: #18222d; --footer-text: #a9b5c1; --footer-copyright-bg: #121920;
  --unread: #5b9bd5;
  --notice-info-bg: #16293b; --notice-info-text: #9cc6ee; --notice-info-border: #24496b;
  --notice-success-bg: #172b1d; --notice-success-text: #8fd19e; --notice-success-border: #2b5235;
  --notice-warning-bg: #2d2615; --notice-warning-text: #e3c879; --notice-warning-border: #5a4a1f;
  --notice-error-bg: #321b1b; --notice-error-text: #f0a5a0; --notice-error-border: #5e2a28;
  --surface: #19212a; --surface-alt: #1e2731; --surface-sunken: #222c37;
  --icon-muted: #5f6d7b; --icon-bg: #232e3a; --text-soft: #aab3bc; --sticky-bg: #18202a;
  --like-active-bg: #24405c; --quote-bg: #1d2834; --quote-line: #3f6a93; --quote-border: #2a3846;
  --highlight-bg: #1c2a39; --hover-overlay: rgba(255, 255, 255, .05); --editor-hover: #2c3845;
  --ms-bg: linear-gradient(170deg, #2a2e33 0%, #222529 55%, #1c1f22 100%); --ms-box: #33383e;
  --ms-border: #40464d; --ms-box-border: rgba(255, 255, 255, .06);
  --post-bg: #1d242c; --post-strip: #252e38;
  --post-btn: #2c3742; --post-btn-hover: #384656; --post-btn-text: #d5dae0;
  --pop-bg: #2b3036; --pop-text: #c9ced4; --pop-strong: #fff; --pop-muted: #7d848c; --pop-border: rgba(255, 255, 255, .06);
  --pop-hover: #343a41; --pop-unread: rgba(58, 109, 156, .22); --pop-unread-hover: rgba(58, 109, 156, .32); --pop-icon: #7fb2e0;
  --pop-head-bg: #2b3036; --pop-head-text: #fff;
  --pop-footer-bg: #22272c; --pop-footer-hover: #1b1f23; --pop-footer-text: #fff;
  color-scheme: dark;
}
:root[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
.theme-toggle .fa-sun { display: none; }
.theme-toggle { background: none; border: 0; cursor: pointer; font: inherit; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.3; }
code { font-family: Consolas, "Courier New", monospace; font-size: 13px; background: var(--surface-sunken); padding: 1px 5px; border-radius: 2px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 15px 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
[hidden] { display: none !important; }

.inner { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------------
   Kopfbereich: obere Leiste (Hauptmenü + Benutzer-Panel)
   --------------------------------------------------------------------- */
.page-header-panel { background: var(--header-panel-bg); color: var(--header-text); position: relative; z-index: 50; }
.page-header-panel .inner { display: flex; align-items: stretch; height: 50px; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 20px; padding: 0 12px; cursor: pointer; }

.main-menu { flex: 1; }
.main-menu > ul, .user-panel { display: flex; list-style: none; margin: 0; padding: 0; height: 100%; }
.main-menu > ul > li, .user-panel > li { position: relative; display: flex; }
.main-menu > ul > li > a, .user-panel > li > a, .user-panel > li > button {
  display: flex; align-items: center; gap: 7px; padding: 0 15px;
  color: var(--header-text); text-decoration: none; white-space: nowrap;
}
.main-menu > ul > li > a:hover, .user-panel > li > a:hover, .user-panel > li > button:hover,
.main-menu > ul > li.has-dropdown:hover > a, .user-panel > li.has-dropdown:hover > a { background: var(--header-hover); }
.main-menu > ul > li.active > a { background: var(--header-bg); }
.main-menu > ul > li > a i { opacity: .85; }

.panel-icon { position: relative; font-size: 17px; }
.badge-count {
  position: absolute; top: 7px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px;
  background: #e74c3c; color: #fff; border-radius: 9px; font-size: 11px; line-height: 17px; text-align: center; font-weight: 600;
}
/* Popups (Benachrichtigungen / Konversationen) */
.has-popover { position: relative; }
.has-popover.open > .panel-icon { background: var(--header-hover); }
.panel-popover {
  position: absolute; top: calc(100% + 8px); right: -60px; z-index: 120; width: 350px;
  background: var(--pop-head-bg); color: var(--pop-text); border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.panel-popover::before {
  content: ""; position: absolute; top: -8px; right: 75px; border: 8px solid transparent; border-top: 0;
  border-bottom-color: var(--pop-head-bg);
}
.popover-header {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 16px;
  background: var(--pop-head-bg); color: var(--pop-head-text); border-radius: 3px 3px 0 0;
  font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
}
.popover-header a, .popover-header-button { color: var(--pop-head-text); font-size: 16px; opacity: .85; }
.popover-header a:hover, .popover-header-button:hover { opacity: 1; color: var(--pop-head-text); text-decoration: none; }
.popover-header-button { background: none; border: 0; padding: 0; cursor: pointer; line-height: 1; }
.popover-body { max-height: 380px; overflow-y: auto; background: var(--pop-bg); }
.popover-empty { padding: 22px 16px; text-align: center; color: var(--pop-muted); font-size: 13px; }
.popover-item {
  display: flex; gap: 10px; align-items: center; padding: 10px 16px; color: var(--pop-text); font-size: 13px; line-height: 1.4;
  border-bottom: 1px solid var(--pop-border);
}
.popover-item:hover { background: var(--pop-hover); color: var(--pop-strong); text-decoration: none; }
.popover-item.unread { background: var(--pop-unread); color: var(--pop-strong); }
.popover-item.unread:hover { background: var(--pop-unread-hover); }
.popover-item-text { min-width: 0; display: flex; flex-direction: column; }
.popover-item-text strong { color: var(--pop-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popover-item-text i { color: var(--pop-icon); margin-right: 2px; }
.popover-item-text small { color: var(--pop-muted); font-size: 12px; }
.popover-footer {
  display: block; padding: 9px 16px; text-align: center; background: var(--pop-footer-bg); color: var(--pop-footer-text);
  font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; border-radius: 0 0 3px 3px;
}
.popover-footer:hover { background: var(--pop-footer-hover); color: var(--pop-footer-text); text-decoration: none; }
@media (max-width: 768px) {
  .has-popover { position: static; }
  .panel-popover { position: fixed; top: 54px; left: 8px; right: 8px; width: auto; }
  .panel-popover::before { display: none; }
}

/* Glocke klingelt bei ungelesenen Benachrichtigungen */
.bell-ringing .fa-bell { transform-origin: 50% 2px; animation: bell-ring 3s ease-in-out infinite; }
@keyframes bell-ring {
  0%, 45%, 100% { transform: rotate(0); }
  5%  { transform: rotate(24deg); }
  10% { transform: rotate(-20deg); }
  15% { transform: rotate(16deg); }
  20% { transform: rotate(-12deg); }
  25% { transform: rotate(8deg); }
  30% { transform: rotate(-5deg); }
  35% { transform: rotate(3deg); }
  40% { transform: rotate(-1deg); }
}
.bell-ringing .badge-count { animation: badge-pop 3s ease-in-out infinite; }
@keyframes badge-pop {
  0%, 30%, 100% { transform: scale(1); }
  8% { transform: scale(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .bell-ringing .fa-bell, .bell-ringing .badge-count { animation: none; }
}
.user-menu .avatar { border: 1px solid rgba(255, 255, 255, .4); }

/* Dropdowns */
.dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px; margin: 0; padding: 5px 0; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15); z-index: 100; color: var(--text);
}
.dropdown-right { left: auto; right: 0; }
.has-dropdown:hover > .dropdown, .has-dropdown.open > .dropdown { display: block; }
.dropdown-click:hover > .dropdown { display: none; }
.dropdown-click.open > .dropdown { display: block; }
.dropdown li a, .dropdown li button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 15px; color: var(--text);
  background: none; border: 0; font: inherit; text-align: left; cursor: pointer; white-space: nowrap;
}
.dropdown li a:hover, .dropdown li button:hover { background: var(--row-hover); color: var(--link); text-decoration: none; }
.dropdown li i { width: 16px; text-align: center; color: var(--muted); }
.dropdown .divider { border-top: 1px solid var(--border-light); margin: 5px 0; }
.dropdown-header { display: flex; align-items: center; gap: 10px; padding: 8px 15px 10px; border-bottom: 1px solid var(--border-light); margin-bottom: 5px; }
.dropdown-header strong { display: block; }
.dropdown-header small { color: var(--muted); }
.dropdown-form { padding: 8px 15px; }
.dropdown-form label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.dropdown-form select { width: 100%; margin-bottom: 6px; }
.dropdown-form button.button { width: auto; display: inline-flex; padding: 4px 10px; }
.dropdown-form button.button:hover { background: var(--button-hover); }

/* ---------------------------------------------------------------------
   Kopfbereich: Logo + Suche
   --------------------------------------------------------------------- */
.page-header { background: var(--header-bg); color: var(--header-text); }
.page-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 25px; padding-bottom: 25px; }
.logo { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.logo:hover { color: #fff; text-decoration: none; }
.logo img { max-height: 70px; }
.logo-icon {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .15); border-radius: 50%; font-size: 26px;
}
.logo-text strong { display: block; font-size: 28px; font-weight: 300; line-height: 1.1; }
.logo-text small { display: block; color: var(--header-text-muted); font-size: 13px; }

.header-search { display: flex; width: 320px; max-width: 100%; }
.header-search input {
  flex: 1; min-width: 0; padding: 8px 12px; border: 0; border-radius: var(--radius) 0 0 var(--radius);
  background: var(--input-bg); font: inherit; color: var(--text);
}
.header-search button {
  border: 0; padding: 0 14px; background: var(--header-panel-bg); color: #fff; cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.header-search button:hover { background: #224264; }

/* Brotkrumen */
.navigation-bar { background: var(--nav-bg); border-bottom: 1px solid var(--border-light); }
.breadcrumbs { list-style: none; margin: 0; padding: 10px 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; }
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li + li::before { content: "\f105"; font: var(--fa-font-solid); margin: 0 8px 0 4px; color: var(--muted); font-size: 11px; }

/* ---------------------------------------------------------------------
   Seitenlayout: Inhalt + Sidebar rechts
   --------------------------------------------------------------------- */
.page { padding: 25px 0 40px; }
.layout { display: flex; gap: 30px; align-items: flex-start; }
.content { flex: 1; min-width: 0; }
.sidebar { width: 320px; flex-shrink: 0; }

.content-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.content-header h1 { font-size: 28px; font-weight: 300; color: var(--text); }
.content-header-description { margin: 4px 0 0; color: var(--muted); }
.content-header-meta { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; }
.content-header-meta i { margin-right: 3px; }
.content-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.content-header-actions form { margin: 0; }
.content-header-actions .has-dropdown { position: relative; }
.content-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 15px; flex-wrap: wrap; }
.content-footer .pagination { margin: 0; }

.section { margin-bottom: 30px; }
.section-title {
  font-size: 20px; font-weight: 300; color: var(--section-head);
  padding-bottom: 8px; margin-bottom: 15px; border-bottom: 1px solid var(--border);
}
.section-title .badge { font-size: 12px; vertical-align: middle; }
.small-title { font-size: 15px; margin: 15px 0 8px; }

/* Sidebar-Boxen */
.box { background: var(--sidebar-bg); border-radius: var(--radius); padding: 15px 18px; margin-bottom: 20px; }
.box-title { font-size: 17px; font-weight: 400; color: var(--section-head); margin-bottom: 12px; }
.box-title a { color: inherit; }
.box-title i { margin-right: 4px; opacity: .8; }
.box-content p { margin: 0 0 8px; }
.box-content p:last-child { margin-bottom: 0; }
.forum-bottom-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.forum-bottom-boxes .box { margin: 0; }

.sidebar-item-list { list-style: none; margin: 0; padding: 0; }
.sidebar-item-list li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border-light); }
.sidebar-item-list li:first-child { border-top: 0; padding-top: 0; }
.sidebar-item-list li > div { min-width: 0; }
.sidebar-item-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-item-list small { color: var(--muted); font-size: 12px; }

.plain-dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0 0 10px; }
.plain-dl dt { color: var(--muted); }
.plain-dl dd { margin: 0; text-align: right; font-weight: 600; }

/* Serverstatus */
.server-status { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 6px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #95a5a6; display: inline-block; }
.online .status-dot { background: #2ecc71; box-shadow: 0 0 0 3px rgba(46, 204, 113, .25); }
.offline .status-dot { background: #e74c3c; }
.server-status.online { color: #27ae60; }
.server-status.offline { color: #c0392b; }
.server-name { font-size: 13px; color: var(--muted); margin-bottom: 10px; word-break: break-word; }
.server-players { display: flex; justify-content: space-between; font-size: 13px; }
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 4px 0 12px; }
.progress span { display: block; height: 100%; background: var(--primary); }
.server-player-list { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.server-connect { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
code.copy { cursor: pointer; background: var(--surface); }
code.copy.copied { background: var(--notice-success-bg); }

.online-summary { font-weight: 600; }
.online-list { line-height: 1.8; }

/* ---------------------------------------------------------------------
   Buttons, Labels, Badges
   --------------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  background: var(--button-bg); color: var(--button-text); border: 0; border-radius: var(--radius);
  font: inherit; font-size: 14px; line-height: 1.4; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.button:hover { background: var(--button-hover); color: var(--button-text); text-decoration: none; }
.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover { background: var(--primary-hover); color: #fff; }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: #a93226; color: #fff; }
.button-small { padding: 4px 10px; font-size: 13px; }
.button-large { padding: 10px 20px; font-size: 15px; }

.badge { display: inline-block; padding: 1px 7px; background: var(--button-bg); color: var(--button-text); border-radius: 10px; font-size: 12px; }
.badge-group { color: #fff; border-radius: var(--radius); padding: 1px 8px; font-size: 12px; }
.label { display: inline-block; padding: 0 6px; border-radius: 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; color: #fff; margin-right: 6px; vertical-align: 2px; line-height: 18px; }
.label-red { background: #c0392b; }
.label-blue { background: #3a6d9c; }
.label-green { background: #27ae60; }
.user-title { font-size: 12px; color: var(--muted); }
.username { font-weight: 600; }

/* Avatare */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; vertical-align: middle; display: inline-block; }
.avatar-default { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; text-transform: uppercase; line-height: 1; user-select: none; }

/* Hinweise */
.notice { padding: 10px 15px; border-radius: var(--radius); border: 1px solid; margin: 0 0 20px; }
.notice-info { background: var(--notice-info-bg); color: var(--notice-info-text); border-color: var(--notice-info-border); }
.notice-success { background: var(--notice-success-bg); color: var(--notice-success-text); border-color: var(--notice-success-border); }
.notice-warning { background: var(--notice-warning-bg); color: var(--notice-warning-text); border-color: var(--notice-warning-border); }
.notice-error { background: var(--notice-error-bg); color: var(--notice-error-text); border-color: var(--notice-error-border); }
.notice a { color: inherit; text-decoration: underline; }

/* Seitennavigation */
.pagination { margin: 0 0 15px; }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 3px; margin: 0; padding: 0; }
.pagination li a, .pagination li span {
  display: block; min-width: 30px; padding: 4px 8px; text-align: center; border-radius: var(--radius);
  background: var(--button-bg); color: var(--button-text);
}
.pagination li a:hover { background: var(--button-hover); text-decoration: none; }
.pagination li.active span { background: var(--primary); color: #fff; }
.pagination li.gap { padding: 4px; color: var(--muted); }

/* ---------------------------------------------------------------------
   Startseite
   --------------------------------------------------------------------- */
.hero {
  display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap;
  background: linear-gradient(135deg, #2b5179 0%, #3a6d9c 60%, #4a86bd 100%);
  color: #fff; border-radius: var(--radius); padding: 35px 35px; margin-bottom: 30px;
}
.hero h1 { font-size: 30px; font-weight: 300; margin-bottom: 8px; }
.hero p { margin: 0 0 20px; color: rgba(255, 255, 255, .85); max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero .button:not(.button-primary) { background: rgba(255, 255, 255, .15); color: #fff; }
.hero .button:not(.button-primary):hover { background: rgba(255, 255, 255, .25); }
.hero .button-primary { background: #fff; color: var(--primary); }
.hero .button-primary:hover { background: #eef3f8; color: var(--primary-hover); }
.hero-status { background: rgba(0, 0, 0, .18); border-radius: var(--radius); padding: 18px 22px; min-width: 230px; text-align: center; }
.hero-status-state { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.hero-status-players { font-size: 15px; margin: 6px 0 10px; }
.hero-status-players strong { font-size: 30px; font-weight: 300; }
.hero-status code { background: rgba(255, 255, 255, .9); color: #3a3a3d; }

.news-item { border-bottom: 1px solid var(--border-light); padding: 0 0 20px; margin-bottom: 20px; }
.news-item h3 { font-size: 20px; margin-bottom: 6px; }
.news-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.news-teaser { margin-bottom: 12px; }
.news-item footer { display: flex; align-items: center; gap: 15px; }

/* ---------------------------------------------------------------------
   Forenliste
   --------------------------------------------------------------------- */
.board-category { margin-bottom: 30px; }
.board-category-header { border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 0; }
.board-category-header h2 { font-size: 20px; font-weight: 300; }
.board-category-header p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.board-list, .thread-list { list-style: none; margin: 0; padding: 0; }
.board-row { display: flex; align-items: center; gap: 15px; padding: 15px 10px; border-bottom: 1px solid var(--border-light); }
.board-row:hover, .thread-row:hover { background: var(--row-hover); }
.board-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--icon-muted); background: var(--icon-bg);
}
.board-row.unread .board-icon { color: #fff; background: var(--unread); }
.board-main { flex: 1; min-width: 0; }
.board-main h3 { font-size: 16px; font-weight: 400; }
.board-row.unread .board-main h3 a { font-weight: 600; }
.board-description { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.sub-boards { list-style: none; display: flex; flex-wrap: wrap; gap: 3px 15px; margin: 6px 0 0; padding: 0; font-size: 13px; }
.sub-boards i { color: var(--icon-muted); font-size: 12px; }
.sub-boards li.unread a { font-weight: 600; }

.board-stats, .thread-stats { display: flex; gap: 20px; margin: 0; flex-shrink: 0; text-align: center; }
.board-stats div, .thread-stats div { min-width: 60px; }
.board-stats dt, .thread-stats dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.board-stats dd, .thread-stats dd { margin: 0; font-size: 16px; }

.board-last-post, .thread-last-post { width: 250px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.board-last-post > div, .thread-last-post > div { min-width: 0; }
.last-post-subject { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-last-post small, .thread-last-post small { display: block; color: var(--muted); font-size: 12px; }

/* Themenliste */
.thread-list { border-top: 1px solid var(--border); }
.thread-row { display: flex; align-items: center; gap: 15px; padding: 12px 10px; border-bottom: 1px solid var(--border-light); }
.thread-row.sticky { background: var(--sticky-bg); }
.thread-avatar { position: relative; flex-shrink: 0; }
.unread-dot { position: absolute; right: -2px; top: -2px; width: 12px; height: 12px; background: var(--unread); border: 2px solid var(--surface); border-radius: 50%; }
.thread-main { flex: 1; min-width: 0; }
.thread-subject { font-size: 15px; font-weight: 400; }
.thread-row.unread .thread-subject > a { font-weight: 600; }
.thread-flag { color: var(--muted); font-size: 12px; margin-left: 4px; }
.thread-pages { font-size: 12px; margin-left: 8px; color: var(--muted); }
.thread-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.thread-meta .username { font-weight: 400; }
.conversation-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--icon-muted); }
.thread-row.unread .conversation-icon { color: var(--unread); }

/* ---------------------------------------------------------------------
   Beiträge (Nachrichten)
   --------------------------------------------------------------------- */
.message-list { margin-bottom: 10px; }
.message { display: flex; align-items: stretch; gap: 18px; margin-bottom: 26px; }

/* Profilspalte links (dunkel, getrennt vom Beitrag) */
.message-sidebar {
  width: 225px; flex-shrink: 0; align-self: flex-start; padding: 0 0 18px; background: var(--ms-bg); color: #e6e6e6;
  border: 1px solid var(--ms-border); border-radius: 3px; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 6px rgba(0, 0, 0, .15);
}
.ms-cover { height: 90px; background-size: cover; background-position: center; margin-bottom: -36px; }
.ms-cover-default {
  background-color: #4fb3e8;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, .25) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255, 255, 255, .18) 25%, transparent 25%),
    linear-gradient(45deg, rgba(0, 60, 120, .18) 25%, transparent 25%),
    linear-gradient(160deg, #8fd3f4 0%, #3fa9e0 55%, #2b8fd0 100%);
  background-size: 60px 60px, 60px 60px, 80px 80px, 100% 100%;
}
.ms-avatar-box {
  position: relative; margin: 0 18px; padding: 8px 36px; background: var(--ms-box); border: 1px solid var(--ms-box-border);
  display: flex; justify-content: center; align-items: center; min-height: 132px;
}
.ms-avatar-box-guest { padding: 8px; }
.ms-avatar { display: block; line-height: 0; }
.ms-avatar .avatar { border-radius: 0 !important; }
/* Online-Punkt mit pulsierendem Ring */
.online-dot, .online-indicator {
  position: relative; display: inline-block; width: 8px; height: 8px; vertical-align: 1px; border-radius: 50%;
  background: #3ec46d; box-shadow: 0 0 4px rgba(62, 196, 109, .8);
  animation: online-glow 2s ease-in-out infinite;
}
.online-dot { margin-right: 10px; }
.online-indicator { width: 9px; height: 9px; vertical-align: middle; }
.online-dot::after, .online-indicator::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #3ec46d;
  animation: online-pulse 2s ease-out infinite;
}
@keyframes online-pulse {
  0%   { transform: scale(1);   opacity: .9; }
  70%  { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}
@keyframes online-glow {
  0%, 100% { box-shadow: 0 0 3px rgba(62, 196, 109, .6); }
  50%      { box-shadow: 0 0 8px rgba(62, 196, 109, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .online-dot, .online-indicator, .online-dot::after, .online-indicator::after { animation: none; }
}
.ms-actions { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ms-actions a, .ms-actions button {
  color: #fff; font-size: 13px; width: 20px; padding: 0; text-align: center; opacity: .85;
  background: none; border: 0; cursor: pointer; line-height: 1.4;
}
.ms-actions a:hover, .ms-actions button:hover { opacity: 1; color: #fff; text-decoration: none; }
.ms-actions .follow-button.active { color: #3ec46d; opacity: 1; }
.button.follow-button.active { background: var(--like-active-bg); color: var(--link); }

/* Dialog im Stil der Glocken-/Konversations-Popups */
.modal-pop { background: var(--pop-head-bg); color: var(--pop-text); border-radius: 3px; overflow: hidden; }
.modal-pop .modal-header { background: var(--pop-head-bg); border-bottom: 0; padding: 12px 16px; }
.modal-pop .modal-header h2 {
  color: var(--pop-head-text); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.modal-pop .modal-close { color: var(--pop-head-text); opacity: .85; }
.modal-pop .modal-close:hover { opacity: 1; }
/* Schwebender Block direkt am Icon (z. B. Nachricht senden) */
.float-pop {
  position: absolute; z-index: 300; width: 560px; max-width: calc(100vw - 16px);
  display: flex; flex-direction: column; overflow: visible;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
  animation: pop-in .26s cubic-bezier(.18, .89, .32, 1.15) both;
}
.float-pop > .modal-header { border-radius: 3px 3px 0 0; }
.float-pop .quick-message-form { border-radius: 0 0 3px 3px; overflow: hidden; }
.float-pop.closing { animation: pop-out .16s ease-in forwards; pointer-events: none; }
.float-pop-arrow { position: absolute; width: 0; height: 0; border: 9px solid transparent; }
.pop-right .float-pop-arrow { left: -18px; border-right-color: var(--pop-head-bg); }
.pop-right .float-pop-arrow.on-body { border-right-color: var(--pop-bg); }
.pop-below .float-pop-arrow { top: -18px; border-bottom-color: var(--pop-head-bg); }
@keyframes pop-in {
  from { opacity: 0; transform: scale(.55); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pop-out {
  to { opacity: 0; transform: scale(.85); }
}
/* Nachricht-Block: auffällige Kopfzeile mit Empfänger */
.modal-quick-message > .modal-header {
  position: relative; overflow: hidden; padding: 14px 16px 16px; align-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 8px, transparent 8px 16px),
    radial-gradient(circle at 85% -20%, rgba(255, 255, 255, .16), transparent 55%),
    linear-gradient(120deg, #23272b 0%, #33383e 50%, #464c53 100%);
}
.qm-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.qm-head-avatar { line-height: 0; flex-shrink: 0; }
.qm-head-avatar .avatar { box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(0, 0, 0, .35); }
.qm-head-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.qm-head-label { color: rgba(255, 255, 255, .7); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.qm-head-text strong { color: #fff; font-size: 19px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.qm-head-deco {
  position: absolute; right: 52px; top: 50%; transform: translateY(-50%) rotate(-18deg);
  font-size: 64px; color: #fff; opacity: .1; pointer-events: none;
}
.modal-quick-message > .modal-header .modal-close { position: relative; z-index: 1; color: #fff; }
.qm-head-line {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, #2b2f34, #555c64 30%, #9aa1a9 50%, #555c64 70%, #2b2f34);
  background-size: 200% 100%; animation: qm-line 3.5s linear infinite;
  box-shadow: 0 0 8px rgba(0, 0, 0, .45);
}
@keyframes qm-line { from { background-position: 200% 0; } to { background-position: 0 0; } }
.modal-quick-message .qm-body label { display: flex; align-items: center; gap: 7px; margin-top: 2px; }
.modal-quick-message .qm-body label i {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; font-size: 11px;
  color: #e9ecef; background: linear-gradient(135deg, #2b2f34, #464c53); border: 1px solid #5a6169; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 1px 2px rgba(0, 0, 0, .25);
}
.modal-quick-message .qm-body { padding-top: 16px; }
.pop-right.modal-quick-message .float-pop-arrow { border-right-color: #25292d; }
.pop-below.modal-quick-message .float-pop-arrow { border-bottom-color: #33383e; }
.pop-right.modal-quick-message .float-pop-arrow.on-body { border-right-color: var(--pop-bg); }
@media (prefers-reduced-motion: reduce) { .qm-head-line { animation: none; } }

/* Gleiche Plopp-Animation für die Popups von Glocke und Konversationen */
.panel-popover:not([hidden]) { transform-origin: calc(100% - 83px) -8px; animation: pop-in .22s cubic-bezier(.18, .89, .32, 1.15) both; }
@media (prefers-reduced-motion: reduce) {
  .float-pop, .float-pop.closing, .panel-popover:not([hidden]) { animation-duration: .01s; }
}

/* Nachricht per Popup */
.quick-message-form { display: flex; flex-direction: column; min-height: 0; }
.qm-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; background: var(--pop-bg); overflow-y: auto; }
.qm-body label { font-weight: 600; font-size: 13px; color: var(--pop-strong); }
.qm-body input[type=text] { width: 100%; }
.qm-body .editor textarea { min-height: 150px; }
.qm-footer { display: flex; background: var(--pop-footer-bg); }
.qm-cancel, .qm-send {
  flex: 1; padding: 11px 16px; border: 0; background: none; cursor: pointer; text-align: center;
  font: inherit; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--pop-footer-text);
}
.qm-cancel { opacity: .7; border-right: 1px solid rgba(255, 255, 255, .08); }
.qm-cancel:hover { opacity: 1; background: var(--pop-footer-hover); }
.qm-send { background: var(--primary); color: #fff; }
.qm-send:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }
.qm-send:disabled { opacity: .6; cursor: wait; }
.quick-message-error { margin: 4px 0 0; padding: 8px 10px; border-radius: var(--radius); background: var(--notice-error-bg); color: var(--notice-error-text); font-size: 13px; white-space: pre-line; }
.quick-message-success { text-align: center; padding: 26px 16px 22px; }
.quick-message-success > i { font-size: 40px; color: #3ec46d; }
.quick-message-success p { margin: 10px 0 0; }

.ms-bar {
  display: block; margin: 10px 18px 0; padding: 4px 8px; text-align: center; font-size: 13px;
  background: var(--ms-box); color: #e6e6e6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 1px solid var(--ms-box-border);
}
.ms-bar + .ms-bar { margin-top: 6px; }
.ms-name .username { color: #3b9cff; font-weight: 600; }
.ms-name-guest { color: #555; }
.ms-guest { color: #e6e6e6; }
.ms-bar.user-title-badge { border-radius: 0; }
.ms-stats { margin: 16px 18px 0; padding: 10px 10px; background: var(--ms-box); border: 1px solid var(--ms-box-border); font-size: 12px; }
.ms-stats div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.ms-stats dt { font-weight: 600; }
.ms-stats dd { margin: 0; }

/* Beitrag rechts (heller Kasten) */
.message-body {
  flex: 1; min-width: 0; padding: 14px 28px 14px; display: flex; flex-direction: column;
  background: var(--post-bg); min-height: 268px;
}
.message-header {
  display: flex; justify-content: space-between; align-items: center; padding: 3px 8px; margin-bottom: 18px;
  background: var(--post-strip); font-size: 11px; color: var(--muted);
}
.message-header a, .message-header time { color: var(--muted); }
.message-number { color: var(--text) !important; font-size: 13px; }
.message-text { flex: 1; overflow-wrap: break-word; padding: 0 2px; }
.message-edit-note { margin-top: 15px; font-size: 12px; color: var(--muted); }
.message-signature { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--border-light); font-size: 13px; color: var(--text-soft); max-height: 260px; overflow: hidden; }
.message-body .message-signature {
  border-top: 0; margin-top: 14px; padding: 6px 12px; background: var(--post-strip);
  text-align: right; font-style: italic; font-size: 11px; max-height: 150px;
}
.message-body .message-signature .signature-image { max-height: 110px; }
.signature-image.align-left { margin-left: 0; margin-right: auto; }
.signature-image.align-center { margin-left: auto; margin-right: auto; }
.signature-image.align-right { margin-left: auto; margin-right: 0; }
.align-choice { display: inline-flex; border: 1px solid var(--input-border); border-radius: var(--radius); overflow: hidden; }
.align-choice label { cursor: pointer; }
.align-choice input { position: absolute; opacity: 0; pointer-events: none; }
.align-choice span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--input-bg); color: var(--text-soft); font-size: 13px; }
.align-choice label + label span { border-left: 1px solid var(--input-border); }
.align-choice input:checked + span { background: var(--primary); color: #fff; }
.align-choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
.message-body .message-signature .bbcode + .signature-image { margin-top: 5px; }
.message-footer { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 18px; flex-wrap: wrap; }
.message-footer .message-reactions { display: contents; }
.message-footer .reaction-summary { margin-right: auto; order: 0; }
.message-footer .message-buttons { order: 1; }
.message-footer .reaction-picker-wrap { order: 2; }
.message-buttons { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.message-buttons form { margin: 0; }
.message-buttons li:has(.quote-button) { margin-left: 10px; }
.message-buttons a, .message-buttons button, .message-footer .reaction-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 28px; height: 28px; padding: 0;
  font: inherit; font-size: 0; color: var(--post-btn-text); background: var(--post-btn); border: 0; border-radius: 0; cursor: pointer;
}
.message-buttons i, .message-footer .reaction-button i { font-size: 13px; }
.message-buttons a:hover, .message-buttons button:hover, .message-footer .reaction-button:hover { background: var(--post-btn-hover); text-decoration: none; }
.message-footer .reaction-label { display: none; }
.message-footer .reaction-current { font-size: 14px; }
.message-footer .reaction-button.active { background: var(--like-active-bg); }
.message-footer .reaction-picker { left: auto; right: 0; }
.message-reply .message-body form { display: flex; flex-direction: column; }
.message-reply .message-body { min-height: 0; }

/* ---------------------------------------------------------------------
   Rang-Plakette der Benutzergruppe (bewusst anders als Benutzertitel):
   spitz zulaufende Form, Metallic-Verlauf, Kanten-Glanz, Großbuchstaben.
   Team-Gruppen: zusätzlich Lichtschimmer und Leuchten.
   --------------------------------------------------------------------- */
.rank-plate {
  --rank-light: color-mix(in srgb, var(--rank-color) 55%, #fff);
  --rank-dark: color-mix(in srgb, var(--rank-color) 55%, #000);
  position: relative; display: inline-flex; vertical-align: middle; max-width: 100%;
}
.rank-plate-frame {
  display: flex; width: 100%; padding: 1px; /* Rahmenbreite */
  background: linear-gradient(180deg, var(--rank-light), var(--rank-dark));
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 9px 100%, 0 50%);
}
.rank-plate-inner {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 4px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .06) 48%, rgba(0, 0, 0, .12) 52%, rgba(0, 0, 0, .28) 100%),
    var(--rank-color);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
  font-size: 10.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; line-height: 1.5; white-space: nowrap;
}
.rank-plate-inner i { font-size: 11px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.rank-plate-name { overflow: hidden; text-overflow: ellipsis; }

/* Team: Leuchten + wandernder Lichtschimmer */
.rank-plate-team { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--rank-color) 70%, transparent)); }
.rank-plate-team .rank-plate-inner::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: skewX(-20deg); animation: rank-shine 4s ease-in-out infinite;
}
.rank-plate-team .rank-plate-inner i { color: #fff6c9; }
@keyframes rank-shine {
  0%, 55% { left: -40%; }
  85%, 100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .rank-plate-team .rank-plate-inner::after { animation: none; display: none; }
}

/* In der Profilspalte: volle Breite */
.rank-plate.ms-rank { display: flex; margin: 10px 14px 0; }
.ms-bar + .rank-plate.ms-rank { margin-top: 8px; }
.rank-plate.ms-rank .rank-plate-inner { padding: 6px 16px; font-size: 11px; }
.rank-plate-large .rank-plate-inner { padding: 6px 22px; font-size: 13px; letter-spacing: 2.5px; }
.team-section-title { display: flex; align-items: center; gap: 10px; border-bottom-color: var(--border); }
.member-info .rank-plate { margin: 4px 0; }

/* Benutzertitel als Badge (Farbe/Icon frei wählbar) */
.user-title-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 2px 9px;
  background: #3a6d9c; color: #fff; border-radius: 2px; font-size: 12px; line-height: 1.6;
}
.ms-bar.user-title-badge { display: flex; font-size: 13px; }
.member-info .user-title-badge, .profile-badges .user-title-badge { margin: 3px 0; }

/* Titel-Einstellungen */
.title-toggle { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; margin-bottom: 8px; }
.title-fields { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin: 0 0 4px; max-width: 560px; transition: opacity .2s; }
.title-fields.is-disabled { opacity: .45; filter: grayscale(1); }
.title-fields[disabled] input { cursor: not-allowed; }
.title-fields-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.title-fields-row input[type=text] { flex: 1; min-width: 180px; }
.title-color-label { display: inline-flex; gap: 6px; align-items: center; }
.title-icon-grid { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.title-icon-grid label { cursor: pointer; }
.title-icon-grid input { position: absolute; opacity: 0; pointer-events: none; }
.title-icon-grid span {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-soft); background: var(--input-bg);
}
.title-icon-grid input:checked + span { border-color: var(--primary); background: var(--like-active-bg); color: var(--link); box-shadow: 0 0 0 1px var(--primary); }
.title-icon-grid input:focus-visible + span { outline: 2px solid var(--focus); }
.title-preview-row { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* Titelbild */
.cover-preview {
  height: 110px; max-width: 560px; margin-bottom: 15px; border-radius: var(--radius); background-size: cover; background-position: center;
  background-color: #4fb3e8;
  background-image: linear-gradient(160deg, #8fd3f4 0%, #3fa9e0 55%, #2b8fd0 100%);
}

/* Signaturbild */
.signature-image { display: block; max-width: 100%; max-height: 250px; margin-top: 6px; }
.message-signature .bbcode + .signature-image { margin-top: 10px; }
.signature-preview .message-signature { border-top: 0; margin-top: 0; padding-top: 0; }
.preview-unsaved { font-size: 13px; color: var(--notice-warning-text); }

/* Reaktionen */
.message-reactions { display: flex; align-items: center; gap: 8px; }
.reaction-summary, .reaction-button {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font: inherit; font-size: 13px;
  background: var(--button-bg); color: var(--button-text); border: 0; border-radius: 14px; cursor: pointer;
}
.reaction-summary:hover, .reaction-button:hover { background: var(--button-hover); }
.reaction-icons { display: inline-flex; }
.reaction-icons span { font-size: 15px; line-height: 1; margin-right: -3px; }
.reaction-icons span:last-child { margin-right: 2px; }
.reaction-count { font-weight: 600; }
.reaction-button.active { background: var(--like-active-bg); color: var(--link); font-weight: 600; }
.reaction-current { font-size: 15px; line-height: 1; }
.reaction-picker-wrap { position: relative; }
.reaction-picker {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 60; display: flex; gap: 2px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.reaction-picker button {
  width: 36px; height: 36px; font-size: 22px; line-height: 1; border: 0; border-radius: 50%; background: none; cursor: pointer;
  transition: transform .12s ease;
}
.reaction-picker button:hover { transform: scale(1.25); background: var(--row-hover); }
.reaction-picker button.active { background: var(--like-active-bg); }

/* Dialog (z. B. "Wer hat reagiert?") */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); color: var(--text); border-radius: var(--radius); width: 100%; max-width: 440px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 17px; }
.modal-close { background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; }
.modal-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 16px 0; }
.modal-tabs button { border: 0; background: var(--button-bg); color: var(--button-text); border-radius: 12px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.modal-tabs button.active { background: var(--primary); color: #fff; }
.modal-body { overflow: auto; padding: 8px 16px 14px; }
.reaction-list { list-style: none; margin: 0; padding: 0; }
.reaction-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.reaction-list li:last-child { border-bottom: 0; }
.reaction-list .reaction-emoji { margin-left: auto; font-size: 18px; }

/* Empfänger-Auswahl (Konversationen) */
.recipient-picker {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 500px; min-height: 38px;
  padding: 4px 6px; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: var(--radius); cursor: text;
}
.recipient-picker:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px rgba(58, 109, 156, .15); }
.recipient-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 3px;
  background: #fff; color: #2b2b2b; border: 1px solid var(--primary); border-radius: 16px; font-weight: 600; font-size: 13px;
}
.recipient-chip .avatar { width: 22px !important; height: 22px !important; font-size: 11px !important; }
.recipient-chip button { border: 0; background: none; color: #888; cursor: pointer; padding: 0 4px; font-size: 13px; }
.recipient-chip button:hover { color: var(--danger); }
.recipient-picker input[type=text] { flex: 1; min-width: 140px; border: 0; padding: 5px 4px; background: transparent; box-shadow: none; }
.recipient-suggestions {
  position: absolute; top: calc(100% + 2px); left: -1px; right: -1px; z-index: 70; list-style: none; margin: 0; padding: 4px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.recipient-suggestions li { display: flex; align-items: center; gap: 10px; padding: 6px 12px; cursor: pointer; }
.recipient-suggestions li.active, .recipient-suggestions li:hover { background: var(--row-hover); }
.recipient-suggestions small { display: block; color: var(--muted); font-size: 12px; }
.recipient-suggestions .empty { color: var(--muted); cursor: default; }

/* Meldungen nach dem Speichern blenden sich aus */
.notice-flash { transition: opacity .5s ease, max-height .5s ease, margin .5s ease, padding .5s ease; max-height: 200px; overflow: hidden; }
.notice-flash.hide { opacity: 0; max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }

/* BBCode-Inhalte */
.bbcode img.bb-img { max-width: 100%; height: auto; }
.bbcode ul, .bbcode ol { margin: 8px 0; padding-left: 25px; }
.bb-quote { margin: 10px 0; padding: 0; border-left: 4px solid var(--quote-line); background: var(--quote-bg); border-radius: 0 var(--radius) var(--radius) 0; }
.bb-quote-header { padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--quote-border); }
.bb-quote-header a { color: inherit; }
.bb-quote-content { padding: 10px 12px; }
.bb-code { margin: 10px 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.bb-code-header { display: flex; gap: 6px; align-items: center; padding: 5px 12px; background: var(--surface-sunken); font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.bb-code-lang { text-transform: uppercase; font-weight: 600; }
.bb-code-lines { margin-left: auto; }
.bb-code pre { margin: 0; padding: 10px 12px; overflow: auto; max-height: 500px; background: var(--surface-alt); }
.bb-code code { background: none; padding: 0; font-size: 13px; line-height: 1.55; }
.bb-icode { background: var(--surface-sunken); }
.bb-spoiler { margin: 10px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.bb-spoiler summary { padding: 6px 12px; cursor: pointer; background: var(--surface-sunken); font-weight: 600; font-size: 13px; }
.bb-spoiler-content { padding: 10px 12px; }
.bb-video { position: relative; max-width: 640px; aspect-ratio: 16 / 9; margin: 10px 0; }
.bb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
mark { background: #fff3a8; color: #2b2b2b; padding: 0 1px; }

/* Editor */
.editor { border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--input-bg); width: 100%; }
.editor:focus-within { border-color: var(--focus); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; background: var(--surface-alt); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.editor-toolbar button { width: 32px; height: 30px; border: 0; background: none; color: var(--text-soft); border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.editor-toolbar button:hover { background: var(--editor-hover); color: var(--text); }
.editor-sep { width: 1px; background: var(--border); margin: 4px 4px; }
.editor textarea { display: block; width: 100%; border: 0; padding: 10px 12px; font: inherit; resize: vertical; min-height: 120px; background: transparent; color: var(--text); }
.editor textarea:focus { outline: none; }
.editor-footer { padding: 5px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border-light); }

/* ---------------------------------------------------------------------
   Formulare
   --------------------------------------------------------------------- */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], select, textarea {
  font: inherit; color: var(--text); background: var(--input-bg); border: 1px solid var(--input-border);
  border-radius: var(--radius); padding: 7px 10px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 2px rgba(58, 109, 156, .15); }
textarea { width: 100%; }
input.long { width: 100%; max-width: 500px; }
input.short { width: 90px; }
input.tiny { width: 70px; padding: 3px 6px; }
input[type=color] { width: 60px; height: 34px; padding: 2px; border: 1px solid var(--input-border); border-radius: var(--radius); vertical-align: middle; }

.form-row { display: flex; gap: 20px; margin: 0 0 18px; }
.form-row dt { width: 220px; flex-shrink: 0; padding-top: 7px; text-align: right; font-weight: 600; }
.form-row dd { flex: 1; margin: 0; min-width: 0; }
.form-row dd small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.checkbox-list label { display: block; padding: 3px 0; }
.form-submit { display: flex; gap: 8px; justify-content: center; padding: 15px 0 0; flex-wrap: wrap; }
.message-reply .form-submit { justify-content: flex-end; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; align-items: center; }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.search-form input { flex: 1; min-width: 200px; }

.auth-box { max-width: 760px; }
.auth-alt { text-align: center; color: var(--muted); }

.error-page { text-align: center; padding: 50px 20px; }
.error-page > i { font-size: 50px; color: var(--icon-muted); margin-bottom: 15px; }
.error-page h1 { font-size: 26px; margin-bottom: 10px; }

/* ---------------------------------------------------------------------
   Mitglieder, Profil, Online
   --------------------------------------------------------------------- */
.member-filter { display: flex; flex-direction: column; gap: 12px; }
.letter-list { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
.letter-list a { display: block; min-width: 26px; padding: 3px 6px; text-align: center; border-radius: var(--radius); }
.letter-list a:hover { background: var(--button-bg); text-decoration: none; }
.letter-list .active a { background: var(--primary); color: #fff; }

.member-grid { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.member-card { display: flex; gap: 15px; padding: 15px; border: 1px solid var(--border); border-radius: var(--radius); }
.member-card h3 { font-size: 16px; }
.member-info { min-width: 0; }
.member-info .badge-group { margin: 4px 0; }
.member-info .button { margin-top: 6px; }
.inline-dl { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; margin: 6px 0 0; font-size: 12px; }
.inline-dl dt { color: var(--muted); }
.inline-dl dd { margin: 0; }

.profile-header { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.profile-cover { height: 140px; background: linear-gradient(135deg, #2b5179, #3a6d9c 55%, #5b93c7); }
.profile-header-content { display: flex; gap: 20px; padding: 0 25px 20px; align-items: flex-end; flex-wrap: wrap; }
.profile-avatar { margin-top: -64px; }
.profile-avatar .avatar { border: 4px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.profile-title { flex: 1; min-width: 200px; padding-top: 10px; }
.profile-title h1 { font-size: 26px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-badges { margin: 4px 0; display: flex; gap: 8px; align-items: center; }
.profile-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 0; padding: 0; color: var(--muted); font-size: 13px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-stats { display: flex; margin: 0; border-top: 1px solid var(--border-light); background: var(--surface-alt); }
.profile-stats div { flex: 1; text-align: center; padding: 12px; border-right: 1px solid var(--border-light); }
.profile-stats div:last-child { border-right: 0; }
.profile-stats dt { font-size: 12px; color: var(--muted); }
.profile-stats dd { margin: 0; font-size: 20px; font-weight: 300; }
.profile-about { margin-bottom: 15px; }

.tab-menu { border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-menu ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; flex-wrap: wrap; }
.tab-menu a { display: block; padding: 9px 16px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab-menu a:hover { color: var(--link); text-decoration: none; }
.tab-menu .active a { color: var(--link); border-bottom-color: var(--primary); }

.data-list { display: grid; grid-template-columns: 200px 1fr; gap: 6px 15px; margin: 0; }
.data-list dt { color: var(--muted); text-align: right; }
.data-list dd { margin: 0; }

.search-results { list-style: none; margin: 0; padding: 0; }
.search-results li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.search-results h3 { font-size: 15px; }
.search-results p { margin: 4px 0; }

.online-table { list-style: none; margin: 0; padding: 0; }
.online-table li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.online-user { width: 220px; }
.online-user small { display: block; color: var(--muted); font-size: 12px; }
.online-location { flex: 1; }
.online-time { width: 140px; text-align: right; font-size: 13px; }

.notification-list { list-style: none; margin: 0; padding: 0; }
.notification-list li { display: flex; gap: 12px; align-items: center; padding: 10px; border-bottom: 1px solid var(--border-light); }
.notification-list li.unread { background: var(--highlight-bg); }
.notification-list small { display: block; }

/* Einstellungen & Administration */
.settings-layout { display: flex; gap: 30px; align-items: flex-start; }
.settings-menu { width: 230px; flex-shrink: 0; background: var(--sidebar-bg); border-radius: var(--radius); padding: 10px 0; }
.settings-menu h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 5px 18px 8px; }
.settings-menu ul { list-style: none; margin: 0; padding: 0; }
.settings-menu a { display: flex; gap: 10px; align-items: center; padding: 8px 18px; color: var(--text); }
.settings-menu a i { width: 16px; text-align: center; color: var(--muted); }
.settings-menu a:hover { background: var(--hover-overlay); text-decoration: none; }
.settings-menu .active a { background: var(--primary); color: #fff; }
.settings-menu .active a i { color: #fff; }
.settings-content { flex: 1; min-width: 0; }
.avatar-preview { margin-bottom: 15px; }

.table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--border); }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.table tr:hover td { background: var(--row-hover); }
.table .row-category td { background: var(--surface-alt); }

.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 15px; margin-bottom: 30px; }
.stat-tile { background: var(--sidebar-bg); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.stat-tile i { color: var(--primary); font-size: 20px; margin-bottom: 8px; }
.stat-tile strong { font-size: 26px; font-weight: 300; }
.stat-tile span { color: var(--muted); font-size: 13px; }
.danger-zone { border: 1px solid var(--notice-error-border); border-radius: var(--radius); padding: 15px 20px; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: 4px 0; }
.check-list .ok i { color: #27ae60; }
.check-list .fail { color: #c0392b; font-weight: 600; }
.install-content h1 { font-size: 28px; font-weight: 300; margin-bottom: 20px; }

/* ---------------------------------------------------------------------
   Fußbereich
   --------------------------------------------------------------------- */
.page-footer { background: var(--footer-bg); color: var(--footer-text); }
.page-footer a { color: #fff; }
.footer-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding-top: 30px; padding-bottom: 30px; }
.footer-boxes h3 { font-size: 16px; color: #fff; margin-bottom: 10px; }
.footer-boxes p { margin: 0 0 8px; }
.footer-boxes ul { list-style: none; margin: 0; padding: 0; }
.footer-boxes li { padding: 2px 0; }
.footer-boxes code { background: rgba(255, 255, 255, .12); color: #fff; }
.footer-copyright { background: var(--footer-copyright-bg); padding: 12px 0; font-size: 13px; text-align: center; color: #aebccb; }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .board-last-post, .thread-last-post { width: 200px; }
}
@media (max-width: 1024px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
  .sidebar .box { margin: 0; }
  .board-stats { display: none; }
}
@media (max-width: 768px) {
  .inner { padding: 0 16px; }
  .menu-toggle { display: block; }
  .main-menu { position: static; flex: 1; }
  .main-menu > ul { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--header-panel-bg); height: auto; padding-bottom: 8px; }
  .main-menu.open > ul { display: flex; }
  .main-menu > ul > li { flex-direction: column; }
  .main-menu > ul > li > a { padding: 11px 16px; }
  .main-menu .dropdown { position: static; display: block; background: transparent; border: 0; box-shadow: none; padding: 0 0 0 28px; }
  .main-menu .dropdown li a { color: var(--header-text-muted); padding: 6px 16px; }
  .main-menu .dropdown li a:hover { background: none; color: #fff; }
  .user-menu-name, .user-panel > li > a > span { display: none; }
  .page-header .inner { flex-direction: column; align-items: stretch; padding-top: 18px; padding-bottom: 18px; }
  .header-search { width: 100%; }
  .logo-text strong { font-size: 22px; }
  .logo-icon { width: 44px; height: 44px; font-size: 20px; }

  .board-row, .thread-row { flex-wrap: wrap; }
  .board-last-post, .thread-last-post { width: 100%; padding-left: 55px; }
  .thread-stats { display: none; }
  .message { flex-direction: column; }
  .message { gap: 0; }
  .message-sidebar { width: auto; align-self: stretch; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; }
  .message-sidebar .ms-cover, .message-sidebar .ms-stats, .ms-actions { display: none; }
  .ms-avatar-box { margin: 0; padding: 0; min-height: 0; background: none; }
  .message-sidebar .avatar { width: 44px !important; height: 44px !important; font-size: 20px !important; }
  .ms-bar, .ms-bar + .ms-bar { margin: 0; }
  .message-body { padding: 12px 14px; min-height: 0; }
  .message-body { padding: 12px 15px; }

  .form-row { flex-direction: column; gap: 5px; }
  .form-row dt { width: auto; text-align: left; padding: 0; }
  .settings-layout { flex-direction: column; }
  .settings-menu { width: 100%; }
  .data-list { grid-template-columns: 1fr; gap: 2px; }
  .data-list dt { text-align: left; margin-top: 8px; }
  .forum-bottom-boxes, .footer-boxes { grid-template-columns: 1fr; }
  .hero { padding: 25px 20px; }
  .hero h1 { font-size: 24px; }
  .hero-status { width: 100%; }
  .online-user { width: auto; flex: 1; }
  .online-location { display: none; }
  .table { display: block; overflow-x: auto; }
  .profile-stats dd { font-size: 17px; }
}
