/*
Theme Name: bbPress Steam
Theme URI: https://github.com/bbpress-steam
Description: A full WordPress theme styled like Steam Community Discussions, with complete bbPress forum integration.
Version: 1.0.0
Author: bbPress Steam
Text Domain: bbpress-steam
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --steam-bg:          #1b2838;
    --steam-bg-2:        #16202d;
    --steam-bg-3:        #132330;
    --steam-border:      #2a475e;
    --steam-blue:        #66c0f4;
    --steam-text:        #c6d4df;
    --steam-muted:       #8f98a0;
    --steam-green:       #4c6b22;
    --steam-green-light: #b4d455;
    --steam-green-btn1:  #75b022;
    --steam-green-btn2:  #588a1b;
    --steam-search-bg:   #316282;
    --steam-search-bdr:  #2a6183;
    --steam-pinned-bg:   #2a4a1e;
    --steam-sticky-bg:   #1a2c40;
    --steam-max-width:   980px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--steam-bg);
    color: var(--steam-text);
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--steam-blue); text-decoration: none; }
a:hover { color: var(--steam-text); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    color: var(--steam-text);
    line-height: 1.3;
    font-weight: bold;
}
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

p { margin-bottom: 10px; color: var(--steam-text); }

blockquote {
    border-left: 3px solid var(--steam-border);
    padding-left: 12px;
    color: var(--steam-muted);
    margin: 10px 0;
    font-style: italic;
}

code, pre {
    background: var(--steam-bg-3);
    border: 1px solid var(--steam-border);
    color: var(--steam-blue);
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
}
code { padding: 2px 5px; border-radius: 2px; }
pre  { padding: 10px; overflow-x: auto; }

input, textarea, select {
    background: var(--steam-bg-2);
    border: 1px solid var(--steam-border);
    color: var(--steam-text);
    font-family: Arial, sans-serif;
    font-size: 13px;
    outline: none;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--steam-green);
}

button {
    cursor: pointer;
    font-family: Arial, sans-serif;
}

hr {
    border: none;
    border-top: 1px solid var(--steam-border);
    margin: 16px 0;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--steam-bg); }
::-webkit-scrollbar-thumb { background: var(--steam-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--steam-green); }

/* ============================================================
   LAYOUT
   ============================================================ */
.site-wrapper {
    max-width: var(--steam-max-width);
    margin: 0 auto;
    padding: 0 12px;
    width: 100%;
}

.content-area {
    flex: 1;
    padding: 20px 0;
}

/* Two-column layout: main + sidebar */
.site-main-sidebar {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.site-main-sidebar .primary { flex: 1; min-width: 0; }
.site-main-sidebar .secondary { width: 220px; flex-shrink: 0; }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    background: var(--steam-bg-3);
    border-bottom: 1px solid var(--steam-border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-inner {
    max-width: var(--steam-max-width);
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 52px;
}

.site-logo a {
    color: var(--steam-text);
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 0.3px;
    text-decoration: none;
}
.site-logo a:hover { color: var(--steam-blue); }

.site-title-text { font-size: 16px; font-weight: bold; color: var(--steam-text); }

/* Primary navigation */
.primary-navigation { flex: 1; }
.primary-navigation ul {
    display: flex;
    gap: 0;
    list-style: none;
}
.primary-navigation ul li a {
    display: block;
    padding: 0 14px;
    line-height: 52px;
    color: var(--steam-muted);
    font-size: 13px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.primary-navigation ul li a:hover,
.primary-navigation ul li.current-menu-item a,
.primary-navigation ul li.current_page_item a {
    color: var(--steam-text);
    border-bottom-color: var(--steam-green);
}

/* Header user area */
.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-user a {
    color: var(--steam-muted);
    font-size: 12px;
}
.header-user a:hover { color: var(--steam-text); text-decoration: none; }
.header-user .btn-signin {
    background: linear-gradient(to right, var(--steam-green-btn1), var(--steam-green-btn2));
    color: var(--steam-green-light);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 2px;
    border: none;
}
.header-user .btn-signin:hover { opacity: 0.9; text-decoration: none; }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    background: var(--steam-bg-3);
    border-top: 1px solid var(--steam-border);
    padding: 24px 0;
    margin-top: auto;
}
.site-footer-inner {
    max-width: var(--steam-max-width);
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-brand { color: var(--steam-muted); font-size: 12px; }
.footer-brand strong { color: var(--steam-text); font-size: 14px; display: block; margin-bottom: 4px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--steam-muted); font-size: 12px; }
.footer-links a:hover { color: var(--steam-text); text-decoration: none; }
.footer-copy { color: var(--steam-muted); font-size: 11px; margin-top: 12px; text-align: center; border-top: 1px solid var(--steam-border); padding-top: 12px; }

/* Widget area in footer */
.footer-widgets {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-widget-area h2, .footer-widget-area h3 {
    color: var(--steam-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.footer-widget-area ul li { margin-bottom: 4px; }
.footer-widget-area ul li a { color: var(--steam-muted); font-size: 12px; }
.footer-widget-area ul li a:hover { color: var(--steam-text); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
    border: 1px solid var(--steam-border);
    margin-bottom: 12px;
}
.sidebar-widget-title {
    background: var(--steam-bg-3);
    border-bottom: 1px solid var(--steam-border);
    padding: 6px 10px;
    font-size: 11px;
    color: var(--steam-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li {
    border-bottom: 1px solid var(--steam-border);
}
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a {
    display: block;
    padding: 7px 10px;
    color: var(--steam-blue);
    font-size: 12px;
}
.sidebar-widget ul li a:hover { background: var(--steam-bg-2); color: var(--steam-text); text-decoration: none; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb, .bbp-breadcrumb {
    color: var(--steam-muted);
    font-size: 12px;
    margin-bottom: 10px;
}
.breadcrumb a, .bbp-breadcrumb a { color: var(--steam-blue); }
.breadcrumb a:hover, .bbp-breadcrumb a:hover { color: var(--steam-text); }
.breadcrumb span.sep, .bbp-breadcrumb .bbp-breadcrumb-sep { margin: 0 5px; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
    color: var(--steam-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--steam-border);
    padding-bottom: 4px;
    margin-bottom: 10px;
}

/* ============================================================
   STEAM-STYLE BUTTONS
   ============================================================ */
.steam-btn {
    display: inline-block;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.3px;
    text-align: center;
}
.steam-btn:hover { text-decoration: none; }
.steam-btn-primary {
    background: linear-gradient(to right, var(--steam-green-btn1), var(--steam-green-btn2));
    color: var(--steam-green-light);
}
.steam-btn-primary:hover { background: linear-gradient(to right, #84c226, #63991f); color: var(--steam-green-light); }
.steam-btn-secondary {
    background: var(--steam-bg);
    border: 1px solid var(--steam-green);
    color: var(--steam-muted);
}
.steam-btn-secondary:hover { background: var(--steam-bg-2); color: var(--steam-text); }
.steam-btn-block { display: block; width: 100%; margin-bottom: 8px; }

/* ============================================================
   STANDARD POST / PAGE CONTENT
   ============================================================ */
.entry-header { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--steam-border); }
.entry-title { font-size: 22px; color: var(--steam-text); margin-bottom: 4px; }
.entry-meta { color: var(--steam-muted); font-size: 12px; }
.entry-meta a { color: var(--steam-muted); }
.entry-meta a:hover { color: var(--steam-blue); }

.entry-content {
    color: var(--steam-text);
    font-size: 14px;
    line-height: 1.7;
}
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
    margin: 16px 0 8px;
    color: var(--steam-text);
}
.entry-content p    { margin-bottom: 12px; }
.entry-content ul, .entry-content ol { padding-left: 20px; margin-bottom: 12px; }
.entry-content ul   { list-style: disc; }
.entry-content ol   { list-style: decimal; }
.entry-content li   { margin-bottom: 4px; }
.entry-content a    { color: var(--steam-blue); }
.entry-content a:hover { color: var(--steam-text); }
.entry-content img  { border-radius: 2px; margin: 10px 0; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 13px;
}
.entry-content table th,
.entry-content table td {
    border: 1px solid var(--steam-border);
    padding: 7px 10px;
    text-align: left;
}
.entry-content table th { background: var(--steam-bg-3); color: var(--steam-muted); }

.entry-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--steam-border); color: var(--steam-muted); font-size: 12px; }
.entry-footer a { color: var(--steam-muted); }
.entry-footer a:hover { color: var(--steam-blue); }

/* Post card (archive/blog) */
.post-card {
    border: 1px solid var(--steam-border);
    background: var(--steam-bg-2);
    padding: 16px;
    margin-bottom: 12px;
    transition: background 0.1s;
}
.post-card:hover { background: #1e2d3d; }
.post-card .post-card-title { font-size: 16px; font-weight: bold; margin-bottom: 4px; }
.post-card .post-card-title a { color: var(--steam-text); }
.post-card .post-card-title a:hover { color: var(--steam-blue); text-decoration: none; }
.post-card .post-card-meta { color: var(--steam-muted); font-size: 11px; margin-bottom: 8px; }
.post-card .post-card-excerpt { color: var(--steam-muted); font-size: 13px; line-height: 1.5; }
.post-card .post-card-more { margin-top: 10px; }

/* Featured image */
.post-thumbnail img { width: 100%; border-radius: 2px; margin-bottom: 14px; border: 1px solid var(--steam-border); }

/* ============================================================
   PAGINATION (WP native)
   ============================================================ */
.pagination, .nav-links {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}
.pagination .page-numbers,
.nav-links a, .nav-links span {
    padding: 5px 10px;
    border: 1px solid var(--steam-border);
    color: var(--steam-blue);
    font-size: 13px;
    border-radius: 2px;
}
.pagination .page-numbers.current,
.nav-links span.current {
    background: var(--steam-green);
    color: var(--steam-green-light);
    border-color: var(--steam-green);
}
.pagination .page-numbers:hover,
.nav-links a:hover { background: var(--steam-bg-2); text-decoration: none; }

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
    border-top: 1px solid var(--steam-border);
    padding-top: 12px;
}
.post-navigation a { color: var(--steam-blue); font-size: 13px; }
.post-navigation a:hover { color: var(--steam-text); text-decoration: none; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area { margin-top: 24px; border-top: 1px solid var(--steam-border); padding-top: 16px; }
.comments-title { font-size: 16px; margin-bottom: 14px; }

.comment-list { list-style: none; }
.comment {
    border: 1px solid var(--steam-border);
    background: var(--steam-bg-2);
    margin-bottom: 10px;
}
.comment-header {
    background: var(--steam-bg-3);
    border-bottom: 1px solid var(--steam-border);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.comment-header .avatar { border-radius: 2px; }
.comment-author-name { font-weight: bold; color: var(--steam-text); font-size: 13px; }
.comment-date { color: var(--steam-muted); font-size: 11px; margin-left: auto; }
.comment-content { padding: 10px 12px; color: var(--steam-text); font-size: 13px; line-height: 1.6; }
.comment-content p { margin-bottom: 6px; }
.comment-reply-link { display: inline-block; color: var(--steam-muted); font-size: 11px; margin: 4px 12px 8px; }
.comment-reply-link:hover { color: var(--steam-blue); text-decoration: none; }

.children { padding-left: 24px; }

.comment-respond { margin-top: 16px; border: 1px solid var(--steam-border); }
.comment-reply-title {
    background: var(--steam-bg-3);
    border-bottom: 1px solid var(--steam-border);
    padding: 7px 12px;
    font-size: 11px;
    color: var(--steam-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.comment-respond p { padding: 6px 12px 0; color: var(--steam-muted); font-size: 12px; }
.comment-respond label { display: block; color: var(--steam-muted); font-size: 12px; margin-bottom: 3px; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: calc(100% - 24px);
    margin: 0 12px 8px;
    padding: 7px 10px;
    background: var(--steam-bg-2);
    border: 1px solid var(--steam-border);
    color: var(--steam-text);
    font-size: 13px;
}
.comment-respond textarea { min-height: 80px; resize: vertical; }
.comment-respond input[type="submit"] {
    margin: 0 12px 12px;
    background: linear-gradient(to right, var(--steam-green-btn1), var(--steam-green-btn2));
    color: var(--steam-green-light);
    border: none;
    padding: 7px 18px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    border-radius: 2px;
}
.comment-respond input[type="submit"]:hover { opacity: 0.9; }

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404-wrap { text-align: center; padding: 60px 20px; }
.error-404-wrap h1 { font-size: 80px; color: var(--steam-green); margin-bottom: 10px; }
.error-404-wrap h2 { font-size: 22px; color: var(--steam-text); margin-bottom: 12px; }
.error-404-wrap p  { color: var(--steam-muted); font-size: 14px; margin-bottom: 20px; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-form-wrap { margin-bottom: 20px; }
.search-form { display: flex; border: 1px solid var(--steam-border); }
.search-form input[type="search"] {
    flex: 1;
    background: var(--steam-search-bg);
    border: none;
    color: var(--steam-text);
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
}
.search-form input[type="search"]::placeholder { color: #6e8fa8; }
.search-form button {
    background: var(--steam-bg-3);
    border: none;
    border-left: 1px solid var(--steam-border);
    color: var(--steam-muted);
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}
.search-form button:hover { background: var(--steam-bg-2); color: var(--steam-text); }

/* ============================================================
   WIDGETS (sidebar)
   ============================================================ */
.widget { margin-bottom: 14px; }
.widget-title {
    color: var(--steam-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--steam-border);
    padding-bottom: 5px;
    margin-bottom: 8px;
}
.widget ul { list-style: none; }
.widget ul li { padding: 4px 0; border-bottom: 1px solid var(--steam-border); font-size: 12px; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--steam-blue); }
.widget ul li a:hover { color: var(--steam-text); }
.widget_search .search-field { width: 100%; }

/* ============================================================
   BBPRESS SIDEBAR PANEL
   ============================================================ */
.bbp-sidebar-panel { }

.bbp-sidebar-search {
    display: flex;
    margin-bottom: 8px;
}
.bbp-sidebar-search input {
    flex: 1;
    background: var(--steam-search-bg);
    border: 1px solid var(--steam-search-bdr);
    border-right: none;
    color: var(--steam-text);
    padding: 6px 8px;
    font-size: 12px;
}
.bbp-sidebar-search input::placeholder { color: #6e8fa8; }
.bbp-sidebar-search button {
    background: var(--steam-bg);
    border: 1px solid var(--steam-search-bdr);
    color: var(--steam-muted);
    padding: 6px 10px;
}
.bbp-sidebar-search button:hover { background: var(--steam-bg-2); }

.bbp-sidebar-box {
    border: 1px solid var(--steam-border);
    margin-bottom: 10px;
}
.bbp-sidebar-box-hdr {
    background: var(--steam-bg-3);
    border-bottom: 1px solid var(--steam-border);
    padding: 6px 10px;
    font-size: 11px;
    color: var(--steam-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
}
.bbp-sidebar-row {
    padding: 7px 10px;
    border-bottom: 1px solid var(--steam-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.1s;
}
.bbp-sidebar-row:hover { background: var(--steam-bg-2); }
.bbp-sidebar-row:last-child { border-bottom: none; }
.bbp-sidebar-row a { color: var(--steam-blue); font-weight: bold; font-size: 12px; }
.bbp-sidebar-row a:hover { color: var(--steam-text); text-decoration: none; }
.bbp-sidebar-row-val { color: var(--steam-muted); }
.bbp-sidebar-link {
    display: flex;
    padding: 7px 10px;
    border-bottom: 1px solid var(--steam-border);
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--steam-blue);
    transition: background 0.1s;
}
.bbp-sidebar-link:hover { background: var(--steam-bg-2); color: var(--steam-text); text-decoration: none; }
.bbp-sidebar-link:last-child { border-bottom: none; }

/* ============================================================
   BBPRESS — FORUMS INDEX (card grid)
   ============================================================ */
.bbpress-wrapper, #bbpress-forums {
    width: 100%;
}

.bbp-forums-index-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--steam-border);
    border: 1px solid var(--steam-border);
    margin-bottom: 14px;
}

/* loop-forums: hide default header/footer rows */
ul.bbp-forums { list-style: none; }
ul.bbp-forums > li.bbp-header,
ul.bbp-forums > li.bbp-footer { display: none; }
ul.bbp-forums > li.bbp-body   { list-style: none; display: contents; }

/* each forum card */
ul.bbp-forums > li.bbp-body > ul.bbp-forum {
    list-style: none;
    background: var(--steam-bg-2);
    padding: 14px;
    cursor: pointer;
    transition: background 0.12s;
    display: block;
}
ul.bbp-forums > li.bbp-body > ul.bbp-forum:hover { background: #1e2d3d; }
ul.bbp-forums > li.bbp-body > ul.bbp-forum > li { display: none; } /* hide default li layout */

/* show the forum-info li content only */
ul.bbp-forums > li.bbp-body > ul.bbp-forum > li.bbp-forum-info { display: block; }

.bbp-forum-title {
    color: var(--steam-blue);
    font-weight: bold;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}
.bbp-forum-title:hover { color: var(--steam-text); text-decoration: none; }

.bbp-forum-content {
    color: var(--steam-muted);
    font-size: 11px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.bbp-forum-footer-meta {
    display: flex;
    gap: 14px;
    font-size: 11px;
    color: var(--steam-muted);
}
.bbp-forum-footer-meta span { color: var(--steam-text); font-weight: bold; }

/* ============================================================
   BBPRESS — SUBFORUM (inside a forum, not archive)
   ============================================================ */
.bbp-subforum-list-wrap {
    border: 1px solid var(--steam-border);
    margin-bottom: 14px;
}
.bbp-subforum-list-hdr {
    background: var(--steam-bg-3);
    border-bottom: 1px solid var(--steam-border);
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--steam-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   BBPRESS — TOPIC LIST
   ============================================================ */
.bbp-topics-list-wrap {
    border: 1px solid var(--steam-border);
    margin-bottom: 8px;
}
.bbp-topics-list-hdr {
    background: var(--steam-bg-3);
    border-bottom: 1px solid var(--steam-border);
    padding: 5px 10px;
    display: flex;
    gap: 8px;
}
.bbp-topics-list-hdr span {
    color: var(--steam-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bbp-th-topic   { flex: 1; }
.bbp-th-replies { width: 60px; text-align: center; }
.bbp-th-last    { width: 130px; text-align: right; }

/* loop-topics: hide default header/footer */
ul.bbp-topics { list-style: none; }
ul.bbp-topics > li.bbp-header,
ul.bbp-topics > li.bbp-footer { display: none; }
ul.bbp-topics > li.bbp-body   { list-style: none; }

/* single topic row */
ul.bbp-topics > li.bbp-body > ul.bbp-topic {
    list-style: none;
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border-bottom: 1px solid var(--steam-border);
    gap: 8px;
    cursor: pointer;
    transition: background 0.1s;
}
ul.bbp-topics > li.bbp-body > ul.bbp-topic:hover { background: var(--steam-bg-2); }
ul.bbp-topics > li.bbp-body > ul.bbp-topic:last-child { border-bottom: none; }
ul.bbp-topics > li.bbp-body > ul.bbp-topic.sticky   { background: var(--steam-sticky-bg); }
ul.bbp-topics > li.bbp-body > ul.bbp-topic.sticky:hover { background: #1e3250; }
ul.bbp-topics > li.bbp-body > ul.bbp-topic.super-sticky { background: var(--steam-sticky-bg); }

/* topic row list items */
ul.bbp-topics > li.bbp-body > ul.bbp-topic > li { list-style: none; }

li.bbp-topic-title {
    flex: 1;
    min-width: 0;
}

.bbp-topic-status-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    vertical-align: middle;
}
.bbp-topic-status-icon.open   { border: 1px solid var(--steam-green); }
.bbp-topic-status-icon.locked { border: 1px solid #666; }
.bbp-topic-status-icon svg    { width: 10px; height: 10px; display: block; }

a.bbp-topic-permalink {
    color: var(--steam-text);
    font-weight: bold;
    font-size: 13px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
a.bbp-topic-permalink:hover { color: var(--steam-blue); text-decoration: none; }
.sticky a.bbp-topic-permalink,
.super-sticky a.bbp-topic-permalink { color: var(--steam-green-light); }

.bbp-sticky-label {
    display: inline-block;
    background: var(--steam-green);
    color: var(--steam-green-light);
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
    margin-right: 4px;
    font-weight: normal;
    font-style: normal;
    vertical-align: middle;
}

p.bbp-topic-meta {
    color: var(--steam-muted);
    font-size: 11px;
    margin: 2px 0 0;
    display: block;
}
p.bbp-topic-meta a { color: var(--steam-muted); }
p.bbp-topic-meta a:hover { color: var(--steam-blue); }

li.bbp-topic-voice-count,
li.bbp-topic-reply-count {
    width: 60px;
    text-align: center;
    color: var(--steam-muted);
    font-size: 12px;
}

li.bbp-topic-freshness {
    width: 130px;
    text-align: right;
}
li.bbp-topic-freshness a {
    color: var(--steam-muted);
    font-size: 11px;
    display: block;
}
li.bbp-topic-freshness a:hover { color: var(--steam-blue); }
.bbp-topic-freshness-author a { color: var(--steam-blue); font-size: 11px; }

/* ============================================================
   BBPRESS — PAGINATION
   ============================================================ */
.bbp-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    color: var(--steam-muted);
    font-size: 12px;
    flex-wrap: wrap;
    gap: 6px;
}
.bbp-pagination-links { display: flex; gap: 2px; flex-wrap: wrap; }
.bbp-pagination-links a,
.bbp-pagination-links span {
    color: var(--steam-blue);
    padding: 3px 7px;
    font-size: 12px;
    border-radius: 2px;
    display: inline-block;
}
.bbp-pagination-links .current {
    background: var(--steam-green);
    color: var(--steam-green-light);
}
.bbp-pagination-links a:hover { color: var(--steam-text); text-decoration: none; background: var(--steam-bg-2); }

/* ============================================================
   BBPRESS — SINGLE TOPIC
   ============================================================ */
.bbp-pinned-bar {
    background: var(--steam-pinned-bg);
    border: 1px solid var(--steam-green);
    color: var(--steam-green-light);
    padding: 7px 12px;
    font-size: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.bbp-pinned-bar svg { width: 12px; height: 12px; fill: var(--steam-green-light); flex-shrink: 0; }

/* post box */
.bbp-post-box {
    border: 1px solid var(--steam-border);
    margin-bottom: 10px;
}
.bbp-post-box-header {
    background: var(--steam-bg-3);
    border-bottom: 1px solid var(--steam-border);
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.bbp-post-box-header .avatar { border-radius: 2px !important; width: 32px !important; height: 32px !important; }
.bbp-post-author-name { font-weight: bold; color: var(--steam-text); font-size: 13px; }
.bbp-post-author-name a { color: var(--steam-text); }
.bbp-post-author-name a:hover { color: var(--steam-blue); text-decoration: none; }
.bbp-post-author-role {
    background: #1b5e91;
    color: var(--steam-blue);
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
    margin-left: 5px;
    font-weight: normal;
    display: inline-block;
}
.bbp-post-timestamp {
    margin-left: auto;
    color: var(--steam-muted);
    font-size: 11px;
    white-space: nowrap;
}
.bbp-post-number {
    color: var(--steam-muted);
    font-size: 11px;
}
.bbp-post-number:hover { color: var(--steam-blue); text-decoration: none; }

/* lead topic title */
.bbp-topic-title-heading {
    color: var(--steam-text);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* content */
.bbp-topic-content,
.bbp-reply-content {
    padding: 12px 14px;
    color: var(--steam-text);
    font-size: 13px;
    line-height: 1.7;
}
.bbp-topic-content p, .bbp-reply-content p { margin-bottom: 8px; }
.bbp-topic-content a, .bbp-reply-content a { color: var(--steam-blue); }
.bbp-topic-content a:hover, .bbp-reply-content a:hover { color: var(--steam-text); }
.bbp-topic-content strong, .bbp-reply-content strong { color: #e8f0f5; }

/* admin links / row actions */
.bbp-admin-links, .bbp-row-actions {
    margin-left: auto;
    font-size: 11px;
    display: flex;
    gap: 8px;
}
.bbp-admin-links a, .bbp-row-actions a { color: var(--steam-muted); }
.bbp-admin-links a:hover, .bbp-row-actions a:hover { color: var(--steam-blue); text-decoration: none; }

/* lock alert / notices */
.bbp-template-notice,
.bbp-no-reply {
    background: var(--steam-bg);
    border: 1px solid var(--steam-border);
    color: var(--steam-muted);
    padding: 10px 14px;
    font-size: 12px;
    margin: 6px 0;
    text-align: center;
}
.bbp-template-notice ul, .bbp-no-reply ul { list-style: none; }

/* lock modal */
.bbp-alert-outer {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
}
.bbp-alert-inner {
    background: var(--steam-bg-2);
    border: 1px solid var(--steam-border);
    padding: 24px; max-width: 400px; width: 90%;
}
.bbp-alert-description { color: var(--steam-text); margin-bottom: 16px; }
.bbp-alert-actions     { display: flex; gap: 10px; justify-content: flex-end; }
.bbp-alert-back  { padding: 6px 14px; border: 1px solid var(--steam-border); color: var(--steam-muted); border-radius: 2px; font-size: 12px; }
.bbp-alert-close { padding: 6px 14px; background: linear-gradient(to right, var(--steam-green-btn1), var(--steam-green-btn2)); color: var(--steam-green-light); border: none; border-radius: 2px; font-size: 12px; font-weight: bold; }

/* reply / topic forms */
.bbp-reply-form, .bbp-topic-form {
    border: 1px solid var(--steam-border);
    margin-top: 14px;
}
.bbp-reply-form fieldset, .bbp-topic-form fieldset { border: none; padding: 0; }
.bbp-reply-form legend, .bbp-topic-form legend {
    display: block;
    width: 100%;
    background: var(--steam-bg-3);
    border-bottom: 1px solid var(--steam-border);
    padding: 7px 12px;
    color: var(--steam-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bbp-reply-form textarea,
.bbp-topic-form textarea {
    width: 100%;
    background: #2a3f52;
    border: none;
    border-bottom: 1px solid var(--steam-border);
    color: var(--steam-text);
    padding: 10px 12px;
    font-size: 13px;
    min-height: 90px;
    resize: vertical;
    display: block;
}
.bbp-reply-form textarea:focus, .bbp-topic-form textarea:focus { background: #2e4a60; }

.bbp-topic-form #bbp_topic_title {
    display: block;
    width: 100%;
    background: #1e3245;
    border: none;
    border-bottom: 1px solid var(--steam-border);
    color: var(--steam-text);
    padding: 10px 12px;
    font-size: 15px;
    font-weight: bold;
}
.bbp-submit-wrapper {
    background: var(--steam-bg-3);
    border-top: 1px solid var(--steam-border);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
#bbp_reply_submit, #bbp_topic_submit,
.bbp-reply-form input[type="submit"],
.bbp-topic-form  input[type="submit"] {
    background: linear-gradient(to right, var(--steam-green-btn1), var(--steam-green-btn2));
    color: var(--steam-green-light);
    border: none;
    padding: 7px 18px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    border-radius: 2px;
}
#bbp_reply_submit:hover, #bbp_topic_submit:hover { opacity: 0.9; }
.bbp-reply-form p, .bbp-topic-form p { padding: 6px 12px; color: var(--steam-muted); font-size: 12px; margin: 0; }
.bbp-reply-form label, .bbp-topic-form label { color: var(--steam-muted); font-size: 12px; }
.bbp-reply-form input[type="checkbox"], .bbp-topic-form input[type="checkbox"] { accent-color: var(--steam-green); }
.bbp-cancel-reply-to-link { color: var(--steam-muted); font-size: 12px; }
.bbp-allowed-tags { display: none; }

/* subscription links */
#bbp-topic-subscription-link a,
#bbp-topic-favorite-link a,
#bbp-forum-subscription-link a {
    display: inline-block;
    background: var(--steam-bg);
    border: 1px solid var(--steam-green);
    color: var(--steam-muted);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 2px;
    margin-bottom: 8px;
}
#bbp-topic-subscription-link a:hover,
#bbp-topic-favorite-link a:hover,
#bbp-forum-subscription-link a:hover {
    background: var(--steam-bg-2);
    color: var(--steam-text);
    text-decoration: none;
}

/* topic tags */
.bbp-topic-tags { margin-bottom: 8px; font-size: 12px; color: var(--steam-muted); }
.bbp-topic-tags a {
    background: #2a3f52;
    border: 1px solid var(--steam-border);
    color: var(--steam-blue);
    padding: 2px 7px;
    border-radius: 2px;
    font-size: 11px;
    margin-right: 4px;
}
.bbp-topic-tags a:hover { color: var(--steam-text); text-decoration: none; }

/* single topic description */
.bbp-single-topic-description, .bbp-single-forum-description {
    color: var(--steam-muted);
    font-size: 12px;
    margin-bottom: 8px;
}

/* lead topic — hide legacy table markup */
ul.bbp-lead-topic { list-style: none; }
ul.bbp-lead-topic > li.bbp-header,
ul.bbp-lead-topic > li.bbp-footer { display: none; }
ul.bbp-lead-topic > li.bbp-body   { list-style: none; }
.bbp-topic-header, .bbp-reply-header { display: none; } /* we put meta in post-box-header */
.bbp-meta { display: none; }
.bbp-topic-author.bbp-reply-author-wrap,
.bbp-reply-author { display: none; } /* handled in our template */

/* ============================================================
   BBPRESS — USER PROFILE
   ============================================================ */
#bbp-user-wrapper {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}
#bbp-single-user-details { width: 200px; flex-shrink: 0; }
#bbp-user-avatar {
    background: var(--steam-bg-2);
    border: 1px solid var(--steam-border);
    padding: 14px;
    text-align: center;
    margin-bottom: 8px;
}
#bbp-user-avatar img { border-radius: 2px; border: 2px solid var(--steam-border); margin: 0 auto; }
.bbp-user-display-name { color: var(--steam-text); font-weight: bold; font-size: 14px; margin-top: 8px; }
.bbp-user-role-tag     { color: var(--steam-green-light); font-size: 11px; margin-top: 2px; }
.bbp-user-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    border-top: 1px solid var(--steam-border);
    padding-top: 10px;
    margin-top: 8px;
}
.bbp-user-stat { text-align: center; }
.bbp-user-stat-val   { color: var(--steam-text); font-size: 16px; font-weight: bold; }
.bbp-user-stat-label { color: var(--steam-muted); font-size: 10px; }

#bbp-user-navigation ul { list-style: none; border: 1px solid var(--steam-border); }
#bbp-user-navigation li { border-bottom: 1px solid var(--steam-border); }
#bbp-user-navigation li:last-child { border-bottom: none; }
#bbp-user-navigation li a {
    display: block;
    padding: 8px 10px;
    color: var(--steam-blue);
    font-size: 12px;
}
#bbp-user-navigation li a:hover { background: var(--steam-bg-2); color: var(--steam-text); text-decoration: none; }
#bbp-user-navigation li.current a {
    background: var(--steam-bg-2);
    color: var(--steam-text);
    border-left: 2px solid var(--steam-green);
}
#bbp-user-body { flex: 1; min-width: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .site-main-sidebar { flex-direction: column; }
    .site-main-sidebar .secondary { width: 100%; }
    .bbp-forums-index-grid { grid-template-columns: 1fr; }
    #bbp-user-wrapper { flex-direction: column; }
    #bbp-single-user-details { width: 100%; }
    li.bbp-topic-freshness,
    li.bbp-topic-voice-count,
    li.bbp-forum-freshness { display: none; }
    .bbp-th-last { display: none; }
    .primary-navigation { display: none; }
    .site-header-inner { gap: 10px; }
}
