/* =============================================================
   MISCAPTION FORUM — Styles
   ============================================================= */

/* Forum Layout */
.forum-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2rem;
}
.forum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.forum-header h1 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 10px;
}
.forum-header h1 i {
    color: var(--accent);
}

/* Forum Categories Grid */
.forum-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forum-cat-card {
    display: grid;
    grid-template-columns: 48px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}
.forum-cat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.forum-cat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.forum-cat-info {
    min-width: 0;
}
.forum-cat-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 2px;
}
.forum-cat-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.forum-cat-stats {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
}
.forum-cat-stat {
    text-align: center;
}
.forum-cat-stat-val {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-bright);
}
.forum-cat-stat-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.forum-cat-latest {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    flex-shrink: 0;
}
.forum-cat-latest img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.forum-cat-latest-info {
    min-width: 0;
}
.forum-cat-latest-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.forum-cat-latest-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Thread List */
.thread-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.thread-item {
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
}
.thread-item:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
}
.thread-item.pinned {
    border-left: 3px solid var(--accent);
}

.thread-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.thread-info {
    min-width: 0;
}
.thread-title {
    font-size: 0.92rem;
    font-weight: 700;
}
.thread-title a {
    color: var(--text-bright);
    text-decoration: none;
    transition: color 0.15s;
}
.thread-title a:hover {
    color: var(--accent);
}
.thread-title .pinned-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    margin-right: 6px;
}
.thread-title .locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
    margin-right: 6px;
}
.thread-meta {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
}
.thread-meta a {
    color: var(--accent);
    text-decoration: none;
}
.thread-meta a:hover {
    text-decoration: underline;
}

.thread-stats {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
}
.thread-stat {
    text-align: center;
}
.thread-stat-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}
.thread-stat-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.thread-latest {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    flex-shrink: 0;
}
.thread-latest img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.thread-latest-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Thread Detail / Posts */
.thread-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.thread-header h1 {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}
.thread-header-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    flex-wrap: wrap;
}
.thread-header-meta i {
    margin-right: 4px;
}

.forum-post {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
}
.forum-post.op {
    border-color: var(--accent);
    border-width: 1px;
    background: var(--accent-surface);
}

.post-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    flex-shrink: 0;
}
.post-author img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.post-author-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    text-decoration: none;
}
.post-author-name:hover {
    text-decoration: underline;
}
.post-author-badges {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
}
.post-author-badge {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.post-content {
    flex: 1;
    min-width: 0;
}
.post-content-body {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.post-content-body p {
    margin-bottom: 0.5rem;
}
.post-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.post-footer a {
    color: var(--text-muted);
    transition: color 0.15s;
}
.post-footer a:hover {
    color: var(--accent);
}

/* Reply Form */
.reply-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.reply-form h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.reply-form h3 i {
    color: var(--accent);
}
.reply-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font);
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}
.reply-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.reply-form .btn {
    margin-top: 0.75rem;
}

/* New Thread Form */
.new-thread-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}
.new-thread-form h1 {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-bright);
    margin-bottom: 1.5rem;
}

/* Breadcrumb */
.forum-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.forum-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s;
}
.forum-breadcrumb a:hover {
    opacity: 0.8;
}
.forum-breadcrumb .sep {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Forum Online Stats */
.forum-online-stats {
    display: flex;
    gap: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}
.forum-online-stats strong {
    color: var(--text-bright);
    font-weight: 800;
}

/* Responsive */
@media (max-width: 768px) {
    .forum-wrap {
        padding: 1rem;
    }
    .forum-cat-card {
        grid-template-columns: 40px 1fr;
        gap: 0.75rem;
    }
    .forum-cat-stats,
    .forum-cat-latest {
        display: none;
    }
    .thread-item {
        grid-template-columns: 32px 1fr;
        gap: 0.75rem;
    }
    .thread-stats,
    .thread-latest {
        display: none;
    }
    .thread-avatar {
        width: 32px;
        height: 32px;
    }
    .forum-post {
        flex-direction: column;
    }
    .post-author {
        flex-direction: row;
        min-width: auto;
    }
    .post-author img {
        width: 36px;
        height: 36px;
    }
}
