/* Recent Posts Page Styles */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title i {
    font-size: 3rem;
}

.page-title h1 {
    font-size: 2.2rem;
    margin-bottom: 0.3rem;
}

.page-title p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.time-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.time-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.time-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.time-btn.active {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-box i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.stat-box span {
    font-size: 1rem;
    color: #6b7280;
}

.stat-box strong {
    color: var(--dark-color);
    font-size: 1.2rem;
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.recent-post-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1.5rem;
    transition: all 0.3s;
    align-items: start;
}

.recent-post-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Post User */
.post-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 0.8rem;
    border: 3px solid var(--primary-color);
}

.user-info .username {
    display: block;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.user-info .username:hover {
    color: var(--primary-color);
}

.user-rank {
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    background: var(--light-color);
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.user-rank.expert {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.user-rank i {
    font-size: 0.7rem;
}

/* Post Main */
.post-main {
    flex: 1;
}

.post-topic {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-topic > a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
}

.post-topic > a:hover {
    color: var(--primary-color);
}

.topic-category {
    padding: 0.3rem 0.8rem;
    background: var(--light-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-category i {
    color: var(--primary-color);
}

.post-excerpt {
    margin-bottom: 1rem;
}

.post-excerpt p {
    color: #6b7280;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: #9ca3af;
}

.post-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.post-stats i {
    margin-right: 0.3rem;
    color: var(--primary-color);
}

/* Post Actions */
.post-actions {
    display: flex;
    align-items: center;
}

.action-link {
    padding: 0.8rem 1.2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.action-link:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateX(3px);
}

/* Load More */
.load-more {
    text-align: center;
    padding: 2rem 0;
}

.load-more .btn {
    padding: 1rem 2.5rem;
}

/* Active Categories */
.active-categories {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.active-cat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: var(--light-color);
    border-radius: 8px;
    transition: all 0.3s;
}

.active-cat:hover {
    background: var(--primary-color);
    color: white;
}

.active-cat:hover .cat-info a,
.active-cat:hover .cat-count {
    color: white;
}

.cat-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cat-info i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.active-cat:hover .cat-info i {
    color: white;
}

.cat-info a {
    font-weight: 500;
    color: var(--dark-color);
}

.cat-count {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
}

/* Active Users List */
.active-users-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.active-user-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.active-user-item:hover {
    background: var(--light-color);
}

.rank-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #e5a162);
    color: white;
}

.active-user-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details a {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.user-details span {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 1024px) {
    .recent-post-item {
        grid-template-columns: 120px 1fr;
        gap: 1rem;
    }
    
    .post-actions {
        grid-column: 2;
    }
}

@media (max-width: 768px) {
    .page-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-title i {
        font-size: 2rem;
    }
    
    .page-title h1 {
        font-size: 1.5rem;
    }
    
    .time-filter {
        width: 100%;
    }
    
    .time-btn {
        flex: 1;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .stats-bar {
        grid-template-columns: 1fr;
    }
    
    .recent-post-item {
        grid-template-columns: 1fr;
    }
    
    .post-user {
        flex-direction: row;
        text-align: left;
    }
    
    .user-avatar {
        width: 50px;
        height: 50px;
    }
    
    .post-actions {
        width: 100%;
    }
    
    .action-link {
        width: 100%;
        justify-content: center;
    }
}

