/* ============================================
   bbPress Modern - Main Stylesheet
   ============================================ */

:root {
    --bbpm-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bbpm-font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
    --bbpm-bg: #f8fafc;
    --bbpm-bg-card: #ffffff;
    --bbpm-bg-hover: #f1f5f9;
    --bbpm-bg-alt: #f0f4f8;
    --bbpm-text: #0f172a;
    --bbpm-text-secondary: #64748b;
    --bbpm-text-muted: #94a3b8;
    --bbpm-border: #e2e8f0;
    --bbpm-border-light: #f1f5f9;
    --bbpm-primary: #6366f1;
    --bbpm-primary-hover: #4f46e5;
    --bbpm-primary-light: rgba(99, 102, 241, 0.1);
    --bbpm-secondary: #06b6d4;
    --bbpm-accent: #f59e0b;
    --bbpm-success: #10b981;
    --bbpm-danger: #ef4444;
    --bbpm-info: #3b82f6;
    --bbpm-radius: 12px;
    --bbpm-radius-sm: 8px;
    --bbpm-radius-xs: 6px;
    --bbpm-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --bbpm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --bbpm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --bbpm-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Base ---- */
body.bbpm-active {
    background: var(--bbpm-bg);
    font-family: var(--bbpm-font);
    color: var(--bbpm-text);
    line-height: 1.7;
}

.bbpm-active #bbpress-forums {
    font-family: var(--bbpm-font);
    font-size: 15px;
    background: transparent;
    overflow: visible;
}

/* ---- Breadcrumb ---- */
.bbpm-breadcrumb {
    background: var(--bbpm-bg-card);
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius);
    padding: 12px 20px;
    margin-bottom: 24px;
    font-size: 13px;
    box-shadow: var(--bbpm-shadow);
}

.bbpm-breadcrumb a {
    color: var(--bbpm-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--bbpm-transition);
}

.bbpm-breadcrumb a:hover {
    color: var(--bbpm-primary-hover);
    text-decoration: underline;
}

.bbpm-breadcrumb .bbp-breadcrumb-sep {
    margin: 0 8px;
    color: var(--bbpm-text-muted);
}

/* ---- Forum Header ---- */
.bbpm-forum-header {
    font-size: 22px;
    font-weight: 700;
    color: var(--bbpm-text);
    margin-bottom: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bbpm-primary), var(--bbpm-secondary));
    border-radius: var(--bbpm-radius);
    color: white;
    box-shadow: var(--bbpm-shadow-md);
}

.bbpm-forum-header i {
    margin-right: 10px;
}

/* ---- Forum Description ---- */
.bbpm-forum-desc {
    color: var(--bbpm-text-secondary);
    font-size: 14px;
    margin-top: 4px;
    line-height: 1.6;
}

/* ---- Forum Listings (Cards) ---- */
.bbpm-active #bbpress-forums ul.forum-titles,
.bbpm-active #bbpress-forums ul.bbp-forums,
.bbpm-active #bbpress-forums ul.bbp-topics {
    border: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bbpm-active #bbpress-forums li {
    list-style: none;
}

.bbpm-active #bbpress-forums ul.bbp-forums > li,
.bbpm-active #bbpress-forums ul.bbp-topics > li {
    background: var(--bbpm-bg-card);
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius);
    padding: 20px 24px;
    box-shadow: var(--bbpm-shadow);
    transition: all var(--bbpm-transition);
    display: block;
    overflow: hidden;
}

.bbpm-active #bbpress-forums ul.bbp-forums > li:hover,
.bbpm-active #bbpress-forums ul.bbp-topics > li:hover {
    border-color: var(--bbpm-primary);
    box-shadow: var(--bbpm-shadow-md);
    transform: translateY(-1px);
}

.bbpm-active #bbpress-forums ul.bbp-forums > li:last-child,
.bbpm-active #bbpress-forums ul.bbp-topics > li:last-child {
    border-bottom: 1px solid var(--bbpm-border);
}

/* ---- Forum Row Layout ---- */
.bbpm-active #bbpress-forums .forum-titles li {
    display: none;
}

.bbpm-active .bbp-forum-info,
.bbpm-active .bbp-topic-title {
    width: auto !important;
    float: none !important;
}

.bbpm-active .bbp-forum-info .bbp-forum-title,
.bbpm-active .bbp-topic-title .bbp-topic-permalink {
    font-size: 16px;
    font-weight: 600;
    color: var(--bbpm-text);
    text-decoration: none;
    transition: color var(--bbpm-transition);
    display: inline-block;
}

.bbpm-active .bbp-forum-info .bbp-forum-title:hover,
.bbpm-active .bbp-topic-title .bbp-topic-permalink:hover {
    color: var(--bbpm-primary);
}

.bbpm-active .bbp-forum-info .bbp-forum-title:before {
    content: '\f086';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    color: var(--bbpm-primary);
    font-size: 18px;
}

/* ---- Forum Meta Row ---- */
.bbpm-active .bbp-forum-info .bbp-forum-content {
    margin-left: 32px;
    font-size: 14px;
}

/* ---- Freshness / Last Post ---- */
.bbpm-active .bbp-forum-freshness,
.bbpm-active .bbp-topic-freshness {
    width: auto !important;
    float: none !important;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--bbpm-border-light);
    font-size: 13px;
    color: var(--bbpm-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bbpm-active .bbp-forum-freshness a,
.bbpm-active .bbp-topic-freshness a {
    color: var(--bbpm-primary);
    font-weight: 500;
    text-decoration: none;
}

.bbpm-active .bbp-forum-freshness a:hover,
.bbpm-active .bbp-topic-freshness a:hover {
    text-decoration: underline;
}

.bbpm-active .bbp-forum-freshness:before {
    content: '\f017';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    color: var(--bbpm-text-muted);
}

/* ---- Topic / Forum Counts ---- */
.bbpm-active .bbp-forum-topic-count,
.bbpm-active .bbp-forum-reply-count,
.bbpm-active .bbp-topic-voice-count,
.bbpm-active .bbp-topic-reply-count {
    width: auto !important;
    float: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--bbpm-text-secondary);
    margin-top: 8px;
    margin-right: 16px;
}

.bbpm-active .bbp-forum-topic-count:before {
    content: '\f086';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--bbpm-primary);
    font-size: 12px;
}

.bbpm-active .bbp-forum-reply-count:before,
.bbpm-active .bbp-topic-reply-count:before {
    content: '\f3e5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--bbpm-secondary);
    font-size: 12px;
}

.bbpm-active .bbp-topic-voice-count:before {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--bbpm-accent);
    font-size: 12px;
}

/* ---- Badges on Topics ---- */
.bbpm-badges-wrap {
    display: inline-flex;
    gap: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

.bbpm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    color: white;
    animation: bbpm-badge-in 0.3s ease;
}

@keyframes bbpm-badge-in {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.bbpm-badge-sticky {
    background: var(--bbpm-primary);
}
.bbpm-badge-closed {
    background: var(--bbpm-text-muted);
}
.bbpm-badge-hot {
    background: var(--bbpm-danger);
}
.bbpm-badge-popular {
    background: var(--bbpm-accent);
}

/* ---- Topic Author / Avatar ---- */
.bbpm-active .bbp-topic-started-by {
    font-size: 13px;
    color: var(--bbpm-text-secondary);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bbpm-active .bbp-topic-started-by .bbp-author-avatar img {
    border-radius: 50%;
    width: 24px;
    height: 24px;
    border: 2px solid var(--bbpm-border);
    vertical-align: middle;
}

.bbpm-active .bbp-topic-started-by .bbp-author-name {
    color: var(--bbpm-primary);
    font-weight: 500;
    text-decoration: none;
}

/* ---- Pagination ---- */
.bbpm-active .bbp-pagination {
    margin: 24px 0;
}

.bbpm-active .bbp-pagination-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bbpm-active .bbp-pagination-links a,
.bbpm-active .bbp-pagination-links span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius-xs);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--bbpm-text);
    background: var(--bbpm-bg-card);
    transition: all var(--bbpm-transition);
}

.bbpm-active .bbp-pagination-links a:hover {
    border-color: var(--bbpm-primary);
    color: var(--bbpm-primary);
    background: var(--bbpm-primary-light);
}

.bbpm-active .bbp-pagination-links span.current {
    background: var(--bbpm-primary);
    border-color: var(--bbpm-primary);
    color: white;
}

.bbpm-active .bbp-pagination-count {
    font-size: 13px;
    color: var(--bbpm-text-secondary);
}

/* ---- Search Form ---- */
.bbpm-active #bbp-search-form {
    margin-bottom: 24px;
}

.bbpm-active #bbp-search-form #bbp_search {
    border: 2px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius) 0 0 var(--bbpm-radius);
    padding: 14px 18px;
    font-size: 15px;
    font-family: var(--bbpm-font);
    background: var(--bbpm-bg-card);
    color: var(--bbpm-text);
    transition: border-color var(--bbpm-transition);
    outline: none;
    min-width: 300px;
}

.bbpm-active #bbp-search-form #bbp_search:focus {
    border-color: var(--bbpm-primary);
    box-shadow: 0 0 0 3px var(--bbpm-primary-light);
}

.bbpm-active #bbp-search-form #bbp_search_submit {
    border: 2px solid var(--bbpm-primary);
    border-radius: 0 var(--bbpm-radius) var(--bbpm-radius) 0;
    padding: 14px 22px;
    background: var(--bbpm-primary);
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--bbpm-transition);
    font-family: var(--bbpm-font);
    margin-left: -1px;
}

.bbpm-active #bbp-search-form #bbp_search_submit:hover {
    background: var(--bbpm-primary-hover);
    border-color: var(--bbpm-primary-hover);
}

/* ---- Topic Detail Page ---- */
.bbpm-active .bbp-topic-form,
.bbpm-active .bbp-reply-form {
    background: var(--bbpm-bg-card);
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius);
    padding: 24px;
    margin-top: 24px;
    box-shadow: var(--bbpm-shadow);
}

.bbpm-active .bbp-topic-form legend,
.bbpm-active .bbp-reply-form legend {
    font-size: 18px;
    font-weight: 700;
    color: var(--bbpm-text);
    padding: 0 0 16px 0;
    border-bottom: 2px solid var(--bbpm-primary);
    width: 100%;
    margin-bottom: 20px;
}

.bbpm-active .bbp-topic-form label,
.bbpm-active .bbp-reply-form label {
    font-size: 14px;
    font-weight: 600;
    color: var(--bbpm-text);
    margin-bottom: 6px;
    display: block;
}

.bbpm-active .bbp-topic-form input[type="text"],
.bbpm-active .bbp-reply-form input[type="text"],
.bbpm-active .bbp-topic-form textarea,
.bbpm-active .bbp-reply-form textarea,
.bbpm-active .bbp-topic-form select,
.bbpm-active .bbp-reply-form select {
    width: 100%;
    border: 2px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius-sm);
    padding: 12px 16px;
    font-size: 15px;
    font-family: var(--bbpm-font);
    background: var(--bbpm-bg);
    color: var(--bbpm-text);
    transition: border-color var(--bbpm-transition);
    outline: none;
}

.bbpm-active .bbp-topic-form input[type="text"]:focus,
.bbpm-active .bbp-reply-form input[type="text"]:focus,
.bbpm-active .bbp-topic-form textarea:focus,
.bbpm-active .bbp-reply-form textarea:focus,
.bbpm-active .bbp-topic-form select:focus,
.bbpm-active .bbp-reply-form select:focus {
    border-color: var(--bbpm-primary);
    box-shadow: 0 0 0 3px var(--bbpm-primary-light);
}

.bbpm-active #bbp_topic_submit,
.bbpm-active #bbp_reply_submit {
    background: var(--bbpm-primary) !important;
    border: none !important;
    border-radius: var(--bbpm-radius-sm) !important;
    padding: 12px 32px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: white !important;
    cursor: pointer !important;
    transition: all var(--bbpm-transition) !important;
    font-family: var(--bbpm-font) !important;
}

.bbpm-active #bbp_topic_submit:hover,
.bbpm-active #bbp_reply_submit:hover {
    background: var(--bbpm-primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--bbpm-shadow-md);
}

/* ---- Reply / Topic Timeline ---- */
.bbpm-active .bbp-replies {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bbpm-active .bbp-replies li {
    list-style: none;
}

.bbpm-active .bbp-replies .bbp-body .hentry {
    background: var(--bbpm-bg-card);
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius);
    padding: 24px;
    box-shadow: var(--bbpm-shadow);
    transition: all var(--bbpm-transition);
    position: relative;
}

.bbpm-active .bbp-replies .bbp-body .hentry:hover {
    border-color: var(--bbpm-border);
    box-shadow: var(--bbpm-shadow-md);
}

.bbpm-active .bbp-replies .bbp-body .hentry:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--bbpm-primary), var(--bbpm-secondary));
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity var(--bbpm-transition);
}

.bbpm-active .bbp-replies .bbp-body .hentry:hover:before {
    opacity: 1;
}

.bbpm-active .bbp-replies .bbp-body .hentry.even {
    background: var(--bbpm-bg-card);
}

.bbpm-active .bbp-replies .bbp-body .hentry.odd {
    background: var(--bbpm-bg);
}

/* ---- Reply Author ---- */
.bbpm-active .bbp-reply-author {
    width: auto !important;
    float: none !important;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bbpm-border-light);
}

.bbpm-active .bbp-reply-author .bbp-author-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    border: 3px solid var(--bbpm-border);
    transition: border-color var(--bbpm-transition);
}

.bbpm-active .bbp-reply-author .bbp-author-avatar img:hover {
    border-color: var(--bbpm-primary);
}

.bbpm-active .bbp-reply-author .bbp-author-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--bbpm-text);
    text-decoration: none;
    display: block;
}

.bbpm-active .bbp-reply-author .bbp-author-name:hover {
    color: var(--bbpm-primary);
}

.bbpm-active .bbp-reply-author .bbp-author-role {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 10px;
    border-radius: 20px;
    background: var(--bbpm-primary-light);
    color: var(--bbpm-primary);
    margin-top: 2px;
}

.bbpm-active .bbp-reply-author .bbp-author-role + br {
    display: none;
}

.bbpm-active .bbp-reply-author .bbp-author-role + br + .bbp-reply-post-date {
    font-size: 12px;
    color: var(--bbpm-text-muted);
    display: block;
    margin-top: 2px;
}

/* ---- Reply Content ---- */
.bbpm-active .bbp-reply-content {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px;
    line-height: 1.8;
    color: var(--bbpm-text);
}

.bbpm-active .bbp-reply-content p {
    margin-bottom: 12px;
}

.bbpm-active .bbp-reply-content p:last-child {
    margin-bottom: 0;
}

/* ---- Reply Admin Links ---- */
.bbpm-active .bbp-admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--bbpm-border-light);
}

.bbpm-active .bbp-admin-links a {
    font-size: 13px;
    color: var(--bbpm-text-secondary);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius-xs);
    transition: all var(--bbpm-transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bbpm-active .bbp-admin-links a:hover {
    color: var(--bbpm-primary);
    border-color: var(--bbpm-primary);
    background: var(--bbpm-primary-light);
}

/* ---- Sticky Topic ---- */
.bbpm-active .bbp-replies .bbp-body .hentry.status-closed {
    opacity: 0.85;
}

.bbpm-active .bbp-replies .bbp-body .hentry.status-closed:after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 14px;
    color: var(--bbpm-text-muted);
}

/* ---- Sticky Topic on Topic List ---- */
.bbpm-active .sticky {
    background: linear-gradient(135deg, var(--bbpm-bg-card), var(--bbpm-primary-light)) !important;
    border-color: var(--bbpm-primary) !important;
}

.bbpm-active .super-sticky {
    background: linear-gradient(135deg, var(--bbpm-bg-card), rgba(245, 158, 11, 0.08)) !important;
    border-color: var(--bbpm-accent) !important;
}

/* ---- Topic Tags ---- */
.bbpm-active .bbp-topic-tags {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--bbpm-border-light);
}

.bbpm-active .bbp-topic-tags a {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--bbpm-primary-light);
    color: var(--bbpm-primary);
    text-decoration: none;
    margin: 2px 4px 2px 0;
    transition: all var(--bbpm-transition);
}

.bbpm-active .bbp-topic-tags a:hover {
    background: var(--bbpm-primary);
    color: white;
}

/* ---- No Topics / Replies ---- */
.bbpm-active .bbp-template-notice {
    background: var(--bbpm-bg-card);
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius);
    padding: 20px;
    text-align: center;
    color: var(--bbpm-text-secondary);
    box-shadow: var(--bbpm-shadow);
}

.bbpm-active .bbp-template-notice p {
    margin: 0;
    font-size: 15px;
}

.bbpm-active .bbp-template-notice.info {
    border-color: var(--bbpm-info);
    background: rgba(59, 130, 246, 0.05);
}

.bbpm-active .bbp-template-notice.warning {
    border-color: var(--bbpm-accent);
    background: rgba(245, 158, 11, 0.05);
}

/* ---- Subscription / Favorites Buttons ---- */
.bbpm-active .bbp-subscription-wrapper,
.bbpm-active .bbp-favorites-wrapper,
.bbpm-active .bbp-topic-subscription-link,
.bbpm-active .bbp-topic-favorite-link {
    margin: 8px 0;
}

.bbpm-active .bbp-subscription-wrapper a,
.bbpm-active .bbp-favorites-wrapper a,
.bbpm-active .bbp-topic-subscription-link a,
.bbpm-active .bbp-topic-favorite-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius-xs);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--bbpm-text-secondary);
    background: var(--bbpm-bg-card);
    transition: all var(--bbpm-transition);
}

.bbpm-active .bbp-subscription-wrapper a:hover,
.bbpm-active .bbp-favorites-wrapper a:hover,
.bbpm-active .bbp-topic-subscription-link a:hover,
.bbpm-active .bbp-topic-favorite-link a:hover {
    border-color: var(--bbpm-primary);
    color: var(--bbpm-primary);
    background: var(--bbpm-primary-light);
}

.bbpm-active .bbp-topic-subscription-link.is-subscribed a,
.bbpm-active .is-favorite a {
    border-color: var(--bbpm-accent);
    color: var(--bbpm-accent);
    background: rgba(245, 158, 11, 0.08);
}

/* ---- User Profile ---- */
.bbpm-active #bbp-user-wrapper {
    background: var(--bbpm-bg-card);
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius);
    padding: 32px;
    box-shadow: var(--bbpm-shadow);
}

.bbpm-active #bbp-user-wrapper .bbp-user-section {
    margin-top: 24px;
}

.bbpm-active #bbp-user-wrapper h2.entry-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--bbpm-text);
    display: flex;
    align-items: center;
    gap: 16px;
}

.bbpm-active #bbp-user-wrapper h2.entry-title:before {
    content: '';
    width: 4px;
    height: 28px;
    background: var(--bbpm-primary);
    border-radius: 4px;
}

.bbpm-active #bbp-user-avatar img {
    border-radius: 50%;
    border: 4px solid var(--bbpm-primary);
    box-shadow: var(--bbpm-shadow-md);
}

.bbpm-active #bbp-user-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--bbpm-border-light);
    padding-bottom: 4px;
}

.bbpm-active #bbp-user-navigation a {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--bbpm-text-secondary);
    text-decoration: none;
    border-radius: var(--bbpm-radius-xs) var(--bbpm-radius-xs) 0 0;
    transition: all var(--bbpm-transition);
    position: relative;
}

.bbpm-active #bbp-user-navigation a:hover {
    color: var(--bbpm-primary);
    background: var(--bbpm-primary-light);
}

.bbpm-active #bbp-user-navigation span a {
    color: var(--bbpm-primary);
    background: var(--bbpm-primary-light);
}

.bbpm-active #bbp-user-navigation span a:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bbpm-primary);
    border-radius: 2px 2px 0 0;
}

/* ---- Back to Top Button ---- */
#bbpm-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--bbpm-primary);
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--bbpm-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--bbpm-transition);
    z-index: 9999;
}

#bbpm-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#bbpm-back-to-top:hover {
    background: var(--bbpm-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -8px rgba(99, 102, 241, 0.4);
}

/* ---- Copy Link Button ---- */
.bbpm-has-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bbpm-copy-link {
    background: none;
    border: 1px solid var(--bbpm-border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--bbpm-text-muted);
    cursor: pointer;
    transition: all var(--bbpm-transition);
    display: inline-flex;
    align-items: center;
}

.bbpm-copy-link:hover {
    border-color: var(--bbpm-primary);
    color: var(--bbpm-primary);
    background: var(--bbpm-primary-light);
}

/* ---- Search Indicator & No Results ---- */
.bbpm-search-indicator {
    display: inline-block;
    margin-left: 8px;
    color: var(--bbpm-text-muted);
    font-size: 14px;
}

.bbpm-no-results {
    background: var(--bbpm-bg-card);
    border: 1px solid var(--bbpm-border);
    border-radius: var(--bbpm-radius);
    padding: 40px 24px;
    text-align: center;
    color: var(--bbpm-text-secondary);
    font-size: 16px;
    margin-top: 12px;
    box-shadow: var(--bbpm-shadow);
}

.bbpm-no-results i {
    display: block;
    font-size: 36px;
    color: var(--bbpm-text-muted);
    margin-bottom: 12px;
}

/* ---- Animations ---- */
@keyframes bbpm-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bbpm-active #bbpress-forums ul.bbp-forums > li,
.bbpm-active #bbpress-forums ul.bbp-topics > li {
    animation: bbpm-fade-in 0.4s ease forwards;
    opacity: 0;
}

.bbpm-active #bbpress-forums ul.bbp-forums > li:nth-child(1),
.bbpm-active #bbpress-forums ul.bbp-topics > li:nth-child(1) { animation-delay: 0.05s; }
.bbpm-active #bbpress-forums ul.bbp-forums > li:nth-child(2),
.bbpm-active #bbpress-forums ul.bbp-topics > li:nth-child(2) { animation-delay: 0.1s; }
.bbpm-active #bbpress-forums ul.bbp-forums > li:nth-child(3),
.bbpm-active #bbpress-forums ul.bbp-topics > li:nth-child(3) { animation-delay: 0.15s; }
.bbpm-active #bbpress-forums ul.bbp-forums > li:nth-child(4),
.bbpm-active #bbpress-forums ul.bbp-topics > li:nth-child(4) { animation-delay: 0.2s; }
.bbpm-active #bbpress-forums ul.bbp-forums > li:nth-child(5),
.bbpm-active #bbpress-forums ul.bbp-topics > li:nth-child(5) { animation-delay: 0.25s; }
.bbpm-active #bbpress-forums ul.bbp-forums > li:nth-child(6),
.bbpm-active #bbpress-forums ul.bbp-topics > li:nth-child(6) { animation-delay: 0.3s; }
.bbpm-active #bbpress-forums ul.bbp-forums > li:nth-child(7),
.bbpm-active #bbpress-forums ul.bbp-topics > li:nth-child(7) { animation-delay: 0.35s; }
.bbpm-active #bbpress-forums ul.bbp-forums > li:nth-child(8),
.bbpm-active #bbpress-forums ul.bbp-topics > li:nth-child(8) { animation-delay: 0.4s; }

/* ---- AJAX Notices ---- */
.bbpm-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--bbpm-radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    animation: bbpm-fade-in 0.3s ease;
}

.bbpm-notice i {
    font-size: 18px;
    flex-shrink: 0;
}

.bbpm-notice-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #065f46;
}

.bbpm-notice-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #991b1b;
}

/* ---- Loading State ---- */
.bbpm-loading {
    opacity: 0.7;
    cursor: not-allowed !important;
}

.bbpm-loading:after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: bbpm-spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes bbpm-spin {
    to { transform: rotate(360deg); }
}

/* ---- OP Reply Styling ---- */
.bbpm-op-reply {
    background: linear-gradient(135deg, var(--bbpm-bg-card), rgba(99, 102, 241, 0.03)) !important;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .bbpm-active #bbp-search-form #bbp_search {
        min-width: auto;
        width: 100%;
        border-radius: var(--bbpm-radius);
        margin-bottom: 8px;
    }

    .bbpm-active #bbp-search-form #bbp_search_submit {
        width: 100%;
        border-radius: var(--bbpm-radius);
    }

    .bbpm-active #bbpress-forums ul.bbp-forums > li,
    .bbpm-active #bbpress-forums ul.bbp-topics > li {
        padding: 16px;
    }

    .bbpm-active .bbp-forum-info .bbp-forum-title,
    .bbpm-active .bbp-topic-title .bbp-topic-permalink {
        font-size: 15px;
    }

    .bbpm-active .bbp-reply-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .bbpm-active .bbp-reply-author .bbp-author-avatar img {
        width: 36px;
        height: 36px;
    }

    #bbpm-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .bbpm-active #bbpress-forums ul.bbp-forums > li,
    .bbpm-active #bbpress-forums ul.bbp-topics > li {
        animation: none;
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .bbpm-active #bbpress-forums ul.bbp-forums > li,
    .bbpm-active #bbpress-forums ul.bbp-topics > li {
        padding: 12px;
    }

    .bbpm-active .bbp-forum-info .bbp-forum-title:before {
        display: none;
    }

    .bbpm-active .bbp-forum-info .bbp-forum-content {
        margin-left: 0;
    }
}
