/* ============================================================================= */
/* DARK METAL THEME - CSS VERSION                                               */
/* themes/css/dark_metal.css                                                    */
/* ============================================================================= */

/* BASE STYLES */
html * { 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 11px; 
    line-height: 1.5; 
}

body, .body { 
    background: #1a1a1a; 
    color: #ccc; 
    margin: 0; 
    padding: 10px; 
}

.container {
    max-width: 960px;
    margin: 0 auto;
    background: #1a1a1a;
}

/* HEADER STRUCTURE */
.header { 
    width: 100%; 
    max-width: 960px; 
    margin: 0 auto 10px; 
    background: linear-gradient(to bottom, #333 0%, #222 100%); 
    border: 1px solid #555; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); 
}

/* Original Header Table Styles */
.tableHeader {
    width: 100%;
    border-collapse: collapse;
}

.tdHeaderBanner {
    background: #222;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #555;
}

.tdHeaderBanner img {
    max-height: 200px;
    width: auto;
}

.tdHeaderLinks1 {
    background: #333;
    padding: 5px 10px;
    border-bottom: 1px solid #555;
    font-size: 11px;
}

.tdHeaderLinks1 a {
    color: #00aaff;
    text-decoration: none;
    margin-right: 10px;
}

.tdHeaderLinks1 a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.tdHeaderLinks2 {
    background: #222;
    padding: 5px 10px;
    border-bottom: 1px solid #555;
    font-size: 11px;
}

.tdHeaderLinks2 a {
    color: #00aaff;
    text-decoration: none;
    margin: 0 5px;
}

.tdHeaderLinks2 a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.tdHeaderViewCounter {
    background: #333;
    padding: 5px 10px;
    border-right: 1px solid #555;
    font-size: 10px;
    color: #999;
}

.tdHeaderTime {
    background: #333;
    padding: 5px 10px;
    font-size: 10px;
    color: #999;
    text-align: right;
}

.tdHeaderSpacer {
    height: 5px;
    background: #222;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

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

.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
    color: #ccc;
}

.user-info a {
    color: #00aaff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.3s;
}

.user-info a:hover {
    background: rgba(255,255,255,0.1);
}

.login-btn, .register-btn {
    background: #444;
    border: 1px solid #555;
}

.login-btn:hover, .register-btn:hover {
    background: #555;
}

.logout-btn {
    background: #aa0000;
    border: 1px solid #cc0000;
}

.logout-btn:hover {
    background: #cc0000;
}

/* BANNER SECTION */
.banner-section {
    padding: 10px; 
    background: #222; 
    text-align: center; 
    border-bottom: 1px solid #555;
}

.banner-image {
    max-width: 100%;
    height: auto;
}

/* NAVIGATION STYLES */
.navigation {
    background: #222;
    border-bottom: 1px solid #555;
}

.nav-menu {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    color: #00aaff;
    text-decoration: none;
    padding: 10px 15px;
    transition: background 0.3s;
    border-right: 1px solid #333;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #444;
    color: #ffcc00;
}

.nav-menu li:last-child a {
    border-right: none;
}

.main-navigation {
    background: #222;
}

.nav-primary { 
    display: flex; 
    justify-content: center; 
    padding: 0; 
    margin: 0; 
    list-style: none; 
    border-bottom: 1px solid #555; 
}

.nav-primary a { 
    display: block; 
    color: #00aaff; 
    text-decoration: none; 
    padding: 10px 15px; 
    border-right: 1px solid #333; 
    transition: background 0.3s; 
    font-size: 12px; 
}

.nav-primary a:hover { 
    background: #444; 
    color: #ffcc00; 
}

.nav-secondary { 
    display: flex; 
    justify-content: center; 
    padding: 5px 0; 
    margin: 0; 
    list-style: none; 
    background: #333; 
}

.nav-secondary a { 
    color: #ccc; 
    text-decoration: none; 
    margin: 0 10px; 
    font-size: 11px; 
}

.nav-secondary a:hover { 
    color: #ffcc00; 
}

.nav-tertiary {
    display: flex; 
    justify-content: space-between; 
    padding: 5px 10px; 
    margin: 0; 
    list-style: none; 
    background: #222; 
    border-top: 1px solid #555; 
    font-size: 10px; 
}

.nav-tertiary a {
    color: #999; 
    text-decoration: none;
}

.nav-tertiary a:hover {
    color: #ffcc00; 
}

.nav-stats {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px; 
    background: #333; 
    border-top: 1px solid #555; 
    font-size: 10px; 
    color: #999; 
}

.stat-item {
    margin: 0 10px; 
}

.inline-login {
    display: flex; 
    gap: 10px; 
    align-items: center; 
}

.login-input {
    padding: 3px 6px; 
    border: 1px solid #555; 
    background: #333; 
    color: #ccc; 
    font-size: 11px; 
}

.login-button {
    padding: 3px 8px; 
    border: 1px solid #555; 
    background: #444; 
    color: #ccc; 
    cursor: pointer;
    font-size: 11px; 
    transition: background 0.3s; 
}

.login-button:hover {
    background: #555;
}

.notifications-container {
    position: fixed; 
    top: 20px; 
    right: 20px; 
    z-index: 1000; 
}

.notification {
    background: #333; 
    border: 1px solid #555; 
    padding: 10px; 
    margin-bottom: 10px; 
    color: #ccc; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); 
}

.content,
.main-content { 
    background: #1a1a1a; 
    padding: 15px; 
    margin: 10px auto; 
    max-width: 960px; 
    border: 1px solid #555; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); 
}

/* TABLE STYLES */
.table,
.subtable,
.thread-list,
.thread-info-table,
.post-table,
.reply-form-table,
.help-table,
.mod-controls-table,
.archived-threads-table,
.no-threads-table,
.error-table,
.header-table,
.forum-info-table,
.articles-filter-table,
.forum-header,
.email-info-table,
.cta-table,
.stats-table,
.services-table,
.status-table,
.login-table,
.donation-table,
.webring-table,
.registration-table,
.profile-header-table,
.profile-info-table,
.profile-bio-table,
.profile-comments-table,
.profile-commentform-table,
.profile-commentedit-table,
.userlist-table,
#forum-categories-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}
.table,
.subtable,
.thread-list,
.thread-info-table,
.reply-form-table,
.help-table,
.mod-controls-table,
.archived-threads-table,
.no-threads-table,
.error-table,
.header-table,
.forum-info-table,
.articles-filter-table,
.forum-header,
.cta-table,
.stats-table,
.services-table,
.status-table,
.login-table,
.donation-table,
.webring-table,
.registration-table,
.userlist-table {
    text-align: center;
}

/* TABLE HEADERS */
.thRegular, .thCategory { 
    background: linear-gradient(to bottom, #444 0%, #333 100%); 
    color: #ccc; 
    padding: 6px; 
    border: 1px solid #555; 
    font-size: 12px; 
    font-weight: bold; 
    text-align: left; 
    text-shadow: 0 1px 1px rgba(0,0,0,0.5); 
    margin: 0;  
}

.thRegular a, .thCategory a { 
    color: #00aaff; 
    text-decoration: none; 
}

.thRegular a:hover, .thCategory a:hover { 
    color: #ffcc00; 
    text-decoration: underline; 
    
}

/* CATEGORY HIERARCHY */
.thCategory.depth-0 { 
    font-size: 14px; 
    font-weight: bold;
    background: linear-gradient(to bottom, #3a3a3a 0%, #2a2a2a 100%);
    border: 2px solid #555;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.thCategory.depth-1 { 
    font-size: 12px; 
    font-weight: bold;
    padding-left: 15px; 
    background: linear-gradient(to bottom, #4a4a4a 0%, #393939 100%); 
    border: 1px solid #666;
    color: #eee;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.6);
}

.thCategory.depth-2 { 
    font-size: 11px; 
    font-weight: bold;
    padding-left: 25px; 
    background: linear-gradient(to bottom, #505050 0%, #3f3f3f 100%); 
    border: 1px solid #777;
    color: #ddd;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.thCategory.depth-3 { 
    font-size: 10px; 
    font-weight: bold;
    padding-left: 35px; 
    background: linear-gradient(to bottom, #565656 0%, #454545 100%); 
    border: 1px solid #888;
    color: #ccc;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
}

/* TABLE CELLS */
.tdStyle1 { 
    background: #2a2a2a; 
    border: 1px solid #555; 
    color: #ccc; 
    padding: 8px; 
    vertical-align: top;
    margin: 0;  
}

.tdStyle2 { 
    background: #252525; 
    border: 1px solid #555; 
    color: #ccc; 
    padding: 8px; 
    vertical-align: top;
            margin: 0;  
}

/* FORUM CATEGORIES SPECIFIC STYLES */
.category-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.category-table .tdStyle1 {
    vertical-align: middle;
}

.category-table .tdStyle1[style*="padding-left: 0px"] {
    border-left: 3px solid #555;
}

.category-table .tdStyle1[style*="padding-left: 10px"] {
    border-left: 3px solid #666;
    background: linear-gradient(to right, #2d2d2d 0%, #2a2a2a 100%);
}

.category-table .tdStyle1[style*="padding-left: 20px"] {
    border-left: 3px solid #777;
    background: linear-gradient(to right, #2f2f2f 0%, #2a2a2a 100%);
}

.category-table .tdStyle1 a {
    color: #00aaff;
    text-decoration: none;
}

.category-table .tdStyle1 a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.new-indicator {
    text-align: center;
    font-size: 10px;
    color: #999;
}

.forum-info {
    text-align: left;
}

.forum-info strong {
    color: #00aaff;
}

.thread-count, .post-count {
    font-weight: bold;
    color: #ccc;
}

/* Responsive table wrapper */
.forum-categories {
    max-width: 100%;
}

.category-listing {
    max-width: 100%;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .forum-categories {
        padding: 10px;
    }
    
    #forum-categories-table {
        font-size: 10px;
    }
    
    #forum-categories-table th,
    #forum-categories-table td {
        padding: 4px 2px;
    }
    
    .category-name {
        font-size: 11px;
    }
    
    .smallText {
        font-size: 9px;
    }
}

.category-actions {
    margin-bottom: 15px;
}

.category-actions a {
    color: #a7d32f;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #555;
    background: #333;
    border-radius: 3px;
    transition: background 0.3s;
}

.category-actions a:hover {
    background: #444;
}

.action-links {
    margin-top: 15px;
}

.action-links a {
    color: #a7d32f;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #555;
    background: #333;
    border-radius: 3px;
    transition: background 0.3s;
}

.action-links a:hover {
    background: #444;
}

/* TEXT STYLES */
.smallText { 
    font-size: 10px; 
    color: #999; 
    font-style: italic; 
}

.greentext { 
    color: #00ff00; 
    font-style: italic; 
}

/* LINKS */
a {
    color: #00aaff;
    text-decoration: none;
}

a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

/* FOOTER */
.footer { 
    text-align: center; 
    font-size: 10px; 
    color: #999; 
    background: #222; 
    border: 1px solid #555; 
    padding: 10px; 
    margin: 10px auto 0; 
    max-width: 960px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); 
}

.footer a { 
    color: #00aaff; 
    text-decoration: none; 
}

.footer a:hover { 
    color: #ffcc00; 
    text-decoration: underline; 
}

.footer-content {
    margin: 0;
}

.footer-content p {
    margin: 5px 0;
}

/* SECTION CONTAINERS */
.welcome-section {
    margin-bottom: 15px;
}

.category-listing {
    margin-bottom: 15px;
}

/* SCROLLBAR STYLING */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #222;
    border: 1px solid #555;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border: 1px solid #777;
}

::-webkit-scrollbar-thumb:hover {
    background: #777;
}

@media (max-width: 768px) {
    .header, .content, .footer { 
        max-width: 100%; 
        margin: 5px; 
        padding: 5px; 
    }
    
    .nav-primary a { 
        padding: 8px 10px; 
        font-size: 11px; 
    }
    
    .nav-stats {
        flex-direction: column;
        gap: 5px; 
    }
    
    .stat-item {
        margin: 0; 
    }
    
    .login-input {
        width: 100%; 
        margin-bottom: 5px; 
    }
}

input[type="text"], input[type="password"], textarea, select {
    background: #333;
    border: 1px solid #555;
    color: #ccc;
    padding: 5px;
    font-size: 11px;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    border-color: #00aaff;
    outline: none;
}

input[type="submit"], input[type="button"], button {
    background: #444;
    border: 1px solid #555;
    color: #ccc;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.3s;
}

input[type="submit"]:hover, input[type="button"]:hover, button:hover {
    background: #555;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.margin-bottom {
    margin-bottom: 10px;
}

.padding {
    padding: 10px;
}

table[cellpadding], table[cellspacing], table[border] {
    border-collapse: collapse;
}

td[valign="top"], th[valign="top"] {
    vertical-align: top;
}

td[valign="middle"], th[valign="middle"] {
    vertical-align: middle;
}

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

.index-container {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.index-main {
    flex: 2;
    min-width: 0;
}

.index-sidebar {
    flex: 1;
    min-width: 200px;
}

.sidebar-box {
    background: #222;
    border: 1px solid #555;
    padding: 10px;
    margin-bottom: 15px;
}

.sidebar-box h2 {
    margin-top: 0;
    color: #ccc;
    font-size: 14px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

.clear {
  clear: both;
}

.article-box {
  background: #222;
    border: 1px solid #555;
    padding: 15px;
    margin-bottom: 15px;
}

.article-meta {
    color: #999;
    font-size: 10px;
    margin-bottom: 10px;
}

.article-links {
    margin-top: 10px;
}

.article-links a {
    color: #a7d32f;
    margin-right: 10px;
}

.category-list, .recent-posts-list {
  list-style: none;
  padding: 0;
}

.category-list li, .recent-posts-list li {
    padding: 5px 0;
    border-bottom: 1px solid #333;
}

/* ============================================================================= */
/* TOPIC/THREAD VIEW STYLES                                                     */
/* ============================================================================= */

/* Thread Header */
.thread-header {
    margin-bottom: 15px;
}

.thread-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.thread-info-table .thRegular {
    background: #333;
    color: #fff;
    padding: 8px;
    text-align: left;
    border: 1px solid #555;
}

.thread-info-table .tdStyle1 {
    background: #222;
    padding: 10px;
    border: 1px solid #555;
    border-top: none;
}

.thread-info-table .tdStyle1 p {
    margin: 5px 0;
}

.thread-info-table .tdStyle1 a {
    color: #00aaff;
    text-decoration: none;
}

.thread-info-table .tdStyle1 a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

/* Error and Success Messages */
.error-messages, .success-messages {
    margin-bottom: 15px;
}

/* Rate Limit Error Messages */
.rate-limit-error {
    background: #f44336;
    color: white;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 4px;
    text-align: center;
    border: 2px solid #d32f2f;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: bold;
}

.rate-limit-error strong {
    color: #ffeb3b;
}

.error-table, .success-table {
    width: 100%;
    border-collapse: collapse;
}

.error-table .thRegular {
    background: #aa0000;
    color: #fff;
    padding: 8px;
    text-align: left;
    border: 1px solid #cc0000;
}

.success-table .thRegular {
    background: #00aa00;
    color: #fff;
    padding: 8px;
    text-align: left;
    border: 1px solid #00cc00;
}

.tdStyle1, .tdStyle1 {
    background: #222;
    padding: 10px;
    border: 1px solid #555;
    border-top: none;
}

/* Thread Actions */
.thread-actions {
    margin-bottom: 15px;
}

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

.actions-table .tdStyle1 {
    background: #222;
    padding: 10px;
    border: 1px solid #555;
}

.actions-table .btn {
    display: inline-block;
    padding: 5px 10px;
    margin-right: 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
    border: 1px solid;
}

.btn-primary {
    background: #00aaff;
    color: #fff;
    border-color: #0088cc;
}

.btn-primary:hover {
    background: #0088cc;
}

.btn-secondary {
    background: #666;
    color: #fff;
    border-color: #555;
}

.btn-secondary:hover {
    background: #555;
}

.btn-disabled {
    background: #444;
    color: #999;
    border-color: #333;
    cursor: not-allowed;
}

/* Posts Listing */
.posts-listing {
    margin-bottom: 20px;
}

.post-container {
    margin-bottom: 15px;
    border: 1px solid #555;
}

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

.post-author {
    background: #333;
    padding: 10px;
    border-right: 1px solid #555;
    vertical-align: top;
    width: 150px;
}

.author-info {
    text-align: center;
}

.author-name {
    margin-bottom: 5px;
}

.author-name a {
    color: #00aaff;
    text-decoration: none;
    font-weight: bold;
}

.author-name a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.author-avatar {
    margin: 5px 0;
}

.author-avatar img {
    max-width: 100px;
    height: auto;
    border: 1px solid #555;
}

.author-title {
    color: #ffcc00;
    font-style: italic;
    margin: 5px 0;
}

.author-stats {
    color: #999;
    font-size: 10px;
    margin: 5px 0;
}

.author-bio {
    color: #ccc;
    font-size: 10px;
    margin: 5px 0;
    text-align: left;
}

.post-content {
    background: #222;
    padding: 10px;
    vertical-align: top;
}

.post-header {
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.post-info {
    font-weight: bold;
    margin-bottom: 5px;
}

.post-info a {
    color: #00aaff;
    text-decoration: none;
}

.post-info a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.post-actions {
    font-size: 11px;
    color: #888;
}

.post-actions a {
    color: #9da4f5;
    text-decoration: none;
    margin-right: 10px;
}

.post-actions a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.post-date {
    color: #999;
    font-size: 10px;
}

.edited-info {
    color: #ffaa44;
    font-style: italic;
}

.delete-link {
    color: #ff4444 !important;
}

.delete-link:hover {
    color: #ff6666 !important;
}

.post-body {
    line-height: 1.6;
}

.post-header-custom {
    background: #333;
    padding: 5px;
    margin-bottom: 10px;
    border-left: 3px solid #00aaff;
}

.post-footer-custom {
    background: #333;
    padding: 5px;
    margin-top: 10px;
    border-left: 3px solid #ffaa44;
}

.post-text {
    color: #ccc;
    word-wrap: break-word;
}

.post-text a {
    color: #00aaff;
    text-decoration: none;
}

.post-text a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.post-text blockquote {
    border-left: 3px solid #555;
    padding-left: 10px;
    margin: 5px 0;
    color: #999;
}

.post-text code {
    background: #333;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    color: #ffcc00;
}

.post-text pre {
    background: #333;
    padding: 10px;
    border-radius: 3px;
    overflow-x: auto;
    margin: 5px 0;
}

.post-text img {
    max-width: 100%;
    max-height: 600px;
    height: auto;
    display: block;
    margin: 5px 0;
}

/* Ensure images don't break table layouts */
.post-table img,
.tdStyle2 img {
    max-width: 100%;
    max-height: 600px;
    height: auto;
    display: block;
    margin: 5px 0;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 20px 0;
}

.pagination a {
    color: #00aaff;
    text-decoration: none;
    padding: 5px 8px;
    margin: 0 2px;
    border: 1px solid #555;
    background: #333;
}

.pagination a:hover {
    background: #444;
    color: #ffcc00;
}

.pagination strong {
    background: #00aaff;
    color: #fff;
    padding: 5px 8px;
    margin: 0 2px;
    border: 1px solid #0088cc;
}

/* Reply Form */
.reply-form {
    margin-top: 20px;
}

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

.reply-table .thRegular {
    background: #333;
    color: #fff;
    padding: 8px;
    text-align: left;
    border: 1px solid #555;
}

.reply-table .tdStyle1 {
    background: #222;
    padding: 15px;
    border: 1px solid #555;
    border-top: none;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    max-width: 600px;
    padding: 8px;
    border: 1px solid #555;
    background: #333;
    color: #ccc;
    font-family: inherit;
    font-size: 11px;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus {
    border-color: #00aaff;
    outline: none;
}

.form-group input[type="checkbox"] {
    margin-right: 5px;
}

.form-actions {
    margin-top: 15px;
}

.form-actions .btn {
    display: inline-block;
    padding: 8px 15px;
    margin-right: 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
    border: 1px solid;
    cursor: pointer;
}

/* Thread Archived Notice */
.thread-archived-notice {
    margin-top: 20px;
}

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

.archived-table .tdStyle1 {
    background: #222;
    padding: 15px;
    border: 1px solid #555;
    text-align: center;
    color: #ffaa44;
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-author {
        width: 120px;
        padding: 5px;
    }
    
    .author-avatar img {
        max-width: 80px;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-actions {
        margin-top: 5px;
    }
    
    .form-group textarea {
        max-width: 100%;
    }
}

.preview-table,
.edit-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.preview-table .thRegular,
.edit-table .thRegular {
    background: #333;
    color: #fff;
    padding: 8px;
    text-align: left;
    border: 1px solid #555;
}

.preview-table .tdStyle1,
.edit-table .tdStyle1 {
    background: #222;
    padding: 15px;
    border: 1px solid #555;
    border-top: none;
}

.post-preview,

/* ATTACHMENT MANAGEMENT */
.attachment-management {
    max-width: 800px;
    margin: 20px auto;
}

.attachment-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
}

.attachment-info p {
    margin: 5px 0;
    color: #ccc;
}

.attachment-info strong {
    color: #00aaff;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-weight: bold;
}

.file-input {
    width: 100%;
    padding: 8px;
    background: #333;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
}

.file-input:focus {
    border-color: #00aaff;
    outline: none;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-success {
    background: #44aa44;
    color: white;
}

.btn-success:hover {
    background: #55bb55;
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn-secondary:hover {
    background: #777;
}

.file-types-info {
    margin-top: 20px;
    padding: 15px;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
}

.file-types-info h3 {
    margin: 0 0 10px 0;
    color: #00aaff;
    font-size: 14px;
}

.file-types-info ul {
    margin: 0;
    padding-left: 20px;
    color: #ccc;
}

.file-types-info li {
    margin: 5px 0;
}

/* EDIT POST ATTACHMENT MANAGEMENT */
.existing-attachments,
.new-attachments {
    margin: 15px 0;
    padding: 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
}

.existing-attachments h4,
.new-attachments h4 {
    margin: 0 0 10px 0;
    color: #00aaff;
    font-size: 14px;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    margin: 5px 0;
    background: #333;
    border: 1px solid #555;
    border-radius: 3px;
}

.attachment-name {
    font-weight: bold;
    color: #ccc;
}

.attachment-size {
    color: #888;
    font-size: 11px;
}

.attachment-actions {
    display: flex;
    gap: 5px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 10px;
}

.btn-danger {
    background: #aa0000;
    color: white;
}

.btn-danger:hover {
    background: #cc0000;
}
.edit-post-form {
    margin: 20px 0;
}

/* Prevent long words/strings from breaking the layout in posts */
.post-content,
.post-body,
.post-text,
.tdStyle2,
.tdStyle1,
.post-table td,
.post-table th {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Sorting Headers */
.sort-header {
    color: #00aaff;
    text-decoration: none;
    font-weight: bold;
    display: block;
    padding: 5px;
    transition: color 0.2s ease;
}

.sort-header:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.sort-header:active {
    color: #ff6600;
}

/* Thread Table Styles */
.thread-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.thread-table .thRegular {
    background: linear-gradient(to bottom, #333 0%, #222 100%);
    border: 1px solid #555;
    padding: 8px 5px;
    text-align: left;
    font-weight: bold;
    color: #fff;
}

.thread-table .tdStyle1 {
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 8px 5px;
    vertical-align: top;
}

.thread-table .tdStyle1:hover {
    background: #333;
}

.thread-row:hover .tdStyle1 {
    background: #333;
}
