/* -----------------------------
   Content Blocks
----------------------------- */
.content_forum_block {
    padding: 10px;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    background-color: var(--bg-gray-transparent);
    transition: transform 0.2s, box-shadow 0.2s;
	height: 100%;
}

/* ============================
   THREADS / POSTS
============================ */
.thread-container { flex: 1; min-width: 300px; }
.thread-user { font-size:0.85em; color:#aaa; }


.active-thread { font-weight:bold; color:#3aa0f0; }

/* Threads */
.forum-threads {
    flex: 1;
    min-width: 300px;
}

/* LISTE CLEAN */
.thread-list {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ============================
   THREAD ITEM (DARK SAAS FLAT)
============================ */
.thread-list li {
    display: flex;
    justify-content: space-between;
    width: 100%; /* volle Seitenbreite */
    padding: 6px 12px;
    margin-bottom: 4px;
    background-color: rgba(30,30,40,0.3);
    border: 1px solid #20222f;
    border-radius: 4px;
}

/* HOVER (ruhig, kein „springen“) */
.thread-list li:hover {
    background: rgba(28, 32, 44, 0.95);
}

/* ============================
   LINK STYLE (CLEAN DARK UI)
============================ */
.thread-list li a {
    color: #cfd8e3;
    font-size: 14px;
    text-decoration: none;

    flex-grow: 1;
    line-height: 1.2;

    text-shadow: none;
}

.thread-list li a:hover {
    color: #7cc4ff;
}

/* ACTIVE STATE */
.active-thread {
    font-weight: 600;
    color: #4da3ff;
}

/* USER META */
.thread-user {
    font-size: 0.75em;
    color: #8b93a1;
    white-space: nowrap;
}


/* -------------------------------------------- */


/* POST BLOCK */
.post-block {
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 3px;
    border: 1px solid #2a2c32;
    background-color: rgba(40, 40, 50, 0.5);
    box-shadow: -5px 5px 10px rgba(0, 0, 0, 0.3), 5px 5px 10px rgba(0, 0, 0, 0.3);
    color: #fcfcfe;
}

.post-block .thread-user {
    font-size: 0.85em;
    color: #aaaaaa;
}

/* COMMENTS */
.post-comment {
    padding: 14px;
    margin-bottom: 12px;
    border-left: 3px solid #6e6e6e;
    border-radius: 3px;
    background-color: rgba(30,30,40,0.3);
    color: #d0d0d0;
}

.post-comment:hover {
    background-color: #1a1d26;
    border-left-color: #3a3c42;
}

.forum-readall-row {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    flex-basis: 100%; /* sicherstellen, dass es eine neue Zeile nimmt */
}

.subboard-unread-count {
    display: inline-block;
    min-width: 22px;          /* Platz für 3-stellige Zahlen */
    padding: 2px 6px;
    margin-left: 6px;
    font-size: 0.75em;
    font-weight: bold;
    color: #fff;
    background-color: #1e6bb8; /* dunkleres Blau */
    border-radius: 12px;       /* rund */
    text-align: center;
    line-height: 1.2;
}

.subboard-unread-count:hover {
    background-color: #66b3ff; /* heller beim Hover */
}

.btn-readall {
    padding: 6px 12px;
    font-size: 0.9em;
    font-weight: bold;
    background-color: #1e6bb8; /* dunkles Blau passend zum Badge */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-readall:hover {
    background-color: #155a9c;
}

.forum-readall-container {
    margin-bottom: 10px;
    text-align: right;
}


/* -----------------------------
   Thread / Comment Layout
----------------------------- */



.post-block {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
	border: 1px solid #2a2c32;
	background-color: rgba(40, 40, 50, 0.5);
	box-shadow: -5px 5px 10px rgba(0, 0, 0, 0.3), 5px 5px 10px rgba(0, 0, 0, 0.3);
    color: #fcfcfe;                 /* Textfarbe passend zum Body */
}

.comment-block {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
    background-color: rgba(20, 23, 30, 0.8);
    border: 1px solid #2a2c32;
    box-shadow: -3px 3px 8px rgba(0,0,0,0.5);
}

.post-user, .comment-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    flex-shrink: 0;
}

.post-user img, .comment-user img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
    border: 2px solid #555;
}

.post-username, .comment-username {
    font-size: 0.85em;
    color: #ced1dd;
    text-align: center;
    word-break: break-word;
}


.post-content, .comment-content {
	border-left: 1px solid #2a2c32;
	padding: 10px;
}


.post-content, .comment-content {
    flex: 1;
    position: relative;
}

.post-date, .comment-date {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.75em;
    color: #888;
}

/* Inhalt */
.post-content p,
.comment-content p {
    word-break: break-all;       /* zwingt Zeilenumbruch mitten im Wort, wenn nötig */
    overflow-wrap: break-word;   /* bricht lange Wörter um */
    hyphens: auto;               /* optional: Bindestriche einfügen, wenn möglich */
}

.post-content h3, .comment-content p {
    margin: 0;
}

.comment-content p {
    margin-top: 5px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .post-block, .comment-block {
        flex-direction: column;
        align-items: flex-start;
    }
    .post-user, .comment-user {
        flex-direction: row;
        align-items: center;
        width: auto;
    }
    .post-user img, .comment-user img {
        margin-right: 10px;
        margin-bottom: 0;
    }
    .post-date, .comment-date {
        position: static;
        margin-left: auto;
        margin-bottom: 5px;
    }
}

.subforum-list li {
    display: flex;
    justify-content: space-between;
    width: 100%; /* volle Seitenbreite */
    padding: 6px 12px;
    margin-bottom: 4px;
    background-color: rgba(30,30,40,0.3);
    border: 1px solid #20222f;
    border-radius: 4px;
}

/* Leere Unterforen haben andere Textfarbe */
.forum-card.empty-subforum .forum-card-title { color: #888888; }
.forum-card.empty-subforum:hover .forum-card-title { color: #aaa; }



/* ============================
   Thread Detail / Posts Dark Style
============================ */

/* Einzelner Post */
.thread-post {
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 3px;
    border: 1px solid #2a2c32;     /* wie container border */
	background-color: rgba(40, 40, 50, 0.5);
	box-shadow: -5px 5px 10px rgba(0, 0, 0, 0.3), 5px 5px 10px rgba(0, 0, 0, 0.3);
    color: #fcfcfe;                 /* Textfarbe passend zum Body */
}
.thread-post .thread-user {
    font-size: 0.85em;
    color: #aaaaaa;                 /* Userinfo dezenter */
}

/* Kommentare unter Posts */
.thread-comments .comment {
    padding: 14px;
    margin-bottom: 12px;
	border-left: 3px solid #6e6e6e;
	border: 1px solid #080b10;
	border: 1px solid #080b10;
	border: 1px solid #080b10;
    border-radius: 3px;
	background-color: rgba(30,30,40,0.3);
    color: #d0d0d0;                 /* Text hell und gut lesbar */
}

.thread-comments .comment:hover {
    background-color: #1a1d26;      /* minimaler Hover-Effekt */
    border-left-color: #3a3c42;     /* Linie leicht heller */
}

/* ============================
   Mobile
============================ */
/* Responsive Anpassung für Mobile */
@media (max-width: 1400px) {
    .forum-block {
        flex: 0 0 auto;
        min-width: 250px;
        max-width: 425px;
        padding: 0px;
        border: 1px solid #080b10;
        background-color: rgba(30,30,40,0.3);
    }
	
	/* 2-Spalten Grid */
	.forum-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 5px;
	}
	
	.forum-card {
		margin: 0px;
	}
}

/* Responsive Anpassung für Mobile */
@media (max-width: 900px) {
    .forum-block {
		flex: 0 0 auto;
		min-width: 300px;
		max-width: 100%;
		width: 100%;
		padding: 0px;
		border: 1px solid #080b10;
		background-color: rgba(30,30,40,0.3);
	}
	
	.forum-grid {
	  display: block;
	  flex-wrap: none;
	}
	
	/* 2-Spalten Grid */
	.forum-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 5px;
	}
	
	.forum-card {
		padding: 5px 10px;
		margin: 5px 0;
	}
	
	.forum-block-title {
		font-size: 1.2em; font-weight: bold;
		margin-bottom: 5px;
		text-align: center;
	}

}



blockquote {
  margin: 12px 0;
  padding: 12px 16px;

  border-left: 4px solid #6c7ae0;
  background: #1e1f26;

  color: #d6d6d6;

  border-radius: 6px;
  position: relative;
}

.ql-size-small {
  font-size: 0.75em;
  color: #b8b8b8;
}

.ql-size-normal {
  font-size: 1em;
  color: #e6e6e6;
}

.ql-size-large {
  font-size: 1.25em;
  font-weight: 600;
  color: #ffffff;
}

.ql-size-huge {
  font-size: 1.6em;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.ql-syntax {
  background: #1e1f26;
  color: #e6e6e6;

  padding: 14px 16px;
  margin: 12px 0;

  border-radius: 8px;
  border: 1px solid #2c2f3a;

  overflow-x: auto;
  overflow-y: hidden;

  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.ql-container {
    position: relative;
    resize: vertical;
    overflow: auto;
    min-height: 140px;
    max-height: 600px;
}

.ql-container::after {
    width: 22px;
    height: 22px;
    background:
        linear-gradient(135deg, rgba(120,170,255,0.4) 25%, transparent 25%) 0 0/7px 7px,
        linear-gradient(135deg, rgba(120,170,255,0.25) 25%, transparent 25%) 3px 3px/7px 7px;
}


/* ==========================================================================
   BBCODE + QUILL POST STYLES  –  Dark Theme
   Alle .bb-* Klassen, die renderPost() / _bbcodeToHtml() erzeugt.
========================================================================== */

/* --------------------------------------------------------------------------
   Basis-Container
-------------------------------------------------------------------------- */
.post-text > *:first-child { margin-top: 0; }
.post-text > *:last-child  { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Überschriften
-------------------------------------------------------------------------- */
.post-text .bb-h1,
.post-text h1 {
    font-size: 1.7em;
    font-weight: 700;
    color: #f0f2ff;
    margin: 16px 0 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 6px;
}

.post-text .bb-h2,
.post-text h2 {
    font-size: 1.35em;
    font-weight: 600;
    color: #e8eaff;
    margin: 14px 0 6px;
}

.post-text .bb-h3,
.post-text h3 {
    font-size: 1.1em;
    font-weight: 600;
    color: #dde0f8;
    margin: 12px 0 5px;
}

/* --------------------------------------------------------------------------
   Inline-Formatierung
-------------------------------------------------------------------------- */
.post-text .bb-u  { text-decoration: underline; }
.post-text .bb-o  { text-decoration: overline; }

.post-text .bb-mark,
.post-text mark {
    background: rgba(255, 220, 60, 0.25);
    color: #ffe86e;
    padding: 1px 3px;
    border-radius: 3px;
}

.post-text .bb-highlight {
    background: rgba(108,123,255,0.2);
    color: #aab4ff;
    padding: 1px 5px;
    border-radius: 4px;
}

.post-text .bb-kbd,
.post-text kbd {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 6px;
    font-family: monospace;
    font-size: 12px;
    color: #c8d0e8;
}

.post-text sup { font-size: 0.75em; vertical-align: super; }
.post-text sub { font-size: 0.75em; vertical-align: sub; }

/* --------------------------------------------------------------------------
   Ausrichtung
-------------------------------------------------------------------------- */
.post-text .bb-left    { text-align: left; }
.post-text .bb-center  { text-align: center; }
.post-text .bb-right   { text-align: right; }
.post-text .bb-justify { text-align: justify; }

/* Quill erzeugt text-align per style-Attribut auf p/div */
.post-text [style*="text-align:center"],
.post-text [style*="text-align: center"] { text-align: center; }
.post-text [style*="text-align:right"],
.post-text [style*="text-align: right"]  { text-align: right; }
.post-text [style*="text-align:justify"],
.post-text [style*="text-align: justify"]{ text-align: justify; }

/* --------------------------------------------------------------------------
   Zitate
-------------------------------------------------------------------------- */
.post-text .bb-quote,
.post-text .bb-bq,
.post-text blockquote {
    margin: 10px 0;
    padding: 10px 14px;
    border-left: 3px solid #6c7bff;
    background: rgba(108,123,255,0.07);
    border-radius: 0 6px 6px 0;
    color: #b0b8d8;
    font-style: italic;
}

.post-text .bb-quote cite {
    display: block;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    color: #8898cc;
    margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   Code
-------------------------------------------------------------------------- */
.post-text .bb-code,
.post-text pre {
    background: #0f111a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #a8b4d8;
}

.post-text .bb-code code,
.post-text pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

.post-text .bb-inline-code,
.post-text code {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 85%;
    color: #a5b4fc;
}

/* Sprach-Badge */
.post-text pre[data-lang]::before {
    content: attr(data-lang);
    display: block;
    font-size: 10px;
    font-family: sans-serif;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #5a6088;
    margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Listen
-------------------------------------------------------------------------- */
.post-text .bb-list,
.post-text ul,
.post-text ol {
    padding-left: 1.6em;
    margin: 6px 0;
}

.post-text .bb-list li,
.post-text ul li,
.post-text ol li {
    margin: 3px 0;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Tabellen
-------------------------------------------------------------------------- */
.post-text .bb-table,
.post-text table {
    border-collapse: collapse;
    width: auto;
    max-width: 100%;
    margin: 10px 0;
    font-size: 13px;
}

.post-text .bb-table td,
.post-text .bb-table th,
.post-text table td,
.post-text table th {
    border: 1px solid rgba(255,255,255,0.12);
    padding: 6px 12px;
    text-align: left;
    vertical-align: top;
}

.post-text .bb-table th,
.post-text table th {
    background: rgba(255,255,255,0.06);
    font-weight: 600;
    color: #d0d6f0;
}

.post-text .bb-table tr:nth-child(even) td,
.post-text table tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}

/* --------------------------------------------------------------------------
   Video-Embed
-------------------------------------------------------------------------- */
.post-text .bb-video {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 10px 0;
}

.post-text .bb-video iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Bilder
-------------------------------------------------------------------------- */
.post-text .bb-img,
.post-text img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Spoiler / More / Accordion
-------------------------------------------------------------------------- */
.post-text .bb-spoiler,
.post-text .bb-more {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    margin: 8px 0;
    overflow: hidden;
}

.post-text .bb-spoiler > summary,
.post-text .bb-more > summary {
    padding: 8px 14px;
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    font-weight: 600;
    color: #9aa8d0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
}

.post-text .bb-spoiler > summary::before { content: '▶'; font-size: 10px; }
.post-text .bb-spoiler[open] > summary::before { content: '▼'; }
.post-text .bb-more > summary::before { content: '▶'; font-size: 10px; }
.post-text .bb-more[open] > summary::before { content: '▼'; }

.post-text .bb-spoiler > summary:hover,
.post-text .bb-more > summary:hover {
    background: rgba(255,255,255,0.07);
}

.post-text .bb-spoiler > div,
.post-text .bb-more > .bb-more-body {
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* --------------------------------------------------------------------------
   Links
-------------------------------------------------------------------------- */
.post-text a,
.post-text .bb-link {
    color: #818cf8;
    text-decoration: none;
    transition: color .15s;
}

.post-text a:hover,
.post-text .bb-link:hover {
    color: #a5b0ff;
    text-decoration: underline;
}

.post-text .bb-link--wiki::before  { content: '📖 '; }
.post-text .bb-link--google::before { content: '🔍 '; }

/* --------------------------------------------------------------------------
   Horizontale Linie
-------------------------------------------------------------------------- */
.post-text .bb-hr,
.post-text hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 14px 0;
}

/* --------------------------------------------------------------------------
   Absätze & Paragraphen
-------------------------------------------------------------------------- */
.post-text p {
    margin: 0 0 8px;
}

.post-text p:last-child { margin-bottom: 0; }