
/* Import Fonts */
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap);

/* --- Fournet Dark Theme --- */

/* 1. Design System */
:root {
    --bg-primary: #0e0e10;
    --bg-secondary: #18181b;
    --accent: #6366f1;
    --text-primary: #f5f5f5;
    --text-secondary: #a1a1aa;
    --border-color: #27272a; /* A slightly lighter border for contrast */

    --border-radius: 10px;
    --box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    --transition: all 0.2s ease;
}

/* 2. Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

#container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    filter: brightness(1.2);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* 3. Resetting old MyBB styles */
.tborder, .thead, .tcat, .trow1, .trow2, .tfoot, .bottommenu, .tcat_menu, table {
    background: none !important;
    border: none !important;
    color: inherit;
    padding: 0;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* Base card style */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin: 0; /* Let grid/flex gap control spacing */
}

/* Buttons */
.button {
    background-color: var(--accent);
    color: var(--text-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    transition: var(--transition);
}

.button:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

/* Forms */
.textbox, select, textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    transition: var(--transition);
}

.textbox:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 5px rgba(99, 102, 241, 0.5);
}

/* Responsive Grid */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Flexbox utilities */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* --- 4. Header & Navigation --- */
.navbar {
    background: rgba(14, 14, 16, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container .logo-svg {
    height: 40px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 16px;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.user-menu-container {
    position: relative;
}

.user-menu {
    position: relative;
}

.user-avatar-container {
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent);
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-width: 200px;
    box-shadow: var(--box-shadow);
    padding: 10px 0;
    list-style: none;
}


.user-dropdown a {
    padding: 10px 20px;
    color: var(--text-secondary);
    display: block;
}

.user-dropdown a:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 0;
}

.guest-menu .button {
    margin-left: 10px;
}

.button-secondary {
    background: transparent;
    border: 1px solid var(--accent);
}

.burger-menu {
    display: none;
    cursor: pointer;
}

/* --- 5. Footer --- */
.main-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 40px;
}

.main-footer .wrapper {
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent);
}

#copyright {
    font-size: 12px;
}

/* Responsive */
@media (max-width: 900px) {
    .main-nav {
        display: none; /* Hide for burger menu */
    }
    .burger-menu {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .burger-menu span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--text-primary);
        border-radius: 3px;
    }
}

/* --- 6. Index Page: Forum Listing --- */
.category-container {
    margin-bottom: 15px;
}

.category-header {
    margin-bottom: 0;
    cursor: pointer;
}

.category-title h3 {
    margin: 0;
    font-size: 20px;
}

.category-title p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.expander-icon {
    transition: transform 0.2s ease;
}

.expander[aria-expanded="true"] .expander-icon {
    transform: rotate(90deg);
}

.forum-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
}

.forum-card-link {
    text-decoration: none;
    display: block;
    transition: var(--transition);
}

.forum-card-link:hover .forum-card {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.forum-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto 250px; /* Adjusted last column for more space */
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #27272a; /* Lighter gray for better contrast */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.forum-icon svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.forum-details h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: var(--text-primary);
}

.forum-details p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.forum-card .stat-item {
    text-align: right;
}

.stat-item .stat-count {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-item .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.forum-lastpost {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.forum-lastpost a {
    color: var(--text-primary);
    font-weight: 500;
}

/* --- 7. Index Page: Board Stats --- */
.board-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.stat-block h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.stat-block p {
    margin: 0;
}

.card-footer {
    background: var(--bg-primary);
    padding: 10px 15px;
    margin: 20px -20px -20px;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.usercp-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.usercp-nav-container {
    flex: 0 0 250px;
    position: sticky;
    top: 90px; /* Adjust based on navbar height */
}

.usercp-nav {
    padding: 15px;
}

.usercp-nav .thead {
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.usercp-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
    font-weight: 500;
}

.usercp-nav-item:hover, .usercp-nav-item.active {
    background: var(--accent);
    color: var(--text-primary);
}

.forum-grid {
    transition: all 0.4s ease-in-out;
    overflow: hidden;
    max-height: 1000px; /* Adjust as needed */
}

.forum-grid.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
}

/* --- 16. Syntax Highlighting --- */
pre[class*="language-"] {
    background: #0d1117; /* A darker background than primary */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5em;
    font-size: 14px;
    line-height: 1.5;
    overflow: auto;
}

.codeblock {
    background: none;
    border: none;
    padding: 0;
}

.codeblock .title {
    display: none; /* Hide the default MyBB code title */
}

.usercp-nav-item svg {
    width: 20px;
    height: 20px;
}

.usercp-content {
    flex-grow: 1;
}

/* Style tables generated by MyBB within the UserCP to look like cards */
.usercp-content .tborder {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.usercp-content .tborder .thead {
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.usercp-nav-group {
    margin-bottom: 10px;
}
.usercp-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.usercp-nav-header:hover {
    background: var(--accent);
    color: var(--text-primary);
}
.usercp-nav-header span {
    display: flex;
    align-items: center;
    gap: 10px;
}
.usercp-nav-header .expander-icon {
    transition: transform 0.2s ease;
}
.usercp-nav-header[aria-expanded="false"] .expander-icon {
    transform: rotate(-90deg);
}
.usercp-nav-links {
    padding: 10px 0 0 15px;
    display: block;
}
.usercp-nav-links.collapsed {
    display: none;
}

/* --- 8. Forum Display: Thread List --- */
.new-post-button-container {
    text-align: right;
    margin-bottom: 20px;
}

.new_thread_button {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

.thread-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.thread-list hr, #mod_notice hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

.thread-card {
    display: grid;
    grid-template-columns: auto 1fr auto 200px !important;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #27272a; /* Lighter gray for better contrast */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-height: 90px; /* Match forum-card height */
}

.thread-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px); /* Match forum-card hover */
}

.thread-card.sticky {
    background-color: rgba(99, 102, 241, 0.05); /* Subtle accent color background */
    border-left: 3px solid var(--accent);
}

.thread-icon svg {
    color: var(--text-secondary);
}

.thread-icon svg.hotfolder, .thread-icon svg.newhotfolder {
    color: var(--accent);
}

.thread-details h4 {
    margin: 0 0 5px 0;
    font-size: 17px;
    font-weight: 600;
}

.thread-details .author-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.thread-stats {
    gap: 20px;
    text-align: center;
}

.thread-lastpost {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.thread-lastpost a {
    color: var(--text-primary);
}

.filter-bar {
    background: var(--bg-secondary);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

/* --- 9. Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination a, .pagination_current {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--accent);
    color: var(--text-primary);
    border-color: var(--accent);
}

.pagination_current {
    background: var(--accent);
    color: var(--text-primary);
    border-color: var(--accent);
    font-weight: 600;
}

.pagination .pages {
    margin-right: 10px;
    font-weight: 500;
}

/* --- 10. Showthread: Post View --- */
.thread-title-container {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.thread-title-container h1 {
    margin: 0;
    text-align: center;
    font-size: 28px;
}

.top-controls {
    margin-bottom: 20px;
}

#posts {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.post-header {
    padding: 15px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    justify-content: space-between;
}

.post-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 15px;
}

.post-author-info {
    flex-grow: 1;
}

.post-author-info strong {
    font-size: 16px;
}

.post-meta-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.post-link {
    margin-left: 10px;
}

.post_content {
    padding: 20px;
    line-height: 1.7;
}

.post_body {
    font-size: 15px;
}

.post-footer {
    padding: 10px 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.post-actions {
    display: flex;
    gap: 15px;
}

.post-action-button {
    color: var(--text-secondary);
    transition: var(--transition);
}

.post-action-button:hover {
    color: var(--accent);
}

.bottom-thread-options {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--border-radius);
}

.thread_tools {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

/* Postbit Compatibility */
.post.classic {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 0; /* Remove card padding to allow for internal sections */
}

.post_author {
    padding: 20px;
    border-right: 1px solid var(--border-color);
    text-align: center;
}

.post_author .author_avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.author_information .smalltext img {
    height: 16px;
    width: auto;
    border-radius: 0;
    margin-bottom: 0;
    vertical-align: middle;
}

.post_author .author_information strong {
    font-size: 1.1em;
}

.post_author .author_statistics {
    margin-top: 15px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.post.classic .post_content {
    padding: 0; /* Handled by inner elements */
    display: flex;
    flex-direction: column;
}

.post .post_head {
    padding: 15px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post .post_body {
    padding: 20px;
    flex-grow: 1; /* Make content area fill space */
}

.post .post_meta {
    padding: 0 20px 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.post .post_controls {
    padding: 10px 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    margin-top: auto; /* Push to bottom */
    display: flex;
    justify-content: space-between;
}

.post .postbit_buttons a {
    color: var(--text-secondary);
    transition: var(--transition);
    margin: 0 5px;
}

.post .postbit_buttons a:hover {
    color: var(--accent);
}

/* Modern Postbit Adjustments */
.post:not(.classic) .post_author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.post:not(.classic) .author_avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.post:not(.classic) .post_date, .post:not(.classic) .post_link {
    font-size: 13px;
    color: var(--text-secondary);
}

.post:not(.classic) .float_right {
    margin-left: auto;
    text-align: right;
}

.post .float_right, .post .float_left { float: none !important; }


/* --- 11. Member Profile Page --- */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    padding: 0;
    position: relative;
    text-align: center;
    margin-bottom: 70px; /* Space for avatar */
}

.profile-banner {
    height: 200px;
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    border-radius: 10px 10px 0 0;
}

.profile-avatar-container {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--bg-primary);
}

.profile-user-info {
    padding: 15px;
    margin-top: 60px; /* Space for avatar */
}

.profile-user-info .username {
    margin: 0;
}

.profile-user-info .usertitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-actions {
    padding-bottom: 20px;
}

.profile-tabs {
    margin-top: 20px;
}

.tab-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: var(--border-radius);
}

.tab-link {
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
}

.tab-link.active, .tab-link:hover {
    background: var(--accent);
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.stat-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.stat-list li:last-child {
    border-bottom: none;
}

/* --- 12. Login/Register Forms --- */
body > .form-container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.form-container-wrapper .card {
     margin: 0;
}

.form-card {
    width: 100%;
    max-width: 450px;
    background: rgba(24, 24, 27, 0.7); /* semi-transparent background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group .button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.form-sub-link {
    display: block;
    text-align: right;
    font-size: 13px;
    margin-top: 5px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check label {
    margin: 0;
}

.disclaimer-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    color: var(--text-secondary);
}

.disclaimer-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 16px;
}

.disclaimer-box p {
    margin: 0;
    line-height: 1.5;
}

/* --- Breadcrumb/Navigation Styling --- */
.navigation {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 15px;
    margin: 20px 0;
    font-size: 14px;
}

.navigation a {
    color: var(--text-secondary);
}

.navigation a:hover {
    color: var(--accent);
    filter: none; /* Remove global brightness filter for this element */
}

.navigation .active {
    color: var(--text-primary);
    font-weight: 600;
}


/* --- 16. Syntax Highlighting --- */
pre[class*="language-"] {
    background: #0d1117; /* A darker background than primary */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5em;
    font-size: 14px;
    line-height: 1.5;
    overflow: auto;
}

.codeblock {
    background: none;
    border: none;
    padding: 0;
}

.codeblock .title {
    display: none; /* Hide the default MyBB code title */
}

/* --- 13. User Control Panel (UserCP) --- */
.usercp-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.usercp-nav-container {
    flex: 0 0 250px;
}

.usercp-nav {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 15px;
    border: 1px solid var(--border-color);
}

.usercp-nav .thead {
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.usercp-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.usercp-nav-item:hover, .usercp-nav-item.active {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.usercp-nav-item svg {
    width: 20px;
    height: 20px;
}

.usercp-content {
    flex-grow: 1;
}

/* --- 14. Member List --- */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.member-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.member-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.member-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.member-name a {
    font-weight: 600;
    color: var(--text-primary);
}

.member-usertitle {
    font-size: 12px;
    color: var(--text-secondary);
}

/* --- 15. Private Messaging --- */
.pm-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.pm-nav-container {
    flex: 0 0 250px;
}

.pm-nav {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 15px;
    border: 1px solid var(--border-color);
}

.pm-nav .thead {
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.pm-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pm-nav-item:hover, .pm-nav-item.active {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.pm-content {
    flex-grow: 1;
}

.message-list .card {
    padding: 15px;
}

.message-list .d-flex {
    align-items: center;
    gap: 15px;
}

.message-read .card {
    padding: 0;
}

.chat-bubble {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.chat-bubble.sent {
    flex-direction: row-reverse;
}

.chat-bubble .post-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.bubble-content {
    background: var(--bg-primary);
    padding: 15px;
    border-radius: var(--border-radius);
    max-width: 75%;
}

.bubble-content .post_body {
    padding: 0;
}

.sent .bubble-content {
    background: var(--accent);
    color: var(--text-primary);
}

/* --- Member Profile Additions --- */
.card-header {
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.list-group-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.list-group-item:last-child {
    border-bottom: none;
}

.profile-field {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.profile-field:last-child {
    border-bottom: none;
}
.profile-field strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}
.profile-field-value {
    color: var(--text-primary);
}

.usercp-nav-group {
    margin-bottom: 10px;
}
.usercp-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.usercp-nav-header:hover {
    background: var(--accent);
    color: var(--text-primary);
}
.usercp-nav-header span {
    display: flex;
    align-items: center;
    gap: 10px;
}
.usercp-nav-header .expander-icon {
    transition: transform 0.2s ease;
}
.usercp-nav-header[aria-expanded="false"] .expander-icon {
    transform: rotate(-90deg);
}
.usercp-nav-links {
    padding: 10px 0 0 15px;
    display: block;
}
.usercp-nav-links.collapsed {
    display: none;
}

/* --- 17. Downloads Page --- */
.downloads-header {
    text-align: center;
    margin-bottom: 30px;
}
.downloads-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}
.downloads-header p {
    font-size: 16px;
    color: var(--text-secondary);
}
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}
.download-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 25px;
}
.download-icon svg {
    width: 40px;
    height: 40px;
    color: var(--accent);
}
.download-details h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
}
.download-details p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.download-button-container {
    text-align: right;
}

/* === POSTBIT CORRECTION PATCH === */

/* Applies the card style to the main post container */
.post {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px; /* Adds space between posts */
    display: grid; /* Use grid for layout */
    grid-template-columns: 200px 1fr; /* Classic layout: 200px for author, rest for content */
    overflow: hidden; /* Prevents content from overflowing the rounded corners */
}

/* Author details section */
.post .post_author {
    padding: 20px;
    border-right: 1px solid var(--border-color);
    text-align: center;
    background: var(--bg-primary); /* Slightly different background for author pane */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post .post_author .author_avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.post .post_author strong, .post .post_author .largetext {
    font-size: 1.1em;
    color: var(--text-primary);
}

.post .post_author .smalltext {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.post .post_author .author_statistics {
    margin-top: 15px;
    font-size: 0.9em;
}

/* Main post content area */
.post .post_content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.post .post_head {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
}

.post .post_body {
    padding: 20px;
    line-height: 1.7;
    flex-grow: 1; /* Allows the body to fill available space */
}

/* Post controls (buttons) */
.post .post_controls {
    padding: 10px 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 15px;
}

.post .post_controls a {
    color: var(--text-secondary);
}

.post .post_controls a:hover {
    color: var(--accent);
}

/* Remove floats from MyBB's default layout */
.post .float_right, .post .float_left {
    float: none !important;
}

/* === MEMBERLIST CORRECTION PATCH === */

/* Ensure the main container for the memberlist page has a clear structure */
.memberlist-container {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Adds space between the grid, pagination, and search form */
}

/* Style the pagination container */
.memberlist-controls {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

/* Ensure the search form card has margin */
.member-search-form.card {
    margin-top: 20px;
}
		
		