:root {
    --bg: #0b1220;
    --card: #0f1724;
    --accent: #ffb730;
    --muted: #9aa6b2;
    --danger: #f28f8f;
    --ok: #8cd48f;
}

* {
    box-sizing: border-box;
    font-family: 'Play', system-ui, Arial, sans-serif;
}

body {
    margin: 0;
    color: #e6eef6;
    background: linear-gradient(180deg, rgba(7, 14, 26, 0.42), rgba(7, 14, 26, 0.58)), url("./../image/background.jpg");
    background-size: cover;
    background-position: center;
}

body.embed-mode {
    background: #0b1622;
}

.forum-shell {
    width: 1200px;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 0 26px rgba(0, 0, 0, 0.78);
}

header {
    width: 100%;
    max-width: 100%;
    margin: 0;
    height: 40px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-image: linear-gradient(135deg, #222 25%, #111 25%, #111 50%, #222 50%, #222 75%, #111 75%, #111 100%);
    background-size: 5px 5px;
    border-bottom: 1px solid #444;
    border-left: 1px solid #444;
    border-right: 1px solid #444;
}

.forum-brand-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    height: 28px;
    padding: 0 .6rem;
    color: #9aa6b2;
    border: 1px dashed #54617b;
    border-radius: .25rem;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: .02em;
}

.header-links {
    display: flex;
    gap: 10px;
}

.link {
    margin: 0;
    padding: 0;
    text-decoration: none;
    color: #ffb73a;
    border: 0;
    cursor: pointer;
    background-color: transparent !important;
}
.link:hover {
    text-decoration: none;
}
.btn {
    display: inline-flex; /* Flexbox verwenden */
    align-items: center; /* Vertikal zentrieren */
    justify-content: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 0px solid #444;
    padding: 0.5rem;
    margin-left: 0;
    color: #ffb730;
    background-color: #111;
    transition: background-color 0.5s ease, color 0.5s ease;
}
.btn-invert {
    color: #111;
    background-color: #ffb730;
}
.btn-invert:hover {
    background-color: #111;
    color: #ffb730  !important;
}
.btn.secondary {
    background: #2a3344;
    color: var(--accent);
}

.btn-full {
    width: 100%;
}

.outer {
    padding: .5rem;
    width: 100%;
    max-width: 100%;
    min-height: calc(100vh - 71px);
    margin: 0;
    border-left: 1px solid #444;
    border-right: 1px solid #444;
    background: linear-gradient(180deg, #0b1622, rgba(0, 0, 0, 0.85));
}

.forum-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: .5rem;
}

.forum-left {
    border-right: 1px solid #2e3644;
    border: 1px solid #444;
}

.forum-right {
    overflow-y: scroll;
    height: calc(100vh - 87px);
    border: 1px solid #444;;
}

.card {
    background: linear-gradient(180deg, #0b1622, rgba(0, 0, 0, 0.7));
    border: 1px solid #444;
    border-radius: .25rem;
    padding: 12px;
    margin-bottom: 12px;
}

.msg {
    position: relative;
    margin: .5rem;
    margin-bottom: 12px;
    padding: .6rem .75rem;
    border-radius: .25rem;
    border: 1px solid #4f3d1f;
    box-shadow: .15rem .15rem .25rem rgba(0, 0, 0, 0.9);
    background: linear-gradient(180deg, rgba(60, 45, 22, 0.96), rgba(43, 30, 13, 0.93));
    color: #fff2da;
    max-width: 780px;
}

.msg.error {
    border-color: #7d2b2b;
    background: linear-gradient(180deg, rgba(86, 33, 33, 0.96), rgba(61, 22, 22, 0.93));
    color: #ffd3d3;
}

.msg.ok {
    border-color: #346934;
    background: linear-gradient(180deg, rgba(40, 83, 40, 0.96), rgba(28, 58, 28, 0.93));
    color: #d7ffd7;
}

.msg::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: -9px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 9px solid #3e2c15;
}

.msg.error::after {
    border-top-color: #4a1f1f;
}

.msg.ok::after {
    border-top-color: #2b4f2b;
}

.thread-link {
    text-align: left;
    display: block;
    padding: .5rem;
    border-bottom: 1px solid #444;
    background: rgba(0, 0, 0, 0.2);
    color: #e6eef6;
    text-decoration: none;
}

.thread-link.active {
    background-image: linear-gradient(135deg, #4e3a1b 25%, #222 25%, #222 50%, #4e3a1b 50%, #4e3a1b 75%, #222 75%, #222 100%);
    background-size: 5px 5px;
}

.forum-room-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.forum-room-count {
    margin-left: auto;
}

.thread-meta {
    color: var(--muted);
    margin-top: .25rem;
    text-align: left;
}

.badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid #555;
    margin-left: 6px;
    color: #d9dee7;
}

.post {
    border-top: 1px dashed #2e3644;
    padding: .5rem;
}

.post:first-of-type {
    border-top: none;
}

.post-meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.forum-post-meta-row {
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}

.forum-pin-form {
    margin: 0;
}

.forum-inline-form {
    margin: 0;
}

.forum-admin-actions {
    gap: .4rem;
    margin-top: .5rem;
    flex-wrap: wrap;
}

.forum-edit-box {
    margin-top: .6rem;
    padding: .6rem;
    border: 1px solid #3d4558;
    border-radius: .25rem;
    background: rgba(0, 0, 0, 0.25);
}

.forum-pin-btn {
    font-size: 11px;
    min-width: 34px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.forum-footer {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: .5rem;
    display: flex;
    justify-content: center;
    gap: .5rem;
    background-image: linear-gradient(135deg, #222 25%, #111 25%, #111 50%, #222 50%, #222 75%, #111 75%, #111 100%);
    background-size: 5px 5px;
    color: #ffb730;
    text-align: center;
    font-size: 12px;
    border-top: 1px solid #444;
    border-left: 1px solid #444;
    border-right: 1px solid #444;
}

.forum-footer-muted {
    color: var(--muted);
}

.forum-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 7, 14, 0.7);
    backdrop-filter: blur(3px);
    padding: 1rem;
}

.forum-modal-overlay.is-open {
    display: flex;
}

.forum-modal-card {
    width: 100%;
    max-width: 720px;
    border: 1px solid #444;
    border-radius: .25rem;
    background: linear-gradient(180deg, #0b1622, rgba(0, 0, 0, 0.85));
    padding: .8rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

.forum-modal-header {
    justify-content: space-between;
    align-items: center;
    margin-bottom: .6rem;
}

.forum-threads-title-row {
    justify-content: space-between;
    align-items: center;
}

.forum-thread-add-btn {
    min-width: 28px;
    height: 28px;
    line-height: 1;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
}

.forum-breadcrumbs {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.forum-breadcrumb-link {
    color: #ffb730;
    text-decoration: none;
}

.forum-breadcrumb-link:hover {
    text-decoration: underline;
}

.forum-breadcrumb-sep {
    color: var(--muted);
}

.forum-breadcrumb-current {
    color: #fff;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-posts-toolbar {
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.forum-posts-per-page-label {
    font-size: 12px;
    color: var(--muted);
    margin-right: .35rem;
}

.forum-posts-per-page-select {
    width: auto;
    min-width: 70px;
    display: inline-block;
}

.forum-pagination {
    justify-content: center;
    align-items: center;
    gap: .6rem;
    margin-top: .9rem;
    flex-wrap: wrap;
}

textarea,
input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #4a5163;
    border-radius: .25rem;
    color: #fff;
    padding: 10px;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.field {
    margin-bottom: 8px;
}

.hint {
    font-size: 12px;
    color: var(--muted);
}

.forum-title-sm {
    margin: 0 0 8px;
    font-size: 16px;
    text-align: left;
}

.forum-title-lg {
    margin: 0 0 6px;
    font-size: 22px;
    text-align: left;
}

.forum-thread-body {
    margin-top: 12px;
    line-height: 1.45;
    text-align: left;
}

.forum-post-body {
    line-height: 1.45;
    text-align: left;
}

body.embed-mode .outer {
    max-width: none;
    min-height: 100vh;
    border-left: none;
    border-right: none;
}

body.embed-mode .forum-shell {
    width: 100%;
    max-width: none;
    box-shadow: none;
}

body.embed-mode .forum-grid {
    min-height: 100vh;
}

body.embed-mode header {
    display: none;
}

body.embed-mode .forum-footer {
    display: none;
}

@media (max-width: 980px) {
    header {
        width: 100%;
        padding: 14px 14px;
        border-left: 0;
        border-right: 0;
    }

    .outer {
        width: 100%;
        border: none;
    }

    .forum-grid {
        grid-template-columns: 1fr;
    }

    .forum-footer {
        width: 100%;
        border-left: 0;
        border-right: 0;
    }

    .forum-shell {
        width: 100%;
        max-width: none;
    }

    .forum-left {
        border-right: none;
        border-bottom: 1px solid #2e3644;
    }
}
