/* ===== Enhanced Forum Design - Modern MySpace 2009 Style ===== */

/* Base wrapper */
.forum-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    font: 12px Verdana, Arial, sans-serif;
    color: #333;
}
body.theme-dark .forum-wrap {
    color: #e5e7eb;
}

/* Breadcrumb with icons */
.forum-bc {
    margin: 0 0 12px;
    font-size: 11px;
    color: #666;
    padding: 8px 12px;
    background: #f5f7fa;
    border-radius: 4px;
}
body.theme-dark .forum-bc {
    color: #9ca3af;
    background: #1f2937;
}
.forum-bc a {
    color: #003399;
    text-decoration: none;
    font-weight: 500;
}
body.theme-dark .forum-bc a {
    color: #60a5fa;
}
.forum-bc a:hover {
    text-decoration: underline;
    color: #0055cc;
}
body.theme-dark .forum-bc a:hover {
    color: #93c5fd;
}
.forum-bc .sep {
    margin: 0 6px;
    color: #999;
}

/* Top bar with gradient */
.forum-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #003399 0%, #0055cc 100%);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.forum-topbar h1 {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    color: #fff;
    word-break: break-word;
}
.forum-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #fff;
    color: #003399;
    text-decoration: none;
    font: bold 11px Verdana, Arial, sans-serif;
    border: 2px solid #fff;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.2s;
}
.forum-btn:hover {
    background: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Enhanced table with better spacing */
.forum-tbl {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #d1d5db;
    margin-bottom: 16px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
body.theme-dark .forum-tbl {
    border-color: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.forum-tbl th {
    background: linear-gradient(180deg, #003399 0%, #002a7a 100%);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: bold;
    border-bottom: 2px solid #002266;
    white-space: nowrap;
}
body.theme-dark .forum-tbl th {
    background: linear-gradient(180deg, #1e3a5f 0%, #152844 100%);
    border-bottom-color: #1e3a5f;
}
.forum-tbl td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    font-size: 11px;
    background: #fff;
    transition: background 0.2s;
}
body.theme-dark .forum-tbl td {
    background: #111827;
    border-bottom-color: #374151;
    color: #e5e7eb;
}
.forum-tbl tbody tr:hover td {
    background: #f0f4ff;
}
body.theme-dark .forum-tbl tbody tr:hover td {
    background: #1f2937;
}
.forum-tbl tbody tr:last-child td {
    border-bottom: none;
}
.forum-tbl .col-count {
    text-align: center;
    width: 70px;
    font-weight: 600;
    color: #003399;
}
body.theme-dark .forum-tbl .col-count {
    color: #60a5fa;
}
.forum-tbl .col-last {
    width: 200px;
    font-size: 10px;
    color: #6b7280;
}
body.theme-dark .forum-tbl .col-last {
    color: #9ca3af;
}
.forum-tbl a {
    color: #003399;
    text-decoration: none;
    font-weight: 500;
}
body.theme-dark .forum-tbl a {
    color: #60a5fa;
}
.forum-tbl a:hover {
    text-decoration: underline;
    color: #0055cc;
}
body.theme-dark .forum-tbl a:hover {
    color: #93c5fd;
}
.forum-tbl .cat-name {
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.forum-tbl .cat-name::before {
    content: "💬";
    font-size: 16px;
}
.forum-tbl .cat-desc {
    color: #6b7280;
    font-size: 10px;
    margin-top: 4px;
    line-height: 1.4;
}
body.theme-dark .forum-tbl .cat-desc {
    color: #9ca3af;
}

/* Post cards with enhanced design */
.forum-post {
    display: flex;
    border: 1px solid #d1d5db;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}
.forum-post:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
body.theme-dark .forum-post {
    background: #111827;
    border-color: #374151;
}
body.theme-dark .forum-post:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Enhanced author panel with avatar */
.post-author {
    width: 140px;
    min-width: 140px;
    padding: 16px 12px;
    text-align: center;
    background: linear-gradient(180deg, #f0f4ff 0%, #e0e8ff 100%);
    border-right: 1px solid #d1d5db;
    font-size: 10px;
}
body.theme-dark .post-author {
    background: linear-gradient(180deg, #1e3a5f 0%, #152844 100%);
    border-right-color: #374151;
}
.post-author img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    display: block;
    margin: 0 auto 8px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
body.theme-dark .post-author img {
    border-color: #374151;
}
.post-author .username {
    font-weight: bold;
    font-size: 11px;
    color: #003399;
    margin: 4px 0;
    word-break: break-word;
}
body.theme-dark .post-author .username {
    color: #60a5fa;
}
.post-author .username a {
    color: inherit;
    text-decoration: none;
}
.post-author .username a:hover {
    text-decoration: underline;
}
.post-author .user-title {
    font-size: 9px;
    color: #6b7280;
    font-style: italic;
    margin: 2px 0 8px;
}
body.theme-dark .post-author .user-title {
    color: #9ca3af;
}
.post-author .user-stats {
    font-size: 9px;
    color: #6b7280;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d1d5db;
}
body.theme-dark .post-author .user-stats {
    color: #9ca3af;
    border-top-color: #374151;
}
.post-author .user-stats div {
    margin: 2px 0;
}

/* User badges */
.user-badge {
    display: inline-block;
    padding: 2px 6px;
    margin: 4px 2px 0;
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
    background: #fbbf24;
    color: #78350f;
}
.user-badge.admin {
    background: #dc2626;
    color: #fff;
}
.user-badge.mod {
    background: #10b981;
    color: #fff;
}
.user-badge.vip {
    background: #8b5cf6;
    color: #fff;
}

/* Post content area */
.post-content {
    flex: 1;
    padding: 16px;
    min-width: 0;
}
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}
body.theme-dark .post-header {
    border-bottom-color: #374151;
}
.post-date {
    font-size: 10px;
    color: #6b7280;
}
body.theme-dark .post-date {
    color: #9ca3af;
}
.post-body {
    line-height: 1.6;
    word-wrap: break-word;
    color: #374151;
}
body.theme-dark .post-body {
    color: #e5e7eb;
}
.post-body p {
    margin: 0 0 12px;
}
.post-body p:last-child {
    margin-bottom: 0;
}

/* Quote styling */
.post-body blockquote {
    margin: 12px 0;
    padding: 10px 12px;
    background: #f9fafb;
    border-left: 4px solid #003399;
    font-style: italic;
    color: #6b7280;
}
body.theme-dark .post-body blockquote {
    background: #1f2937;
    border-left-color: #60a5fa;
    color: #9ca3af;
}

/* Post actions */
.post-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 10px;
}
body.theme-dark .post-actions {
    border-top-color: #374151;
}
.post-actions a {
    color: #003399;
    text-decoration: none;
    margin-right: 12px;
    font-weight: 500;
}
body.theme-dark .post-actions a {
    color: #60a5fa;
}
.post-actions a:hover {
    text-decoration: underline;
}

/* Pagination with better styling */
.forum-paging {
    font-size: 11px;
    margin: 12px 0;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}
body.theme-dark .forum-paging {
    color: #9ca3af;
}
.forum-paging a {
    color: #003399;
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    transition: all 0.2s;
}
body.theme-dark .forum-paging a {
    color: #60a5fa;
    border-color: #374151;
    background: #1f2937;
}
.forum-paging a:hover {
    background: #f0f4ff;
    border-color: #003399;
    text-decoration: none;
}
body.theme-dark .forum-paging a:hover {
    background: #374151;
    border-color: #60a5fa;
}
.paging-current {
    font-weight: bold;
    color: #fff;
    background: #003399;
    padding: 4px 10px;
    border: 1px solid #003399;
    border-radius: 4px;
}
body.theme-dark .paging-current {
    background: #1e3a5f;
    border-color: #1e3a5f;
}

/* Reply form enhancement */
.reply-form {
    margin-top: 20px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}
body.theme-dark .reply-form {
    background: #1f2937;
    border-color: #374151;
}
.reply-form h3 {
    margin: 0 0 12px;
    font-size: 13px;
    color: #003399;
}
body.theme-dark .reply-form h3 {
    color: #60a5fa;
}

/* Topic indicators */
.topic-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
    margin-left: 8px;
}
.topic-indicator.hot {
    background: #fef3c7;
    color: #92400e;
}
.topic-indicator.new {
    background: #dbeafe;
    color: #1e40af;
}
.topic-indicator.locked {
    background: #fee2e2;
    color: #991b1b;
}
.topic-indicator.pinned {
    background: #e0e7ff;
    color: #3730a3;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .forum-wrap {
        padding: 8px;
    }
    .forum-topbar {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    .forum-topbar h1 {
        font-size: 14px;
    }
    .forum-btn {
        text-align: center;
    }
    .forum-tbl .col-last {
        display: none;
    }
    .forum-tbl .hdr-last {
        display: none;
    }
    .forum-tbl .cat-name {
        font-size: 12px;
    }
    .forum-tbl td,
    .forum-tbl th {
        padding: 8px 6px;
    }
    .forum-post {
        flex-direction: column;
    }
    .post-author {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #d1d5db;
        padding: 12px;
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }
    body.theme-dark .post-author {
        border-bottom-color: #374151;
    }
    .post-author img {
        width: 60px;
        height: 60px;
        margin: 0;
    }
    .post-author .user-stats {
        border-top: none;
        padding-top: 0;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .forum-tbl .col-count {
        width: 40px;
        font-size: 10px;
    }
    .post-content {
        padding: 12px;
    }
}
