/* =========================================================
   WP Reddit Forum — Frontend Styles
   ========================================================= */

:root {
  --wrf-bg:           #f4f5f7;
  --wrf-card-bg:      #ffffff;
  --wrf-border:       #e8eaed;
  --wrf-primary:      #0b3851;
  --wrf-primary-dark: #0a2f44;
  --wrf-upvote:       #4f8ef7;
  --wrf-downvote:     #ea0027;
  --wrf-text:         #1a1a2e;
  --wrf-muted:        #6b7280;
  --wrf-success:      #46d160;
  --wrf-danger:       #ea0027;
  --wrf-warning:      #ffd635;
  --wrf-radius:       12px;
  --wrf-shadow:       0 1px 4px rgba(0,0,0,.06);
}

/* Reset for plugin scope */
.wrf-forum, .wrf-forum * {
  box-sizing: border-box;
    font-family: Arial, sans-serif !important;
}

.wrf-wrap {
    max-width: 1400px;
    margin: 0 auto;
    color: var(--wrf-text);
    font-family: Arial, sans-serif !important;
}
.wrf-forum button.wrf-btn {
    background-color: #0B3851 !important;
    color: #fff !important;
    border: 0 !important;
}
button.wrf-btn.wrf-btn-sm,button#wrf-edit-topic-btn,button#wrf-edit-topic-btn, .wrf-post-actions button{
    border: 0 !important;
    background: #0b3851 !important;
    color: #fff !important;
}
a.wrf-btn.wrf-btn-primary {
    background: #0B3851 !important;
    color: #fff !important;
    border: 0 !important;
}
.wrf-post-actions button{
    padding: 5px !important;
}

/* ── Header ── */
.wrf-forum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--wrf-card-bg);
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.wrf-forum-title { margin: 0; font-size: 1.2rem; }
.wrf-header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wrf-logged-as { font-size: .85rem; color: var(--wrf-muted); }
.wrf-link-muted { color: var(--wrf-muted); text-decoration: none; font-size: .8rem; }
.wrf-link-muted:hover { text-decoration: underline; }

/* ── Search ── */
.wrf-search-form { display: flex; gap: 6px; }
.wrf-search-input {
  padding: 6px 10px;
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  font-size: .9rem;
  width: 220px;
}
.wrf-search-results { background: var(--wrf-card-bg); border: 1px solid var(--wrf-border); border-radius: var(--wrf-radius); padding: 16px; margin-bottom: 16px; }

/* ── Breadcrumb ── */
.wrf-breadcrumb {
  font-size: .85rem;
  color: var(--wrf-muted);
  margin-bottom: 12px;
}
.wrf-breadcrumb a { color: var(--wrf-primary); text-decoration: none; }
.wrf-breadcrumb a:hover { text-decoration: underline; }
.wrf-sep { margin: 0 6px; }

/* ── Page header ── */
.wrf-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.wrf-page-header h2 { margin: 0 0 4px; }

/* ── Buttons ── */
.wrf-btn {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  background: var(--wrf-card-bg);
  color: var(--wrf-text);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.wrf-btn:hover { background: var(--wrf-bg); }
.wrf-btn-primary {
  background: var(--wrf-primary);
  border-color: var(--wrf-primary);
  color: #fff;
}
.wrf-btn-primary:hover { background: var(--wrf-primary-dark); border-color: var(--wrf-primary-dark); color: #fff; }
.wrf-btn-success { background: var(--wrf-success); border-color: var(--wrf-success); color: #fff; }
.wrf-btn-danger  { background: var(--wrf-danger);  border-color: var(--wrf-danger);  color: #fff; }
.wrf-btn-sm { padding: 4px 10px; font-size: .8rem; }
.wrf-btn-link,
.wrf-forum button.wrf-btn-link {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--wrf-muted) !important;
  font-size: .8rem !important;
  font-weight: normal !important;
  cursor: pointer;
  padding: 0 !important;
  text-decoration: none;
  display: inline;
  line-height: inherit;
  min-height: 0 !important;
}
.wrf-btn-link:hover,
.wrf-forum button.wrf-btn-link:hover {
  color: var(--wrf-primary) !important;
  text-decoration: underline;
  background: none !important;
}

/* ── Sort bar ── */
.wrf-sort-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  margin-bottom: 10px;
  color: var(--wrf-muted);
}
.wrf-sort-btn {
  padding: 4px 10px;
  border-radius: 20px;
  background: none;
  border: 1px solid transparent;
  color: var(--wrf-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  transition: .15s;
}
.wrf-sort-btn:hover {
  background: var(--wrf-bg);
  border-color: var(--wrf-border);
  color: var(--wrf-text);
}
.wrf-sort-btn.active {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
}

/* ── Categories ── */
.wrf-categories { display: flex; flex-direction: column; gap: 8px; }
.wrf-category-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--wrf-card-bg);
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  padding: 14px 16px;
  transition: border-color .15s;
}
.wrf-category-card:hover { border-color: #c5c8cc; }
.wrf-category-name { font-size: 1.05rem; font-weight: 700; color: var(--wrf-text); text-decoration: none; }
.wrf-category-name:hover { color: var(--wrf-primary); }
.wrf-category-desc { font-size: .85rem; color: var(--wrf-muted); margin: 4px 0 0; }
.wrf-subcategories { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wrf-subcat-link {
  font-size: .8rem;
  color: var(--wrf-primary);
  text-decoration: none;
  background: #fff4f0;
  border: 1px solid #ffd5c7;
  border-radius: 12px;
  padding: 2px 10px;
}
.wrf-subcat-link:hover { background: #ffe0d5; }
.wrf-category-stats { text-align: right; font-size: .82rem; color: var(--wrf-muted); white-space: nowrap; }
.wrf-category-stats strong { display: block; font-size: 1.1rem; color: var(--wrf-text); }

/* ── Topic list ── */
.wrf-topic-list { display: flex; flex-direction: column; gap: 4px; }
.wrf-topic-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--wrf-card-bg);
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  padding: 10px 14px;
  transition: border-color .15s;
}
.wrf-topic-row:hover { border-color: #c5c8cc; }
.wrf-topic-row.wrf-pinned { border-left: 3px solid var(--wrf-primary); }
.wrf-topic-body { flex: 1; min-width: 0; }
.wrf-topic-title-row { display: flex; align-items: center; gap: 6px; }
.wrf-topic-link { font-size: .97rem; font-weight: 600; color: var(--wrf-text); text-decoration: none; }
.wrf-topic-link:hover { color: var(--wrf-primary); }
.wrf-topic-meta { font-size: .78rem; color: var(--wrf-muted); margin-top: 3px; }
.wrf-tag { font-size: .8rem; }

/* ── Vote column ── */
.wrf-vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
}
.wrf-vote-btn {
  background: none;
  border: none;
  color: var(--wrf-muted);
  cursor: pointer;
  font-size: .85rem;
  padding: 2px;
  border-radius: 2px;
  transition: color .15s;
  line-height: 1;
}
.wrf-vote-btn:hover, .wrf-upvote.active   { color: var(--wrf-upvote); }
.wrf-downvote.active                       { color: var(--wrf-downvote); }
.wrf-score {
  font-size: .82rem;
  font-weight: 700;
  color: var(--wrf-muted);
  text-align: center;
  min-width: 24px;
}
.wrf-score.positive { color: var(--wrf-upvote); }
.wrf-score.negative { color: var(--wrf-downvote); }

/* ── Topic detail ── */
.wrf-topic-detail {
  display: flex;
  gap: 10px;
  background: var(--wrf-card-bg);
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  padding: 16px;
  margin-bottom: 16px;
}
.wrf-topic-content { flex: 1; }
.wrf-topic-heading { font-size: 1.4rem; margin: 0 0 8px; line-height: 1.3; }
.wrf-post-meta { font-size: .82rem; color: var(--wrf-muted); margin-bottom: 12px; }
.wrf-post-body { font-size: .95rem; line-height: 1.6; color: var(--wrf-text); }
.wrf-post-body p  { margin: 0 0 10px; }
.wrf-post-body ul, .wrf-post-body ol { padding-left: 20px; margin: 0 0 10px; }
.wrf-post-body blockquote { border-left: 4px solid #c5cad3; margin: 10px 0; padding: 8px 12px; color: var(--wrf-muted); background: #f8f9fa; }
.wrf-post-body code { background: #f4f4f4; padding: 2px 5px; border-radius: 3px; font-size: .88rem; font-family: monospace; }
.wrf-post-body pre { background: #1e1e1e; color: #d4d4d4; padding: 14px; border-radius: var(--wrf-radius); overflow-x: auto; }
.wrf-post-body pre code { background: none; padding: 0; color: inherit; }

/* ── Mod toolbar ── */
.wrf-mod-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--wrf-border);
}
.wrf-mod-label { font-size: .78rem; color: var(--wrf-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* ── Replies ── */
.wrf-replies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.wrf-replies-header h3 { margin: 0; font-size: 1rem; }

.wrf-post-list { display: flex; flex-direction: column; gap: 6px; }
.wrf-post-item {
  display: flex;
  gap: 10px;
  background: var(--wrf-card-bg);
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  padding: 12px 14px;
}
.wrf-post-item.wrf-accepted { border-left: 3px solid var(--wrf-success); }
.wrf-post-content { flex: 1; min-width: 0; }
.wrf-accepted-badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  color: #1a7f37;
  background: #e6ffed;
  border: 1px solid #b4e7c3;
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.wrf-post-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ── Nested replies ── */
.wrf-nested-replies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid #d0d5dd;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wrf-reply-item {
  display: flex;
  gap: 8px;
  font-size: .9rem;
}
.wrf-reply-vote { display: flex; flex-direction: column; align-items: center; min-width: 28px; }
.wrf-reply-body { flex: 1; }

/* ── Inline reply form ── */
.wrf-inline-reply {
  margin-top: 10px;
  padding: 10px;
  background: #f8f8f8;
  border-radius: var(--wrf-radius);
}
.wrf-inline-reply .wrf-form-footer { margin-top: 8px; display: flex; gap: 8px; }

/* ── Reply / topic form ── */
.wrf-reply-section {
  background: var(--wrf-card-bg);
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  padding: 16px;
  margin-top: 20px;
}
.wrf-reply-section h3 { margin: 0 0 12px; font-size: 1rem; }
.wrf-form-card {
  background: var(--wrf-card-bg);
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  padding: 24px;
  max-width: 700px;
}
.wrf-form-card h2 { margin: 0 0 20px; }
.wrf-form-group { margin-bottom: 16px; }
.wrf-form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 5px; }
.wrf-form-group label .required { color: var(--wrf-danger); }
.wrf-input, .wrf-select, .wrf-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  font-size: .93rem;
  font-family: inherit;
  color: var(--wrf-text);
  transition: border-color .15s;
  background: #fff;
}
.wrf-input:focus, .wrf-select:focus, .wrf-textarea:focus {
  outline: none;
  border-color: #4f8ef7;
  box-shadow: 0 0 0 3px rgba(79,142,247,.12);
}
.wrf-textarea { resize: vertical; min-height: 100px; }
.wrf-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.wrf-inline-form { display: flex; gap: 8px; }
.wrf-inline-form .wrf-input { flex: 1; }

/* ── Notices / badges ── */
.wrf-notice {
  padding: 10px 14px;
  border-radius: var(--wrf-radius);
  font-size: .88rem;
  margin-bottom: 12px;
}
.wrf-notice-warning { background: #fff9e6; border: 1px solid #ffd635; }
.wrf-notice-danger  { background: #fff0f0; border: 1px solid #f8b4b4; color: #b00; }
.wrf-notice-info    { background: #e8f4fd; border: 1px solid #a8d5f5; }
.wrf-notice-success { background: #e6ffed; border: 1px solid #b4e7c3; color: #1a7f37; }

/* ── Form messages ── */
.wrf-form-message {
  padding: 10px 14px;
  border-radius: var(--wrf-radius);
  font-size: .88rem;
  margin-bottom: 12px;
}
.wrf-form-message.success { background: #e6ffed; border: 1px solid #b4e7c3; color: #1a7f37; }
.wrf-form-message.error   { background: #fff0f0; border: 1px solid #f8b4b4; color: #b00; }

/* ── Access denied ── */
.wrf-access-denied {
  text-align: center;
  padding: 40px 20px;
  color: var(--wrf-muted);
}
.wrf-access-denied p { margin-bottom: 16px; }

/* ── Empty states ── */
.wrf-empty, .wrf-empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--wrf-muted);
  font-size: .95rem;
}
.wrf-empty-state .wrf-btn { margin-top: 12px; }

/* ── Error ── */
.wrf-error { color: var(--wrf-danger); padding: 16px; }

/* ── Profile ── */
.wrf-profile-stats {
  display: flex;
  gap: 24px;
  background: var(--wrf-bg);
  border-radius: var(--wrf-radius);
  padding: 14px 20px;
  margin-bottom: 20px;
}
.wrf-stat { text-align: center; }
.wrf-stat strong { display: block; font-size: 1.2rem; color: var(--wrf-text); }
.wrf-stat span { font-size: .8rem; color: var(--wrf-muted); }
.wrf-section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--wrf-border); }
.wrf-section:last-child { border-bottom: none; }
.wrf-section h3 { margin: 0 0 8px; font-size: 1rem; }

/* ── Pagination ── */
.wrf-pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.wrf-page-btn {
  padding: 6px 10px;
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  font-size: .85rem;
  color: var(--wrf-text);
  text-decoration: none;
  background: var(--wrf-card-bg);
  cursor: pointer;
}
.wrf-page-btn:hover, .wrf-page-btn.active {
  background: var(--wrf-primary);
  border-color: var(--wrf-primary);
  color: #fff;
}

/* ── Tags ── */
.wrf-tag-pill {
  display: inline-block;
  font-size: 12px !important;
  font-weight: 600;
  color: #B2DDFF;
  background: #EFF8FF;
  border: 1px solid #B2DDFF;
  border-radius: 12px;
  padding: 2px 9px;
  text-decoration: none;
  transition: background .15s;
}
.wrf-tag-pill:hover { background: #ffe0d5; }
.wrf-topic-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }

/* ── Tag cloud toolbar ── */
.wrf-toolbar {
  margin-bottom: 12px;
}
.wrf-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.wrf-tag-cloud .wrf-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--wrf-border);
  border-radius: 12px;
  font-size: .8rem;
  color: var(--wrf-muted);
  text-decoration: none;
  background: var(--wrf-card-bg);
  transition: .15s;
}
.wrf-tag-cloud .wrf-tag:hover,
.wrf-tag-cloud .wrf-tag.active {
  background: var(--wrf-primary);
  border-color: var(--wrf-primary);
  color: #fff;
}
.wrf-tag-count {
  font-size: .72rem;
  background: rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 0 5px;
}
.wrf-tag-cloud .wrf-tag.active .wrf-tag-count { background: rgba(255,255,255,.25); }
.wrf-tag-clear { color: var(--wrf-danger) !important; }

/* ── Tag input preview ── */
.wrf-tag-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  min-height: 24px;
}

/* ── Unread badge ── */
.wrf-unread-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  color: #fff;
  background: var(--wrf-primary);
  border-radius: 4px;
  padding: 1px 6px;
  letter-spacing: .04em;
  vertical-align: middle;
}
.wrf-topic-row.wrf-unread .wrf-topic-link { font-weight: 700; }

/* ── Topic/post edit form ── */
.wrf-edit-form {
  margin-top: 10px;
  padding: 12px;
  background: #f8f9fa;
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
}

/* ── Format bar (editor toolbar) ── */
.wrf-editor-wrap {
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  overflow: hidden;
}
.wrf-format-bar {
  display: flex;
  gap: 2px;
  padding: 5px 6px;
  background: #f4f4f4;
  border-bottom: 1px solid var(--wrf-border);
}
/* Strong specificity to beat theme button resets */
.wrf-forum .wrf-format-bar button.wrf-fmt-btn,
.wrf-forum .wrf-fmt-btn {
  background: #fff !important;
  border: 1px solid #ddd !important;
  border-radius: 3px !important;
  padding: 3px 8px !important;
  font-size: .82rem !important;
  cursor: pointer !important;
  color: #333 !important;
  line-height: 1.4 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  transition: background .12s, border-color .12s !important;
}
.wrf-forum .wrf-format-bar button.wrf-fmt-btn:hover,
.wrf-forum .wrf-fmt-btn:hover {
  background: #e8e8e8 !important;
  border-color: #aaa !important;
  color: #000 !important;
}
.wrf-editor-wrap .wrf-textarea {
  border: none;
  border-radius: 0;
}
.wrf-editor-wrap .wrf-textarea:focus {
  box-shadow: none;
  border: none;
}

/* ── Preview panel ── */
.wrf-preview-panel {
  margin-top: 12px;
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  overflow: hidden;
}
.wrf-preview-label {
  background: #f4f4f4;
  border-bottom: 1px solid var(--wrf-border);
  padding: 6px 12px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--wrf-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.wrf-preview-panel .wrf-post-body { padding: 12px 14px; min-height: 40px; }
.wrf-preview-title { margin: 0; padding: 10px 14px 0; font-size: 1.1rem; }

/* ── Draft notice ── */
.wrf-draft-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--wrf-muted);
  margin-top: 8px;
}

/* ── Edited hint ── */
.wrf-edited-hint { color: var(--wrf-muted); font-size: .78rem; }

/* ── Tag icon (pin/lock/closed indicators) ── */
.wrf-tag-icon { font-size: .85rem; }

/* ── Reputation badge ── */
.wrf-reputation {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: middle;
}
.wrf-reputation.positive { color: #1a7f37; background: #e6ffed; }
.wrf-reputation.negative { color: #b00; background: #fff0f0; }
.wrf-rep-positive { color: #1a7f37; }
.wrf-rep-negative { color: var(--wrf-danger); }

/* ── Emoji reaction bar ── */
.wrf-reaction-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}
.wrf-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--wrf-bg) !important;
  border: 1px solid var(--wrf-border) !important;
  border-radius: 12px !important;
  padding: 2px 8px !important;
  font-size: .85rem !important;
  cursor: pointer !important;
  color: var(--wrf-text) !important;
  transition: background .12s !important;
  min-height: 0 !important;
  box-shadow: none !important;
}
.wrf-reaction-btn:hover {
  background: #e0e8f0 !important;
  border-color: #8ab !important;
}
.wrf-reaction-btn.active {
  background: #dce8ff !important;
  border-color: var(--wrf-primary) !important;
}
.wrf-reaction-emoji { font-size: .95rem; line-height: 1; }
.wrf-reaction-count { font-size: .75rem; font-weight: 700; color: var(--wrf-muted); min-width: 0; }
.wrf-reaction-btn.active .wrf-reaction-count { color: var(--wrf-primary); }

/* ── Announcement banners ── */
.wrf-announcements { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.wrf-announcement-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff9e6;
  border: 1px solid #ffd635;
  border-left: 4px solid #f0b429;
  border-radius: var(--wrf-radius);
  padding: 12px 14px;
  font-size: .92rem;
}
.wrf-announcement-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.wrf-announcement-content { flex: 1; line-height: 1.5; }
.wrf-announcement-content a { color: var(--wrf-primary); }

/* ── Subcategory cards ── */
.wrf-subcategory-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.wrf-subcat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--wrf-card-bg);
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--wrf-text);
  transition: border-color .15s, box-shadow .15s;
}
.wrf-subcat-card:hover {
  border-color: var(--wrf-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  color: var(--wrf-text);
}
.wrf-subcat-card strong { font-size: .97rem; color: var(--wrf-primary); }
.wrf-subcat-desc { font-size: .8rem; color: var(--wrf-muted); }
.wrf-subcat-count { font-size: .75rem; color: var(--wrf-muted); margin-top: 4px; }

/* ── Profile list ── */
.wrf-profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wrf-profile-list li { font-size: .9rem; }
.wrf-profile-list a { color: var(--wrf-text); text-decoration: none; font-weight: 600; }
.wrf-profile-list a:hover { color: var(--wrf-primary); text-decoration: underline; }

/* ── Helpers ── */
.wrf-muted { color: var(--wrf-muted); font-size: .83rem; }
.wrf-author { color: var(--wrf-text); }

.wrf-accepted-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  background: #1a7f37;
  vertical-align: middle;
  margin-left: 5px;
  line-height: 1.5;
}

/* ── Notification bell ── */
.wrf-bell-btn {
  position: relative;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--wrf-text);
  margin-right: 4px;
}
.wrf-bell-btn:hover { color: var(--wrf-primary); }
.wrf-bell-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #d63638;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* ── Notification list ── */
.wrf-notification-list { display: flex; flex-direction: column; gap: 0; }
.wrf-notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--wrf-text);
  border-bottom: 1px solid var(--wrf-border);
  transition: background .1s;
}
.wrf-notification-item:hover { background: var(--wrf-bg); }
.wrf-unread-item { background: color-mix(in srgb, var(--wrf-primary) 6%, transparent); }
.wrf-notif-icon { font-size: 1rem; min-width: 24px; text-align: center; padding-top: 2px; }
.wrf-notif-body { display: flex; flex-direction: column; gap: 2px; }
.wrf-notif-message { font-size: .9rem; }
.wrf-notif-time { font-size: .8rem; color: var(--wrf-muted); }

/* ── Follow / Bookmark buttons ── */
.wrf-follow-btn, .wrf-bookmark-btn {
  font-size: .82rem;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--wrf-border);
  background: none;
  cursor: pointer;
  color: var(--wrf-muted);
  transition: background .15s, color .15s;
}
.wrf-follow-btn:hover, .wrf-bookmark-btn:hover { background: var(--wrf-bg); color: var(--wrf-text); }
.wrf-follow-btn.active, .wrf-bookmark-btn.active { background: var(--wrf-primary); color: #fff; border-color: var(--wrf-primary); }

/* ── Move topic select ── */
.wrf-select-sm {
  padding: 3px 6px;
  font-size: .82rem;
  border: 1px solid var(--wrf-border);
  border-radius: 4px;
  background: var(--wrf-bg);
  color: var(--wrf-text);
}

/* ── Leaderboard ── */
.wrf-leaderboard { background: var(--wrf-card); border: 1px solid var(--wrf-border); border-radius: var(--wrf-radius); padding: 20px; }
.wrf-leaderboard h3 { margin: 0 0 14px; font-size: 1rem; }
.wrf-leaderboard-list { display: flex; flex-direction: column; gap: 0; }
.wrf-leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--wrf-border);
  font-size: .9rem;
}
.wrf-leaderboard-row:last-child { border-bottom: none; }
.wrf-lb-rank { min-width: 28px; font-weight: 700; color: var(--wrf-muted); }
.wrf-lb-name { flex: 1; text-decoration: none; color: var(--wrf-text); font-weight: 600; }
.wrf-lb-name:hover { color: var(--wrf-primary); text-decoration: underline; }
.wrf-lb-rep { font-weight: 700; }
.wrf-lb-rep.positive { color: #1a7f37; }
.wrf-lb-rep.negative { color: #d63638; }
.wrf-lb-stats { font-size: .8rem; }
.wrf-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.wrf-page-header h2 { margin: 0; }

/* ── @mention autocomplete dropdown ── */
.wrf-mention-dropdown {
  position: absolute;
  z-index: 9999;
  background: var(--wrf-card);
  border: 1px solid var(--wrf-border);
  border-radius: var(--wrf-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  font-size: .88rem;
  overflow: hidden;
}
.wrf-mention-dropdown li {
  padding: 7px 14px;
  cursor: pointer;
  color: var(--wrf-text);
  transition: background .1s;
}
.wrf-mention-dropdown li:hover { background: var(--wrf-bg); }

/* ── Related topics block ── */
.wrf-related-topics {
  margin-top: 28px;
  border-top: 1px solid var(--wrf-border);
  padding-top: 18px;
}
.wrf-related-title {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--wrf-muted);
  margin: 0 0 12px;
}
.wrf-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.wrf-related-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--wrf-border);
}
.wrf-related-item:last-child { border-bottom: none; }
.wrf-related-link {
  flex: 1;
  color: var(--wrf-text);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
}
.wrf-related-link:hover { color: var(--wrf-primary); text-decoration: underline; }
.wrf-related-meta { font-size: .78rem; white-space: nowrap; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .wrf-forum-header { flex-direction: column; align-items: flex-start; }
  .wrf-search-input { width: 100%; }
  .wrf-topic-row { flex-wrap: wrap; }
  .wrf-topic-detail { flex-direction: column; }
  .wrf-profile-stats { gap: 12px; }
  .wrf-form-footer { flex-direction: column-reverse; }
}

/* ── Image upload bar ── */
.wrf-upload-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.wrf-upload-status {
  font-size: 12px;
}
.wrf-upload-status.success { color: #2e7d32; }
.wrf-upload-status.error   { color: #c62828; }

/* Images inside post/topic content */
.wrf-post-body img,
.wrf-topic-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 8px 0;
  display: block;
}

/* =========================================================
   Main page redesign — pixel-perfect match
   ========================================================= */

.wrf-main-wrap {
  padding: 16px 20px;
  font-family: Arial, sans-serif;
}

/* Alert banner */
.wrf-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fffde7;
  border: 1px solid #ffe082;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: .875rem;
  color: #5f4b00;
  margin-bottom: 10px;
  gap: 10px;
  font-weight: 500;
}
.wrf-alert-close {
  background: none !important;
  border: none !important;
  color: #999 !important;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 !important;
  line-height: 1;
  flex-shrink: 0;
}
.wrf-alert-close:hover { color: #555 !important; }
.allherader {
    display: flex;
    padding: 32px;
    flex-direction: column;
    align-self: stretch;
    border-radius: 12px;
    border: 1px solid #E9EAEB;
    background: #FDFDFD;
    margin: 20px 0;
}
/* User bar */
.wrf-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 10px;
  border: 1px solid #e8eaed;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.wrf-user-bar-left  { display: flex; align-items: center; gap: 10px; }
.wrf-user-bar-right { display: flex; align-items: center; gap: 16px; }

.wrf-avatar-sm {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #4f8ef7;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.wrf-username-display {
  font-weight: 600;
  font-size: .95rem;
  color: #1a1a2e;
}
.wrf-edit-name-icon {
  font-size: .95rem;
  text-decoration: none;
  opacity: .65;
}
.wrf-edit-name-icon:hover { opacity: 1; }

.wrf-topbar-icon {
  font-size: 1.3rem;
  text-decoration: none;
  color: #333;
  position: relative;
  line-height: 1;
}
.wrf-topbar-icon:hover { opacity: .75; }

/* Forum title + search */
.wrf-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 14px;
  padding: 16px 22px;
  margin-bottom: 18px;
  border: 1px solid #e8eaed;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  gap: 16px;
  flex-wrap: wrap;
}
.wrf-forum-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -.01em;
}

.wrf-search-wrap { position: relative; flex: 1; max-width: 320px; }
.wrf-search-box {
  display: flex;
  align-items: center;
  background: #f4f5f7;
  border: 1.5px solid #e2e5ea;
  border-radius: 24px;
  padding: 8px 16px;
  gap: 8px;
  transition: border-color .18s, background .18s;
}
.wrf-search-box:focus-within {
  border-color: #4f8ef7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79,142,247,.12);
}
.wrf-search-icon { font-size: .85rem; color: #9aa0aa; flex-shrink: 0; }
.wrf-search-input {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: .88rem;
  width: 100%;
  color: #1a1a2e;
  padding: 0 !important;
  font-family: inherit;
}
.wrf-search-input::placeholder { color: #adb5bd; }

/* Search results area */
.wrf-search-results-area {
  background: #fff;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 18px;
  border: 1px solid #e8eaed;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.wrf-search-label {
  font-size: .875rem;
  color: #6b7280;
  margin: 0 0 14px;
  font-weight: 500;
}
.wrf-search-label em { font-style: italic; color: #1a1a2e; }
.wrf-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #f2f3f5;
  text-decoration: none;
  color: #1a1a2e;
  gap: 14px;
  transition: background .1s;
}
.wrf-search-row:last-child { border-bottom: none; }
.wrf-search-row:hover .wrf-search-row-title { color: #4f8ef7; }
.wrf-search-row-title { font-weight: 600; font-size: .95rem; line-height: 1.4; }
.wrf-search-row-cat {
  font-size: .75rem;
  background: #f0f2f5;
  color: #6b7280;
  border-radius: 20px;
  padding: 3px 11px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
  border: 1px solid #e2e5ea;
}
.wrf-search-empty   { text-align: center; color: #9aa0aa; padding: 24px 0; font-size: .9rem; }
.wrf-search-loading { text-align: center; color: #9aa0aa; padding: 18px 0; font-size: .85rem; }

/* Two-column grid */
.wrf-main-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 18px;
  align-items: start;
}

/* Section titles */
.wrf-section-title {
  font-size: 28px;
  font-weight: 700;
  color: #0B3851;
  margin: 0 0 14px;
  letter-spacing: -.01em;
}

/* Category cards */
.wrf-cat-grid { display: flex; flex-direction: column; gap: 10px; }
.wrf-cat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e8eaed;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow .2s, border-color .2s, transform .15s;
}
.wrf-cat-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.09);
  border-color: #d0d5dd;
  transform: translateY(-1px);
}
.wrf-cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}
.wrf-cat-body   { flex: 1; min-width: 0; }
.wrf-cat-name   { font-weight: 700; font-size: 28px; color: #0B3851; margin-bottom: 5px; }
.wrf-cat-desc   { font-size: .83rem; color: #6b7280; margin-bottom: 8px; line-height: 1.45; }
.wrf-cat-count  { font-size: .8rem; color: #4f8ef7; font-weight: 600; }

/* Latest discussions column */
.wrf-col-discussions {

}
.wrf-discussions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.wrf-see-all {
  font-size: .83rem;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 2px;
}
.wrf-see-all:hover { color: #4f8ef7; }

/* Tag pills */
.wrf-tag-pills {
display: flex;
    flex-wrap: wrap;
    overflow-x: auto;
    gap: 5px;
    margin-bottom: 14px;
    scrollbar-width: none;
}
.wrf-tag-pills::-webkit-scrollbar { display: none; }
.wrf-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f2f5;
  color: #374151;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: .79rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e2e5ea;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.wrf-tag-pill:hover { background: #e5e8ef; border-color: #c8cdd6; }
.wrf-tag-pill-count {
  background: #175CD3;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
}

/* Discussion cards */
.wrf-discussion-list { display: flex; flex-direction: column; gap: 2px;

    background: #fff;
    border-radius: 14px;
    padding: 18px 16px;
    border: 1px solid #e8eaed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.wrf-discussion-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.wrf-discussion-card:hover { background: #f7f8fa; }
.wrf-discussion-card:hover .wrf-disc-title { color: #4f8ef7; }

.wrf-disc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #4f8ef7;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .88rem;
  font-weight: 700;
  flex-shrink: 0;
}
.wrf-disc-body   { flex: 1; min-width: 0; }
.wrf-disc-author { font-size: .78rem; color: #6b7280; font-weight: 600; margin-bottom: 3px; }
.wrf-disc-title  {
  font-size: .9rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.45;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wrf-disc-meta { font-size: .74rem; color: #9aa0aa; }

/* ── Main page responsive ── */
@media (max-width: 860px) {
  .wrf-main-wrap  { padding: 12px; }
  .wrf-main-grid  { grid-template-columns: 1fr; gap: 12px; }
  .wrf-col-discussions { order: -1; }
  .wrf-main-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .wrf-search-wrap { max-width: 100%; width: 100%; }
  .wrf-cat-card { padding: 14px 12px; }
}

/* =========================================================
   Sub-page styles (category, topic, profile, etc.)
   ========================================================= */

/* Sub-page wrapper — same bg/font as main page */
.wrf-forum.wrf-wrap { padding: 16px 35px;}

/* Page header card */
.wrf-subpage-header {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.wrf-subpage-header h2 {
  margin: 0 0 2px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -.01em;
}
.wrf-subpage-header .wrf-muted {
  font-size: .85rem;
  color: #6b7280;
  margin: 0;
}
.wrf-subpage-header .wrf-sort-bar { background: none; border: none; padding: 0; }

/* Breadcrumb */
.wrf-breadcrumb {
  font-size: .8rem;
  color: #9aa0aa;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.wrf-breadcrumb a { color: #6b7280; text-decoration: none; font-weight: 500; }
.wrf-breadcrumb a:hover { color: #4f8ef7; }
.wrf-breadcrumb .wrf-sep { color: #c5c8ce; }

/* Toolbar (sort + tag cloud) */
.wrf-toolbar {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.wrf-toolbar .wrf-sort-bar { margin-bottom: 0; }
.wrf-toolbar .wrf-tag-cloud { margin-top: 10px; padding: 0; border: none; box-shadow: none; background: none; }

/* Topic rows */
.wrf-topic-list { gap: 6px; }
.wrf-topic-row {
  border-radius: 12px;
  border-color: #e8eaed;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  padding: 14px 16px;
  transition: box-shadow .15s, border-color .15s;
}
.wrf-topic-row:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border-color: #d0d5dd;
}
.wrf-topic-link { font-size: .97rem; color: #1a1a2e; font-weight: 600; }
.wrf-topic-link:hover { color: #4f8ef7; }
.wrf-topic-meta { color: #9aa0aa; font-size: .8rem; margin-top: 5px; }

/* Topic detail card */
.wrf-topic-detail {
  border-radius: 14px;
  border-color: #e8eaed;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.wrf-topic-heading { font-size: 1.3rem; color: #1a1a2e; font-weight: 700; }
.wrf-post-meta { font-size: .82rem; color: #6b7280; margin-bottom: 14px; }

/* Replies header */
.wrf-replies-header {
  margin: 4px 0 10px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.wrf-replies-header h3 { margin: 0; font-size: 1rem; font-weight: 700; color: #1a1a2e; }
.wrf-replies-header .wrf-sort-bar { background: none; border: none; padding: 0; }

/* Post items */
.wrf-post-list { gap: 8px; }
.wrf-post-item {
  border-radius: 12px;
  border-color: #e8eaed;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  padding: 16px 18px;
  transition: box-shadow .12s;
}
.wrf-post-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.07); }

/* Reply section / leave a reply */
.wrf-reply-section {
  border-radius: 14px;
  border-color: #e8eaed;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  padding: 20px 22px;
  margin-top: 16px;
}
.wrf-reply-section h3 { font-size: 1.05rem; font-weight: 700; color: #1a1a2e; margin: 0 0 14px; }

/* Related topics */
.wrf-related-topics {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  padding: 18px 22px;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  border-top: none;
  padding-top: 18px;
}
.wrf-related-title { color: #6b7280; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; margin: 0 0 12px; }
.wrf-related-item { border-color: #f2f3f5; padding: 10px 0; }
.wrf-related-link { color: #1a1a2e; font-weight: 600; font-size: .92rem; }
.wrf-related-link:hover { color: #4f8ef7; }

/* Form card (new topic / profile) */
.wrf-form-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  padding: 24px 28px;
  max-width: 780px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.wrf-form-card h2 { font-size: 1.3rem; font-weight: 700; color: #1a1a2e; margin: 0 0 20px; }

/* Edit form */
.wrf-edit-form { background: #f8f9fa; border-color: #e8eaed; border-radius: 10px; }

/* Inline reply form */
.wrf-inline-reply { background: #f8f9fa; border-radius: 10px; }

/* Leaderboard */
.wrf-leaderboard {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  margin-bottom: 14px;
}
.wrf-leaderboard h3 { margin: 0 0 14px; font-size: 1rem; font-weight: 700; color: #1a1a2e; }
.wrf-leaderboard-row { border-color: #f2f3f5; padding: 11px 0; }
.wrf-lb-rank { color: #9aa0aa; font-weight: 700; }
.wrf-lb-name { color: #1a1a2e; font-weight: 600; }
.wrf-lb-name:hover { color: #4f8ef7; text-decoration: none; }
.wrf-lb-stats { font-size: .8rem; color: #9aa0aa; }

/* Notifications */
.wrf-notification-list {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  overflow: hidden;
}
.wrf-notification-item { border-color: #f2f3f5; padding: 14px 18px; }
.wrf-notification-item:hover { background: #f7f8fa; }
.wrf-unread-item { background: rgba(79,142,247,.06); }
.wrf-notif-message { font-size: .92rem; color: #1a1a2e; }
.wrf-notif-time { font-size: .8rem; color: #9aa0aa; }

/* Profile */
.wrf-profile-stats {
  background: #f4f5f7;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border: none;
}
.wrf-stat strong { font-size: 1.35rem; font-weight: 700; color: #1a1a2e; display: block; }
.wrf-stat span { font-size: .75rem; color: #9aa0aa; text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }
.wrf-section { border-color: #f2f3f5; padding-bottom: 18px; margin-bottom: 18px; }
.wrf-section h3 { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin: 0 0 12px; }
.wrf-profile-list li { font-size: .9rem; padding: 6px 0; border-bottom: 1px solid #f4f5f7; }
.wrf-profile-list a { color: #1a1a2e; font-weight: 600; }
.wrf-profile-list a:hover { color: #4f8ef7; }

/* Pagination */
.wrf-page-btn { border-radius: 8px; font-weight: 600; }
.wrf-page-btn:hover, .wrf-page-btn.active { background: #4f8ef7; border-color: #4f8ef7; color: #fff; }

/* Subcategory cards */
.wrf-subcategory-cards { margin-bottom: 14px; }
.wrf-subcat-card { border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.wrf-subcat-card:hover { border-color: #4f8ef7; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.wrf-subcat-card strong { color: #4f8ef7; }

/* Vote buttons */
.wrf-vote-btn { color: #c5c8ce; }
.wrf-vote-btn:hover, .wrf-upvote.active { color: #4f8ef7; }

/* Mod toolbar */
.wrf-mod-toolbar { border-color: #f0f2f5; }

/* Tag pills in topic list */
.wrf-topic-tags .wrf-tag-pill { background: #f0f2f5; color: #374151; border-color: #e2e5ea; font-size: .76rem; }
.wrf-topic-tags .wrf-tag-pill:hover { background: #e5e8ef; }

/* Unread badge */
.wrf-unread-badge { background: #4f8ef7; }

/* Notice boxes */
.wrf-notice { border-radius: 10px; }

/* Empty state */
.wrf-empty-state { background: #fff; border: 1px solid #e8eaed; border-radius: 14px; padding: 40px 24px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }

/* Follow / bookmark buttons */
.wrf-follow-btn.active, .wrf-bookmark-btn.active { background: #4f8ef7; border-color: #4f8ef7; color: #fff; }

/* Sub-page responsive */
@media (max-width: 700px) {
  .wrf-forum.wrf-wrap { padding: 10px 12px; }
  .wrf-subpage-header { padding: 14px 16px; }
  .wrf-topic-detail { padding: 14px 16px; }
  .wrf-reply-section { padding: 14px 16px; }
  .wrf-form-card { padding: 18px 16px; }
  .wrf-leaderboard { padding: 16px; }
}

/* ── Display name popup ── */
.wrf-name-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: wrfFadeIn .2s ease;
}
@keyframes wrfFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.wrf-name-popup {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 28px;
  max-width: 420px;
  width: calc(100% - 32px);
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  animation: wrfSlideUp .22s ease;
}
@keyframes wrfSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.wrf-name-popup-icon {
  font-size: 2.6rem;
  margin-bottom: 12px;
  line-height: 1;
}
.wrf-name-popup h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: var(--wrf-text);
}
.wrf-name-popup-sub {
  margin: 0 0 20px;
  font-size: .88rem;
  color: var(--wrf-muted);
}
.wrf-name-popup-msg {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .84rem;
  margin-bottom: 14px;
  text-align: left;
}
.wrf-name-popup-msg.error   { background: #fef0f0; color: #b91c1c; }
.wrf-name-popup-msg.success { background: #f0fdf4; color: #166534; }
.wrf-name-popup-field {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--wrf-border);
  border-radius: 10px;
  font-size: .95rem;
  font-family: Arial, sans-serif;
  margin-bottom: 14px;
  transition: border-color .15s;
  outline: none;
}
.wrf-name-popup-field:focus {
  border-color: var(--wrf-primary);
  box-shadow: 0 0 0 3px rgba(11,56,81,.1);
}
.wrf-name-popup-save {
  display: block;
  width: 100%;
  padding: 11px;
  background: var(--wrf-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: Arial, sans-serif;
  transition: background .15s;
  margin-bottom: 10px;
}
.wrf-name-popup-save:hover  { background: var(--wrf-primary-dark); }
.wrf-name-popup-save:disabled { opacity: .6; cursor: default; }
.wrf-name-popup-skip {
  background: none;
  border: none;
  color: var(--wrf-muted);
  font-size: .82rem;
  cursor: pointer;
  font-family: Arial, sans-serif;
  text-decoration: underline;
  padding: 0;
}
.wrf-name-popup-skip:hover { color: var(--wrf-text); }
