/* Forum Header */
.forum-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(99, 75, 34, 0.5);
}

.forum-page-header h1 {
    margin-bottom: 0;
    font-size: 26px;
    background: linear-gradient(180deg, #ffdf85 0%, #e6b85c 60%, #b38634 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Forum Groups & Categories */
.forum-group {
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: 6px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.forum-group-header {
    background: linear-gradient(180deg, #2d241d 0%, #1c1612 100%);
    padding: 14px 20px;
    border-bottom: 1px solid var(--gold-border);
}

.forum-group-header h2 {
    margin: 0;
    font-size: 17px;
    color: var(--gold-bright);
}

.forum-categories {
    display: flex;
    flex-direction: column;
}

.forum-category {
    border-bottom: 1px solid rgba(99, 75, 34, 0.25);
    transition: background 0.2s ease;
}

.forum-category:last-child {
    border-bottom: none;
}

.forum-category:hover {
    background: var(--bg-card-hover);
}

.forum-category-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    color: var(--text-primary);
}

.forum-category-icon {
    font-size: 24px;
}

.forum-category-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-primary);
}

.forum-category-link:hover .forum-category-title {
    color: var(--gold-bright);
}

/* Forum index: classic category board with latest activity */
.forum-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 20px;
    padding: 24px 28px;
    border: 1px solid rgba(187, 145, 69, .55);
    border-radius: 8px;
    background: radial-gradient(ellipse at 85% 10%, rgba(124, 78, 31, .28), transparent 48%), linear-gradient(135deg, #211b17, #14110f);
    box-shadow: inset 0 1px rgba(255,255,255,.04), 0 8px 24px rgba(0,0,0,.25);
}
.forum-welcome h2 { margin: 5px 0 6px; color: #f0d292; font-size: 22px; }
.forum-welcome p { margin: 0; color: #c3b9a9; line-height: 1.55; }
.forum-eyebrow { color: #ba914d; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.forum-login-button { flex: 0 0 auto; padding: 11px 18px; border: 1px solid #d2ad65; border-radius: 4px; background: linear-gradient(#a77d35, #745021); color: #fff4d9; font-weight: 700; text-decoration: none; }
.forum-welcome-status { color: #cfc2aa; }
.forum-welcome-status b { color: #f0d292; }
.forum-quicklinks { display: flex; justify-content: space-between; align-items: center; margin: 0 2px 12px; color: #948979; font-size: 12px; }
.forum-quicklinks a { color: #d3b16c; text-decoration: none; }
.forum-category-link { display: grid; grid-template-columns: 34px minmax(180px, 1.4fr) 64px minmax(180px, 1fr) 14px; gap: 14px; padding: 17px 20px; text-decoration: none; }
.forum-category-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(202,164,92,.35); border-radius: 50%; color: #d5b36e; font-size: 15px; }
.forum-category-info { min-width: 0; }
.forum-category-description { margin-top: 5px; color: #a89d8e; font-size: 12px; line-height: 1.45; }
.forum-category-count { display: flex; flex-direction: column; align-items: center; color: #a89d8e; font-size: 11px; }
.forum-category-count strong { color: #e4c781; font-size: 17px; }
.forum-category-latest { display: flex; min-width: 0; flex-direction: column; gap: 3px; border-left: 1px solid rgba(99,75,34,.35); padding-left: 14px; }
.forum-category-latest span, .forum-category-latest small { color: #9b907f; font-size: 11px; }
.forum-category-latest b { overflow: hidden; color: #d7c39a; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.forum-category-arrow { align-self: center; color: #b48a45; font-size: 24px; }
@media (max-width: 760px) {
    .forum-welcome { align-items: flex-start; flex-direction: column; padding: 20px; }
    .forum-category-link { grid-template-columns: 32px minmax(0, 1fr) 14px; gap: 10px; padding: 14px; }
    .forum-category-count { grid-column: 2; grid-row: 2; align-items: flex-start; flex-direction: row; gap: 5px; }
    .forum-category-count strong { font-size: 12px; }
    .forum-category-latest { grid-column: 2 / 4; grid-row: 3; border-left: 0; padding-left: 0; }
    .forum-category-arrow { grid-column: 3; grid-row: 1; }
    .forum-category-description { font-size: 11px; }
}

/* Keep section and thread routes inside the same integrated forum shell. */
body.forum-inner { background: #e9eaec; color: #292d32; }
body.forum-inner .container { max-width: 1240px; }
body.forum-inner .forum-page-content { padding: 18px; border: 1px solid #d5d7da; border-radius: 3px; background: #f7f7f8; color: #292d32; }
body.forum-inner .forum-toolbar { display: flex; min-height: 42px; align-items: center; justify-content: space-between; margin: -18px -18px 0; padding: 0 18px; border-bottom: 1px solid #1e2227; background: #30343a; color: #d8dadd; font-size: 13px; }
body.forum-inner .forum-toolbar-tabs { display: flex; align-self: stretch; gap: 4px; }
body.forum-inner .forum-toolbar-tabs a { display: flex; align-items: center; padding: 0 16px; color: #d9dadd; text-decoration: none; }
body.forum-inner .forum-toolbar-user a { color: #e2c17d; }
body.forum-inner .forum-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 12px 2px; border-bottom: 1px solid #dedfe1; color: #656b72; font-size: 12px; }
body.forum-inner .forum-tools a { color: #4c6d8d; text-decoration: none; }
body.forum-inner .forum-search { display: flex; gap: 5px; margin-left: auto; }
body.forum-inner .forum-search input { width: min(220px, 34vw); border: 1px solid #c8ccd0; border-radius: 3px; padding: 6px 8px; background: #fff; color: #30353a; }
body.forum-inner .forum-search button { border: 1px solid #c8ccd0; border-radius: 3px; padding: 5px 9px; background: #f5f6f7; color: #4b535a; cursor: pointer; }
body.forum-inner .forum-topics { overflow: hidden; border: 1px solid #d2d5d8; border-radius: 3px; background: #fff; }
body.forum-inner .forum-topic { position: relative; padding: 13px 15px; border-bottom: 1px solid #e2e4e6; }
body.forum-inner .forum-topic:last-child { border-bottom: 0; }
body.forum-inner .topic-title { color: #426b8d; font-size: 14px; font-weight: 700; }
body.forum-inner .topic-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; color: #858b91; font-size: 11px; }
body.forum-inner .topic-meta b { color: #5e646a; }
body.forum-inner .topic-badge { display: inline-block; margin: 0 6px 4px 0; border: 1px solid #d8dadd; border-radius: 2px; padding: 2px 6px; background: #f1f2f3; color: #666d74; font-size: 10px; }
body.forum-inner .topic-pinned { border-color: #d6c591; background: #f8f4e8; color: #826b31; }
body.forum-inner .topic-closed { border-color: #d7baba; background: #f8eeee; color: #875555; }
@media (max-width: 760px) {
    body.forum-inner .forum-toolbar { padding: 0 10px; }
    body.forum-inner .forum-search { flex-basis: 100%; margin: 0; }
    body.forum-inner .forum-search input { flex: 1; width: auto; }
}

body.forum-index .forum-page-header,
body.forum-inner .forum-page-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid #d8dade; }
body.forum-index .forum-page-header h1,
body.forum-inner .forum-page-header h1 { color: #353a40; background: none; -webkit-text-fill-color: currentColor; font-size: 21px; }
body.forum-index .forum-breadcrumb,
body.forum-inner .forum-breadcrumb { display: flex; flex-basis: 100%; gap: 8px; color: #8a8f95; font-size: 12px; }
body.forum-index .forum-breadcrumb a,
body.forum-inner .forum-breadcrumb a { color: #4c6d8d; }
body.forum-index .forum-actions,
body.forum-inner .forum-actions { margin: 12px 0; }
body.forum-index .forum-form,
body.forum-inner .forum-form { margin: 14px 0 20px; padding: 16px; border: 1px solid #d2d5d8; border-radius: 3px; background: #fff; }
body.forum-index .forum-form h3,
body.forum-inner .forum-form h3 { margin: 0 0 12px; color: #3c4248; font-size: 16px; }
body.forum-index .form-input,
body.forum-inner .form-input { box-sizing: border-box; width: 100%; border: 1px solid #c8ccd0; border-radius: 3px; padding: 9px 10px; background: #fff; color: #30353a; }
body.forum-index .btn-primary,
body.forum-inner .btn-primary { border: 1px solid #315d82; border-radius: 3px; padding: 8px 14px; background: #4c7597; color: #fff; cursor: pointer; }
body.forum-index .forum-topics { overflow: hidden; border: 1px solid #d2d5d8; border-radius: 3px; background: #fff; }
body.forum-index .forum-topic { position: relative; padding: 13px 15px; border-bottom: 1px solid #e2e4e6; }
body.forum-index .forum-topic:last-child { border-bottom: 0; }
body.forum-index .topic-title { color: #426b8d; font-size: 14px; font-weight: 700; }
body.forum-index .topic-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; color: #858b91; font-size: 11px; }
body.forum-index .topic-meta b { color: #5e646a; }
body.forum-index .topic-badge { display: inline-block; margin: 0 6px 4px 0; border: 1px solid #d8dadd; border-radius: 2px; padding: 2px 6px; background: #f1f2f3; color: #666d74; font-size: 10px; }
body.forum-index .topic-pinned { border-color: #d6c591; background: #f8f4e8; color: #826b31; }
body.forum-index .topic-closed { border-color: #d7baba; background: #f8eeee; color: #875555; }
body.forum-inner .forum-posts { display: flex; flex-direction: column; gap: 10px; }
body.forum-inner .forum-post { display: grid; grid-template-columns: 180px minmax(0, 1fr); overflow: hidden; border: 1px solid #d2d5d8; border-radius: 3px; background: #fff; }
body.forum-inner .post-author { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 16px 10px; background: #f0f1f2; text-align: center; }
body.forum-inner .post-author-avatar { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #cbd0d4; border-radius: 50%; background: #fff; color: #627b91; font-size: 20px; }
body.forum-inner .post-author-name { color: #456b8b; font-size: 13px; font-weight: 700; }
body.forum-inner .post-author-name a,
body.forum-index .topic-meta a,
body.forum-inner .topic-meta a,
body.forum-index .forum-category-latest a { color: #456b8b; text-decoration: none; }
body.forum-inner .post-author-name a:hover,
body.forum-index .topic-meta a:hover,
body.forum-inner .topic-meta a:hover,
body.forum-index .forum-category-latest a:hover { text-decoration: underline; }
body.forum-inner .post-author-level { color: #868c92; font-size: 11px; }
body.forum-inner .post-content { min-width: 0; padding: 14px 16px; }
body.forum-inner .post-date { margin-bottom: 10px; color: #888e94; font-size: 11px; }
body.forum-inner .post-text { color: #353a40; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
body.forum-index .forum-pagination,
body.forum-inner .forum-pagination { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0; }
body.forum-index .forum-pagination a,
body.forum-inner .forum-pagination a { min-width: 28px; padding: 6px 8px; border: 1px solid #d1d4d7; border-radius: 3px; background: #fff; color: #4c6d8d; font-size: 12px; text-align: center; text-decoration: none; }
body.forum-index .forum-pagination a.is-current,
body.forum-inner .forum-pagination a.is-current { border-color: #4c7597; background: #4c7597; color: #fff; }
body.forum-index .empty-state,
body.forum-inner .empty-state { padding: 20px; border: 1px solid #d2d5d8; background: #fff; color: #777e85; text-align: center; }
@media (max-width: 600px) {
    body.forum-inner .forum-post { grid-template-columns: 1fr; }
    body.forum-inner .post-author { flex-direction: row; justify-content: flex-start; text-align: left; }
    body.forum-inner .post-author-avatar { width: 34px; height: 34px; font-size: 15px; }
}

/* Index layout follows the reference forum's compact board and activity columns. */
body.forum-index { background: #e9eaec; color: #292d32; }
body.forum-index .container { max-width: 1240px; }
body.forum-index .forum-page-content { padding: 18px; background: #f7f7f8; border: 1px solid #d5d7da; border-radius: 3px; color: #292d32; }
body.forum-index .forum-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 42px; margin: -18px -18px 0; padding: 0 18px; background: #30343a; border-bottom: 1px solid #1e2227; color: #d8dadd; font-size: 13px; }
body.forum-index .forum-toolbar-tabs { display: flex; align-self: stretch; gap: 4px; }
body.forum-index .forum-toolbar-tabs a { display: flex; align-items: center; padding: 0 16px; color: #d9dadd; text-decoration: none; }
body.forum-index .forum-toolbar-tabs a.is-current { background: #f7f7f8; color: #33383e; font-weight: 700; }
body.forum-index .forum-toolbar-user a { color: #e2c17d; }
body.forum-index .forum-tools { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 2px; border-bottom: 1px solid #dedfe1; color: #656b72; font-size: 12px; }
body.forum-index .forum-tools a { color: #4c6d8d; text-decoration: none; }
body.forum-index .forum-tool-label { color: #858a90; }
body.forum-index .forum-search { display: flex; gap: 5px; margin-left: auto; }
body.forum-index .forum-search input { width: min(220px, 34vw); border: 1px solid #c8ccd0; border-radius: 3px; padding: 6px 8px; background: #fff; color: #30353a; }
body.forum-index .forum-search button { border: 1px solid #c8ccd0; border-radius: 3px; padding: 5px 9px; background: #f5f6f7; color: #4b535a; cursor: pointer; }
body.forum-index .forum-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 14px 0 8px; color: #80868c; font-size: 12px; }
body.forum-index .forum-section-heading h2 { margin: 0; color: #3b4147; font-size: 16px; }
body.forum-index .forum-intro { padding: 17px 2px 14px; }
body.forum-index .forum-intro h1 { margin: 0 0 8px; color: #34393f; font-size: 22px; font-weight: 600; }
body.forum-index .forum-intro p { margin: 0; color: #676d73; font-size: 13px; line-height: 1.6; }
body.forum-index .forum-group { margin: 0 0 16px; overflow: hidden; border: 1px solid #cfd2d5; border-radius: 3px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
body.forum-index .forum-group-header { padding: 9px 13px; border-bottom: 1px solid #cfd2d5; background: #e2e5e8; }
body.forum-index .forum-group-header h2 { color: #3b4147; font-size: 14px; font-weight: 700; }
body.forum-index .forum-categories { display: block; }
body.forum-index .forum-category { border-bottom: 1px solid #e4e5e7; background: #fff; }
body.forum-index .forum-category:last-child { border-bottom: 0; }
body.forum-index .forum-category:hover { background: #f8fafb; }
body.forum-index .forum-category-link { display: grid; grid-template-columns: minmax(220px, 1fr) 150px minmax(210px, .8fr); align-items: center; gap: 18px; padding: 13px 14px; color: inherit; text-decoration: none; }
body.forum-index .forum-category-title { color: #3d6688; font-size: 14px; font-weight: 700; }
body.forum-index .forum-category-link:hover .forum-category-title { color: #244c70; text-decoration: underline; }
body.forum-index .forum-category-description { color: #737980; font-size: 12px; }
body.forum-index .forum-category-stats { display: flex; justify-content: center; gap: 14px; color: #858b91; font-size: 11px; }
body.forum-index .forum-category-stats b { display: block; color: #4f555c; font-size: 13px; font-weight: 600; text-align: center; }
body.forum-index .forum-category-latest { gap: 3px; border-left: 1px solid #e4e5e7; padding-left: 14px; }
body.forum-index .forum-category-latest span { color: #858b91; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
body.forum-index .forum-category-latest b { color: #4c6d8d; font-size: 12px; font-weight: 600; }
body.forum-index .forum-category-latest small { color: #858b91; font-size: 11px; }
body.forum-index .forum-statistics { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; padding: 13px 15px; border: 1px solid #d3d5d8; border-radius: 3px; background: #eceef0; color: #686e74; font-size: 12px; }
body.forum-index .forum-statistics strong { color: #3b4147; }
body.forum-index .forum-statistics b { color: #3b4147; }
@media (max-width: 760px) {
    body.forum-index .forum-category-link { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    body.forum-index .forum-category-stats { justify-content: flex-start; }
    body.forum-index .forum-category-stats b { display: inline; }
    body.forum-index .forum-category-latest { border-left: 0; padding-left: 0; }
    body.forum-index .forum-tools { gap: 12px; }
    body.forum-index .forum-toolbar { padding: 0 10px; }
    body.forum-index .forum-search { flex-basis: 100%; margin: 0; }
    body.forum-index .forum-search input { flex: 1; width: auto; }
    body.forum-index .forum-tools { align-items: center; }
}
