﻿#content {
    overflow: visible;
}

#forums-container {
    padding: 28px 15px 15px;
}

/* ── Forum index — section + category rows ────── */
.forum-section-wrap {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}

.forum-section-head {
    background-image: url('/images/header-bg.png');
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.4), inset 0 0 0 2px rgba(255,255,255,.07);
    padding: 11px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fshead-title {
    font-size: 0.82em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: #fff;
}

.fshead-cols {
    display: flex;
    gap: 0;
}

.fshead-cols span {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,.65);
    text-align: right;
}

.fshead-cols span:first-child {
    min-width: 90px;
    text-align: center;
}

.fshead-cols span:last-child {
    min-width: 190px;
    padding-right: 2px;
}

/* Category row — the "sticking out" effect */
.forum-cat-row {
    display: flex;
    align-items: center;
    padding: 17px 22px;
    background-color: #13202e;          /* just a touch lighter than #0e1720 body */
    border-top: 1px solid rgba(0,0,0,.28);
    text-decoration: none;
    transition: background-color 0.18s;
    cursor: pointer;
}

.forum-cat-row:first-child {
    border-top: none;
}

.forum-cat-row:hover {
    background-color: #1a2d40;
    text-decoration: none;
}

.fcat-info {
    flex: 1;
    min-width: 0;
}

.fcat-name {
    font-size: 1.18em;
    font-weight: 700;
    color: #e8e3ec;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    transition: color 0.18s;
}

.forum-cat-row:hover .fcat-name {
    color: #d5ad32;
}

.fcat-desc {
    font-size: 0.92em;
    color: #8aaabb;
    letter-spacing: 0.3px;
}

.fcat-threads {
    min-width: 90px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 700;
    color: #3e5468;
    flex-shrink: 0;
}

.fcat-active {
    min-width: 190px;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.fcat-active-title {
    font-size: 0.77em;
    color: #5a7a9a;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 185px;
}

.fcat-active-time {
    font-size: 0.67em;
    color: #5a7a9a;
    letter-spacing: 0.5px;
}

@media (max-width: 640px) {
    .fshead-cols, .fcat-threads, .fcat-active { display: none; }
}

/* Category view */
#category-header {
    background-image: url('/images/header-bg.png');
    background-size: cover;
    box-shadow: inset 0px 0px 0px 1px rgba(0,0,0,.32), inset 0 0 0 2px rgba(255,255,255,.19);
    border-radius: 6px 6px 0 0;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Category / thread nav breadcrumb ─────── */
.cat-nav {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.cat-nav-home {
    color: rgba(255,255,255,.45);
    text-decoration: none;
    font-size: 0.95em;
    line-height: 1;
    transition: color 0.18s;
    flex-shrink: 0;
}
.cat-nav-home:hover { color: white; text-decoration: none; }

.cat-nav-sep {
    color: rgba(255,255,255,.2);
    font-size: 0.75em;
    font-weight: 400;
    flex-shrink: 0;
}

.cat-nav-link {
    font-size: 0.68em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.18s;
}
.cat-nav-link:hover { color: white; text-decoration: none; }

.cat-nav-current {
    font-size: 0.68em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
}

/* Thread nav bar (same bg as category header) */
.thread-nav-bar {
    background-image: url('/images/header-bg.png');
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.32), inset 0 0 0 2px rgba(255,255,255,.07);
    border-radius: 6px 6px 0 0;
    padding: 10px 16px;
}

/* ── Category section wrapper ──────────────── */
.cat-section-wrap {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
    margin-bottom: 10px;
}

/* Thin nav bar (breadcrumb + controls) */
.cat-nav-bar {
    background-color: #111d2c;
    border-bottom: 1px solid rgba(0,0,0,.35);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cat-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Sort button — purple, matching screenshot */
.btn-sort {
    background-color: #6d28d9;
    border: none;
    color: white;
    padding: 5px 11px;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.62em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-sort:hover, .btn-sort:focus { background-color: #5b21b6; color: white; outline: none; }

.sort-caret { font-size: 0.8em; opacity: 0.8; }

/* Sort dropdown menu */
.sort-menu {
    background-color: #111d2c !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 6px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.6) !important;
    padding: 4px 0 !important;
    min-width: 110px !important;
    margin-top: 3px !important;
}
.sort-menu > li > a {
    color: #b8c8d8 !important;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 14px !important;
    display: block;
    transition: background-color 0.18s, color 0.18s;
}
.sort-menu > li > a:hover { background-color: rgba(255,255,255,.06) !important; color: #e8e3ec !important; }
.sort-menu > li > a.active { color: #d5ad32 !important; }

/* New Post button — green, matching screenshot */
.btn-new-post {
    background-color: #16a34a;
    color: white;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.62em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: background-color 0.2s;
    white-space: nowrap;
}
.btn-new-post:hover { background-color: #15803d; color: white; text-decoration: none; }

/* Section header with column labels */
.cat-section-header {
    background-image: url('/images/header-bg.png');
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.4), inset 0 0 0 2px rgba(255,255,255,.06);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cat-section-name {
    font-size: 0.88em;
    font-weight: 900;
    color: white;
    letter-spacing: 1px;
}

.cat-col-labels {
    display: flex;
    gap: 0;
}
.cat-col-labels span {
    font-size: 0.6em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,.45);
    text-align: center;
}
.cat-col-labels span:first-child { min-width: 90px; }
.cat-col-labels span:last-child  { min-width: 175px; text-align: right; }

/* Thread rows */
.thread-entry {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    background-color: #13202e;
    border-top: 1px solid rgba(0,0,0,.22);
    text-decoration: none;
    transition: background-color 0.18s;
    cursor: pointer;
}
.thread-entry:first-child { border-top: none; }
.thread-entry:hover { background-color: #182c3e; text-decoration: none; }

.thread-entry.pinned { border-left: 3px solid #d5ad32; }
.thread-entry.locked .thread-title-text { opacity: 0.6; }

.thread-pin-icon {
    color: #d5ad32;
    font-size: 0.7em;
    vertical-align: middle;
}

.thread-votes {
    min-width: 40px;
    flex-shrink: 0;
    text-align: center;
    font-size: 1.45em;
    font-weight: 700;
    color: #3e5468;
    margin-right: 10px;
}

.thread-info { flex: 1; min-width: 0; }

.thread-title-text {
    font-size: 0.9em;
    font-weight: 600;
    color: #75b3c7;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.18s;
}
.thread-entry:hover .thread-title-text { color: #d5ad32; }

.thread-meta {
    font-size: 0.68em;
    color: #3e5468;
    letter-spacing: 0.3px;
}

.thread-stat {
    min-width: 90px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 700;
    color: #3e5468;
    flex-shrink: 0;
}

.thread-last {
    min-width: 175px;
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.thread-last-author { font-size: 0.77em; color: #5a7a9a; font-weight: 600; }
.thread-last-time   { font-size: 0.67em; color: #5a7a9a; }

/* Thread footer action cluster */
.thread-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Pin button (on thread page) */
.btn-pin {
    background: rgba(213,173,50,.12);
    border: 1px solid rgba(213,173,50,.25);
    color: #d5ad32;
    padding: 4px 10px;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s, border-color 0.2s;
}
.btn-pin:hover { background: rgba(213,173,50,.25); border-color: rgba(213,173,50,.5); }

/* Edit thread button (footer) */
.btn-edit-thread {
    background: rgba(117,179,199,.10);
    border: 1px solid rgba(117,179,199,.25);
    color: #75b3c7;
    padding: 4px 10px;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s, border-color 0.2s;
}
.btn-edit-thread:hover { background: rgba(117,179,199,.22); border-color: rgba(117,179,199,.5); text-decoration: none; }

/* Legacy .btn-new-thread kept for new-post form page button */
#category-header .btn-new-thread {
    background-color: #d5ad32;
    color: white;
    border: none;
    padding: 7px 15px;
    border-radius: 6px;
    font-size: 0.65em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-decoration: none;
    box-shadow: inset 0px 0px 0px 1px rgba(0,0,0,.19), inset 0 0 0 2px rgba(255,255,255,.19);
    text-shadow: 0 1px 0 rgba(0,0,0,.19);
    transition: background-color 0.3s;
}

#category-header .btn-new-thread:hover {
    background-color: #cba62f;
}

.thread-list {
    background-color: #0c1a28;
    border-radius: 0 0 6px 6px;
    margin-bottom: 15px;
}

.thread-entry {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-top: 1px solid rgba(0,0,0,.2);
    transition: background-color 0.2s;
}

.thread-entry:hover {
    background-color: rgba(255,255,255,.02);
}

.thread-entry.pinned {
    border-left: 3px solid #d5ad32;
}

.thread-entry.locked .thread-title a {
    opacity: 0.6;
}

.thread-entry .thread-info {
    flex: 1;
}

.thread-entry .thread-title {
    font-size: 0.95em;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.thread-entry .thread-title a {
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}

.thread-entry .thread-title a:hover {
    color: #d5ad32;
}

.thread-entry .thread-badges {
    display: inline-flex;
    gap: 5px;
    margin-left: 8px;
    vertical-align: middle;
}

.badge-pinned, .badge-locked {
    font-size: 0.55em;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    vertical-align: middle;
}

.badge-pinned {
    background-color: rgba(213,173,50,.2);
    color: #d5ad32;
}

.badge-locked {
    background-color: rgba(238,29,37,.2);
    color: #ee1d25;
}

.thread-entry .thread-meta {
    font-size: 0.7em;
    color: #5a7a9a;
    letter-spacing: 1px;
}

.thread-entry .thread-stat {
    min-width: 90px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 700;
    color: #3e5468;
}

.thread-entry .thread-last {
    min-width: 175px;
    text-align: right;
    color: #5a7a9a;
}

/* breadcrumb-bar kept for any other pages that still use it */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    font-size: 0.7em;
    color: #5a7a9a;
    letter-spacing: 1px;
    gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb-bar a { color: #75b3c7; text-decoration: none; transition: color 0.2s; }
.breadcrumb-bar a:hover { color: #d5ad32; }
.breadcrumb-bar .sep { opacity: 0.4; }

/* ── Thread view ─────────────────────────────── */
#thread-view {
    padding: 15px;
}

#thread-post {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background-color: #0c1a28;
    border-radius: 6px;
    padding: 18px 22px 18px 18px;
    box-shadow: 0 2px 0 rgba(0,0,0,.2);
    margin-bottom: 20px;
    position: relative;
}

/* PINNED badge anchored to the top-right corner of the post.
   font-size restores the size it had inside the 1.6em title (0.38em × 1.6). */
#thread-post .thread-pinned-corner {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 0.6em;
}

/* Body skin column */
.thread-skin-link {
    flex-shrink: 0;
    display: block;
    width: 84px;
    text-align: center;
}

.thread-body-skin {
    width: 84px;
    height: auto;
    /* High-res mcstats body downscaled: smooth scaling keeps thin hair intact. */
    image-rendering: auto;
    display: block;
    /* Soft shadow that follows the character's silhouette */
    filter: drop-shadow(0 5px 7px rgba(0,0,0,.55));
}

/* Content column */
.thread-content-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Title row */
.thread-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 5px;
}

.thread-title-text {
    font-size: 1.3em;
    font-weight: 900;
    color: #e8e3ec;
    margin: 0;
    line-height: 1.2;
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* In-thread (post view) title keeps its original larger size */
#thread-post .thread-title-text {
    font-size: 1.6em;
    gap: 6px; /* upvote sits closer to the title */
}

.post-badge {
    font-size: 0.38em;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 4px;
    vertical-align: middle;
}

.badge-pinned { background: rgba(213,173,50,.2);  color: #d5ad32; }
.badge-locked { background: rgba(238,29,37,.2);   color: #ee1d25; }

/* Meta line */
.thread-meta-line {
    font-size: 0.75em;
    color: #3e5468;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.thread-meta-author {
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.thread-meta-author:hover { opacity: 0.75; }

/* "Last edited" line under the thread author */
.thread-edited {
    display: block;
    margin-top: 2px;
    font-size: 0.92em;
    color: #3a4a5a;
    font-style: italic;
}

/* Post content */
.thread-content-text {
    flex: 1;
    color: #b8c8d8;
    line-height: 1.7;
    font-size: 1em;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* Rich (Quill HTML) post content — News / Official Events */
.thread-content-rich { white-space: normal; }
.thread-content-rich h1 { font-size: 1.6em; font-weight: 800; color: #e8e3ec; margin: 0.6em 0 0.3em; }
.thread-content-rich h2 { font-size: 1.35em; font-weight: 800; color: #e8e3ec; margin: 0.6em 0 0.3em; }
.thread-content-rich h3 { font-size: 1.15em; font-weight: 700; color: #e8e3ec; margin: 0.6em 0 0.3em; }
.thread-content-rich p  { margin: 0 0 0.8em; }
.thread-content-rich ul, .thread-content-rich ol { margin: 0 0 0.8em; padding-left: 1.6em; }
.thread-content-rich li { margin-bottom: 0.2em; }
.thread-content-rich a  { color: #75b3c7; text-decoration: underline; }
.thread-content-rich a:hover { color: #d5ad32; }
.thread-content-rich strong { font-weight: 800; }
.thread-content-rich blockquote {
    border-left: 3px solid #2a4256;
    margin: 0 0 0.8em;
    padding: 4px 14px;
    color: #9fb3c4;
    background: rgba(255,255,255,.03);
}
.thread-content-rich pre, .thread-content-rich pre.ql-syntax {
    background: #0b141c;
    border: 1px solid #16242f;
    border-radius: 5px;
    padding: 10px 12px;
    color: #c9d6e2;
    overflow-x: auto;
    white-space: pre-wrap;
}
.thread-content-rich img { max-width: 100%; height: auto; border-radius: 4px; }

/* Quill text-alignment classes (rendered wherever rich content appears) */
.ql-align-center  { text-align: center; }
.ql-align-right   { text-align: right; }
.ql-align-justify { text-align: justify; }

/* Quill editor (new/edit thread in News & Official Events) — dark theme that
   matches the thread content background (#0c1a28) so it's effectively WYSIWYG.
   Scoped under #new-thread-form so these win over quill.snow.css (loaded later). */
#new-thread-form .ql-toolbar.ql-snow {
    background: #13202e;
    border: 1px solid #1e3344;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
}
#new-thread-form .ql-container.ql-snow {
    background: #0c1a28;
    border: 1px solid #1e3344;
    border-radius: 0 0 5px 5px;
}
#new-thread-form #quill-editor { height: 280px; }
#new-thread-form .ql-editor {
    color: #b8c8d8;
    font-size: 14px;
    line-height: 1.6;
}
#new-thread-form .ql-editor.ql-blank::before {
    color: #5a7a8a;
    font-style: normal;
}
/* Toolbar icons + dropdown, recoloured for the dark toolbar */
#new-thread-form .ql-snow .ql-stroke { stroke: #b8c8d8; }
#new-thread-form .ql-snow .ql-fill { fill: #b8c8d8; }
#new-thread-form .ql-snow .ql-picker { color: #b8c8d8; }
#new-thread-form .ql-snow .ql-picker-options { background: #13202e; border-color: #1e3344; }
#new-thread-form .ql-snow.ql-toolbar button:hover .ql-stroke,
#new-thread-form .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: #d5ad32; }
#new-thread-form .ql-snow.ql-toolbar button:hover .ql-fill,
#new-thread-form .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: #d5ad32; }
/* Link tooltip popup */
#new-thread-form .ql-snow .ql-tooltip {
    background: #13202e;
    color: #b8c8d8;
    border-color: #1e3344;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
#new-thread-form .ql-snow .ql-tooltip input[type=text] {
    background: #0c1a28;
    color: #e8e3ec;
    border-color: #1e3344;
}

/* Footer */
.thread-post-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7em;
    color: #3a4a5a;
    letter-spacing: 1px;
}

/* ── Upvote ──────────────────────────────────── */
.upvote-wrap {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
    margin-left: 0;
}

.upvote-btn {
    background: none;
    border: none;
    color: #9aa7b3;
    font-size: 0.95em;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.18s, transform 0.15s;
    font-family: inherit;
    -webkit-text-stroke: 0.6px currentColor; /* bolder arrow with rounded strokes */
    text-stroke: 0.6px currentColor;
}

.upvote-btn:hover {
    color: #d5ad32;
    transform: translateY(-2px);
}

.upvote-btn.voted {
    color: #d5ad32;
}

.upvote-count {
    font-size: 0.85em;
    font-weight: 800;
    color: #9aa7b3;
    line-height: 1;
}

.upvote-count.has-votes {
    color: #c2ccd4;
}

/* Reply author link (no underline, rank colour via inline style) */
.reply-author-link {
    font-weight: 800;
    text-decoration: none;
    transition: opacity 0.2s;
}
.reply-author-link:hover { opacity: 0.75; }

/* ── Delete buttons ──────────────────────────── */
.post-delete-form {
    display: inline-flex;
    margin-left: auto;
}

.post-delete-btn {
    background: rgba(238,29,37,.12);
    border: 1px solid rgba(238,29,37,.25);
    color: #c0392b;
    padding: 4px 10px;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-delete-btn:hover {
    background: rgba(238,29,37,.25);
    border-color: rgba(238,29,37,.5);
    color: #ee1d25;
}

/* Inline × on individual replies */
.reply-delete-btn {
    background: none;
    border: none;
    color: #5a7a9a;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    margin-left: auto;
    font-weight: 700;
    transition: color 0.2s;
    flex-shrink: 0;
}

.reply-delete-btn:hover {
    color: #ee1d25;
}

.reply-restore-btn {
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.35);
    color: #22c55e;
    padding: 4px 10px;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s, border-color 0.2s;
}
.reply-restore-btn:hover {
    background: rgba(34,197,94,.25);
    border-color: rgba(34,197,94,.6);
}

.reply-purge-btn {
    background: rgba(238,29,37,.12);
    border: 1px solid rgba(238,29,37,.25);
    color: #c0392b;
    padding: 4px 10px;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s, border-color 0.2s;
}
.reply-purge-btn:hover {
    background: rgba(238,29,37,.25);
    border-color: rgba(238,29,37,.5);
    color: #ee1d25;
}

/* Replies */
#replies-section {
    margin-top: 20px;
}

#replies-section .section-title {
    font-size: 0.65em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #5a7a9a;
    margin-bottom: 12px;
}

.reply-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
    margin-left: calc(var(--reply-depth, 0) * 36px);
}

/* Nested indent — subtle left border acts as the connecting line */
.reply-item.reply-nested {
    border-left: 2px solid rgba(255,255,255,.07);
    padding-left: 12px;
}

.reply-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    flex-shrink: 0;
    display: block;
    image-rendering: pixelated;
}

.reply-bubble {
    flex: 1;
    background-color: #0c1a28;
    border-radius: 6px;
    padding: 9px 13px;
    box-shadow: 0 1px 0 rgba(0,0,0,.13);
    min-width: 0;
}

.reply-info {
    font-size: 0.72em;
    color: #5a7a9a;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.rdot { opacity: 0.3; font-size: 0.9em; }

.reply-time { color: #3a4a5a; }

.reply-text {
    color: #b8c8d8;
    font-size: 0.88em;
    line-height: 1.6;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* Per-reply upvote */
.reply-vote-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.reply-upvote-btn {
    background: none;
    border: none;
    color: #3a4a5a;
    font-size: 0.85em;
    line-height: 1;
    cursor: pointer;
    padding: 1px 3px;
    border-radius: 3px;
    transition: color 0.18s, transform 0.15s;
    font-family: inherit;
    vertical-align: middle;
}

.reply-upvote-btn:hover    { color: #75b3c7; transform: translateY(-1px); }
.reply-upvote-btn.voted    { color: #d5ad32; }

.reply-vote-count {
    font-size: 0.82em;
    font-weight: 700;
    color: #3a4a5a;
    vertical-align: middle;
}

/* Reply action row, shown below the comment text */
.reply-actions {
    margin-top: 7px;
}

/* "reply" link */
.reply-link {
    color: #3e5468;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    transition: color 0.18s;
}
.reply-link:hover { color: #75b3c7; text-decoration: none; }

/* "edit" link (mirrors reply link) */
.edit-link {
    color: #3e5468;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    transition: color 0.18s;
}
.edit-link:hover { color: #d5ad32; text-decoration: none; }

/* "(edited)" marker on a reply */
.reply-edited {
    color: #3a4a5a;
    font-size: 0.82em;
    font-style: italic;
}

/* Inline nested reply form */
.inline-reply-form {
    display: none;
    margin-top: 8px;
}
.inline-reply-form.open {
    display: block;
}

.inline-reply-textarea {
    width: 100%;
    background-color: #0e1720;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    color: #e8e3ec;
    padding: 8px 10px;
    min-height: 60px;
    resize: vertical;
    font-family: 'Raleway', sans-serif;
    font-size: 0.83em;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.inline-reply-textarea:focus    { border-color: #d5ad32; }
.inline-reply-textarea::placeholder { color: #3a4a5a; }

.inline-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.btn-post-reply {
    background-color: #d5ad32;
    color: white;
    border: none;
    padding: 5px 14px;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.65em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-post-reply:hover { background-color: #cba62f; }

.btn-cancel-reply {
    background: none;
    border: none;
    color: #3a4a5a;
    font-family: 'Raleway', sans-serif;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-cancel-reply:hover { color: #e8e3ec; }

/* Reply form */
#reply-form-section {
    margin-top: 20px;
    background-color: #0c1a28;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 0 rgba(0,0,0,.13);
}

#reply-form-section .form-header {
    background-image: url('/images/header-bg.png');
    background-size: cover;
    box-shadow: inset 0px 0px 0px 1px rgba(0,0,0,.32), inset 0 0 0 2px rgba(255,255,255,.19);
    padding: 8px 15px;
    font-size: 0.65em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: white;
}

#reply-form-section form {
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

#reply-form-section form img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    flex-shrink: 0;
}

#reply-form-section textarea {
    flex: 1;
    background-color: #0e1720;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    color: #e8e3ec;
    padding: 10px;
    resize: vertical;
    min-height: 80px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.85em;
    outline: none;
    transition: border-color 0.3s;
}

#reply-form-section textarea:focus {
    border-color: #d5ad32;
}

#reply-form-section textarea::placeholder {
    color: #3a4a5a;
}

#reply-form-section .btn-reply {
    background-color: #d5ad32;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.65em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: inset 0px 0px 0px 1px rgba(0,0,0,.19), inset 0 0 0 2px rgba(255,255,255,.19);
    align-self: flex-end;
    white-space: nowrap;
}

#reply-form-section .btn-reply:hover {
    background-color: #cba62f;
}

/* New thread form */
#new-thread-form {
    padding: 20px;
    background-color: #0c1a28;
    border-radius: 0 0 6px 6px;
}

#new-thread-form .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

#new-thread-form input[type="text"],
#new-thread-form select,
#new-thread-form textarea {
    background-color: #0e1720;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    color: #e8e3ec;
    padding: 10px 14px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.88em;
    outline: none;
    transition: border-color 0.3s;
    width: 100%;
}

#new-thread-form input[type="text"]:focus,
#new-thread-form select:focus,
#new-thread-form textarea:focus {
    border-color: #d5ad32;
}

#new-thread-form select option,
#new-thread-form select optgroup {
    background-color: #0e1720;
    color: #e8e3ec;
}

#new-thread-form textarea {
    min-height: 200px;
    resize: vertical;
    margin-bottom: 12px;
}

#new-thread-form .btn-post {
    background-color: #d5ad32;
    color: white;
    border: none;
    padding: 9px 24px;
    border-radius: 6px;
    font-size: 0.7em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    float: right;
    transition: background-color 0.3s;
    box-shadow: inset 0px 0px 0px 1px rgba(0,0,0,.19), inset 0 0 0 2px rgba(255,255,255,.19);
}

#new-thread-form .btn-post:hover {
    background-color: #cba62f;
}

#new-thread-form label {
    display: block;
    font-size: 0.65em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #5a7a9a;
    margin-bottom: 5px;
}

.form-group-row {
    margin-bottom: 15px;
}

.login-prompt {
    background-color: #0e1720;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    font-size: 0.8em;
    color: #5a7a9a;
    letter-spacing: 1px;
}

.login-prompt a {
    color: #d5ad32;
    text-decoration: none;
    font-weight: 700;
}

.locked-notice {
    background-color: rgba(238,29,37,.1);
    border: 1px solid rgba(238,29,37,.3);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    font-size: 0.75em;
    color: #ee1d25;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

@media (max-width: 768px) {
    /* Trim the doubled side padding so threads use the full width */
    #forums-container { padding: 10px; }
    #thread-view      { padding: 10px; }

    /* Original post: keep skin beside content but shrink it and tighten spacing */
    #thread-post {
        flex-direction: row;
        gap: 14px;
        padding: 14px;
    }

    .thread-skin-link,
    .thread-body-skin { width: 68px; }

    .thread-title-text { font-size: 1.25em; }

    /* Cap nested-reply indentation so deep replies don't run off-screen */
    .reply-item { margin-left: calc(var(--reply-depth, 0) * 14px); }
    .reply-item.reply-nested { padding-left: 9px; }

    .forum-entry .forum-stat,
    .forum-entry .forum-latest {
        display: none;
    }

    .thread-entry .thread-stat,
    .thread-entry .thread-last {
        display: none;
    }
}
