/* ═══════════════════════════════════════════════════════════
   PGH FORUMS
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

.pghf-wrap {
    --fa:      #c0392b;
    --fa2:     #a93226;
    --dark:    #1a1a1a;
    --border:  #e5e7eb;
    --bg:      #f4f4f4;
    --white:   #ffffff;
    --text:    #1a1a1a;
    --muted:   #6b7280;
    --green:   #16a34a;
    --radius:  8px;

    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    width: 100%;
    max-width: 100%;
}
.pghf-wrap img, .pghf-wrap video { max-width: 100%; height: auto; }

/* Targeted border-box on the full-width padded cards so their padding is
   contained within the width instead of overflowing the viewport on mobile.
   Scoped to specific block containers (not a global * reset) to avoid
   disturbing the grid/flex layouts the desktop view relies on. */
.pghf-forum-header,
.pghf-pages-nav,
.pghf-cat-group,
.pghf-cat-group-header,
.pghf-cat-row,
.pghf-r-feed,
.pghf-r-card,
.pghf-thread-list-header,
.pghf-thread-row,
.pghf-post,
.pghf-new-thread-form,
.pghf-breadcrumb { box-sizing: border-box; max-width: 100%; }

/* ── FORUM HEADER ──────────────────────────────────────── */
.pghf-forum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--dark);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.pghf-forum-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
}

.pghf-forum-sub { font-size: 13px; color: #888; margin: 0; }

.pghf-header-actions { display: flex; gap: 8px; align-items: center; }

/* ── FORUM PAGES NAV ───────────────────────────────────── */
.pghf-pages-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
}

.pghf-page-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all .15s;
}

.pghf-page-link:hover { background: var(--bg); color: var(--fa); }

/* ── CATEGORY GROUPS ───────────────────────────────────── */
.pghf-cat-group { margin-bottom: 20px; }

.pghf-cat-group-header {
    background: var(--dark);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius) var(--radius) 0 0;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.pghf-cat-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: none;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}

.pghf-cat-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.pghf-cat-row:hover { background: #fafafa; }

.pghf-cat-icon { font-size: 28px; flex-shrink: 0; width: 40px; text-align: center; }

.pghf-cat-info { flex: 1; min-width: 0; }
.pghf-cat-name { font-size: 15px; font-weight: 700; color: var(--fa); margin-bottom: 2px; }
.pghf-cat-desc { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pghf-cat-stats { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }

.pghf-cat-last { text-align: right; min-width: 180px; flex-shrink: 0; }
.pghf-cat-last-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.pghf-cat-last-meta { font-size: 11px; color: var(--muted); }

/* ── BREADCRUMB ────────────────────────────────────────── */
.pghf-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.pghf-breadcrumb a { color: var(--fa); text-decoration: none; }
.pghf-breadcrumb a:hover { text-decoration: underline; }
.pghf-bc-sep { color: var(--muted); }

/* ── CATEGORY HEADER ───────────────────────────────────── */
.pghf-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pghf-cat-title { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.pghf-cat-desc-full { font-size: 13px; color: var(--muted); margin: 0; }

/* ── THREAD LIST ───────────────────────────────────────── */
.pghf-thread-list {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.pghf-thread-list-header {
    display: grid;
    grid-template-columns: 1fr 70px 70px 140px;
    gap: 12px;
    padding: 10px 16px;
    background: var(--dark);
    color: #888;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.pghf-thread-row {
    display: grid;
    grid-template-columns: 1fr 70px 70px 140px;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}

.pghf-thread-row:hover { background: #fafafa; }
.pghf-thread-row.pghf-pinned { background: #fffbeb; }

.pghf-thread-main { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.pghf-thread-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.pghf-thread-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.pghf-thread-avatar { width: 18px; height: 18px; border-radius: 50%; }

.pghf-thread-replies,
.pghf-thread-views { font-size: 13px; font-weight: 600; color: var(--muted); text-align: center; }

.pghf-thread-last { text-align: right; }
.pghf-thread-last-name { font-size: 12px; font-weight: 600; color: var(--fa); }
.pghf-thread-last-time { font-size: 11px; color: var(--muted); }

.pghf-ann-badge, .pghf-pin-badge, .pghf-lock-badge { font-size: 14px; flex-shrink: 0; }
.pghf-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 14px; }

/* ── THREAD PAGE ───────────────────────────────────────── */
.pghf-thread-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pghf-thread-title-full {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.3;
}

.pghf-thread-header-meta { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.pghf-thread-header-actions { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }

/* Mod dropdown */
.pghf-mod-tools { position: relative; }
.pghf-mod-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    min-width: 160px;
    z-index: 100;
    overflow: hidden;
}

.pghf-mod-action {
    display: block;
    width: 100%;
    padding: 9px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    transition: background .1s;
    font-family: 'DM Sans', sans-serif;
}

.pghf-mod-action:hover { background: var(--bg); }
.pghf-mod-action.pghf-mod-danger { color: var(--fa); }
.pghf-mod-action.pghf-mod-danger:hover { background: #fef2f2; }

/* ── POST CARD ─────────────────────────────────────────── */
.pghf-posts { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.pghf-post {
    display: flex;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.pghf-post.pghf-best-answer { border-color: var(--green); border-left: 4px solid var(--green); }

/* User sidebar */
.pghf-post-user {
    width: 130px;
    flex-shrink: 0;
    padding: 16px 12px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.pghf-post-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
    border: 2px solid var(--border);
    cursor: pointer;
}

.pghf-post-username {
    font-size: 13px;
    font-weight: 700;
    color: var(--fa);
    text-decoration: none;
    word-break: break-word;
}

.pghf-post-username:hover { text-decoration: underline; }
.pghf-post-rank     { font-size: 11px; font-weight: 700; margin-top: 2px; }
.pghf-post-score    { font-size: 11px; color: var(--muted); }
.pghf-post-postcount{ font-size: 11px; color: var(--muted); }
.pghf-post-since    { font-size: 10px; color: var(--muted); }
.pghf-mod-badge     { background: var(--fa); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-top: 4px; }

/* Post body */
.pghf-post-body { flex: 1; padding: 16px; min-width: 0; display: flex; flex-direction: column; }

.pghf-best-answer-badge {
    display: inline-block;
    background: #f0fdf4;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    border: 1px solid #bbf7d0;
}

.pghf-post-content {
    font-size: 14px;
    line-height: 1.65;
    flex: 1;
    word-break: break-word;
}

.pghf-post-content p { margin: 0 0 10px; }
.pghf-post-content p:last-child { margin-bottom: 0; }
.pghf-post-content img { max-width: 100%; border-radius: 6px; }
.pghf-post-content a { color: var(--fa); }
.pghf-post-content ul, .pghf-post-content ol { padding-left: 20px; margin: 8px 0; }
.pghf-post-content blockquote { border-left: 3px solid var(--border); padding: 8px 12px; margin: 8px 0; color: var(--muted); background: var(--bg); border-radius: 0 6px 6px 0; }
.pghf-post-content code { background: #f4f4f5; padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.pghf-post-content pre { background: #1a1a1a; color: #e5e7eb; padding: 14px; border-radius: 7px; overflow-x: auto; font-size: 13px; }

/* Quote */
.pghf-quote { background: var(--bg); border-left: 3px solid var(--fa); padding: 10px 14px; border-radius: 0 6px 6px 0; margin-bottom: 12px; }
.pghf-quote-author { font-size: 11px; font-weight: 700; color: var(--fa); margin-bottom: 4px; text-transform: uppercase; }
.pghf-quote-text   { font-size: 13px; color: var(--muted); }

/* Attachments */
.pghf-post-attachment { margin-top: 12px; }
.pghf-attachment-img  { max-width: 100%; max-height: 400px; border-radius: 6px; cursor: zoom-in; border: 1px solid var(--border); }

/* Post footer */
.pghf-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    gap: 8px;
    flex-wrap: wrap;
}

.pghf-post-time { font-size: 11px; color: var(--muted); }
.pghf-post-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.pghf-like-btn, .pghf-quote-btn, .pghf-best-btn, .pghf-delete-post-btn {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--muted);
    transition: all .15s;
    font-family: 'DM Sans', sans-serif;
}

.pghf-like-btn:hover    { border-color: var(--green); color: var(--green); }
.pghf-like-btn.liked    { background: #f0fdf4; border-color: var(--green); color: var(--green); }
.pghf-quote-btn:hover   { border-color: var(--fa); color: var(--fa); }
.pghf-best-btn:hover    { border-color: var(--green); color: var(--green); }
.pghf-delete-post-btn:hover { border-color: var(--fa); color: var(--fa); }
.pghf-like-display      { font-size: 12px; color: var(--muted); }

/* ── EMBEDS ────────────────────────────────────────────── */
.pghf-embed { margin: 12px 0; }

.pghf-embed-yt {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    max-width: 480px;
}

.pghf-yt-thumb { width: 100%; display: block; }
.pghf-yt-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 54px; height: 54px;
    background: rgba(0,0,0,.75);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
    transition: background .15s;
}
.pghf-embed-yt:hover .pghf-yt-play { background: var(--fa); }

.pghf-twitch-link, .pghf-kick-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.pghf-twitch-link { background: #f3e8ff; color: #6d28d9; }
.pghf-kick-link   { background: #f0fdf4; color: #166534; }

/* ── REPLY BOX ─────────────────────────────────────────── */
.pghf-reply-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 8px;
}

.pghf-reply-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fa);
}

.pghf-reply-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 10px;
}

.pghf-login-prompt { text-align: center; padding: 24px; }
.pghf-closed-notice { text-align: center; padding: 16px; background: #fef3c7; border: 1px solid #fde68a; border-radius: var(--radius); font-weight: 600; color: #92400e; }

/* ── RICH TEXT EDITOR ──────────────────────────────────── */
.pghf-editor-wrap {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .15s;
}
.pghf-editor-wrap:focus-within { border-color: var(--fa); }

.pghf-editor-toolbar {
    display: flex;
    gap: 2px;
    padding: 6px 8px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.pghf-tb-btn {
    background: none;
    border: none;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--muted);
    transition: all .1s;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
}

.pghf-tb-btn:hover { background: var(--border); color: var(--text); }
.pghf-tb-btn.active { background: var(--fa); color: #fff; }

.pghf-tb-sep { width: 1px; background: var(--border); margin: 2px 4px; }

.pghf-editor {
    min-height: 140px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    background: #fff;
}

.pghf-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}

.pghf-editor p { margin: 0 0 8px; }
.pghf-editor blockquote { border-left: 3px solid var(--border); padding: 6px 12px; margin: 6px 0; color: var(--muted); background: var(--bg); }
.pghf-editor img { max-width: 100%; }

/* ── ATTACHMENT ────────────────────────────────────────── */
.pghf-attach-area { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pghf-attach-preview img { max-height: 60px; border-radius: 6px; border: 1px solid var(--border); }
.pghf-attach-preview .pghf-attach-remove { background: var(--fa); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 12px; margin-left: 4px; }

/* ── BUTTONS ───────────────────────────────────────────── */
.pghf-btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}

.pghf-btn-primary { background: var(--fa); color: #fff !important; }
.pghf-btn-primary:hover { background: var(--fa2); }
.pghf-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.pghf-btn-ghost {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}
.pghf-btn-ghost:hover { border-color: var(--fa); color: var(--fa); }
.pghf-btn-ghost.active { border-color: var(--fa); color: var(--fa); background: #fdf2f1; }

.pghf-push-btn { padding: 8px 10px; }

/* Sub button */
.pghf-sub-btn.active { border-color: var(--green); color: var(--green); background: #f0fdf4; }

/* ── MODAL ─────────────────────────────────────────────── */
.pghf-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: 16px;
}

.pghf-modal-inner {
    background: var(--white);
    border-radius: var(--radius);
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
}

.pghf-modal-lg { width: min(760px, 100%); }

.pghf-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.pghf-modal-head h3 { font-size: 16px; font-weight: 700; margin: 0; }
.pghf-modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 4px; }
.pghf-modal-close:hover { background: var(--bg); }

.pghf-modal-body { padding: 20px; flex: 1; overflow-y: auto; }
.pghf-modal-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

/* ── FORM ELEMENTS ─────────────────────────────────────── */
.pghf-field { margin-bottom: 14px; }

.pghf-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 5px;
}

.pghf-input, .pghf-select {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

.pghf-input:focus, .pghf-select:focus { border-color: var(--fa); }

.pghf-form-msg {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
}
.pghf-form-msg.ok  { color: var(--green); }
.pghf-form-msg.err { color: var(--fa); }

/* ── PAGINATION ────────────────────────────────────────── */
.pghf-pagination { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 16px; }
.pghf-page-btn {
    padding: 6px 12px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    transition: all .15s;
}
.pghf-page-btn:hover, .pghf-page-btn.active { background: var(--fa); border-color: var(--fa); color: #fff; }

/* ── FORUM PAGE ────────────────────────────────────────── */
.pghf-page-content {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.pghf-page-title { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--fa); }
.pghf-page-body { font-size: 14px; line-height: 1.7; }
.pghf-page-body h2 { font-size: 18px; font-weight: 700; margin: 20px 0 10px; }
.pghf-page-body li { margin-bottom: 6px; }

/* ── NOTICE ────────────────────────────────────────────── */
.pghf-notice { padding: 16px; background: #fef3c7; border: 1px solid #fde68a; border-radius: var(--radius); font-size: 14px; color: #92400e; }

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
    .pghf-cat-last { display: none; }
    .pghf-thread-list-header,
    .pghf-thread-row { grid-template-columns: 1fr 50px 60px; }
    .pghf-thread-last { display: none; }
    .pghf-post { flex-direction: column; }
    .pghf-post-user { width: 100%; flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); padding: 10px 14px; flex-wrap: wrap; text-align: left; }
    .pghf-post-avatar { width: 36px; height: 36px; margin-bottom: 0; }

    /* Forum header stacks on mobile */
    .pghf-forum-header { flex-direction: column; align-items: flex-start; padding: 14px; gap: 10px; }
    .pghf-forum-title  { font-size: 16px; }
    .pghf-forum-sub    { font-size: 12px; }
    .pghf-header-actions { width: 100%; }
    .pghf-header-actions .pghf-btn { width: 100%; text-align: center; justify-content: center; }

    /* Category group */
    .pghf-cat-group-header { font-size: 11px; }
    .pghf-cat-row { padding: 10px 12px; gap: 10px; }
    .pghf-cat-icon { font-size: 22px; width: 30px; }
    .pghf-cat-name { font-size: 14px; }
    .pghf-cat-desc { display: none; }

    /* Thread list */
    .pghf-thread-title { font-size: 13px; }
    .pghf-thread-row   { padding: 10px 12px; }

    /* Thread header */
    .pghf-thread-header { flex-direction: column; gap: 8px; }
    .pghf-thread-title-full { font-size: 16px; }
    .pghf-thread-header-actions { flex-wrap: wrap; }

    /* Reply box */
    .pghf-reply-footer { flex-direction: column; align-items: flex-start; }
    .pghf-reply-footer .pghf-btn { width: 100%; text-align: center; }

    /* New thread form */
    .pghf-new-thread-form { padding: 14px; }
    .pghf-form-footer { flex-direction: column; align-items: flex-start; }
    .pghf-form-footer .pghf-btn { width: 100%; text-align: center; }

    /* Breadcrumb */
    .pghf-breadcrumb { font-size: 12px; }
}

@media (max-width: 480px) {
    .pghf-thread-list-header,
    .pghf-thread-row { grid-template-columns: 1fr 45px; }
    .pghf-thread-views { display: none; }
    .pghf-thread-header { flex-direction: column; }
    .pghf-wrap { font-size: 13px; }

    /* Sidebar stats grid */
    .pghf-stats-grid { grid-template-columns: repeat(3,1fr); gap: 4px; padding: 8px; }
    .pghf-stat-num { font-size: 16px; }

    /* Pages nav wraps */
    .pghf-pages-nav { padding: 6px 10px; }
    .pghf-page-link { font-size: 12px; padding: 3px 8px; }
}

/* ═══════════════════════════════════════════════════════════
   PGH FORUMS — SIDEBAR
═══════════════════════════════════════════════════════════ */

.pghf-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-family: 'DM Sans', sans-serif;
}

/* ── Widget shell ──────────────────────────────────────── */
.pghf-sb-widget {
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius, 8px);
    overflow: hidden;
}

.pghf-sb-header {
    background: #1a1a1a;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pghf-online-count {
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.pghf-sb-body {
    padding: 12px 14px;
}

.pghf-sb-empty {
    color: #9ca3af;
    font-size: 13px;
    margin: 0;
    text-align: center;
    padding: 8px 0;
}

/* ── Stats grid ────────────────────────────────────────── */
.pghf-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
}

.pghf-stat-item { text-align: center; }

.pghf-stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #c0392b;
    line-height: 1;
}

.pghf-stat-lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #9ca3af;
    margin-top: 2px;
}

/* ── User card ─────────────────────────────────────────── */
.pghf-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pghf-sb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border, #e5e7eb);
}

.pghf-sb-user-info { flex: 1; min-width: 0; }

.pghf-sb-username {
    font-size: 14px;
    font-weight: 700;
    color: #c0392b;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pghf-sb-username:hover { text-decoration: underline; }

.pghf-sb-rank {
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}

.pghf-sb-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
    display: flex;
    gap: 4px;
}

/* ── Thread list ───────────────────────────────────────── */
.pghf-thread-list-sb { padding: 8px 0; }

.pghf-sb-thread {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f4f6;
    transition: background .12s;
}

.pghf-sb-thread:last-child { border-bottom: none; }
.pghf-sb-thread:hover { background: #fafafa; }

.pghf-sb-hot-num {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #e5e7eb;
    width: 20px;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.2;
}

.pghf-sb-thread:nth-child(1) .pghf-sb-hot-num { color: #ffd700; }
.pghf-sb-thread:nth-child(2) .pghf-sb-hot-num { color: #9e9e9e; }
.pghf-sb-thread:nth-child(3) .pghf-sb-hot-num { color: #cd7f32; }

.pghf-sb-thread-body { flex: 1; min-width: 0; }

.pghf-sb-thread-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pghf-sb-thread:hover .pghf-sb-thread-title { color: #c0392b; }

.pghf-sb-thread-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #9ca3af;
}

.pghf-sb-cat-pill {
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
}

/* ── Online users ──────────────────────────────────────── */
.pghf-online-members {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.pghf-online-user { display: inline-block; }

.pghf-online-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e5e7eb;
    transition: transform .1s;
}

.pghf-online-avatar:hover { transform: scale(1.15); }

.pghf-online-summary {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* ── Mod widget ────────────────────────────────────────── */
.pghf-mod-widget .pghf-sb-header { background: #7c3aed; }

.pghf-mod-links { display: flex; flex-direction: column; gap: 2px; }

.pghf-mod-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: background .12s;
}

.pghf-mod-link:hover { background: #f3f4f6; color: #7c3aed; }

.pghf-mod-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 6px 0;
}

.pghf-mod-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 6px;
}

.pghf-mod-stat {
    background: #f9fafb;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.pghf-mod-stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #7c3aed;
    display: block;
}

.pghf-mod-stat-lbl {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.pghf-mod-thread-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}

.pghf-mod-thread-row:last-child { border-bottom: none; }

.pghf-mod-thread-link {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pghf-mod-thread-link:hover { color: #7c3aed; }

.pghf-mod-thread-actions { display: flex; gap: 2px; flex-shrink: 0; }

.pghf-sb-mod-btn {
    background: none;
    border: none;
    padding: 2px 5px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: background .12s;
    line-height: 1;
}

.pghf-sb-mod-btn:hover { background: #f3f4f6; }
.pghf-sb-mod-del:hover { background: #fee2e2; }

/* ── Forum layout with sidebar ─────────────────────────── */
.pghf-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: flex-start;
}

.pghf-with-sidebar .pghf-main-col { min-width: 0; }

@media (max-width: 900px) {
    .pghf-with-sidebar { grid-template-columns: 1fr; }
    .pghf-sidebar-col  { display: none; }
}

/* Sidebar widget mobile fixes */
@media (max-width: 640px) {
    .pghf-sb-widget { font-size: 13px; }
    .pghf-sb-header { font-size: 11px; padding: 7px 12px; }
    .pghf-stats-grid { padding: 10px; gap: 6px; }
    .pghf-stat-num { font-size: 18px; }
    .pghf-sb-thread { padding: 7px 12px; }
    .pghf-sb-thread-title { font-size: 12px; }
    .pghf-mod-link { font-size: 12px; }
}

/* ── Inline new thread form ────────────────────────────── */
.pghf-new-thread-form {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--fa);
}

.pghf-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.pghf-form-header h3 { margin: 0; font-size: 16px; font-weight: 700; }

.pghf-form-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

/* ═══════════════════════════════════════════════════════════
   REDDIT-STYLE SKIN (v1.2.0)
═══════════════════════════════════════════════════════════ */
.pghf-reddit {
    --r-card-bg: var(--white);
    --r-up: #ff4500;
    --r-down: #7193ff;
    --r-rail-bg: #f8f9fa;
}
[data-theme="dark"] .pghf-reddit {
    --r-card-bg: #1a1a1b;
    --border: #343536;
    --bg: #030303;
    --text: #d7dadc;
    --muted: #818384;
    --r-rail-bg: #161617;
}

/* ── Community cards (index) ──────────────────────────── */
.pghf-r-community-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--r-card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px; margin-bottom: 10px;
    text-decoration: none; color: var(--text);
    transition: border-color .15s, transform .1s;
}
.pghf-r-community-card:hover { border-color: var(--r-up); transform: translateY(-1px); }
.pghf-r-cc-icon { font-size: 30px; line-height: 1; flex-shrink: 0; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; background: var(--r-rail-bg); border-radius: 50%; }
.pghf-r-cc-info { flex: 1; min-width: 0; }
.pghf-r-cc-name { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 16px; color: var(--text); }
.pghf-r-cc-desc { font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.pghf-r-cc-stats { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pghf-r-cc-last { color: var(--muted); }
.pghf-r-cc-arrow { font-size: 22px; color: var(--muted); flex-shrink: 0; }
.pghf-r-dot { color: var(--muted); }

/* ── Category banner ──────────────────────────────────── */
.pghf-r-banner {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg, var(--fa), var(--fa2));
    border-radius: 10px; padding: 18px 22px; margin-bottom: 16px; color: #fff;
}
.pghf-r-banner-icon { font-size: 38px; width: 60px; height: 60px; background: rgba(255,255,255,.18); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pghf-r-banner-info { flex: 1; min-width: 0; }
.pghf-r-banner-title { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 22px; margin: 0; color: #fff; }
.pghf-r-banner-desc { font-size: 13px; opacity: .92; margin: 3px 0 4px; }
.pghf-r-banner-stats { font-size: 12px; opacity: .85; }

/* ── Sort bar ─────────────────────────────────────────── */
.pghf-r-sortbar {
    display: flex; gap: 6px; background: var(--r-card-bg);
    border: 1px solid var(--border); border-radius: 10px;
    padding: 8px 10px; margin-bottom: 14px;
}
.pghf-r-sort {
    font-size: 13px; font-weight: 700; color: var(--muted);
    padding: 6px 14px; border-radius: 18px; text-decoration: none;
    transition: background .15s, color .15s;
}
.pghf-r-sort:hover { background: var(--r-rail-bg); color: var(--text); }
.pghf-r-sort.active { background: var(--fa); color: #fff; }

/* ── Post cards (feed) ────────────────────────────────── */
.pghf-r-feed { display: flex; flex-direction: column; gap: 10px; }
.pghf-r-card {
    display: flex; background: var(--r-card-bg);
    border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; transition: border-color .15s;
}
.pghf-r-card:hover { border-color: #898989; }
.pghf-r-card.pghf-pinned { border-color: var(--green); }

/* Vote rail */
.pghf-r-votes {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: var(--r-rail-bg); padding: 10px 8px; flex-shrink: 0;
    min-width: 44px;
}
.pghf-r-vote {
    background: none; border: none; cursor: pointer; font-size: 15px;
    color: var(--muted); line-height: 1; padding: 2px; border-radius: 3px;
    transition: color .12s, background .12s;
}
.pghf-r-vote:hover:not(.disabled):not(:disabled) { background: rgba(0,0,0,.06); }
.pghf-r-vote.up.active { color: var(--r-up); }
.pghf-r-vote.down.active { color: var(--r-down); }
.pghf-r-vote.disabled, .pghf-r-vote:disabled { cursor: default; opacity: .55; }
.pghf-r-score { font-size: 13px; font-weight: 700; color: var(--text); }

/* Card body */
.pghf-r-card-body { flex: 1; min-width: 0; padding: 10px 14px; text-decoration: none; color: var(--text); display: block; }
.pghf-r-card-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); margin-bottom: 5px; flex-wrap: wrap; }
.pghf-r-community { font-weight: 700; color: var(--text); }
.pghf-r-meta-avatar { width: 16px; height: 16px; border-radius: 50%; }
.pghf-r-author { color: var(--muted); }
.pghf-r-card-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--text); margin-bottom: 8px; overflow-wrap: break-word; word-wrap: break-word; }
.pghf-r-card-preview { font-size: 13px; line-height: 1.5; color: var(--muted); margin: -2px 0 8px; overflow-wrap: break-word; word-wrap: break-word; }
.pghf-r-preview-label { font-weight: 700; color: var(--text); margin-right: 3px; }
.pghf-r-card:hover .pghf-r-card-title { color: var(--fa); }
.pghf-r-card-foot { display: flex; gap: 16px; font-size: 12px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }

/* ── Reddit comments (thread page) ────────────────────── */
.pghf-r-comments { display: flex; flex-direction: column; gap: 8px; }
.pghf-r-comment {
    display: flex; gap: 0; background: var(--r-card-bg);
    border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.pghf-r-comment.pghf-r-op { border-color: var(--fa); border-width: 1px 1px 1px 3px; }
.pghf-r-comment.pghf-best-answer { border-color: var(--green); }
.pghf-r-comment .pghf-r-votes { padding: 12px 8px; }
.pghf-r-comment-body { flex: 1; min-width: 0; padding: 12px 14px; }
.pghf-r-comment-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.pghf-r-comment-author { display: flex; align-items: center; gap: 5px; text-decoration: none; color: var(--text); font-weight: 700; }
.pghf-r-comment-avatar { width: 22px; height: 22px; border-radius: 50%; }
.pghf-r-comment-rank { font-weight: 600; }
.pghf-r-comment-age { color: var(--muted); }
.pghf-r-comment-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pghf-r-comment-actions button {
    background: none; border: none; cursor: pointer; font-size: 12px; font-weight: 700;
    color: var(--muted); padding: 4px 8px; border-radius: 4px; transition: background .12s, color .12s;
}
.pghf-r-comment-actions button:hover { background: var(--r-rail-bg); color: var(--text); }
.pghf-r-comment .pghf-best-answer-badge { background: var(--green); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }

/* Mobile */
@media (max-width: 600px) {
    .pghf-r-banner { flex-wrap: wrap; }
    .pghf-r-card-title { font-size: 15px; }
    .pghf-r-votes { min-width: 38px; padding: 8px 6px; }
}
