/* Forum Container */
.forum-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Forum Header */
.forum-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.current-page {
    color: #ffffff;
}

.category-actions {
    margin-top: 1rem;
}

/* Category Cards */
.forum-categories {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.forum-category {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #00bfff;
}

.forum-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.3);
    border-left-width: 6px;
}

.category-icon {
    font-size: 2rem;
    color: #00bfff;
    margin-right: 1.5rem;
    width: 60px;
    text-align: center;
}

.category-content {
    flex: 1;
}

.category-name {
    margin: 0 0 0.5rem 0;
    color: #ffffff;
    font-weight: 600;
}

.category-description {
    margin: 0 0 0.75rem 0;
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.4;
}

.category-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.stat-item {
    color: #aaaaaa;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.category-arrow {
    color: #00bfff;
    font-size: 1.2rem;
}

/* Topics List */
.topics-list {
    display: grid;
    gap: 1rem;
}

.topic-item {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-left: 4px solid transparent;
}

.topic-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.2);
    border-left-color: #00bfff;
}

.topic-item.pinned {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
}

.topic-pin {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #ffc107;
    font-weight: 600;
}

.topic-lock {
    position: absolute;
    top: 0.75rem;
    right: 2.5rem;
    color: #ff6b6b;
    font-size: 0.9rem;
}

.topic-content {
    flex: 1;
}

.topic-title {
    margin: 0 0 0.5rem 0;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.3;
}

.topic-description {
    margin: 0 0 0.75rem 0;
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.4;
}

.topic-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: #aaaaaa;
    flex-wrap: wrap;
}

.topic-meta > span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.topic-arrow {
    color: #00bfff;
    font-size: 1.1rem;
    margin-left: 1rem;
}

/* New Topic Form */
.new-topic-form {
    padding: 2rem;
    margin-bottom: 2rem;
}

.character-count {
    font-size: 0.75rem;
    color: #aaaaaa;
    text-align: right;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    align-items: center;
}

/* Forum Stats */
.forum-stats {
    padding: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00bfff;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #aaaaaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.latest-topic {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.latest-topic-item {
    padding: 0.75rem;
    border-radius: 6px;
    background: rgba(0, 191, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
}

.latest-topic-item:hover {
    background: rgba(0, 191, 255, 0.1);
}

.topic-title {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.topic-meta {
    font-size: 0.8rem;
    color: #aaaaaa;
}

.time-ago {
    margin-left: 0.5rem;
    color: #00bfff;
}

/* Pagination */
.pagination-container {
    margin-top: 2rem;
}

.pagination .page-link {
    background: rgba(0, 191, 255, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.3);
    color: #00bfff;
    margin: 0 0.125rem;
}

.pagination .page-link:hover {
    background: rgba(0, 191, 255, 0.2);
    border-color: #00bfff;
    color: #ffffff;
}

.pagination .page-item.active .page-link {
    background: #00bfff;
    border-color: #00bfff;
    color: #000;
}

.pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #666;
    cursor: not-allowed;
}

.pagination-info {
    color: #aaaaaa;
    font-size: 0.85rem;
}

/* No Content States */
.no-categories,
.no-topics {
    padding: 3rem;
    text-align: center;
}

.no-categories i,
.no-topics i {
    color: #00bfff;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .forum-container {
        padding: 0.75rem;
    }
    
    .forum-category,
    .topic-item {
        padding: 1rem;
    }
    
    .category-icon {
        font-size: 1.5rem;
        width: 40px;
        margin-right: 1rem;
    }
    
    .topic-meta {
        gap: 1rem;
        font-size: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    .topic-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .topic-pin {
        position: static;
        margin-bottom: 0.5rem;
    }
}

/* Topic Header */
.topic-header {
    padding: 2rem;
    margin-bottom: 2rem;
}

.topic-title-section {
    flex: 1;
}

.topic-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

    .topic-badge.pinned {
        background: rgba(255, 193, 7, 0.2);
        color: #ffc107;
    }

    .topic-badge.locked {
        background: rgba(255, 107, 107, 0.2);
        color: #ff6b6b;
        margin-left: 0.5rem;
    }

.topic-title {
    margin: 0 0 1rem 0;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}

.topic-description {
    margin: 0 0 1.5rem 0;
    color: #cccccc;
    font-size: 1.1rem;
    line-height: 1.5;
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 191, 255, 0.3);
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.topic-date {
    color: #aaaaaa;
    font-size: 0.85rem;
}

.topic-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

    .topic-stats .stat {
        color: #aaaaaa;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

.topic-actions {
    display: flex;
    align-items: flex-start;
}

/* Forum Posts Container */
.forum-posts {
    /* ThreadedComments styling will handle the posts */
}

/* Forum Reply Form */
.forum-reply-form {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

    .forum-reply-form h6 {
        color: #ffffff;
        margin-bottom: 1rem;
    }

/* Topic Status Messages */
.topic-locked-notice,
.login-prompt {
    padding: 2rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

    .topic-locked-notice i,
    .login-prompt i {
        color: #00bfff;
    }

.topic-not-found {
    padding: 3rem;
}

    .topic-not-found i {
        color: #ff6b6b;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .topic-header {
        padding: 1.5rem;
    }

    .topic-title {
        font-size: 1.5rem;
    }

    .topic-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .topic-stats {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
    }
}

/* Topic Action Buttons */
.topic-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #aaaaaa;
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

    .topic-action-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
        transform: translateY(-1px);
        text-decoration: none;
    }

    .topic-action-btn:active {
        transform: translateY(0);
    }

    .topic-action-btn:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(0, 191, 255, 0.4);
    }

    /* Special states */
    .topic-action-btn.text-danger {
        color: #ff6b6b;
    }

        .topic-action-btn.text-danger:hover {
            background: rgba(255, 107, 107, 0.2);
            color: #ff6b6b;
        }

    .topic-action-btn .text-warning {
        color: #ffc107;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .topic-actions {
        gap: 0.25rem;
    }

    .topic-action-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Topic meta layout adjustments for mobile */
@media (max-width: 768px) {
    .topic-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .topic-actions {
        order: -1; /* Move actions to top on mobile */
        align-self: flex-end;
    }
}

.topic-like-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #6c757d;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

    .topic-like-btn:hover:not(.disabled) {
        background-color: rgba(0, 123, 255, 0.1);
        color: #0d6efd;
    }

    .topic-like-btn.liked {
        color: #0d6efd;
    }

        .topic-like-btn.liked:hover {
            color: #dc3545;
        }

    .topic-like-btn .fa-thumbs-up {
        margin-right: 0.5rem;
    }

/* Add to your forum.css */
.forum-container {
    min-height: 600px;
    opacity: 1;
    transition: opacity 0.15s ease-in-out;
}

    .forum-container.loading {
        opacity: 0.8;
    }

/* Breadcrumb skeleton */
.breadcrumb-skeleton {
    width: 120px;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Prevent content jumping during load */
.topic-header {
    min-height: 200px;
}

.comments-wrapper {
    min-height: 300px;
}

/* Smooth transitions for dynamic content */
.topic-voting, .comment-actions {
    transition: opacity 0.2s ease-in-out;
}

    .topic-voting.loading, .comment-actions.loading {
        opacity: 0.6;
    }