/* Category Page Styles */

/* Breadcrumb */
.breadcrumb {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.95rem;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 0.8rem;
    color: #9ca3af;
}

.breadcrumb span {
    color: var(--dark-color);
    font-weight: 500;
}

/* Category Info */
.category-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.category-info h1 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.category-info p {
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.category-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.category-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.category-stats i {
    color: var(--primary-color);
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.sort-options select {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    color: var(--text-color);
    font-size: 0.95rem;
    cursor: pointer;
}

/* Topics Section */
.topics-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    overflow: hidden;
}

.section-title {
    background: var(--light-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.section-title i {
    color: var(--primary-color);
}

/* Topic Item */
.topic-item {
    display: grid;
    grid-template-columns: 50px 1fr auto 200px;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
    align-items: center;
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-item:hover {
    background: var(--light-color);
}

.topic-item.hot {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
    border-left: 4px solid var(--danger-color);
}

.topic-item.pinned {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
    border-left: 4px solid var(--primary-color);
}

.topic-item.solved {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
    border-left: 4px solid var(--success-color);
}

.topic-item.locked {
    opacity: 0.7;
    background: var(--light-color);
}

/* Topic Avatar */
.topic-avatar {
    width: 50px;
    height: 50px;
}

.topic-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Topic Info */
.topic-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.topic-info h3 a {
    color: var(--dark-color);
    font-weight: 600;
}

.topic-info h3 a:hover {
    color: var(--primary-color);
}

.topic-info h3 i {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.topic-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pinned {
    background: var(--primary-color);
    color: white;
}

.badge-hot {
    background: var(--danger-color);
    color: white;
}

.badge-solved {
    background: var(--success-color);
    color: white;
}

.badge-locked {
    background: #6b7280;
    color: white;
}

.topic-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #6b7280;
}

.topic-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.topic-meta i {
    font-size: 0.8rem;
}

/* Topic Stats */
.topic-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    min-width: 80px;
}

.topic-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.topic-stats i {
    color: var(--primary-color);
}

/* Topic Last Reply */
.topic-last-reply {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.topic-last-reply img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.topic-last-reply div {
    display: flex;
    flex-direction: column;
}

.topic-last-reply a {
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.topic-last-reply span {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: #9ca3af;
}

/* Sidebar Widgets */
.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 8px;
}

.quick-stat i {
    font-size: 2rem;
    color: var(--primary-color);
}

.quick-stat div {
    display: flex;
    flex-direction: column;
}

.quick-stat strong {
    font-size: 1.3rem;
    color: var(--dark-color);
}

.quick-stat span {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Top Contributors */
.top-contributors {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contributor {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.contributor:hover {
    background: var(--light-color);
}

.rank {
    font-size: 1.5rem;
}

.contributor img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.contributor-info {
    display: flex;
    flex-direction: column;
}

.contributor-info strong {
    color: var(--dark-color);
    font-size: 0.95rem;
}

.contributor-info span {
    color: #6b7280;
    font-size: 0.8rem;
}

/* Related Categories */
.related-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-cat {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    background: var(--light-color);
    transition: all 0.3s;
    color: var(--dark-color);
}

.related-cat:hover {
    background: var(--primary-color);
    color: white;
}

.related-cat i {
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .topic-item {
        grid-template-columns: 40px 1fr;
        gap: 1rem;
    }
    
    .topic-stats,
    .topic-last-reply {
        grid-column: 2;
    }
    
    .topic-stats {
        flex-direction: row;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .category-info {
        flex-direction: column;
        text-align: center;
    }
    
    .category-info h1 {
        font-size: 1.5rem;
    }
    
    .category-stats {
        justify-content: center;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .topic-item {
        grid-template-columns: 1fr;
    }
    
    .topic-avatar {
        display: none;
    }
    
    .topic-last-reply {
        display: none;
    }
}

