/* ============================================================
   bbPress Forum Styling — retro phpBB-inspired layout
   ============================================================ */

/* ============================================================
   Widen the site frame on all bbPress pages (forums, topics, etc.)
   ============================================================ */

body.bbpress .container-fluid {
    max-width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
    background-image: none;
}

body.bbpress {
    background-image: url("../images/ruins.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Fade in only on the main forums index — ruins emerging from the mist.
   Individual forums/topics (once you're "inside") load instantly, no fade. */
body.noctuwrimo-forum-archive {
    animation: fadeIn 5s ease-in;
}

#bbpress-forums {
    text-align: left;
    color: ghostwhite;
    font-family: 'Garamond', serif;
}

/* Blanket fix: force every element inside the forums to have a dark
   background, since we know ghostwhite text already works reliably
   against dark backgrounds everywhere else in the forums. */
#bbpress-forums,
#bbpress-forums * {
    background-color: #0a0a0a !important;
}

/* Consistent font sizing across ALL forum pages (archive, single forum, single topic) */
#bbpress-forums,
#bbpress-forums * {
    font-size: 15px !important;
}

#bbpress-forums h1,
#bbpress-forums h2,
#bbpress-forums h3,
#bbpress-forums .bbp-breadcrumb,
#bbpress-forums .bbp-forum-title {
    font-size: 18px !important;
}

#bbpress-forums ul.bbp-category-row .bbp-forum-title {
    font-size: 22px !important;
}

#bbpress-forums a {
    color: greenyellow;
    text-decoration: none;
}

#bbpress-forums a:hover {
    color: silver;
    text-decoration: underline;
}

/* Breadcrumb */
#bbpress-forums .bbp-breadcrumb {
    font-family: 'Trebuchet MS', serif;
    padding: 8px 12px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #555;
}

/* Search box */
#bbpress-forums #bbp-search-form {
    margin-bottom: 15px;
    text-align: right;
}

#bbpress-forums #bbp_search {
    background: #111;
    border: 1px solid #666;
    color: ghostwhite;
    padding: 4px 8px;
}

#bbpress-forums #bbp_search_submit {
    background: dimgray;
    border: 1px solid #666;
    color: ghostwhite;
    padding: 4px 10px;
    cursor: pointer;
}

/* ============================================================
   Forum / Topic / Reply list tables
   ============================================================ */

#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    border: 1px solid #555;
}

/* Header row (Forum / Topics / Posts / Last Post) */
#bbpress-forums li.bbp-header {
    background: linear-gradient(
        to bottom,
        #606060 0%,
        gray 20%,
        dimgray 50%,
        #3a3a3a 80%,
        #606060 100%
    );
    font-family: 'Trebuchet MS', serif;
    font-weight: bold;
    color: ghostwhite;
}

/* Body / footer rows */
#bbpress-forums li.bbp-body > ul,
#bbpress-forums li.bbp-header > ul,
#bbpress-forums li.bbp-footer > ul {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #444;
}

#bbpress-forums li.bbp-body > ul:last-child {
    border-bottom: none;
}

#bbpress-forums li.bbp-body {
    background: #0a0a0a !important;
}

#bbpress-forums li.bbp-body:nth-child(even) {
    background: #141414 !important;
}

#bbpress-forums li.bbp-footer {
    font-size: 0.85em;
    color: silver;
    padding: 4px 12px;
}

/* Column widths — shared across forum/topic/reply list rows */
#bbpress-forums .bbp-forum-info,
#bbpress-forums .bbp-topic-title {
    flex: 1 1 auto;
    text-align: left;
}

#bbpress-forums .bbp-forum-topic-count,
#bbpress-forums .bbp-forum-reply-count,
#bbpress-forums .bbp-topic-voice-count,
#bbpress-forums .bbp-topic-reply-count {
    flex: 0 0 90px;
    text-align: center;
}

#bbpress-forums .bbp-forum-freshness,
#bbpress-forums .bbp-topic-freshness {
    flex: 0 0 220px;
    text-align: right;
    font-size: 0.9em;
}

#bbpress-forums .bbp-forum-title {
    font-size: 18px !important;
    font-weight: bold;
}

#bbpress-forums .bbp-forum-content,
#bbpress-forums .bbp-topic-content {
    font-size: 15px !important;
    color: silver;
    margin-top: 3px;
}

/* Category header rows (non-clickable dividers, like "NaNo Tips and Strategies") */
#bbpress-forums ul.bbp-category-row {
    background: #000 !important;
    border-top: 2px solid #666;
    border-bottom: 1px solid #666;
}

#bbpress-forums ul.bbp-category-row .bbp-forum-title {
    font-size: 22px !important;
    color: ghostwhite;
    text-shadow: 0 0 6px rgba(255,255,255,0.3);
}

/* Individual forum rows (the actual clickable boards) */
#bbpress-forums ul.bbp-forum-row {
    padding-left: 20px;
}

#bbpress-forums ul.bbp-forum-row .bbp-forum-title {
    color: greenyellow;
}

#bbpress-forums ul.bbp-forum-row .bbp-forum-title:hover {
    color: silver;
}

/* Sub-forums nested inside a forum row */
#bbpress-forums ul.bbp-forums ul.bbp-forums {
    border: none;
    margin: 8px 0 0 0;
}

/* ============================================================
   Single topic / reply content
   ============================================================ */

#bbpress-forums .bbp-topic-header,
#bbpress-forums .bbp-reply-header,
#bbpress-forums .bbp-template-notice,
#bbpress-forums .bbp-topic-content,
#bbpress-forums .bbp-reply-content,
#bbpress-forums dl.bbp-topic-author,
#bbpress-forums dl.bbp-reply-author,
#bbpress-forums .bbp-author-name,
#bbpress-forums .bbp-author-ip,
#bbpress-forums .bbp-author-role {
    color: ghostwhite !important;
}

#bbpress-forums .bbp-topic-header a,
#bbpress-forums .bbp-reply-header a,
#bbpress-forums .bbp-template-notice a {
    color: greenyellow !important;
}

#bbpress-forums .bbp-topic-header,
#bbpress-forums .bbp-reply-header,
#bbpress-forums .bbp-reply-content,
#bbpress-forums .bbp-topic-content {
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    font-size: 0.85em;
    color: silver;
    border-bottom: 1px solid #444;
}

#bbpress-forums .bbp-topic-content,
#bbpress-forums .bbp-reply-content {
    padding: 12px;
    line-height: 1.5;
}

#bbpress-forums div.bbp-topic-author,
#bbpress-forums div.bbp-reply-author {
    text-align: center;
    font-family: 'Trebuchet MS', serif;
}

#bbpress-forums div.bbp-topic-author img.avatar,
#bbpress-forums div.bbp-reply-author img.avatar {
    border-radius: 50%;
    border: 2px solid #666;
}

/* ============================================================
   Forms — new topic / reply
   ============================================================ */

#bbpress-forums #bbp-topic-form,
#bbpress-forums #bbp-reply-form,
#bbpress-forums #bbp-forum-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #555;
    padding: 15px;
    margin-top: 15px;
}

#bbpress-forums fieldset.bbp-form legend {
    font-family: 'Trebuchet MS', serif;
    font-weight: bold;
    color: ghostwhite;
    padding: 0 6px;
}

#bbpress-forums input[type="text"],
#bbpress-forums input[type="email"],
#bbpress-forums input[type="url"],
#bbpress-forums textarea {
    background: #111;
    border: 1px solid #666;
    color: ghostwhite;
    padding: 6px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Garamond', serif;
}

#bbpress-forums button[type="submit"],
#bbpress-forums input[type="submit"] {
    background: linear-gradient(to bottom, #606060, dimgray);
    border: 1px solid #666;
    color: ghostwhite;
    padding: 8px 18px;
    cursor: pointer;
    font-family: 'Trebuchet MS', serif;
}

#bbpress-forums button[type="submit"]:hover,
#bbpress-forums input[type="submit"]:hover {
    background: linear-gradient(to bottom, greenyellow, olivedrab);
    color: #000;
}

/* ============================================================
   Pagination
   ============================================================ */

#bbpress-forums .bbp-pagination {
    text-align: center;
    margin: 15px 0;
}

#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span.current {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 2px;
    border: 1px solid #666;
    color: ghostwhite;
}

#bbpress-forums .bbp-pagination-links span.current {
    background: dimgray;
}

/* ============================================================
   Mobile: stack columns instead of squishing them
   ============================================================ */

@media (max-width: 768px) {
    #bbpress-forums li.bbp-body > ul,
    #bbpress-forums li.bbp-header > ul {
        flex-wrap: wrap;
    }

    #bbpress-forums .bbp-forum-topic-count,
    #bbpress-forums .bbp-forum-reply-count,
    #bbpress-forums .bbp-topic-voice-count,
    #bbpress-forums .bbp-topic-reply-count,
    #bbpress-forums .bbp-forum-freshness,
    #bbpress-forums .bbp-topic-freshness {
        flex: 1 1 33%;
        text-align: left;
        font-size: 0.8em;
    }
}

/* ============================================================
   Member author profile (Author Bio / Fact Sheet / Novel Info)
   ============================================================ */

.noctu-author-profile {
    margin-top: 20px;
    background: #0a0a0a;
    border: 1px solid #555;
    padding: 20px;
}

.noctu-profile-section {
    margin-bottom: 25px;
}

.noctu-profile-section:last-child {
    margin-bottom: 0;
}

.noctu-profile-section h3 {
    font-size: 18px;
    text-align: left;
    border-bottom: 1px solid #555;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.noctu-profile-section p,
.noctu-profile-section li {
    color: ghostwhite;
    line-height: 1.5;
}

.noctu-fact-sheet {
    list-style: none;
    padding: 0;
    margin: 0;
}

.noctu-fact-sheet li {
    padding: 4px 0;
}

.noctu-novel-title {
    font-size: 16px;
    font-weight: bold;
    color: greenyellow;
}

.noctu-wordcount-bar {
    max-width: 400px;
    margin: 0 auto;
    height: 14px;
    background: #1a1a1a;
    border: 1px solid #666;
    border-radius: 3px;
    overflow: hidden;
}

.noctu-wordcount-fill {
    height: 100%;
    background: linear-gradient(to right, dimgray, greenyellow);
    transition: width 0.4s ease;
}

.noctu-wordcount-label {
    text-align: center;
    margin-top: 6px;
    font-size: 13px;
    font-family: 'Trebuchet MS', serif;
    font-weight: bold;
}

.noctu-wordcount-form {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
}

.noctu-wordcount-form input[type="number"] {
    width: 100px;
    background: #0a0a0a;
    color: ghostwhite;
    border: 1px solid #666;
    border-radius: 3px;
    padding: 4px 6px;
    margin: 0 6px;
}

.noctu-wordcount-form button {
    background: linear-gradient(to bottom, #606060, dimgray);
    color: ghostwhite;
    border: 1px solid #666;
    border-radius: 3px;
    padding: 4px 12px;
    cursor: pointer;
}

.noctu-wordcount-form button:hover {
    background: linear-gradient(to bottom, greenyellow, olivedrab);
    color: #000;
}

.noctu-edit-profile {
    border-top: 2px solid #666;
    padding-top: 20px;
    margin-top: 10px;
}

.noctu-profile-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.noctu-profile-form label {
    font-family: 'Trebuchet MS', serif;
    font-weight: bold;
    margin-top: 12px;
}

.noctu-profile-form input[type="text"],
.noctu-profile-form input[type="number"],
.noctu-profile-form input[type="url"],
.noctu-profile-form textarea {
    background: #0a0a0a;
    color: ghostwhite;
    border: 1px solid #666;
    border-radius: 3px;
    padding: 6px 8px;
    font-family: 'Garamond', serif;
    width: 100%;
    box-sizing: border-box;
}

.noctu-profile-form button {
    align-self: center;
    margin-top: 20px;
    background: linear-gradient(to bottom, #606060, dimgray);
    color: ghostwhite;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 10px 24px;
    font-family: 'Trebuchet MS', serif;
    cursor: pointer;
}

.noctu-profile-form button:hover {
    background: linear-gradient(to bottom, greenyellow, olivedrab);
    color: #000;
}

/* ============================================================
   Author Directory
   ============================================================ */

.noctu-author-search {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    max-width: 500px;
}

.noctu-author-search input[type="text"] {
    flex: 1;
    background: #0a0a0a;
    color: ghostwhite;
    border: 1px solid #666;
    border-radius: 3px;
    padding: 8px 10px;
    font-family: 'Garamond', serif;
}

.noctu-author-search button {
    background: linear-gradient(to bottom, #606060, dimgray);
    color: ghostwhite;
    border: 1px solid #666;
    border-radius: 3px;
    padding: 8px 18px;
    cursor: pointer;
}

.noctu-author-search button:hover {
    background: linear-gradient(to bottom, greenyellow, olivedrab);
    color: #000;
}

.noctu-author-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.noctu-author-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid #444;
}

.noctu-author-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: greenyellow;
    text-decoration: none;
}

.noctu-author-item a:hover {
    color: silver;
}

.noctu-author-item img {
    border-radius: 50%;
    border: 2px solid #666;
}

.noctu-author-name {
    font-family: 'Trebuchet MS', serif;
    font-weight: bold;
    font-size: 16px;
}

.noctu-author-meta {
    color: silver;
    font-size: 13px;
}
