/* ==================== TOPS Y RANKINGS - ESTILO RETRO TARINGA ==================== */

/* ==================== HERO SECTION ==================== */
.tops-hero {
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    border-bottom: 2px solid #2196F3;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
}

.hero-title {
    font-size: 22px;
    font-weight: bold;
    color: #2C3E50;
    margin-bottom: 8px;
}

.hero-title .fa {
    color: #FFD700;
    margin-right: 10px;
    font-size: 24px;
}

.hero-subtitle {
    font-size: 12px;
    color: #7F8C8D;
}

/* ==================== TABS DE PERÍODO ==================== */
.tops-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    background: #F8F9FA;
    border: 1px solid #DDDDDD;
    padding: 5px;
}

.top-tab {
    flex: 1;
    padding: 10px 15px;
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    color: #2C3E50;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.1s;
}

.top-tab:hover {
    background: #F8F9FA;
    border-color: #2196F3;
}

.top-tab.active {
    background: #2196F3;
    border-color: #1976D2;
    color: white;
}

.top-tab .fa {
    margin-right: 6px;
}

/* ==================== CONTENEDOR DE TOPS ==================== */
.tops-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* ==================== SECTION HEADERS ==================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #F8F9FA;
    border: 1px solid #DDDDDD;
    border-bottom: 2px solid #2196F3;
    margin-bottom: 10px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #2C3E50;
    margin: 0;
}

.section-title .fa {
    color: #2196F3;
    margin-right: 8px;
}

.section-subtitle {
    font-size: 11px;
    color: #7F8C8D;
    font-weight: normal;
}

/* ==================== TOP POSTS ==================== */
.tops-section {
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    padding: 0;
}

.top-posts-list {
    padding: 10px;
}

.top-post-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    margin-bottom: 10px;
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    border-left: 3px solid #2196F3;
    cursor: pointer;
    transition: all 0.1s;
}

.top-post-item:hover {
    background: #F8F9FA;
    border-left-color: #FF9800;
}

/* Posición/Medalla */
.post-position {
    flex-shrink: 0;
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.position-number {
    font-size: 24px;
    font-weight: bold;
    color: #BDBDBD;
}

.position-medal {
    font-size: 32px;
}

/* Medallas especiales */
.top-post-item:nth-child(1) .position-number { color: #FFD700; }
.top-post-item:nth-child(2) .position-number { color: #C0C0C0; }
.top-post-item:nth-child(3) .position-number { color: #CD7F32; }

.medal-gold { color: #FFD700; }
.medal-silver { color: #C0C0C0; }
.medal-bronze { color: #CD7F32; }

/* Contenido del post */
.post-info {
    flex: 1;
    min-width: 0;
}

.post-category-small {
    display: inline-block;
    background: #2196F3;
    color: white;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.post-title-small {
    font-size: 14px;
    font-weight: bold;
    color: #2C3E50;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-author-small {
    font-size: 11px;
    color: #2196F3;
    margin-bottom: 6px;
}

.post-author-small .fa {
    margin-right: 4px;
}

.post-stats-small {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #757575;
}

.post-stats-small span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-stats-small .fa-star { color: #FF9800; }
.post-stats-small .fa-comment-o { color: #2196F3; }
.post-stats-small .fa-eye { color: #757575; }

/* ==================== RANKING DE USUARIOS ==================== */
.ranking-section {
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    padding: 0;
}

.ranking-filters {
    padding: 10px 15px;
    background: #F8F9FA;
    border-bottom: 1px solid #DDDDDD;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ranking-filters label {
    font-size: 11px;
    font-weight: bold;
    color: #2C3E50;
}

.ranking-filters label .fa {
    color: #2196F3;
    margin-right: 4px;
}

.filter-select {
    padding: 5px 8px;
    font-size: 11px;
    border: 1px solid #DDDDDD;
    background: #FFFFFF;
}

.filter-select:focus {
    outline: none;
    border-color: #2196F3;
}

.ranking-list {
    padding: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 8px;
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    transition: all 0.1s;
}

.ranking-item:hover {
    background: #F8F9FA;
    border-color: #2196F3;
}

/* Posición en ranking */
.ranking-position {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: #9E9E9E;
}

.ranking-item:nth-child(1) .ranking-position {
    background: linear-gradient(135deg, #FFD700, #FFA000);
}

.ranking-item:nth-child(2) .ranking-position {
    background: linear-gradient(135deg, #C0C0C0, #9E9E9E);
}

.ranking-item:nth-child(3) .ranking-position {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
}

/* Avatar */
.ranking-avatar {
    width: 40px;
    height: 40px;
    background: #2196F3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

/* Info del usuario */
.ranking-user-info {
    flex: 1;
    min-width: 0;
}

.ranking-username {
    font-size: 13px;
    font-weight: bold;
    color: #2C3E50;
    margin-bottom: 3px;
}

.ranking-user-rank {
    font-size: 10px;
    padding: 2px 6px;
    background: #E0E0E0;
    color: #616161;
    font-weight: bold;
    display: inline-block;
}

/* Puntos */
.ranking-points {
    flex-shrink: 0;
    text-align: right;
}

.points-value {
    font-size: 16px;
    font-weight: bold;
    color: #FF9800;
    display: flex;
    align-items: center;
    gap: 4px;
}

.points-value .fa {
    color: #FFD700;
}

.points-label {
    font-size: 10px;
    color: #757575;
}

/* ==================== ESTADÍSTICAS GLOBALES ==================== */
.stats-section {
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    padding: 20px;
    margin-bottom: 20px;
}

.stats-section .section-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #EEEEEE;
}

.stats-section .section-title .fa {
    color: #2196F3;
    margin-right: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card-big {
    background: #F8F9FA;
    border: 1px solid #DDDDDD;
    border-left: 3px solid #2196F3;
    padding: 20px;
    text-align: center;
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: #2196F3;
}

.stat-icon .fa {
    color: #2196F3;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #2C3E50;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: #7F8C8D;
    text-transform: uppercase;
    font-weight: bold;
}

/* Colores por tipo de stat */
.stat-card-big:nth-child(1) { border-left-color: #2196F3; }
.stat-card-big:nth-child(1) .stat-icon { color: #2196F3; }

.stat-card-big:nth-child(2) { border-left-color: #4CAF50; }
.stat-card-big:nth-child(2) .stat-icon { color: #4CAF50; }

.stat-card-big:nth-child(3) { border-left-color: #FF9800; }
.stat-card-big:nth-child(3) .stat-icon { color: #FF9800; }

.stat-card-big:nth-child(4) { border-left-color: #FFD700; }
.stat-card-big:nth-child(4) .stat-icon { color: #FFD700; }

/* ==================== LOADING ==================== */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #7F8C8D;
    font-size: 13px;
}

.loading .fa {
    margin-right: 8px;
    color: #2196F3;
    font-size: 18px;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7F8C8D;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-title {
    font-size: 18px;
    font-weight: bold;
    color: #2C3E50;
    margin-bottom: 10px;
}

.empty-message {
    font-size: 13px;
    color: #7F8C8D;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 968px) {
    .tops-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tops-tabs {
        flex-direction: column;
    }
    
    .top-tab {
        width: 100%;
    }
    
    .tops-hero {
        padding: 15px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .top-post-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .post-position {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }
    
    .ranking-item {
        gap: 8px;
    }
    
    .ranking-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .post-stats-small {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .ranking-position {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .ranking-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card-big {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 32px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}

/* ==================== ANIMACIONES ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-post-item,
.ranking-item,
.stat-card-big {
    animation: fadeInUp 0.3s ease-out;
}

/* ==================== BADGES Y EXTRAS ==================== */
.trending-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    background: #FF5722;
    color: white;
    font-size: 9px;
    font-weight: bold;
    margin-left: 6px;
}

.trending-badge .fa {
    font-size: 8px;
}

.new-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    background: #4CAF50;
    color: white;
    font-size: 9px;
    font-weight: bold;
}

/* ==================== PODIO VISUAL (OPCIONAL) ==================== */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    padding: 30px 20px;
    background: linear-gradient(to bottom, #F8F9FA 0%, #FFFFFF 100%);
    border: 1px solid #DDDDDD;
    margin-bottom: 20px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.podium-avatar {
    width: 60px;
    height: 60px;
    background: #2196F3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    border: 3px solid;
}

.podium-place:nth-child(2) .podium-avatar {
    width: 80px;
    height: 80px;
    border-color: #FFD700;
}

.podium-place:nth-child(1) .podium-avatar {
    border-color: #C0C0C0;
}

.podium-place:nth-child(3) .podium-avatar {
    border-color: #CD7F32;
}

.podium-base {
    width: 80px;
    background: #E0E0E0;
    padding: 10px;
    border: 1px solid #BDBDBD;
}

.podium-place:nth-child(2) .podium-base {
    width: 100px;
    height: 120px;
    background: linear-gradient(to bottom, #FFD700, #FFA000);
}

.podium-place:nth-child(1) .podium-base {
    height: 90px;
    background: linear-gradient(to bottom, #E0E0E0, #BDBDBD);
}

.podium-place:nth-child(3) .podium-base {
    height: 70px;
    background: linear-gradient(to bottom, #CD7F32, #A0522D);
}

.podium-number {
    font-size: 32px;
    font-weight: bold;
    color: white;
}

.podium-name {
    font-size: 11px;
    font-weight: bold;
    color: #2C3E50;
    margin-top: 8px;
}

.podium-points {
    font-size: 10px;
    color: #757575;
}